KEMBAR78
Move c10d to libtorch(_cuda) by lw · Pull Request #59563 · pytorch/pytorch · GitHub
Skip to content

Conversation

@lw
Copy link
Contributor

@lw lw commented Jun 7, 2021

Stack from ghstack:

Differential Revision: D28932239

NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!

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]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jun 7, 2021

💊 CI failures summary and remediations

As of commit 160683d (more details on the Dr. CI page):


  • 2/2 failures possibly* introduced in this PR
    • 1/2 non-scanned failure(s)

1 failure not recognized by patterns:

Job Step Action
CircleCI Build Error Config Processing Error (Don't rerun) 🔁 rerun

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.

Click here to manually regenerate this comment.

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]
lw added a commit that referenced this pull request Jun 9, 2021
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]
lw added a commit that referenced this pull request Jun 10, 2021
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]
lw added a commit that referenced this pull request Jun 10, 2021
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]
lw added a commit that referenced this pull request Jun 11, 2021
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]
lw added a commit that referenced this pull request Jun 11, 2021
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/)!
libtorch_core_sources = sorted(core_sources_common + core_sources_full + core_trainer_sources)

libtorch_distributed_sources = [
libtorch_distributed_windows_sources = [
Copy link
Contributor

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

Suggested change
libtorch_distributed_windows_sources = [
libtorch_distributed_base_sources = [

Copy link
Contributor Author

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.

"torch/lib/c10d/Utils.cpp",
]

libtorch_distributed_sources = libtorch_distributed_windows_sources + [
Copy link
Contributor

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();

Suggested change
libtorch_distributed_sources = libtorch_distributed_windows_sources + [
libtorch_distributed_c10d_sources = [

Copy link
Contributor Author

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.

Copy link
Contributor

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

Copy link
Contributor Author

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]
lw added a commit that referenced this pull request Jun 14, 2021
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]
lw added a commit that referenced this pull request Jun 14, 2021
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/)!
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in a178043.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged oncall: distributed Add this issue/PR to distributed oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants