-
Notifications
You must be signed in to change notification settings - Fork 24.1k
Add torch._C.Tag.needs_contiguous_strides #152859
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/zou3519/1171/base
Are you sure you want to change the base?
Conversation
this forces inductor to force the inputs to be contiguous. Test Plan: - new test [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/152859
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Unrelated FailureAs of commit f3a59f0 with merge base fe36d7d ( NEW FAILURE - The following job has failed:
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
|
this forces inductor to force the inputs to be contiguous. Test Plan: - new test cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
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.
Needs one small change until we land other pr
torch/_inductor/lowering.py
Outdated
@@ -164,6 +164,8 @@ def maybe_layout_constraints(fn: Callable[..., Any]) -> Optional[Callable[..., A | |||
def tag_to_layout_constraint(tag): | |||
if tag == torch._C.Tag.needs_exact_strides: | |||
return constrain_to_fake_tensors | |||
if tag == torch._C.Tag.needs_contiguous_strides: | |||
return require_contiguous |
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.
Can we construct the strides manually ? I had a pr to fix this but it was blocked by mkldnn tests. @CaoE has a pr to update #148424. cc @CaoE @leslie-fang-intel we really need to land that.
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.
What do you mean by "Can we construct the strides manually ?"?
this forces inductor to force the inputs to be contiguous. Test Plan: - new test cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov [ghstack-poisoned]
Stack from ghstack (oldest at bottom):
this forces inductor to force the inputs to be contiguous.
Test Plan:
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov