Repository navigation
Define NCCL_WIN_CFT_COUNTED in the bitcode nccl.h (#4526) - #4526
Open
MittalMakwana wants to merge 2 commits into
Open
MittalMakwana wants to merge 2 commits into
MittalMakwana wants to merge 2 commits into
Conversation
Contributor
|
@MittalMakwana has exported this pull request. If you are a Meta employee, you can view the originating Diff in D126785321. |
MittalMakwana
pushed a commit
to MittalMakwana/torchcomms
that referenced
this pull request
Oct 27, 2026
Summary: The Triton device bitcode build compiles `device_window.cu` with clang against a minimal `ir_include/nccl.h` that stands in for the full NCCL host header. NCCLX 2.32's device headers read the `NCCL_WIN_CFT_COUNTED` window flag in `ncclGetMultimemLeInfo()`, which that minimal header did not define, so the bitcode failed to compile against 2.32 with `use of undeclared identifier 'NCCL_WIN_CFT_COUNTED'`. - Define `NCCL_WIN_CFT_COUNTED` with the value from NCCLX 2.32's `nccl.h` (`0x08`). - No effect on 2.30, whose device headers do not read any window flag. Reviewed By: cppccppccppc Differential Revision: D126785321
Summary: The 2.32 make build of `libnccl.so` failed to link with undefined references to `meta::comms::colltracev2::*` (`CollTraceV2::instance`, `enabled`, `selected`, `newCollId`, `registerComm`, ...), called from `ncclx/meta/colltrace/CollTraceWrapper.cc` and `ctran/colltrace/CollTraceWrapper.cc`. - Root cause: the 2.30 Makefile was moved onto the prebuilt `libcommsutils.so.1` / `libobservatory.so.1`, but the 2.32 Makefile still compiled its own subset of `comms/utils` (only `colltrace/v1`) and never linked `libcommsutils`. Once the shared colltrace wrappers started calling colltrace v2, which lives only in `libcommsutils`, the 2.32 link had nothing to resolve those symbols against. - Fix: port the same change to 2.32. The Makefile no longer compiles any `comms/utils` source or builds `libobservatory`; `libnccl.so` links `-lobservatory -lcommsutils` from `COMMSUTILS_LIB_DIR` (default: the environment's lib dir), and the link rule names both libraries as prerequisites so a missing package fails with a message naming it. `build_ncclx.sh` is shared across versions and already provisions `COMMSUTILS_LIB_DIR`. - One process now holds a single copy of the cvars table, trainer state and colltrace registries, shared with the MCCL plugin, as with 2.30. - The `ncclx_trainer_context` extension links `libcommsutils` too, since `TrainerContext` lives there. Reviewed By: cppccppccppc Differential Revision: D126780535
Summary: The Triton device bitcode build compiles `device_window.cu` with clang against a minimal `ir_include/nccl.h` that stands in for the full NCCL host header. NCCLX 2.32's device headers read the `NCCL_WIN_CFT_COUNTED` window flag in `ncclGetMultimemLeInfo()`, which that minimal header did not define, so the bitcode failed to compile against 2.32 with `use of undeclared identifier 'NCCL_WIN_CFT_COUNTED'`. - Define `NCCL_WIN_CFT_COUNTED` with the value from NCCLX 2.32's `nccl.h` (`0x08`). - No effect on 2.30, whose device headers do not read any window flag. Reviewed By: cppccppccppc Differential Revision: D126785321
MittalMakwana
force-pushed
the
export-D126785321
branch
from
October 27, 2026 19:23
f653d6a to
81b8a7c
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The Triton device bitcode build compiles
device_window.cuwith clang against a minimalir_include/nccl.hthat stands in for the full NCCL host header. NCCLX 2.32's device headers read theNCCL_WIN_CFT_COUNTEDwindow flag inncclGetMultimemLeInfo(), which that minimal header did not define, so the bitcode failed to compile against 2.32 withuse of undeclared identifier 'NCCL_WIN_CFT_COUNTED'.NCCL_WIN_CFT_COUNTEDwith the value from NCCLX 2.32'snccl.h(0x08).Reviewed By: cppccppccppc
Differential Revision: D126785321