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
Enable fused optimizer for DP #98270
Conversation
Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)! [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/98270
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 6a114e6: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)! ghstack-source-id: 184956702 Pull Request resolved: #98270
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.
LGTM. There is one real lint error.
@@ -1464,9 +1464,9 @@ void Reducer::finalize_bucket_dense(Bucket& bucket) { | |||
} | |||
|
|||
if (!gradient_as_bucket_view_) { | |||
if (set_grads_to_none_) { | |||
if (optim_in_backward_) { | |||
// Return early has optimizer has already run. |
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.
nit: Maybe typo?
// Return early has optimizer has already run. | |
// Return early since optimizer has already run. |
if (set_grads_to_none_) { | ||
grad.reset(); | ||
if (optim_in_backward_) { | ||
// Return early has optimizer has already run. |
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.
Same as above: maybe typo?
Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)! [ghstack-poisoned]
Pull Request resolved: #98270 Enable DDP optimizer overlap for HPC 10x CMF, providing ~7% QPS gain. ghstack-source-id: 185743906 Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)!
Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)! [ghstack-poisoned]
Pull Request resolved: #98270 Enable DDP optimizer overlap for HPC 10x CMF, providing ~7% QPS gain. ghstack-source-id: 185745827 Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)!
Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)! [ghstack-poisoned]
Pull Request resolved: #98270 Enable DDP optimizer overlap for HPC 10x CMF, providing ~7% QPS gain. ghstack-source-id: 185811936 Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)!
Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)! [ghstack-poisoned]
Pull Request resolved: #98270 Enable DDP optimizer overlap for HPC 10x CMF, providing ~7% QPS gain. ghstack-source-id: 185866613 Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)!
Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)! [ghstack-poisoned]
Pull Request resolved: #98270 Enable DDP optimizer overlap for HPC 10x CMF, providing ~7% QPS gain. ghstack-source-id: 185879423 Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)!
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
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 |
Differential Revision: [D42714482](https://our.internmc.facebook.com/intern/diff/D42714482/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D42714482/)! Pull Request resolved: #98270 Approved by: https://github.com/awgu
Stack from ghstack (oldest at bottom):
Differential Revision: D42714482
NOTE FOR REVIEWERS: This PR has internal Meta-specific changes or comments, please review them on Phabricator!