feat: support AllToAll with OpenMPI backend implementation#14
Merged
Conversation
66d49c2 to
f091b46
Compare
Modified file: - `include/comm.h` Added files: - `src/base/all_to_all.h` - `src/ompi/impl/all_to_all.h` - `examples/all_to_all.cc`
e16a878 to
c78d7d7
Compare
Ziminli
requested changes
May 19, 2026
alltoall with OpenMPI backend implementationAllToAll with OpenMPI backend implementation
Ziminli
requested changes
May 19, 2026
Ziminli
approved these changes
May 19, 2026
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.
Summary
This PR introduces an OpenMPI-based implementation of
AllToAll, along with a complete example program for functionality verification and basic performance evaluation.Changes
AllToAllImplementationinfiniAllToAll(), including:src/base/all_to_all.h;src/ompi/impl/all_to_all.h;include/infiniccl.h.examples/all_to_all.ccsimilar toexamples/all_reduce.ccfor correctness verification and simple performance testing.Known Issues & Future Work
AllToAllimplementation uses blockingMPI_Alltoall, which prevents overlap between communication and computation. Future work may introduce non-blocking collectives (MPI_Alltoall) and stream-aware asynchronous execution to improve concurrency and performance.malloc/freeon every invocation. This may introduce noticeable overhead in high-frequency workloads. Future work may add reusable buffer pools, allocator caching, and pinned host memory support to improve transfer efficiency and reduce allocation overhead.AllToAllmessages (e.g.,1 << 20elements) may fail with mlx5 RC RDMA_READ errors due to UCX rendezvous RDMA_READ path limitations. This requires settingUCX_RNDV_SCHEME=put_zcopyto force a safe put-based transfer protocol. Without this setting, large-messageAllToAllexecution is unstable on some NIC configurations.AllToAllmessages exceedingINT_MAXelements, execution is rejected due to MPI int range limitations. Future work may introduce chunked transfers orMPI_Countsupport in MPI-4+ to handle very large tensors safely.AllToAllwithout pipelining. For large messages, this may lead to high memory consumption and limited scalability. Future work may add chunked or pipelined transfers to reduce peak memory usage and improve scalability across many ranks.Logs & Screenshots
all_reduce test (MetaX-NVIDIA heterogeneous)
all_reduce.log
all_gather test (MetaX-NVIDIA heterogeneous)
all_gather.log
reduce_scatter test (MetaX-NVIDIA heterogeneous)
reduce_scatter.log
broadcast test (MetaX-NVIDIA heterogeneous)
broadcast.log
all_to_all test (MetaX-NVIDIA heterogeneous)
all_to_all.log