feat: support CCL Send and Recv - #60
Open
GordonYang1 wants to merge 1 commit into
Open
Conversation
GordonYang1
force-pushed
the
feat/support-ccl-send-recv
branch
2 times, most recently
from
August 14, 2026 07:14
cd0a469 to
64f4e04
Compare
GordonYang1
force-pushed
the
feat/support-ccl-send-recv
branch
from
August 23, 2026 09:32
64f4e04 to
a0874c9
Compare
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 adds
SendandRecvsupport to the shared CCL backend abstraction, including native bindings through the existing NCCL and MCCL provider layers for the publicinfinicclSend()andinfinicclRecv()APIs. It also adds shared communicator and data-type handling for CCL point-to-point operations, keeps inter-only communicators on the existing OpenMPI staging path during mixed-backend flows, includes CCL-only plus OpenMPI-assistedSend/Recvexample programs with correctness and one-way communication-bandwidth reporting, and enforces and documents NCCL 2.10 as the minimum supported version.Changes
Public API and Dispatch
infinicclSend()andinfinicclRecv()APIs for configured CCL backends through generated bridge dispatch.infinicclCommInitRank()has initialized the matching intra-node provider.Common CCL Implementation
SendandRecvimplementations following the existing provider-orientedAllReducestructure.NotSupportedwhen the selected provider cannot represent the requested data type.Existing CCL Provider Bindings
ncclSend(),ncclRecv(),mcclSend(), andmcclRecv().SendandRecvwith the existing NCCL and MCCL provider layers.Examples and Validation
Send/Recvexample using one shared unique ID.Send/Recvexample that uses OpenMPI for rank discovery and unique-ID broadcast, then initializes a native CCL communicator for GPU point-to-point communication.payload_bytes / time, and bus bandwidth with the point-to-point correction factor of 1 in all three examples.Documentation
ncclAvg.Platform and Backend Affected
Platform
Backend
Performance Impact
This adds GPU-native CCL paths for
SendandRecv, avoiding the existing MPI host-staging paths when a supported CCL backend is selected. Existing MPI point-to-point operations are intended to remain unchanged.Known Issues & Future Work
AllReduce,Send, andRecv; other CCL operations remain future work.SendandRecvinherit the backend/device combinations and data type support of the existing CCL providers; this PR does not add a new provider or device integration.float32transfer from rank 0 to rank 1 on the default stream. Multi-peer, bidirectional, grouped, additional-data-type, and non-default-stream coverage remain future work. The heterogeneous MPISend/Recvregression also transfers between ranks 0 and 1 on the NVIDIA node, so it is not a cross-vendor point-to-point test.Test Results
The implementation commit is
a0874c9ba781c110ab1325f7b0ded2d7f8d31c9e, a single commit directly based onef4045a2d99837c75c2acd90aae57dacb83172d2. The attached evidence contains exactly 15 hash-verified canonical logs from the current commit: all 15 targets passed, withCorrect: YES17 times andCorrect: NO0 times. The extra two positive results are the additional expected validation cases in the broadcast log.All four
Send/Recvpaths passed with a 1,048,576-elementFloat32payload (4.00 MiB), 2 warm-up iterations, and 20 profiled iterations:The reported time is the elapsed time averaged over the 20 profiled one-way transfers after the 2 warm-up transfers. Algorithm bandwidth uses
payload_bytes / time; bus bandwidth is identical because the point-to-point correction factor is 1. The values were independently recomputed while accounting for the displayed time being rounded to three decimal places. They are included as execution evidence, not as a cross-platform benchmark comparison.Test Involved Platform
Test Involved Backend
Pure CCL (NCCL) on single-node NVIDIA:
ccl_all_reduce.log
ccl_broadcast.log
CCL + MPI on single-node NVIDIA:
ccl_mpi_hybrid_all_reduce.log
ccl_mpi_hybrid_broadcast.log
MPI on Heterogeneous Cluster:
mpi_all_gather.log
mpi_all_reduce.log
mpi_all_to_all.log
mpi_broadcast.log
mpi_gather.log
mpi_reduce.log
mpi_reduce_scatter.log
mpi_scatter.log
mpi_send_recv.log
Pure CCL (MCCL) on single-node MetaX:
ccl_all_reduce.log
ccl_broadcast.log
Checklist
Title, Branch, and Commits
feat: …,fix(nccl): …).<type>/xxx-yyyy-zzzzwhere<type>matches the PR title's Conventional Commits type and words are joined with hyphens (seeCONTRIBUTING.md§Branches).CONTRIBUTING.md§Pull Requests).master— the branch is rebased cleanly on top of the currentmaster.fixup!/squash!/wipcommits remain.Scope and Design
CONTRIBUTING.md§Code/General).printf/std::cout/print(...)left behind, orTODOwithout an owner and issue link.General Code Hygiene
CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General).the `AllReduce` implementation) (CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General; §Python).C++ Specific (if C++ files changed)
clang-format(version 16, per.github/workflows/clang-format.yml) has been run against all modified applicable files; the diff is clean.assertwith messages that include at least__FILE__,__LINE__, and__func__(CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).Python Specific (if Python files changed)
ruff checkpasses cleanly on CI (see `.github/workflows/ruff.yml).ruff format --checkpasses cleanly — if not, runruff formatand commit the result.CONTRIBUTING.md§Python).pytest.skipmessages without terminal period) are honored where applicable (CONTRIBUTING.md§Python).CONTRIBUTING.md§Python).if,for, and similar control-flow statements (CONTRIBUTING.md§Python).return, except when it directly follows a control-flow statement (CONTRIBUTING.md§Python).CONTRIBUTING.md§Python).Testing
Build, CI, and Tooling
CMakeLists.txtunderif(AUTO_DETECT_DEVICES)or toif(AUTO_DETECT_BACKENDS)if applicable.clang-format.yml,ruff.yml) are green locally (or expected to be green on CI).Documentation
README.md,CONTRIBUTING.md, or inline docs updated when behavior, build flags, or developer workflow changed.!orBREAKING CHANGE:footer.Security and Safety