-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We need a good way to log Tensor shapes in portable ops' error messages #7902
Labels
module: user experience
Issues related to reducing friction for users
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Milestone
Comments
This was referenced Jan 24, 2025
I just found sizes_to_string, used in one place: https://github.com/search?q=repo%3Apytorch%2Fexecutorch%20sizes_to_string&type=code |
swolchok
added a commit
that referenced
this issue
Feb 7, 2025
This is the motivating example for #7902. Test Plan: Injected failure to new broadcast_test and saw shapes in error message.
Closing because we now have a good way. Systematically fixing error messages seems covered by #8273 |
swolchok
added a commit
that referenced
this issue
Feb 12, 2025
Thank you @swolchok -- this is a good user experience improvement! |
swolchok
added a commit
that referenced
this issue
Feb 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
module: user experience
Issues related to reducing friction for users
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
🚀 The feature, motivation and pitch
Currently, when we complain about tensors' shapes, we don't include them in the log message because it's not obvious or convenient how to do this. I think we can write a shape_to_string function that uses an extremely finite amount of stack space (
kTensorDimensionLimit
* 4 digits per dim + commas, spaces, and parentheses) and use that to do this logging. (@dbort , how big an array can I put on the stack on a prototypical embedded system these days, and/or do you have any other ideas for how to do this?)Alternatives
No response
Additional context
Motivating example: #7748 (comment)
RFC (Optional)
No response
cc @mergennachin @byjlw
The text was updated successfully, but these errors were encountered: