Skip to content

feat: add point-to-point communication for mccl - #62

Open
lqinfdim wants to merge 1 commit into
InfiniTensor:masterfrom
lqinfdim:feat/mccl-point-to-point-20260818
Open

feat: add point-to-point communication for mccl#62
lqinfdim wants to merge 1 commit into
InfiniTensor:masterfrom
lqinfdim:feat/mccl-point-to-point-20260818

Conversation

@lqinfdim

Copy link
Copy Markdown

Summary

Add point-to-point communication support for the MCCL backend.

This PR introduces Send and Recv operations for MCCL on MetaX GPUs,
including the backend adapters, common CCL implementations, bridge
registration, tests, and a runnable example.

Changes

  • MCCL backend

    • Add MCCL adapters for mcclSend and mcclRecv in
      src/backends/ccl/mccl/impl/send.h and
      src/backends/ccl/mccl/impl/recv.h.
    • Add MCCL API declarations for point-to-point communication in
      src/backends/ccl/mccl/api.h.
    • Register the MCCL Send and Recv implementations with the CCL bridge.
  • Common CCL implementation

    • Add common point-to-point operation implementations in
      src/backends/ccl/common/impl/send.h and
      src/backends/ccl/common/impl/recv.h.
    • Preserve the existing backend and device validation behavior.
  • Build, tests, and example

    • Update bridge generation dependencies for the new point-to-point
      operations.
    • Add point-to-point implementation tests in
      tests/ccl_point_to_point_impl.cc.
    • Add bridge dependency and bridge generation coverage.
    • Add the examples/ccl/send_recv.cc example.
    • Validate command-line arguments without exception-based parsing.

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

This PR adds point-to-point communication support and does not change the
performance characteristics of existing collective operations.

Known Issues & Future Work

  • The implementation currently covers MCCL point-to-point send and receive
    operations.
  • Multi-device MCCL runtime validation depends on a working MetaX/MCCL
    runtime environment and communicator initialization.
  • Additional benchmark coverage can be added in a follow-up change if
    point-to-point performance tracking is required.

Test Results

The following checks were run with MetaX and MCCL enabled:

  • Clean CMake build completed successfully.
  • CTest passed: 3/3 tests.
    • bridge_dependency_contract
    • bridge_generation
    • ccl_point_to_point_impl
  • The examples/ccl/send_recv executable was built successfully.
  • Invalid command-line arguments return an error without throwing exceptions.
  • Help output is returned successfully with -h.

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

The following items should be checked after verifying them locally.

Title, Branch, and Commits

  • PR title follows Conventional Commits.
  • Branch name follows the repository naming convention:
    feat/mccl-point-to-point-20260818.
  • Commit message follows Conventional Commits.
  • This small PR is maintained as a single squashable commit.
  • No stray merge commits from master.
  • No fixup!, squash!, or wip commits remain.

Scope and Design

  • Changes are limited to MCCL point-to-point communication and its
    tests/examples.
  • No unrelated backend or platform behavior was added.
  • No dead code, debug output, or unexplained TODOs were introduced.
  • No unrelated formatting churn was intentionally introduced.

General Code Hygiene

  • Modified files use English comments and error messages.
  • Modified files have trailing newlines.
  • git diff --check passes.

C++ Specific

  • No exceptions are thrown by the new example argument parsing or
    point-to-point implementation.
  • clang-format version 16 has been run on all modified C++ files.
  • Existing constructor and validation conventions are preserved.

Testing

  • The relevant CCL example was built successfully.
  • The relevant unit and bridge tests passed.

Build, CI, and Tooling

  • CI workflows are green.

Documentation

  • Documentation update is not required for this internal backend
    implementation and example addition.

Security and Safety

  • No secrets, tokens, internal URLs, customer data, or hardware
    identifiers were committed.
  • No unsafe pointer arithmetic or uninitialized reads were introduced.

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