8000 Add sequence number support for UCC by Fuzzkatt · Pull Request #85047 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Add sequence number support for UCC #85047

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

Closed
wants to merge 13 commits into from

Conversation

Fuzzkatt
Copy link
Collaborator
@Fuzzkatt Fuzzkatt commented Sep 14, 2022

Add sequence number support for UCC, mostly following format of ProcressGroupNCCL.
Pass new test: test_all_gather_object_subgroup
Add skips for gather tests: test_gather_object and test_gather_object_subgroup

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu

@pytorch-bot
Copy link
pytorch-bot bot commented Sep 14, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/85047

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 27a7a07:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: distributed (c10d) release notes category label Sep 14, 2022
@facebook-github-bot facebook-github-bot added cla signed oncall: distributed Add this issue/PR to distributed oncall triage queue labels Sep 14, 2022
@dagitses dagitses added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Sep 16, 2022
@ptrblck
Copy link
Collaborator
ptrblck commented Sep 21, 2022

The lint issues are real, could you fix them, please?

@@ -1569,6 +1571,12 @@ c10::intrusive_ptr<Work> ProcessGroupUCC::recv(
"ucc:recv");
}

void ProcessGroupUCC::setSequenceNumberForGroup() {}
Copy link
Member

Choose a reason for hiding this comment

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

curious why this set function is a no-op?

Copy link
Collaborator Author
@Fuzzkatt Fuzzkatt Sep 22, 2022

Choose a reason for hiding this comment

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

The ProcessGroupUcc setSequenceNumberForGroup() and getSequenceNumberForGroup() implementation here is based on the existing ProcessGroupNccl implementation: https://github.com/pytorch/pytorch/blob/master/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp#L759-L763
Basically the _seq counter is initialized at 0, and it is only incremented during the collective_post() call, which is the equivalent to the ProcessGroupNccl handling during its equivalent collective() call: https://github.com/pytorch/pytorch/blob/master/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp#L1532

@Fuzzkatt Fuzzkatt requested a review from kwen2501 as a code owner September 26, 2022 20:45
@facebook-github-bot
Copy link
Contributor

/easycla

As part of the transition to the PyTorch Foundation, this project now requires contributions be covered under the new CLA. See #85559 for additional details.

This comment will trigger a new check of this PR. If you are already covered, you will simply see a new "EasyCLA" check that passes. If you are not covered, a bot will leave a new comment with a link to sign.

@linux-foundation-easycla
Copy link
linux-foundation-easycla bot commented Oct 3, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@Fuzzkatt
Copy link
Collaborator Author

Add barrier blocking fix from here: #86961

Copy link
Contributor
@kwen2501 kwen2501 left a comment

Choose a reason for hiding this comment

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

The code changes look good to me.
Only have one question about the @sandcastle_skip_if

@@ -7694,12 +7696,14 @@ def _test_verify_model_across_rank(self, use_logger):

@require_backend(DistTestCases.backend_feature["gpu"])
@require_backends_available(DistTestCases.backend_feature["gpu"])
@sandcastle_skip_if(BACKEND == "ucc", "test failing locally with ucc")
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering what error this local failure would manifest to end users?
Asking to see if it is safe to skip.

Copy link
Collaborator Author
@Fuzzkatt Fuzzkatt Oct 28, 2022

Choose a reason for hiding this comment

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

Just updated the skip message. For both with and without logger versions, it hangs and then times out after 5 minutes.

@@ -170,6 +170,9 @@ void read_config() {
torch_ucc_config.blocking_wait[(std::uint8_t)op] = true;
}

// barrier is always blocking
torch_ucc_config.blocking_wait[(std::uint8_t)OpType::BARRIER] = true;

Copy link
Contributor

Choose a reason for hiding this comment

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

Just FYI - this change is also in #86961

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 28, 2022
@Fuzzkatt
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

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

@pytorchmergebot
Copy link
Collaborator

Rebase failed due to Command git -C /home/runner/work/pytorch/pytorch rebase refs/remotes/origin/viable/strict pull/85047/head returned non-zero exit code 1

Rebasing (1/6)
Auto-merging torch/csrc/distributed/c10d/ProcessGroupUCC.cpp
CONFLICT (content): Merge conflict in torch/csrc/distributed/c10d/ProcessGroupUCC.cpp
Auto-merging torch/csrc/distributed/c10d/ProcessGroupUCC.hpp
CONFLICT (content): Merge conflict in torch/csrc/distributed/c10d/ProcessGroupUCC.hpp
Auto-merging torch/testing/_internal/distributed/distributed_test.py
error: could not apply 2b47d67643... add sequence number support, skip gather tests for ucc
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2b47d67643... add sequence number support, skip gather tests for ucc

Raised by https://github.com/pytorch/pytorch/actions/runs/3348775193

@Fuzzkatt
Copy link
Collaborator Author

@pytorchbot merge

1 similar comment
@seemethere
Copy link
Member

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: The following mandatory check(s) failed (Rule superuser):

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

@Fuzzkatt
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

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

@pytorchmergebot
Copy link
Collaborator

Rebase failed due to Command git -C /home/runner/work/pytorch/pytorch rebase refs/remotes/origin/viable/strict pull/85047/head returned non-zero exit code 1

Rebasing (1/6)
Auto-merging torch/csrc/distributed/c10d/ProcessGroupUCC.cpp
CONFLICT (content): Merge conflict in torch/csrc/distributed/c10d/ProcessGroupUCC.cpp
Auto-merging torch/csrc/distributed/c10d/ProcessGroupUCC.hpp
CONFLICT (content): Merge conflict in torch/csrc/distributed/c10d/ProcessGroupUCC.hpp
Auto-merging torch/testing/_internal/distributed/distributed_test.py
error: could not apply 2b47d67643... add sequence number support, skip gather tests for ucc
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2b47d67643... add sequence number support, skip gather tests for ucc

Raised by https://github.com/pytorch/pytorch/actions/runs/3352547882

@Fuzzkatt
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 additional jobs have failed, first few of them are: trunk

Details for Dev Infra team Raised by workflow job

@Fuzzkatt
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 additional jobs have failed, first few of them are: trunk

Details for Dev Infra team Raised by workflow job

@Fuzzkatt
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@github-actions
Copy link
Contributor

Hey @Fuzzkatt.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Nov 5, 2022
Add sequence number support for UCC, mostly following format of ProcressGroupNCCL.
Pass new test: `test_all_gather_object_subgroup`
Add skips for gather tests: `test_gather_object` and `test_gather_object_subgroup`

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu
Pull Request resolved: pytorch#85047
Approved by: https://github.com/kwen2501
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
Add sequence number support for UCC, mostly following format of ProcressGroupNCCL.
Pass new test: `test_all_gather_object_subgroup`
Add skips for gather tests: `test_gather_object` and `test_gather_object_subgroup`

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu
Pull Request resolved: pytorch#85047
Approved by: https://github.com/kwen2501
pytorchmergebot pushed a commit that referenced this pull request Apr 6, 2023
Creates the equivalent c10d test for ucc for https://github.com/pytorch/pytorch/blob/master/test/distributed/test_c10d_gloo.py and https://github.com/pytorch/pytorch/blob/master/test/distributed/test_c10d_nccl.py. Uses test_c10d_gloo.py as the reference and adds all the common ops. More detailed comparison of available ops here: https://docs.google.com/document/d/1yPsa_X9EiEiqo-j2Yn7ierhccBtEjwoqC-B7-amI0MI/edit?usp=sharing

Also removes extra line for ProcessGroupUCC.cpp barrier blocking wait that got duplicated from merging #85047.

Pull Request resolved: #88110
Approved by: https://github.com/zasdfgbnm, https://github.com/kit1980, https://github.com/kwen2501, https://github.com/malfet
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 open source release notes: distributed (c10d) release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants
0