Skip to content

[c10d] Make gather as a custom op#79687

Closed
alanwaketan wants to merge 2 commits intogh/alanwaketan/38/basefrom
gh/alanwaketan/38/head
Closed

[c10d] Make gather as a custom op#79687
alanwaketan wants to merge 2 commits intogh/alanwaketan/38/basefrom
gh/alanwaketan/38/head

Conversation

@alanwaketan
Copy link
Copy Markdown
Collaborator

@alanwaketan alanwaketan commented Jun 16, 2022

Stack from ghstack (oldest at bottom):

Summary:
This patch makes gather as a custom op such that it's dispatcher
passable. It's one part of the effort to route comm ops to the dispatcher
such that tracing mechanisms that relies on the dispatcher can trace them,
e.g., LazyTensor and AOTAutograd.

Test Plan:
python test/distributed/test_c10d_nccl.py -k test_gather_ops
python test/distributed/test_c10d_gloo.py -k test_gather_basics
...and other existing distributed tests.

Summary:
This patch makes gather as a custom op such that it's dispatcher
passable. It's one part of the effort to route comm ops to the dispatcher
such that tracing mechanisms that relies on the dispatcher can trace them,
e.g., LazyTensor and AOTAutograd.

Test Plan:
python test/distributed/test_c10d_nccl.py -k test_gather_ops
python test/distributed/test_c10d_gloo.py -k test_gather_basics
...and other existing distributed tests.

[ghstack-poisoned]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Jun 16, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 4a5c218 (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added the oncall: distributed Add this issue/PR to distributed oncall triage queue label Jun 16, 2022
alanwaketan pushed a commit that referenced this pull request Jun 16, 2022
Summary:
This patch makes gather as a custom op such that it's dispatcher
passable. It's one part of the effort to route comm ops to the dispatcher
such that tracing mechanisms that relies on the dispatcher can trace them,
e.g., LazyTensor and AOTAutograd.

Test Plan:
python test/distributed/test_c10d_nccl.py -k test_gather_ops
python test/distributed/test_c10d_gloo.py -k test_gather_basics
...and other existing distributed tests.

ghstack-source-id: 0e63c05
Pull Request resolved: #79687
Summary:
This patch makes gather as a custom op such that it's dispatcher
passable. It's one part of the effort to route comm ops to the dispatcher
such that tracing mechanisms that relies on the dispatcher can trace them,
e.g., LazyTensor and AOTAutograd.

Test Plan:
python test/distributed/test_c10d_nccl.py -k test_gather_ops
python test/distributed/test_c10d_gloo.py -k test_gather_basics
...and other existing distributed tests.

[ghstack-poisoned]
@mrshenli mrshenli added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 24, 2022
.def(
"gather",
[](::c10d::ProcessGroup& pg,
[](const c10::intrusive_ptr<::c10d::ProcessGroup>& pg,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Let me follow up on #80246. Thanks for approving.

@alanwaketan
Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

facebook-github-bot pushed a commit that referenced this pull request Jun 27, 2022
Summary:
This patch makes gather as a custom op such that it's dispatcher
passable. It's one part of the effort to route comm ops to the dispatcher
such that tracing mechanisms that relies on the dispatcher can trace them,
e.g., LazyTensor and AOTAutograd.

Pull Request resolved: #79687
Approved by: https://github.com/mrshenli

Test Plan:
contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/9d6e3f81d46382ed91b6ff286efe07e5cf5dd052

Test plan from GitHub:
python test/distributed/test_c10d_nccl.py -k test_gather_ops
python test/distributed/test_c10d_gloo.py -k test_gather_basics
...and other existing distributed tests.

Reviewed By: atalman

Differential Revision: D37455701

Pulled By: alanwaketan

fbshipit-source-id: 9322466cc8652789ccd77d8ed13e10958e85b101
@facebook-github-bot facebook-github-bot deleted the gh/alanwaketan/38/head branch June 28, 2022 14:17
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 cla signed Merged oncall: distributed Add this issue/PR to distributed oncall triage queue release notes: distributed (c10d) release notes category topic: new features topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants