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
Don't run fallback if symbolic sizes in fake tensor #97148
Conversation
Signed-off-by: Edward Z. Yang <ezyang@meta.com> [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/97148
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 026d4c4: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Signed-off-by: Edward Z. Yang <ezyangmeta.com> ghstack-source-id: 06d7c4f51b4c1d536ee7621089f2feb7368a3e96 Pull Request resolved: #97148
@pytorchbot merge |
Merge failedReason: This PR needs a label If not, please add the For more information, see Details for Dev Infra teamRaised by workflow job |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side note: I wonder if we should avoid the entire try + except and fallback if we see an operator that's not part ATen (aka all custom ops)
There was at least one example github issue of torch.compile failing with an awful error, because we tried to plumb fake tensors and the custom op wasn't written in a way to handle them.
I would probably take the hit of having some custom ops stop working automatically (with a loud error saying they need a meta function impl, and some docs on how to add one), over some custom ops silently giving bad error messages / segfaults.
@pytorchbot merge |
Yes, our coverage is good enough that I will support removing the fallback entirely. @eellison WDYT |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
I'm not in favor of that because of all the custom operators that don't have meta funcs. IMO the IMA zeros case is much, much less frequent. |
But IMA zeros is much, much worse, whereas missing coverage is kind of meh and kind of easy to fix. |
Signed-off-by: Edward Z. Yang <ezyang@meta.com> Pull Request resolved: pytorch/pytorch#97148 Approved by: https://github.com/Skylion007, https://github.com/eellison, https://github.com/bdhirsh
Signed-off-by: Edward Z. Yang <ezyang@meta.com> Pull Request resolved: pytorch/pytorch#97148 Approved by: https://github.com/Skylion007, https://github.com/eellison, https://github.com/bdhirsh
Stack from ghstack (oldest at bottom):
Signed-off-by: Edward Z. Yang ezyang@meta.com