Repository navigation
feat: support CCL Reduce - #87
Open
xingjiangjun wants to merge 1 commit into
Open
xingjiangjun wants to merge 1 commit into
xingjiangjun wants to merge 1 commit into
Conversation
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 native NCCL/MCCL Reduce support through the existing shared CCL framework.
This PR is a follow-up to #66, originally contributed by @GordonYang1. It rebases and refines the original implementation and aligns the examples with the existing MPI Reduce and CCL/Hybrid examples.
The diff contains eight files. MPI implementations, MPI examples, and shared example utilities are unchanged. Zero-count Reduce now returns success before argument validation, matching the existing AllGather convention.
Changes
src/backends/ccl/common/impl/reduce.h, with thin NCCL/MCCL registration and provider forwarding.ValidatorandMetricsutilities.HasInvalidArgs()while retaining root-specific buffer checks for nonzero counts.Platform and Backend Affected
Platform
The shared zero-count validation change also applies to other Reduce backend/device combinations; only the checked native platforms and OpenMPI paths were exercised. NCCL/RCCL is checked for NCCL only.
Backend
Performance Impact
N/A — functionality change, not a performance optimization. Shared-server timings are not performance comparisons.
Known Issues & Future Work
Test Results
All reported test processes exited with code 0 and produced the expected results or error statuses. Heterogeneous communication used UCX/TCP and the existing
icclrunconfiguration, not RDMA. Targeted examples were run directly with timeouts rather than through the fullrun_examples.pysuite. Tests used the working-tree snapshot whose source manifest was checked against the final commit; they were performed before commit creation, not rerun under the final SHA.Final commit:
db69aad2e4ba200d2804d2047960276c207033e1.Sanitized test logs and standalone test sources are attached. Full originals are archived locally.
Test Involved Platform
Test Involved Backend
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)
N/A — no Python files changed.
Testing
Build, CI, and Tooling
No new backend or device is introduced.
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
@Ziminli, could you please review this follow-up to #66? The implementation and examples follow the existing CCL framework and the guidance from the AllToAll review. Thank you.