Repository navigation
feat(cambricon): add CNCL backend for local multi-device collectives - #72
Merged
Merged
Conversation
baominghelly
marked this pull request as ready for review
September 9, 2026 06:06
Ziminli
force-pushed
the
feat/nccl-all-gather
branch
from
September 15, 2026 02:34
0251d7f to
3816cd5
Compare
Ziminli
force-pushed
the
feat/add-cncl
branch
from
September 16, 2026 02:50
f528bb1 to
a2b0101
Compare
…elevant code - support `GetUniqueId` and `CommInitRank` for CNCL - remove the currently unsupported and irrelevant CCL backend of `CommInitAll` - set `INFINICCL_UNIQUE_ID_BYTES` to 136 to accommodate `cnclCliqueId` - organize code for `CommInitAll` and `CommInitRank`
- coordinate process-local `CommInitRank` requests into one `cnclInitComms` call per clique - support native multi-threaded, MPI-hybrid, and MxN initialization - validate local ranks, global ranks, devices, and deferred initialization groups - add CNCL `Send` and `Recv` providers through the common CCL implementation - provide a fallback queue for CNCL versions that reject `nullptr` queues - add CNCL error checking and preserve local communicator metadata
Ziminli
approved these changes
Sep 23, 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
Add full Cambricon CNCL backend support and integrate it with existing CCL/MPI architecture.
This PR adds CNCL device and backend integration, common CCL communicator initialization, CNCL rank-based initialization for native and MPI-hybrid multi-threaded programs, CNCL collectives and point-to-point communication, and the required build, dispatch, and example updates.
Changes
CNCL Backend Integration
AllReduceAllGatherSendRecvGetUniqueIdCommInitRankCommDestroyINFINICCL_UNIQUE_ID_BYTESto accommodatecnclCliqueId.Communicator Initialization
cnclInitComms.CommInitRankhandling and safely copy backend-specific unique IDs.Point-to-point Communication
nullptrqueue.Documentation Update
README.mdand.github/pull_request_template.mdto include CNCL as a valid supported backend.Platform and Backend Affected
Platform
Backend
OpenMPI is marked because its
CommInitAllimplementation is adapted to the corrected multi-handle interface; its communication path remains unchanged.NCCL/RCCL and MCCL are marked because common ccl implementation has changes.
Performance Impact
The branch enables native CNCL communication instead of relying on fallback paths. No formal benchmark comparison is included.
Known Issues & Future Work
float64reduction data or theAvgreduction operation.CommInitAllis not supported yet.Test Results
Test Involved Platform
Test Involved Backend
Cambricon CNCL + OMPI:
ccl_mpi_hybrid_all_gather.log
ccl_mpi_hybrid_all_reduce.log
ccl_mpi_hybrid_send_recv.log
Cambricon CNCL:
ccl_all_gather.log
ccl_all_reduce.log
ccl_send_recv.log
NVIDIA NCCL + OMPI:
ccl_mpi_hybrid_all_gather.log
ccl_mpi_hybrid_all_reduce.log
ccl_mpi_hybrid_send_recv.log
Checklist
Title, Branch, and Commits
masterare present.fixup!,squash!, orwipcommits remain.Scope and Design
CommInitAllinterface correction.General Code Hygiene
git diff --checkpasses.C++ Specific
Python Specific
N/A: This PR does not modify Python files.
Testing
Build, CI, and Tooling
git diff --checkpasses; hosted CI will run on this Draft PR.Documentation
Security and Safety