feat(nccl): add all-gather communication - #59
Draft
voltjia wants to merge 1 commit into
Draft
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
Implement the existing
infinicclAllGatherAPI for the NCCL backend, including communicator-aware backend selection, zero-count handling, and reliable NVIDIA and mixed-backend validation.This PR is stacked on #58, which provides the shared supported-backend selection used by collective and point-to-point operations. #58 is stacked on #57, which keeps generated communication bridges current when provider headers change.
Changes
ncclAllGatherwhile preserving NCCL's per-rankcountand legal in-place buffer contract.infinicclNotSupportedwhen the communicator has no compatible provider, and an internal error when it has no initialized backend.Platform and Backend Affected
Platform
Backend
Performance Impact
N/A. This PR enables an existing API for NCCL and makes no performance claim.
Known Issues & Future Work
float32; datatype acceptance remains governed by the existing backend type map.Test Results
Environment:
ssh nvidia,accelerator-dev/nvidia:latest, two NVIDIA A100-SXM4-80GB GPUs, clean Release builds.clang-format16.0.6--dry-run --Werrorpassed for every changed C++ file.[cpu,nvidia]/[nccl]full build passed, followed by CTest 2/2.CUDA_VISIBLE_DEVICES=0,1 examples/ccl/all_gatherpassed out-of-place and NCCL-defined in-place element-wise validation and printedAllGather validation passed.[cpu,nvidia]/[ompi,nccl]full build passed, followed by CTest 2/2.mpirun --allow-run-as-root --bind-to none -np 2 examples/mpi/all_gatherpassed withCorrect: YESand rank-ordered blocks[r0: 1] [r1: 2].git diff --checkpassed.Test Involved Platform
Test Involved Backend
Checklist
Title, Branch, and Commits
<type>/xxx-yyyy-zzzzwhere<type>matches the PR title's Conventional Commits type and words are joined with hyphens.fixup!/squash!/wipcommits remain.Scope and Design
General Code Hygiene
C++ Specific
.clang-format.clang-formatversion 16.0.6 passed with--dry-run --Werror.Python Specific
N/A. This PR does not change Python files.
Testing
Build, CI, and Tooling
N/A. This PR does not add a backend or device to auto-detection. The repository's C++ formatting gate was reproduced locally; hosted CI will run on the pushed branch.
Documentation
examples/ccl/all_gather.ccand this PR description.Security and Safety