pytorch / pytorch/executorch

Return error when running method with non-planned, unset output tensor data

Open
#12,557 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: runtime module: user experience triaged
Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

🚀 The feature, motivation and pitch

When running a model with non-memory planned outputs, if the user doesn't set the output data pointer, the framework will still run the method and crash when trying to write to the null output tensor. It can be tricky for a user to debug this, as it crashes inside a kernel and in a non-recoverable fashion. We should ideally catch this case, log an error message, and return an error code.

Alternatives

No response

Additional context

No response

RFC (Optional)

No response

cc @larryliu0820 @JacobSzwejbka @lucylq @mergennachin @byjlw

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named in the issue. Start by tracing execution for non-memory-planned output tensors, then identify the existing error-reporting and return-code path. Done means an unset output pointer produces a logged error and recoverable error code instead of a kernel crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.