Skip to content

[inductor] propagate shapes in CSEVariable#152198

Closed
isuruf wants to merge 21 commits intogh/isuruf/141/basefrom
gh/isuruf/141/head
Closed

[inductor] propagate shapes in CSEVariable#152198
isuruf wants to merge 21 commits intogh/isuruf/141/basefrom
gh/isuruf/141/head

Conversation

@isuruf
Copy link
Collaborator

@isuruf isuruf commented Apr 25, 2025

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Apr 25, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/152198

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 1 Pending

As of commit 006a0e1 with merge base 1795116 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

[ghstack-poisoned]
isuruf added a commit that referenced this pull request Apr 25, 2025
ghstack-source-id: f2aa06b
Pull Request resolved: #152198
Copy link
Collaborator

@rec rec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, quick unsolicited review while waiting for something else, feel free to ignore!

🙂

write: bool = True,
assignment: bool = True,
dtype: Optional[torch.dtype] = None,
shape: Optional[ShapeType] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it have to be Optional here, either? Couldn't the default be ()?

It makes the code simpler if you're not always checking for None.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

() means the variable is a scalar. None means we don't know.

[ghstack-poisoned]
isuruf added a commit that referenced this pull request May 2, 2025
ghstack-source-id: 540faf4
Pull Request resolved: #152198
[ghstack-poisoned]
isuruf added a commit that referenced this pull request May 2, 2025
ghstack-source-id: 617d336
Pull Request resolved: #152198
[ghstack-poisoned]
[ghstack-poisoned]
isuruf added a commit that referenced this pull request May 6, 2025
ghstack-source-id: 93c674e
Pull Request resolved: #152198
[ghstack-poisoned]
isuruf added a commit that referenced this pull request Jun 6, 2025
ghstack-source-id: 9d6d2eb
Pull Request resolved: #152198
[ghstack-poisoned]
isuruf added a commit that referenced this pull request Jun 9, 2025
ghstack-source-id: a0c4ca6
Pull Request resolved: #152198
@isuruf isuruf added the topic: not user facing topic category label Jun 9, 2025
[ghstack-poisoned]
[ghstack-poisoned]
isuruf added a commit that referenced this pull request Aug 11, 2025
ghstack-source-id: 5dcbe75
Pull Request resolved: #152198
@eellison
Copy link
Contributor

Possible to land this soon ?

@isuruf
Copy link
Collaborator Author

isuruf commented Aug 18, 2025

Yes, let's land this soon. The only holdover is your comment

The one comment that I think should definitely be addressed is to not use this in codegen since it is not 100% comprehensive/needs testing.

Do you mean removing the changes in torch/_inductor/codegen/triton.py?

@eellison
Copy link
Contributor

Per your comment

This doesn't change codegen, just adds a new function that returns the shape as well as reduction_resize codegen.

we're not actually changing codegen yet.

@isuruf
Copy link
Collaborator Author

isuruf commented Aug 18, 2025

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 18, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 jobs have failed, first few of them are: trunk / macos-py3-arm64 / test (default, 2, 3, macos-m1-stable), trunk / macos-py3-arm64 / test (mps, 1, 1, macos-m1-14)

Details for Dev Infra team Raised by workflow job

[ghstack-poisoned]
isuruf added a commit that referenced this pull request Aug 18, 2025
ghstack-source-id: d106d58
Pull Request resolved: #152198
[ghstack-poisoned]
isuruf added a commit that referenced this pull request Aug 19, 2025
ghstack-source-id: 1a28643
Pull Request resolved: #152198
[ghstack-poisoned]
isuruf added a commit that referenced this pull request Aug 19, 2025
ghstack-source-id: 1bbf213
Pull Request resolved: #152198
@isuruf
Copy link
Collaborator Author

isuruf commented Aug 19, 2025

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

jagadish-amd added a commit to jagadish-amd/pytorch that referenced this pull request Aug 21, 2025
torch._inductor.virtualized.OpsValue objects instance
does not have shape attribute. This breaks the fp8 test
on ROCm. Add the OpsValue class in todo list.

Signed-off-by: Jagadish Krishnamoorthy <jagadish.krishnamoorthy@amd.com>
@jeffdaily
Copy link
Collaborator

@isuruf FYI this PR needed a forward fix for ROCm MI300 tests. See #161166.

pytorchmergebot pushed a commit that referenced this pull request Aug 21, 2025
torch._inductor.virtualized.OpsValue objects instance does not have shape attribute. This breaks the fp8 test on ROCm. Add the OpsValue class in todo list.

Pull Request resolved: #161166
Approved by: https://github.com/jeffdaily
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
torch._inductor.virtualized.OpsValue objects instance does not have shape attribute. This breaks the fp8 test on ROCm. Add the OpsValue class in todo list.

Pull Request resolved: pytorch#161166
Approved by: https://github.com/jeffdaily
@github-actions github-actions bot deleted the gh/isuruf/141/head branch September 21, 2025 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants