Skip to content

feat(nccl): add point-to-point communication - #58

Draft
voltjia wants to merge 1 commit into
fix/bridge-header-dependenciesfrom
feat/nccl-point-to-point
Draft

feat(nccl): add point-to-point communication#58
voltjia wants to merge 1 commit into
fix/bridge-header-dependenciesfrom
feat/nccl-point-to-point

Conversation

@voltjia

@voltjia voltjia commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Add NVIDIA NCCL implementations for infinicclSend and infinicclRecv, while preserving communicator-aware fallback to an available backend. The branch is stacked on #57 so provider header changes reliably regenerate the generated bridge.

Changes

  • NCCL point-to-point support
    • Add common CCL validation and NCCL Send/Recv providers.
    • Forward dtype, peer rank, communicator, and CUDA stream to ncclSend and ncclRecv.
  • Safe communicator dispatch
    • Select only backends and devices supported by the requested operation.
    • Fall back from an unsupported communicator backend to another active communicator backend.
    • Return kNotSupported instead of entering an unavailable template dispatch and aborting.
  • Examples and tests
    • Add a deterministic dual-GPU send/receive example.
    • Add backend-selection tests for supported, fallback, and unsupported communicator combinations.

Platform and Backend Affected

Platform

  • CPU
  • NVIDIA GPU
  • Iluvatar GPU
  • MetaX GPU
  • Moore Threads GPU
  • Cambricon MLU
  • HYGON DCU

Backend

  • OpenMPI
  • MPICH
  • NCCL
  • MCCL

Performance Impact

  • No performance impact
  • Performance improved
  • Performance regression possible

N/A. No performance claim is made; the change adds a previously unavailable NCCL operation.

Known Issues & Future Work

Test Results

Test environment: ssh nvidia, accelerator-dev/nvidia:latest, two NVIDIA A100-SXM4-80GB GPUs.

  • NVIDIA+NCCL Release configure and full example build passed.
  • CTest passed, including supported, fallback, and unsupported backend-selection cases.
  • examples/ccl/send_recv passed on two A100 GPUs and received the expected value 7.0.
  • Existing examples/ccl/all_reduce passed as a regression check.
  • OpenMPI+NCCL Release configure and full example build passed.
  • mpirun -np 2 examples/mpi/send_recv passed and received the expected data.
  • clang-format 16.0.6 and git diff --check passed.

Test Involved Platform

  • CPU
  • NVIDIA GPU
  • Iluvatar GPU
  • MetaX GPU
  • Moore Threads GPU
  • Cambricon MLU
  • HYGON DCU

Test Involved Backend

  • OpenMPI
  • MPICH
  • NCCL
  • MCCL

Checklist

Title, Branch, and Commits

  • PR title follows Conventional Commits.
  • Branch name follows <type>/xxx-yyyy-zzzz.
  • Each commit message follows Conventional Commits.
  • Relative to the stacked base, this small PR is a single squashable commit.
  • No stray merge commits from master.
  • No fixup! / squash! / wip commits remain.

Scope and Design

  • Changes are minimal and contain no unrelated modifications.
  • No dead code, debug output, or unowned TODOs were added.
  • No unrelated formatting churn was introduced.
  • The public Send/Recv behavior is intentional and covered by examples and tests.

General Code Hygiene

  • Comments are limited to non-obvious intent.
  • Every modified or added file ends with a single trailing newline.
  • No trailing whitespace, inconsistent indentation, or mixed formatting remains.
  • Code identifiers in comments and errors use Markdown backticks where applicable.
  • Comments and error messages are in English.
  • Comments and error messages follow the repository language conventions.

C++ Specific

  • Code follows the Google C++ Style Guide.
  • clang-format 16.0.6 passes on all modified C++ files.
  • No exceptions are thrown.
  • Error handling follows repository conventions.
  • Constructor initializer order is unchanged or matches declarations.
  • Class and function spacing follows repository conventions.
  • Class member spacing follows repository conventions.
  • Namespace spacing follows repository conventions.

Python Specific

N/A: No Python files are changed by this PR.

Testing

  • Applicable NCCL and OpenMPI examples were built and tested successfully in the environments listed above.

Build, CI, and Tooling

  • N/A: No new backend or device auto-detection entry is required.
  • The applicable clang-format check passes; Ruff is not applicable.

Documentation

  • The new example documents the public point-to-point usage.
  • N/A: No user-visible breaking change is introduced.

Security and Safety

  • No secrets, internal URLs, customer data, or personal hardware identifiers are included.
  • No third-party code is introduced.
  • Provider inputs, communicator backend, device, and operation support are validated before dispatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant