Skip to content
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

[activation checkpointing] Tagging based min cut partitioner #103357

Closed
wants to merge 13 commits into from

Conversation

@pytorch-bot
Copy link

pytorch-bot bot commented Jun 9, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit 0389cb4:
💚 Looks good so far! There are no failures yet. 💚

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

anijain2305 added a commit that referenced this pull request Jun 9, 2023
ghstack-source-id: 7460f23e423c619aa2ffe8ccab9978e079d8b774
Pull Request resolved: #103357
anijain2305 added a commit that referenced this pull request Jun 10, 2023
ghstack-source-id: 6fde7c1ac9b9c62a01de3365b9bb7642e5960b6d
Pull Request resolved: #103357
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
anijain2305 added a commit that referenced this pull request Jun 10, 2023
ghstack-source-id: 2f5a570a37920788eb54ce4fe5bad7e7aaabe4ba
Pull Request resolved: #103357
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
anijain2305 added a commit that referenced this pull request Jun 10, 2023
ghstack-source-id: de40da68dd7d58a37196a87da22cbe53d17dd3f0
Pull Request resolved: #103357
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
anijain2305 added a commit that referenced this pull request Jun 10, 2023
ghstack-source-id: 1ba53e37a1b1e75961b9e1e33d7039a3131dd92c
Pull Request resolved: #103357
@anijain2305 anijain2305 requested a review from Chillee June 10, 2023 06:10
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
anijain2305 added a commit that referenced this pull request Jun 10, 2023
ghstack-source-id: f12499283b88fc044d7fc066c3393c4d5f290984
Pull Request resolved: #103357
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
anijain2305 added a commit that referenced this pull request Jun 10, 2023
ghstack-source-id: deeea3f322e7cf77214da6c684dbe034334c63eb
Pull Request resolved: #103357
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
anijain2305 added a commit that referenced this pull request Jun 10, 2023
ghstack-source-id: 1865b1a06ba776793c28860d8c139b0ab993a804
Pull Request resolved: #103357
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
@anijain2305 anijain2305 changed the title Tagging based min cut partitioner [activation checkpointing] Tagging based min cut partitioner Jun 10, 2023
@anijain2305 anijain2305 requested a review from jansel June 10, 2023 19:47
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
@anijain2305
Copy link
Contributor Author

anijain2305 commented Jun 13, 2023

@jansel This is ready for review. @Chillee reviewed this PR w/ me in my 1:1 and I have incorporated all his comments. His comments were - Avoid changing the existing code as much as possible, so that removing it later, if we need to, is easy.

@@ -26,6 +26,21 @@ def is_symint_node(node):
assert hasattr(node, 'meta'), "All nodes traced with proxy_tensor should have meta"
return "val" in node.meta and isinstance(node.meta['val'], torch.SymInt)

def must_recompute(node):
return "recompute" in node.meta and node.meta["recompute"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return "recompute" in node.meta and node.meta["recompute"]
return node.meta.get("recompute", False)

for output in output_node.args[0]:
if isinstance(output, torch.fx.node.Node):
if output not in env:
print("output gradient dependent only on fwd", output)
Copy link
Contributor

Choose a reason for hiding this comment

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

print

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy aakhundov

[ghstack-poisoned]
@anijain2305
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 14, 2023
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 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.

Details for Dev Infra team Raised by workflow job

@anijain2305
Copy link
Contributor Author

@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

@facebook-github-bot facebook-github-bot deleted the gh/anijain2305/53/head branch June 18, 2023 14:16
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: dynamo topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants