Skip to content

Conversation

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 11, 2025

🔗 Helpful Links

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

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 ac1971a with merge base 1d138e6 (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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

ydwu4 added a commit that referenced this pull request Sep 11, 2025
ghstack-source-id: 52e219c
Pull Request resolved: #162754

cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx chenyang78 kadeng chauhang amjames Lucaskabela

[ghstack-poisoned]
ydwu4 added a commit that referenced this pull request Sep 12, 2025
ghstack-source-id: fad13e0
Pull Request resolved: #162754

cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx chenyang78 kadeng chauhang amjames Lucaskabela

[ghstack-poisoned]
ydwu4 added a commit that referenced this pull request Sep 12, 2025
ghstack-source-id: 2f64634
Pull Request resolved: #162754

cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx chenyang78 kadeng chauhang amjames Lucaskabela

[ghstack-poisoned]
ydwu4 added a commit that referenced this pull request Sep 12, 2025
ghstack-source-id: 2935707
Pull Request resolved: #162754

cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx chenyang78 kadeng chauhang amjames Lucaskabela

[ghstack-poisoned]
ydwu4 added a commit that referenced this pull request Sep 12, 2025
ghstack-source-id: edbb9f0
Pull Request resolved: #162754

cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx chenyang78 kadeng chauhang amjames Lucaskabela

[ghstack-poisoned]
ydwu4 added a commit that referenced this pull request Sep 12, 2025
ghstack-source-id: 4d07123
Pull Request resolved: #162754

cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx chenyang78 kadeng chauhang amjames Lucaskabela

[ghstack-poisoned]
ydwu4 added a commit that referenced this pull request Sep 12, 2025
ghstack-source-id: 193c74b
Pull Request resolved: #162754
Comment on lines +1554 to +1555
and "ac_graph_id" in user.meta
and "ac_graph_id" in node.meta
Copy link
Contributor

Choose a reason for hiding this comment

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

what's this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We didn't go through aot_autograd so these two metas are not set. The prior logic only works when this meta exists.

@@ -0,0 +1,362 @@
import logging
from typing import Any, Callable, Union

Copy link
Contributor

@zou3519 zou3519 Sep 19, 2025

Choose a reason for hiding this comment

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

Do you have any tests? Are there no expecttests for scan forward+backward that need to be updated as a result of this change? if not we should add a test that demonstrates the partitioning is actually happening

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I can add some tests guarding this.

Comment on lines +770 to +771
# TODO: torch.flip copies the tensor, we should optimize it away
[torch.flip(x, (0,)) for x in pytree.tree_flatten(bw_xs)[0]],
Copy link
Contributor

Choose a reason for hiding this comment

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

how are you thinking of optimizing it away?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could pass the reverse keyword all the way to inductor and do a reversed traverse there.


cc ezyang SherlockNoMad EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx chenyang78 kadeng chauhang amjames Lucaskabela

[ghstack-poisoned]
ydwu4 added a commit that referenced this pull request Sep 26, 2025
ghstack-source-id: 61d5e36
Pull Request resolved: #162754

cc ezyang EikanWang jgong5 wenzhe-nrv voznesenskym penguinwu Guobing-Chen XiaobingSuper zhuhaozhe blzheng jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben Lucaskabela SherlockNoMad

[ghstack-poisoned]
ydwu4 added a commit that referenced this pull request Sep 27, 2025
ghstack-source-id: 1816435
Pull Request resolved: #162754
@ydwu4 ydwu4 added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 27, 2025
@ydwu4
Copy link
Contributor Author

ydwu4 commented Sep 27, 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

jainapurva pushed a commit that referenced this pull request Sep 29, 2025
maggiemoss pushed a commit to maggiemoss/pytorch that referenced this pull request Sep 29, 2025
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.

4 participants