CollectiveX: NCCL EP v0.2 via nccl-extensions — lift the LL clamp, enable LL rows and B200 EP16 - #2815
CollectiveX: NCCL EP v0.2 via nccl-extensions — lift the LL clamp, enable LL rows and B200 EP16#2815Oseltamivir wants to merge 1 commit into
Conversation
… clamp and enable B200 EP16 The vendor shipped nccl-ep v0.2 as the nccl-extensions PyPI wheel (nccl4py stopped bundling nccl/ep at 0.4 and now provides only nccl.core). The install spec becomes two pinned wheels — nccl-extensions[cu13]==0.1.0 plus nccl4py[cu13]==0.5.0 — so a cache rebuild resolves the same tree, and the spec string change itself re-keys the shared cache. The import probe now logs get_lib_version()/get_lib_path() so a stale or shadowing libnccl_ep.so is visible in the run log. The v0.2 wheel ships the combine-recv fence v0.1's port of DeepEP lacked (the PR #642 analogue: fence_view_async_shared before mbarrier_arrive(emptyBarriers) in the shipped ll_ep.cuh) — the documented restore condition for the T<=128 ladder clamp — so the LL ladder returns to the full 256-slot receive and LL rows are enabled: EP8 on h100/h200/b300, EP8+EP16 on b200/gb200/gb300. b200 normal mode also gains EP16 (v0.2 fixes the RDMA EP16 GIN fault that pool hit under v0.1); h100/h200/b300 EP16 stays unsupported pending revalidation, since only the B200 configuration is claimed fixed. kernel_generation bumps to nccl-ep-v02-ht-routed / nccl-ep-v02-ll so pre-upgrade rows never pool with the new mover. The adapter's call surface is unchanged — every class and signature it uses is identical in v0.2. Still BF16 only: v0.2's FP8 dispatch (DS_FP8E3M4) and experimental NVFP4 combine recipes are separate bring-up. All claims beyond the fence (which is verified present in the published wheel) are validated by the correctness oracle on metal.
There was a problem hiding this comment.
I reviewed this PR and didn't find any bugs. Because it lifts a documented correctness clamp (the LL ladder cap) based on unverified vendor claims and enables new low-latency/EP16 rows across several production SKU configs, a human look — including the promised on-metal validation sweep — would still be worthwhile.
What was reviewed: the pip-spec/cache-slug rework in runtime/common.sh and runtime/prepare_backend.sh, including the deliberately unquoted two-spec install line; the ladder-clamp removal and kernel_generation rename in bench/ep_nccl.py alongside the corresponding test rework in tests/test_backends.py; and the platform_config.json changes, which are limited to adding nccl-ep to ll_backends where it was already present in backends. Also checked the new unguarded nccl.ep.get_lib_version()/get_lib_path() probe call in prepare_backend.sh — an exception there would only affect the diagnostic log line, not correctness.
Extended reasoning...
This PR upgrades CollectiveX's NCCL EP adapter from a from-source v0.1 pin to a v0.2 PyPI wheel (nccl-extensions), touching the install/cache pipeline in runtime/common.sh and runtime/prepare_backend.sh, the adapter logic and correctness-clamp constants in bench/ep_nccl.py, the SKU-level enablement table in configs/platform_config.json, and narrative docs. The single commit is well-documented with detailed inline commentary explaining the rationale for each change.
No security-relevant risks stand out: there is no auth, crypto, or permission-boundary code here. The unquoted $COLLX_NCCL_EP_SPEC in the pip install command is intentional word-splitting of two version-pinned pip specs (with a shellcheck disable and a comment explaining why), not attacker-controlled input, so it is not an injection concern.
The correct level of scrutiny here is higher than a typical config tweak: the core change removes a documented safety clamp (_LL_LADDER_CAP returning to _LL_BUFFER_CAP) that was put in place specifically because of an observed 1-in-5 bimodal data-corruption bug in the low-latency combine path. The removal is justified entirely by the vendor's changelog claim that v0.2 ships a missing memory fence, which the PR author explicitly says is unverified pending on-metal validation ("What only metal can settle" section lists LL correctness at T=256, LL EP16, and B200 EP16 as still-open validation items). Enabling this clamp-lifted path across many production SKU configs in platform_config.json before that validation is a design/risk decision that benefits from a second set of human eyes, even though the mechanical code changes (renames, spec swap, test updates) are individually simple and well-reasoned.
Other factors: there is no CODEOWNERS entry for experimental/CollectiveX/, this is the first review pass on this PR (no prior review body or unaddressed third-party objections in the timeline), and local tests reportedly pass (99 tests, 7 skips). The one candidate issue considered (unguarded diagnostic probe call) only affects log output, not runtime correctness, so it does not change the overall assessment.
Stacked on #2786 (cx-measure-fixes) — review only the top commit here; merge after 2786.
Implements the vendor's v0.2 upgrade request.
Packaging. nccl-ep v0.2 ships as the
nccl-extensionsPyPI wheel, which ownsnccl.ep(libnccl_ep.so JIT runtime + bindings);nccl4pystopped bundlingnccl/epat 0.4 and provides onlynccl.core. The install spec becomes two pinned wheels —nccl-extensions[cu13]==0.1.0 nccl4py[cu13]==0.5.0— rather than the vendor's unpinnednccl-extensions[cu13]: the spec string keys the shared cache dir, and nccl-extensions leaves its nccl4py dependency unpinned, so an unpinned spec would let a cache rebuild silently resolve a different tree. The spec change itself re-keys the cache and forces a clean reinstall. The import probe now logsnccl.ep.get_lib_version()/get_lib_path()so a stale or image-shadowing libnccl_ep.so is visible in every run log.LL clamp lifted, rows enabled. v0.1's LL combine recv pipeline was a port of DeepEP's pre-#642 kernel, missing the shared-memory fence before
mbarrier_arrive(bimodal 1-in-5 T=256 corruption on gb300 EP8). The v0.2 wheel physically ships the fence —fence_view_async_shared()before theemptyBarriersarrive in the published wheel'sll_ep.cuh— which was the documented restore condition, so_LL_LADDER_CAPreturns to_LL_BUFFER_CAP(256) andll_backendsgains nccl-ep: EP8 on h100/h200/b300, EP8+EP16 on b200/gb200/gb300.B200 EP16 normal mode enabled — the vendor claims v0.2 fixes the RDMA EP16 GIN fault. h100/h200/b300 EP16 stays unsupported: only the B200 configuration is claimed fixed.
Store hygiene.
kernel_generationbumps tonccl-ep-v02-ht-routed/nccl-ep-v02-llso pre-upgrade rows never pool with the new mover.No adapter code changes needed: every class and signature the adapter uses (GroupConfig, Group.create/create_handle, dispatch/combine/complete/update, DispatchConfig/CombineConfig/LayoutInfo/Tensor) is unchanged v0.1→v0.2, verified against the published wheel. Still BF16-only — v0.2's FP8 dispatch (
DS_FP8E3M4) and experimental NVFP4 combine are separate bring-up.What only metal can settle (validation sweep to follow on this branch): LL correctness unclamped at T=256, LL EP16, B200 EP16 HT, and HT
complete()semantics — v0.2's docstring now describescomplete()as LL-staged-only, while under v0.1 the HT combine required it to finish the cross-rank gather; the adapter still calls it unconditionally and the combine oracle will catch any semantic change. Registry enables are claims until that sweep is green.Local suite: 99 tests pass (7 torch-gated skips).
Note
Medium Risk
Changes benchmark dependency pins, sweep coverage (new LL/EP16 cells), and measurement contract (
kernel_generation, T=256 LL ladder); correctness still gated by the oracle but metal validation is explicitly deferred.Overview
Upgrades CollectiveX NCCL EP to the v0.2 stack by installing pinned
nccl-extensions[cu13](ownsnccl.ep) plusnccl4py[cu13]instead of the old singlenccl4pywheel. The install spec keys the shared cache and forces a clean reinstall; the import probe now logslibnccl_epversion and path.Low-latency measurement restores the full decode ladder:
_LL_LADDER_CAPequals_LL_BUFFER_CAP(256) because v0.2 ships the combine-recv fence that v0.1 lacked.ll_backendsgainsnccl-epon H100/H200/B300 (EP8) and B200/GB200/GB300 (EP8+EP16); B200backendsalso addsnccl-epat EP16 for normal mode (vendor-claimed GIN fix).Result hygiene:
kernel_generationbecomesnccl-ep-v02-ht-routed/nccl-ep-v02-llso pre-upgrade rows do not pool with v0.2. README and methodology document the packaging split, unclamped LL, and revised EP16 coverage claims. Unit tests expect ladder ≤ buffer (equality under v0.2) and still exercise buffer-vs-ladder sizing via a patched clamp.Reviewed by Cursor Bugbot for commit 5de11ba. Bugbot is set up for automated code reviews on this repo. Configure here.