Skip to content

fix: build NCCL stub with public device API header - #4998

Merged
lvhan028 merged 1 commit into
InternLM:mainfrom
lvhan028:fix/nccl-stub-headers
Sep 22, 2026
Merged

lvhan028 merged 1 commit into
InternLM:mainfrom
lvhan028:fix/nccl-stub-headers

Conversation

@lvhan028

Copy link
Copy Markdown
Collaborator

Motivation

NCCL 2.32.3 moved ncclCommProperties_t and ncclDevCommRequirements_t from nccl_device/core.h into nccl_device/host.h. Including core.h directly therefore breaks the TurboMind compatibility stub build. The build dependency allows nvidia-nccl-cu12>=2.30.4, so isolated pip builds can select the affected release.

Observed in this CI failure.

Modification

Include the public nccl_device.h entry point in nccl_stub.cc so declarations are available across the supported header layouts. Keep the NCCL minimum at 2.30.4 with no version cap. This changes one include and preserves the stub's symbols and behavior.

Validation

  • Stub compilation, linking, loading, and exported-symbol checks passed with NCCL 2.30.4, 2.30.7, 2.31.2, and 2.32.3. The original source reproduces both missing-type errors with 2.32.3.
  • The CMake turbomind_nccl_stub target and pre-commit passed.
  • Real-model HTTP tests passed for Qwen3-0.6B with TP=1/2 on NCCL 2.30.4, 2.31.2, and 2.32.3, and Qwen3-30B-A3B-Instruct-2507 with TP=2/EP=2 and DeepEP on NCCL 2.32.3. Including before/after controls, 80 requests passed across 10 server configurations, covering streaming, multi-turn, and concurrent requests. Corresponding text and non-streaming token IDs were identical.

The full TurboMind extension used for inference was built with NCCL 2.31.2; the changed stub was rebuilt against each tested header version. The DeepEP control used the original stub built with 2.31.2 and the same 2.32.3 runtime as the fixed case. Local NCCL 2.31.2 DeepEP initialization fails with the same GIN rank-stride error before and after this change. NCCL 2.30.4 DeepEP, 2.30.7 inference, and multi-node RDMA were not tested.

Checklist

  • Pre-commit passes.
  • Native build and real-model regression checks cover this header change; no Python unit test was added.
  • Stub build compatibility checked with all currently published NCCL versions >=2.30.4; runtime coverage and limitations are listed above.
  • Documentation reviewed; no user-facing behavior or configuration changes require updates.

Copilot AI lite review requested due to automatic review settings September 22, 2026 11:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The header compatibility fix is validated across supported NCCL versions with no unresolved issues.

Review effort: Lite
Findings: None

What changed in this PR

Updates the NCCL compatibility stub to use the public device API header, supporting NCCL 2.30.4–2.32.3 while preserving existing behavior.

Changes:

  • Replaces nccl_device/core.h with nccl_device.h.
  • Preserves existing stub symbols and behavior.
File Description
src/​turbomind/​comm/​nccl/​deepep/​nccl_stub.cc Uses the public NCCL device API entry point.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@lvhan028
lvhan028 merged commit 4fe5a33 into InternLM:main Sep 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants