pytorch / pytorch/executorch

[Request impl] Gracefully error out in ETDump

Open
#9,971 2 comments 1 reaction 1 assignee View on GitHub

Nobody has claimed this yet.

good first issue module: devtools triaged
Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

Context and Target:

In the etdump_flatcc.cpp file, there are instances where the class may directly raise an error and shut down the system when encountering issues. An example can be found here.
The preferred approach is to handle these errors gracefully by returning an error code to the user, allowing them to decide how to address the issue.

TODO:
  • Modify the code to return an error code to the user instead of crashing the system when an error occurs.
    If applicable, use the ET_CHECK_OR_RETURN_ERROR macro, as seen here.
    Alternatively, manually return an error code, as demonstrated here, if there's extra work like free need to be done.

  • Update the return type of the function as necessary and ensure corresponding tests are updated.

Consider breaking this task into two or three pull requests for better structure and clarity.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.