Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
wants to merge 3 commits into from

Conversation

zou3519
Copy link
Contributor

@zou3519 zou3519 commented May 5, 2025

this forces inductor to force the inputs to be contiguous.

Test Plan:
- new test

[ghstack-poisoned]
@zou3519 zou3519 requested a review from ezyang as a code owner May 5, 2025 20:22
Copy link

pytorch-bot bot commented May 5, 2025

🔗 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.

✅ You can merge normally! (1 Unrelated Failure)

As of commit f3a59f0 with merge base fe36d7d (image):

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.

zou3519 added a commit that referenced this pull request May 5, 2025
this forces inductor to force the inputs to be contiguous.

Test Plan:
- new test

ghstack-source-id: 721c98a
Pull Request resolved: #152859
@zou3519 zou3519 requested review from eellison and removed request for ezyang May 5, 2025 20:23
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]
zou3519 added a commit that referenced this pull request May 6, 2025
this forces inductor to force the inputs to be contiguous.

Test Plan:
- new test

ghstack-source-id: 62132a5
Pull Request resolved: #152859
Copy link
Contributor

@eellison eellison left a 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

@@ -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
Copy link
Contributor

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.

Copy link
Contributor Author

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]
zou3519 added a commit that referenced this pull request May 6, 2025
this forces inductor to force the inputs to be contiguous.

Test Plan:
- new test

ghstack-source-id: 128a8d7
Pull Request resolved: #152859
@zou3519 zou3519 added the ciflow/trunk Trigger trunk jobs on your pull request label May 6, 2025
@eellison eellison added the topic: not user facing topic category label May 8, 2025
@eellison
Copy link
Contributor

eellison commented May 8, 2025

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 1 checks: pull / unstable-linux-focal-cuda12.6-py3.10-gcc11-sm89-xfail / build

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants