-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[SymmetricMemoryOps] refine cross-device barriers #137471
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/137471
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit dd059f5 with merge base 9b2e453 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Oct 8, 2024
[ghstack-poisoned]
Chillee
approved these changes
Oct 8, 2024
Chillee
approved these changes
Oct 8, 2024
weifengpy
approved these changes
Oct 8, 2024
This was referenced Oct 8, 2024
pytorchmergebot
pushed a commit
that referenced
this pull request
Oct 9, 2024
## This Stack Implement custom all-reduce algos available in `IntraNodeComm` as `symm_mem` ops and replace the existing `IntraNodeComm` kernels with them. ## This PR Implement `symm_mem::one_shot_all_reduce` and `symm_mem::one_shot_all_reduce_out`. Later we'll replace the one-shot all-reduce in `IntraNodeComm` with these. Pull Request resolved: #137472 Approved by: https://github.com/Chillee, https://github.com/weifengpy ghstack dependencies: #137471
pytorchmergebot
pushed a commit
that referenced
this pull request
Oct 9, 2024
## This Stack Implement custom all-reduce algos available in `IntraNodeComm` as `symm_mem` ops and replace the existing `IntraNodeComm` kernels with them. ## This PR Implement `symm_mem::two_shot_all_reduce_`. Later we'll replace the two-shot all-reduce in `IntraNodeComm` with these. Pull Request resolved: #137473 Approved by: https://github.com/Chillee ghstack dependencies: #137471, #137472
pytorchmergebot
pushed a commit
that referenced
this pull request
Oct 9, 2024
…reduce (#137474) ## This Stack Implement custom all-reduce algos available in `IntraNodeComm` as `symm_mem` ops and replace the existing `IntraNodeComm` kernels with them. ## This PR Implement `symm_mem::multimem_one_shot_all_reduce_out`. The out-variant is more suitable for `IntraNodeComm` integration. Pull Request resolved: #137474 Approved by: https://github.com/Chillee ghstack dependencies: #137471, #137472, #137473
pytorchmergebot
pushed a commit
that referenced
this pull request
Oct 9, 2024
…m ops (#137475) ## This Stack Implement custom all-reduce algos available in `IntraNodeComm` as `symm_mem` ops and replace the existing `IntraNodeComm` kernels with them. ## This PR - Replaces one-shot all-reduce with `symm_mem::one_shot_all_reduce_out` - Replaces two-shot all-reduce with `symm_mem::two_shot_all_reduce_` - Removes HCM all-reduce (at least for now). Due to the nature of its accumulation order, we can't guarantee the numerical consistency across all ranks. - Removes the `IntraNodeComm` python binding (its original purpose is superceded by `SymmetricMemory`). - Removes methods that were made for the python binding. - Replaces nvlink detection logic with `DMAConnectivityDetector`. Pull Request resolved: #137475 Approved by: https://github.com/Chillee ghstack dependencies: #137471, #137472, #137473, #137474
pytorchmergebot
pushed a commit
that referenced
this pull request
Oct 9, 2024
…ating bfloat16 with multimem.ld_reduce (#137529) This provides better accuracy without additional cost. Also added documentation to `multimem_one_shot_all_reduce` to note the numerical caveats. Pull Request resolved: #137529 Approved by: https://github.com/Chillee ghstack dependencies: #137471, #137472, #137473, #137474, #137475
pytorchmergebot
pushed a commit
that referenced
this pull request
Oct 9, 2024
- Previously the detection would fail before user calling APIs such as `torch.cuda.set_device()`. This is because the detection logic requires nvml initialization. In this PR, we added explicit nvml initialization (which idempotent). - Previously any nvml issue occurred in the detection logic would result in fatal error. Now we issue an informative warning and return a topology assuming no NVLink connectivity. Pull Request resolved: #137530 Approved by: https://github.com/Chillee ghstack dependencies: #137471, #137472, #137473, #137474, #137475, #137529
yifuwang
pushed a commit
to yifuwang/pytorch
that referenced
this pull request
Feb 22, 2025
ghstack-source-id: 68341b0 Pull Request resolved: pytorch#137471
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Merged
oncall: distributed
Add this issue/PR to distributed oncall triage queue
release notes: distributed (c10d)
release notes category
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
This Stack
Implement custom all-reduce algos available in
IntraNodeCommassymm_memops and replace the existingIntraNodeCommkernels with them.This PR
Refine the corss-device synchronization primitives to make it clearer when to use which synchronization pattern.
cc @XilunWu @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o