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
Hard code known true contiguity settings for unbacked SymInts #95003
Conversation
Extracted from #94523 which has E2E test Signed-off-by: Edward Z. Yang <ezyang@meta.com> [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/95003
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 99e25b2: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@@ -1212,6 +1212,27 @@ void TensorImpl::empty_tensor_restride_symint(MemoryFormat memory_format) { | |||
// recompute contiguous flag, as currently NHWC/NCHW flags are not mutually | |||
// exclusive see #24090 | |||
refresh_contiguous(); | |||
// hard code some known true settings, for unbacked case | |||
// TODO: avoid chundering into the guards for computing these | |||
switch (memory_format) { |
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.
if you don't set true, do they default false?
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.
no, they would be set to some complicated expression from the guard-less bool implementation that would evaluate to true (often, sympy cannot figure it out though)
…nts" Extracted from #94523 which has E2E test Signed-off-by: Edward Z. Yang <ezyangmeta.com> [ghstack-poisoned]
@pytorchbot merge |
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#95003)" This reverts commit d9950c5.
…h#95003) Extracted from pytorch#94523 which has E2E test Signed-off-by: Edward Z. Yang <ezyang@meta.com> Pull Request resolved: pytorch#95003 Approved by: https://github.com/voznesenskym, https://github.com/ngimel
Stack from ghstack (oldest at bottom):
Extracted from #94523 which has E2E test
Signed-off-by: Edward Z. Yang ezyang@meta.com