-
Notifications
You must be signed in to change notification settings - Fork 24.2k
[DRAFT][Reshape] Guard-free reshape for contiguous tensors to avoid data dependent errors. #148742
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
base: gh/laithsakka/114/base
Are you sure you want to change the base?
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/148742
Note: Links to docs will display an error until the docs builds have been completed. ❌ 10 New Failures, 4 Unrelated FailuresAs of commit 8bb976d with merge base d363913 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
[ghstack-poisoned]
Main reason for refactor is to avoid data dependent error that the default path have. this is because this new path have no checks on sizes [ghstack-poisoned]
Main reason for refactor is to avoid data dependent error that the default path have. this is because this new path have no checks on sizes [ghstack-poisoned]
Main reason for refactor is to avoid data dependent error that the default path have. this is because this new path have no checks on sizes [ghstack-poisoned]
return prims.view_of(a) | ||
|
||
strides = [1] | ||
for x in reversed(shape[1:]): |
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.
should this be shape[:-1]?
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.
haha maybe i am new ish to python no fancy slicing in c++.
I will try it
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.
you mean why not
[1:][::-1]
I want to remove first element the reverse
Main reason for refactor is to avoid data dependent error that the default path have. this is because this new path have no checks on sizes [ghstack-poisoned]
Main reason for refactor is to avoid data dependent error that the default path have this is because this new path have no checks on sizes. Does this deviate from previous behaviors/or from torch eager? specially when it comes to strides? I need to dig deep on this, I do not have a clear answer. There was in situation where this used to diverge from previous behavior when we reshape the input to itself but i addressed that. In general we have three choices here: 1. use the new logic only for unbacked. 2. use it for all compile 3. use it for eager and compile I do not want to spend time fixing the failing tests if we are going to go with (1) or if the idea is not accepted thats why i would like to have this discussed first. the failures does seems not risky (change expected string or runtime assert ..etc) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
… to avoid data dependent errors." Main reason for refactor is to avoid data dependent error that the default path have this is because this new path have no checks on sizes. Does this deviate from previous behaviors/or from torch eager? specially when it comes to strides? I need to dig deep on this, I do not have a clear answer. There was in situation where this used to diverge from previous behavior when we reshape the input to itself but i addressed that. In general we have three choices here: 1. use the new logic only for unbacked. 2. use it for all compile 3. use it for eager and compile I do not want to spend time fixing the failing tests if we are going to go with (1) or if the idea is not accepted thats why i would like to have this discussed first. the failures does seems not risky (change expected string or runtime assert ..etc) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
… to avoid data dependent errors." Main reason for refactor is to avoid data dependent error that the default path have this is because this new path have no checks on sizes. Does this deviate from previous behaviors/or from torch eager? specially when it comes to strides? I need to dig deep on this, I do not have a clear answer. There was in situation where this used to diverge from previous behavior when we reshape the input to itself but i addressed that. In general we have three choices here: 1. use the new logic only for unbacked. 2. use it for all compile 3. use it for eager and compile I do not want to spend time fixing the failing tests if we are going to go with (1) or if the idea is not accepted thats why i would like to have this discussed first. the failures does seems not risky (change expected string or runtime assert ..etc) cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
ghstack-source-id: e8baa07 Pull Request resolved: pytorch/pytorch#148742
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Stack from ghstack (oldest at bottom):
Main reason for refactor is to avoid data dependent error that the default path have
this is because this new path have no checks on sizes.
Does this deviate from previous behaviors/or from torch eager? specially when it comes to strides?
I need to dig deep on this, I do not have a clear answer. There was in situation where this used to diverge
from previous behavior when we reshape the input to itself but i addressed that.
In general we have three choices here:
I do not want to spend time fixing the failing tests if we are going to go with (1) or if the idea is not accepted
thats why i would like to have this discussed first. the failures does seems not risky (change expected string or runtime assert ..etc)
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames