KEMBAR78
Add error check for out variant of tensordot function with requries_grad tensor by cz2h · Pull Request #150270 · pytorch/pytorch · GitHub
Skip to content

Conversation

cz2h
Copy link
Contributor

@cz2h cz2h commented Mar 30, 2025

Fixes #147846. Previously there is no error out under out variant oftensordot while requires_grad=True. This can cause potential issue when out tensor is part of a computation graph.

Enforces the out variant of tensordot to run without setting requries_grad=True. Change same to #117067

cc @ezyang @gchanan

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 30, 2025

🔗 Helpful Links

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

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

❌ 5 New Failures

As of commit 61f7165 with merge base 732f9d7 (image):

NEW FAILURES - The following jobs have failed:

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

@pytorch-bot pytorch-bot bot added the release notes: linalg_frontend release notes category label Mar 30, 2025
@lezcano lezcano requested a review from soulitzer March 31, 2025 07:46
@zou3519 zou3519 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Apr 2, 2025
@soulitzer soulitzer added module: bc-breaking Related to a BC-breaking change release notes: autograd release notes category labels Apr 3, 2025
@pytorch-bot pytorch-bot bot added the topic: bc breaking topic category label Apr 3, 2025
@cz2h cz2h requested a review from soulitzer April 6, 2025 01:01
@cz2h cz2h requested a review from soulitzer April 8, 2025 00:29
Copy link
Contributor

@soulitzer soulitzer left a comment

Choose a reason for hiding this comment

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

Thanks!

@soulitzer
Copy link
Contributor

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Apr 10, 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

@pytorch-bot pytorch-bot bot removed the ciflow/trunk Trigger trunk jobs on your pull request label Apr 11, 2025
@cz2h
Copy link
Contributor Author

cz2h commented Apr 11, 2025

Hi @soulitzer, thanks for the help, can you help trigger the CI again please?

The test case failure is specific to CUDA tensor and should be fixed now. For the build issues, I am not sure why they are there.

@soulitzer
Copy link
Contributor

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Apr 11, 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

@cz2h
Copy link
Contributor Author

cz2h commented Apr 14, 2025

Hi @zou3519 ,@soulitzer the build failure seems unrelated to my change. Do we have a workaround to pass the Ci? Thanks in advance.

Cc
@lezcano @nikitaved @IvanYashchuk

@soulitzer
Copy link
Contributor

@pytorchbot merge -i

@soulitzer
Copy link
Contributor

@cz2h Yes, it is possible to merge with the ignore option to ignore failures that are unrelated

@pytorchmergebot
Copy link
Collaborator

@cz2h
Copy link
Contributor Author

cz2h commented Apr 14, 2025

@cz2h Yes, it is possible to merge with the ignore option to ignore failures that are unrelated

Thank you, appreciate it :)

timocafe pushed a commit to timocafe/pytorch that referenced this pull request Apr 16, 2025
…rad tensor (pytorch#150270)

Fixes pytorch#147846. Previously there is no error out under out variant of`tensordot` while `requires_grad=True`. This can cause potential issue when out tensor is part of a computation graph.

Enforces the out variant of tensordot to run without setting `requries_grad=True`. Change same to pytorch#117067

Pull Request resolved: pytorch#150270
Approved by: https://github.com/soulitzer
amathewc pushed a commit to amathewc/pytorch that referenced this pull request Apr 17, 2025
…rad tensor (pytorch#150270)

Fixes pytorch#147846. Previously there is no error out under out variant of`tensordot` while `requires_grad=True`. This can cause potential issue when out tensor is part of a computation graph.

Enforces the out variant of tensordot to run without setting `requries_grad=True`. Change same to pytorch#117067

Pull Request resolved: pytorch#150270
Approved by: https://github.com/soulitzer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged module: bc-breaking Related to a BC-breaking change open source release notes: autograd release notes category release notes: linalg_frontend release notes category topic: bc breaking topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RuntimeError not raised for out= argument in torch.tensordot with requires_grad tensors

5 participants