-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Move c10d to libtorch(_cuda) #59563
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
Move c10d to libtorch(_cuda) #59563
Conversation
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 160683d (more details on the Dr. CI page):
1 failure not recognized by patterns:
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Pull Request resolved: #59563 ghstack-source-id: 130932256 Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)!
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Pull Request resolved: #59563 ghstack-source-id: 131056993 Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)!
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Pull Request resolved: #59563 ghstack-source-id: 131064301 Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)!
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Pull Request resolved: #59563 ghstack-source-id: 131169543 Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)!
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Pull Request resolved: #59563 ghstack-source-id: 131181183 Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)!
tools/build_variables.bzl
Outdated
| libtorch_core_sources = sorted(core_sources_common + core_sources_full + core_trainer_sources) | ||
|
|
||
| libtorch_distributed_sources = [ | ||
| libtorch_distributed_windows_sources = [ |
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: Please consider renaming libtorch_distributed_windows_sources to libtorch_distribtued_base_sources, as there are nothing windows specific about them
| libtorch_distributed_windows_sources = [ | |
| libtorch_distributed_base_sources = [ |
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.
I called them windows because they're the only sources that are safe to build under Windows. I'll rename them to base as suggested, and add a comment to clarify why we need to separate them.
tools/build_variables.bzl
Outdated
| "torch/lib/c10d/Utils.cpp", | ||
| ] | ||
|
|
||
| libtorch_distributed_sources = libtorch_distributed_windows_sources + [ |
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.
If filelists are split into base and c10d source if we replace if();add();else();add();endif() into add(base);if();add(extra);endif();
| libtorch_distributed_sources = libtorch_distributed_windows_sources + [ | |
| libtorch_distributed_c10d_sources = [ |
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.
I don't want to use c10d in the name because after this change we'll be able to also move the RPC layer from libtorch_python to libtorch and its files would be added to this list as well. But I'm fine with calling it extra as suggested.
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.
How about libtorch_distributed_extra_sources
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.
Yes that's what I went with. I also left libtorch_distributed_sources defined as the union of base+extra, since it's handy internally. Hope this is fine?
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Pull Request resolved: #59563 ghstack-source-id: 131329887 Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)!
Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)! [ghstack-poisoned]
Pull Request resolved: #59563 ghstack-source-id: 131331264 Differential Revision: [D28932239](https://our.internmc.facebook.com/intern/diff/D28932239/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D28932239/)!
|
This pull request has been merged in a178043. |
Stack from ghstack:
Differential Revision: D28932239
NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!