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

Open
wants to merge 3 commits into
base: gh/zou3519/1171/base
Choose a base branch
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.

❌ 1 New Failure, 1 Unrelated Failure

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

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.

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

github-actions bot commented May 5, 2025

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request module: inductor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants