-
Notifications
You must be signed in to change notification settings - Fork 722
Closed
Labels
actionableItems in the backlog waiting for an appropriate impl/fixItems in the backlog waiting for an appropriate impl/fixgood first issueGood for newcomersGood for newcomersmodule: runtimeIssues related to the core runtime and code under runtime/Issues related to the core runtime and code under runtime/triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🚀 The feature, motivation and pitch
Currently, when a module is provided with input of a wrong type (ex. long instead of integer), an error is raised with a message like below:
The 0-th input tensor's scalartype does not meet requirement: found 3 but expected 4
It is not immediately obvious that 3 corresponds to Int and 4 corresponds to Long. This lack of clarity can cause confusion
Possible solutions
- Replace numbers with string representations. For example by defining a function with a switch condition for every enum value. I see that this may become a maintainance disaster, but there are better options too like
boost/preprocessorusage in this stack overflow answer. - Just provide a link to the file containing the
ScalarTypeclass (as far as I can see the link is: https://github.com/pytorch/pytorch/blob/main/torchgen/executorch/model.py)
While this is a small improvement, I believe it would make the error message more clear and helpful
Thank you for executorch :)
Alternatives
No response
Additional context
No response
RFC (Optional)
No response
Metadata
Metadata
Assignees
Labels
actionableItems in the backlog waiting for an appropriate impl/fixItems in the backlog waiting for an appropriate impl/fixgood first issueGood for newcomersGood for newcomersmodule: runtimeIssues related to the core runtime and code under runtime/Issues related to the core runtime and code under runtime/triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module