-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Reland "Trigger specialization when you call size()/stride() from C++ (#111935)" #112605
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/112605
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7c2a287 with merge base 84f59d8 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@ezyang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@@ -635,7 +635,9 @@ bool TensorImpl::is_non_overlapping_and_dense_custom() const { | |||
} | |||
|
|||
IntArrayRef TensorImpl::sizes_custom() const { | |||
if (C10_UNLIKELY(matches_python_custom(SizesStridesPolicy::CustomSizes))) { | |||
if (C10_UNLIKELY( |
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.
I think one consequence of this is that wrapper tensor subclasses during tracing (like DTensor) will see calls to ‘aten.size’ in their torch_dispatch, and need to handle it properly
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.
only if there are symbolic shapes!
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
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 |
…pytorch#111935)" (pytorch#112605) This reverts commit 22221c6. Differential Revision: [D50886564](https://our.internmc.facebook.com/intern/diff/D50886564) Pull Request resolved: pytorch#112605 Approved by: https://github.com/voznesenskym
…pytorch#111935)" (pytorch#112605) This reverts commit 22221c6. Differential Revision: [D50886564](https://our.internmc.facebook.com/intern/diff/D50886564) Pull Request resolved: pytorch#112605 Approved by: https://github.com/voznesenskym
Stack from ghstack (oldest at bottom):
This reverts commit 22221c6.
Differential Revision: D50886564