New allreduce algo for small message size#647
Merged
Binyang2014 merged 9 commits intomainfrom Oct 23, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
chhwang
approved these changes
Oct 20, 2025
chhwang
approved these changes
Oct 23, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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: