Skip to content

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

Merged
Ziminli merged 2 commits into
masterfrom
feat/nccl-point-to-point
Sep 14, 2026
Merged

Ziminli merged 2 commits into
masterfrom
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. Examples now cover both single-node thread-per-GPU transfers and MPI-launched global-rank transfers. The branch is stacked on #57.

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

    • Add examples/ccl/send_recv.cc, a deterministic single-node dual-GPU example using one worker thread per GPU.
    • Add examples/ccl_mpi_hybrid/send_recv.cc, which performs send/recv between global MPI-launched ranks.

Platform and Backend Affected

Platform

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

Backend

  • OpenMPI
  • MPICH
  • NCCL/RCCL
  • 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

N/A.

Test Results

Test Involved Platform

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

Test Involved Backend

  • OpenMPI
  • MPICH
  • NCCL/RCCL
  • MCCL

NVIDIA NCCL + OMPI (2 Nodes):
ccl_mpi_hybrid_all_reduce.log
ccl_mpi_hybrid_send_recv.log

NVIDIA NCCL (Single Node):
ccl_all_reduce.log
ccl_send_recv.log

Iluvatar NCCL + OMPI (Single Node):
ccl_mpi_hybrid_all_reduce.log
ccl_mpi_hybrid_send_recv.log

HYGON RCCL + OMPI (2 Nodes):
ccl_mpi_hybrid_all_reduce.log
ccl_mpi_hybrid_send_recv.log


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.

@Ziminli
Ziminli force-pushed the feat/nccl-point-to-point branch from 8ed1772 to 1878506 Compare September 11, 2026 03:28
- remove communicator redispatch from the shared operation layer
- align CCL `Send`/`Recv` implementations with the existing collective style
- add a hybrid example for global-rank `Send`/`Recv` across MPI-launched processes
@Ziminli
Ziminli marked this pull request as ready for review September 14, 2026 10:29
@Ziminli
Ziminli merged commit 0df90c6 into master Sep 14, 2026
2 checks passed
@Ziminli
Ziminli deleted the feat/nccl-point-to-point branch September 14, 2026 10:30
@Ziminli Ziminli mentioned this pull request Sep 14, 2026
53 tasks
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.

2 participants