-
Notifications
You must be signed in to change notification settings - Fork 75
New allreduce algo for small message size #647
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
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.
Pull Request Overview
This PR introduces a new allreduce algorithm optimized for small message sizes (< 32KB) using NVLS packet-based communication, improving bandwidth performance by approximately 9% compared to the previous implementation.
Key changes:
- New
AllreduceNvlsPacketalgorithm specifically for messages ≤ 32KB - Enhanced
SwitchChannelDeviceHandlewith packet-based broadcast functionality - Updated algorithm selection logic to prioritize the new packet algorithm for small messages
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| include/mscclpp/switch_channel_device.hpp | Added packet broadcast specialization and multimem store for LLPacket |
| apps/nccl/src/nccl.cu | Integrated new algorithm, optimized selection logic with static variables, fixed control flow |
| apps/nccl/src/allreduce.hpp | Declared AllreduceNvlsPacket class and allreduceNvlsPacket kernel |
| apps/nccl/src/allreduce.cu | Implemented AllreduceNvlsPacket algorithm with adapter and kernel launch logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
caiomcbr
left a comment
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.
LGTM
New algo for message size < 32KB, command:
mpirun --allow-run-as-root -tag-output -np 8 -x LD_PRELOAD=/root/mscclpp/build/apps/nccl/libmscclpp_nccl.so -x MSCCLPP_DISABLE_CHANNEL_CACHE=1 ./build/all_reduce_perf -b 1K -e 32K -f 2 -c 1 -G 1 -n 100 -d halfTested on H100
Perf:
Old: