CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 24.7k
[C10D] Add better profiling title for NCCL barrier, nccl:all_reduce to nccl:all_reduce_barrier #140785
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/140785
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit 84058f6 with merge base 452e1a7 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but was present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
This changes the profiling title for all allreduce operations, which is not correct. We should only change the title for barrier operations. It might be trickier to do the correct thing.
@@ -4481,7 +4482,7 @@ c10::intrusive_ptr<Work> ProcessGroupNCCL::barrier(const BarrierOptions& opts) { | |||
at::zeros({1}, at::TensorOptions().device(barDevice).dtype(at::kFloat)); | |||
|
|||
// All reduce to achieve the barrier | |||
auto work = allreduce_impl(barrierTensor); | |||
auto work = allreduce_impl<true>(barrierTensor); |
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.
nit: does this work? Its nice to avoid passing mysterious booleans without names in c++ using comments auto work = allreduce_impl</*isBarrier*/true>(barrierTensor);
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.
I have a question on top of Will's comment. How do you verify your change is working?
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.
Yeah, I am searching the test methods, would update when test results are ready.
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.
ProfilingTitle should be used in multiple places in UTs? add a barrier call there to verify? And you can check the github issue which originally complains about the profileTitle being confusing, and re-pro the same test?
No need to use template. You can just extend the
|
Thank you for the review. |
@@ -3701,6 +3701,7 @@ c10::intrusive_ptr<Work> ProcessGroupNCCL::allreduce_sparse( | |||
#endif | |||
} | |||
|
|||
template <bool IsBarrier> |
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.
nit: start with lowerCase variable name (isBarrier) to be consistent with other variable definition?
I am not sure if C++ does not support multiple optional arguments. Using template here doubles the binary size for a very minor difference, that's why I would prefer argument form. |
Discussed offline, to apply an extra "profiling name" input, and order it as the first optional input |
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 updates, 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 |
…o nccl:all_reduce_barrier (pytorch#140785) Fixes [issue](pytorch#140257) Pull Request resolved: pytorch#140785 Approved by: https://github.com/wconstab
…o nccl:all_reduce_barrier (pytorch#140785) Fixes [issue](pytorch#140257) Pull Request resolved: pytorch#140785 Approved by: https://github.com/wconstab
…o nccl:all_reduce_barrier (pytorch#140785) Fixes [issue](pytorch#140257) Pull Request resolved: pytorch#140785 Approved by: https://github.com/wconstab
Fixes issue
cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o