-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[c10d] [NCCL] Fix work handle for coalescing manager #122849
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/122849
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 08deacb with merge base dd8a24b ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
i don't understand the fix, and i'd appreciate if you also add a test case, probably to the fix looks like its just adds some assertions and updates the coalescedDevice, but how does it impact the work obj that gets returned? |
Here: pytorch/torch/distributed/distributed_c10d.py Lines 2037 to 2039 in 76a87e3
pytorch/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp Lines 2280 to 2286 in 76a87e3
|
cc @kwen2501 |
Thanks for finding the issue. |
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.
Thanks for the fix! LGTM!
@pytorchbot merge |
Merge startedYour 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 |
Fixes pytorch#122807 The work handle of the coalescing job will be populated: ```python with dist._coalescing_manager(group=pg_nccl, device=device, async_ops=True) as cm: dist.all_reduce(a) dist.all_reduce(b) print(len(cm.works)) # prints 1 cm.wait() # actually waits ``` Pull Request resolved: pytorch#122849 Approved by: https://github.com/kwen2501
Fixes #122807
The work handle of the coalescing job will be populated:
cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225 @chauhang