feat(cambricon): add CNCL backend for local multi-device collectives - #72
Open
baominghelly wants to merge 1 commit into
Open
feat(cambricon): add CNCL backend for local multi-device collectives#72baominghelly wants to merge 1 commit into
baominghelly wants to merge 1 commit into
Conversation
baominghelly
marked this pull request as ready for review
September 9, 2026 06:06
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 a Cambricon CNCL backend for local, single-process multi-device collective communication. This enables the existing
infinicclCommInitAll,infinicclCommDestroy,infinicclAllReduce, andinfinicclAllGatherAPIs to operate on Cambricon MLU devices through CNCL.This is a stacked PR based on #59 because the CNCL
AllGatherprovider reuses the shared CCLAllGatherimplementation introduced there.Changes
WITH_CNCLbuild option, dependency discovery, bridge registration, andlibcncllinkage.CommInitAll,CommDestroy,AllReduce, andAllGatherthrough the shared CCL provider abstraction.CommInitAlldispatch to return one communicator handle for every requested local device.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.Performance Impact
Cambricon local multi-device collectives use CNCL directly instead of relying on a host-staged communication path. This PR does not make a quantified performance claim.
Known Issues & Future Work
infinicclCommInitAll.GetUniqueIdandCommInitRankare not implemented, so cross-process and multi-node CNCL initialization are not supported by this PR.masterafter its prerequisite PRs merge.Test Results
Test environment: one Cambricon node/container with four MLUs and CNCL 1.27.2.
bridge_dependency_contractoperation_backend_selectionCommInitAll + AllReduce + AllGathervalidation passed.AllReducevalidation passed: rank inputs1, 2, 3, 4produced10on every device.The CNCL implementation was validated before the history-only rebase onto the updated #59 branch. The CNCL commit replayed without conflicts; this Draft PR has not been rebuilt after that rebase.
Test Involved Platform
Test Involved Backend
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