-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Enable fused foreach Adam compilation #104121
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/104121
Note: Links to docs will display an error until the docs builds have been completed. ✅ 1 Unrelated FailureAs of commit 1cb8777: BROKEN TRUNK - The following job failed but were present on the merge base 803c144:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Currently getting NaNs so I'm investigating that, but wanted to get feedback on the optim changes |
Fixed by #104137 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using self.compiled and introducing a new "internal-only" flag, which...meh, not good engineering, we can just overload self.capturable. So dynamo can just set capturable to True when compiling.
Then, we're guaranteed that step will follow to the right device. e.g., rn one would need to update line 432 in optimizer.py to check the flag so step could be loaded correctly.
c6c4fe0
to
6f192d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a deeper dive of the changes. I think we should clarify what users should expect when they torch compile vs capturable vs both. I had previously thought of torch.compile be an overriding of capturable…but is there a space where the eager capturable will vary from torch compiled step?
Co-authored-by: Jane (Yuan) Xu <31798555+janeyx99@users.noreply.github.com>
Co-authored-by: Jane (Yuan) Xu <31798555+janeyx99@users.noreply.github.com>
Co-authored-by: Jane (Yuan) Xu <31798555+janeyx99@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 ⭐️
@pytorchbot merge |
Merge startedYour 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 |
Merge failedReason: 1 jobs have failed, first few of them are: inductor / cuda11.8-py3.10-gcc7-sm86 / test (inductor_torchbench, 1, 1, linux.g5.4xlarge.nvidia.gpu) Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge -f "Failures on trunk" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
I think this is responsible for a 50s increase in TIMM dynamic shapes compilation time 131s → 180s |
as title for reference: this is a followup to #104121 Pull Request resolved: #104888 Approved by: https://github.com/janeyx99
Fixes #104713 ### Testing Manual testing locally using #104121 and confirm that the correct merge base commit is returned [803c144](https://github.com/pytorch/pytorch/commits/1cb87771c1efef32df7009d75bed08249df8ecad) instead of the wrong value provided by `baseRefOid` (de7b6e5). Here is the JSON output of the GraphQL query for PR info https://paste.sh/TJ-QQWz4#fvE3Y6qoJ8vDkRBZ3vowkZ3m Pull Request resolved: #105098 Approved by: https://github.com/malfet
Fixes #ISSUE_NUMBER
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @ngimel @yf225 @chenyang78 @kadeng @anijain2305