Skip to content

Port the two-HCA switchless cycle patch to NCCL 2.31.2 - #398

Open
lookevink wants to merge 1 commit into
FujitsuPolycom:mainfrom
lookevink:nccl-2312-switchless-cycle
Open

lookevink wants to merge 1 commit into
FujitsuPolycom:mainfrom
lookevink:nccl-2312-switchless-cycle

Conversation

@lookevink

Copy link
Copy Markdown

What and why

A four-node SGLang deployment on a direct-cable cycle needed SparkRing's two-GID listener advertisement and ring-only initialization on NCCL 2.31.2. The 2.30.7 patch no longer applies to the PAT connection code at the 2.31.2 pin. This ports the existing SparkRing changes, documents the two-HCA configuration and SGLang library selection, and credits the original patch and NVIDIA source. The port is a standalone build input for this runtime.

Validation

  • Applied the patch to NVIDIA NCCL 7b83616df3ae082a1f32bb74c27458bfe8153a13. Checked forward application, the resulting source diff, and reverse application.
  • On Linux arm64, python -m pytest runtime/common -q reported 1,848 passed and two skipped. Repository layout, Markdown links and release-safety checks passed. A separate macOS run had 13 failures, and all 13 reproduced at unchanged upstream commit dcfc974.

Compatibility or evidence

The physical fleet used four 128 GB DGX Sparks with one ConnectX-7 HCA per neighbor, a /30 subnet per cable and the pinned Inkling SGLang image. Stock NCCL 2.30.7 and stock 2.31.2 both timed out before completing the first GPU all-reduce. With the patched library, NCCL_ALGO=Ring and NCCL_SWITCHLESS_RING_ONLY=1, all four ranks returned the correct sum eight times at each of 1 KiB, 64 KiB and 1 MiB. Hardware counters showed RDMA traffic on both neighbor ports on every rank. The same configuration served six chat requests with the native Inkling 2 Small checkpoint. These tests exercised the four-node, two-HCA SGLang configuration.

Build and library identity · Stock controls, collectives, counters and serving records

@FujitsuPolycom FujitsuPolycom left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The patch itself looks solid — it applies cleanly against upstream NVIDIA NCCL v2.31.2-1 (7b83616df3ae082a1f32bb74c27458bfe8153a13), matches the 2.29.7 hunk-for-hunk while keeping the 2.31.2 ncclTopoComputePaths / ncclTopoTrimSystem / ncclTopoCompute changes intact, and doesn't touch the existing 2.29.7 path or default build behavior.

Three small cleanup items before merge:

  1. spark_transport/nccl/README.md — make the /30 + subnet-aware env vars explicit inline
    The new NCCL 2.31.2 on a two-HCA cycle with SGLang section notes that subnet-aware routing matches the /30 link subnets, and later sections of the same file show NCCL_IB_SUBNET_PREFIX_LEN=24 and NCCL_SKIP_TREE_CONNECT=1. Listing the exact 2.31.2 cycle env vars inline (NCCL_IB_SUBNET_AWARE_ROUTING=1, NCCL_IB_SUBNET_PREFIX_LEN=30, NCCL_IB_MERGE_NICS=0, NCCL_CROSS_NIC=1) avoids readers copying the /24 or skip-tree settings from lower down in the README by mistake.

  2. spark_transport/nccl/README.md — section placement & self-contained wording
    ### NCCL 2.31.2 on a two-HCA cycle with SGLang currently sits under ## Status and scope rather than ## Runtime contract (where the env/runtime expectations live). Also, per docs/development/writing.md, consider trimming undefined external names ("the Inkling SGLang image", "Inkling 2 Small") in favor of describing the SGLang + NCCL 2.31.2 setup directly.

  3. THIRD_PARTY_NOTICES.md — match sibling entry format
    Match the em-dash bullet style of the 2.29.7 entry and include the v2.31.2-1 tag alongside commit 7b83616df3ae082a1f32bb74c27458bfe8153a13 so both NCCL base versions are documented consistently.

(Also note CI checks haven't run on the PR yet — once approved to run, check_repository_layout.py and check_markdown_links.py should confirm everything passes cleanly.)

This branch has not been deployed

No deployments
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