Repository navigation
Link commsutils in the 2.32 make build (#4524) - #4524
Open
MittalMakwana wants to merge 1 commit into
Open
MittalMakwana wants to merge 1 commit into
MittalMakwana wants to merge 1 commit into
Conversation
Contributor
|
@MittalMakwana has exported this pull request. If you are a Meta employee, you can view the originating Diff in D126780535. |
MittalMakwana
pushed a commit
to MittalMakwana/torchcomms
that referenced
this pull request
Oct 27, 2026
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
MittalMakwana
pushed a commit
to MittalMakwana/torchcomms
that referenced
this pull request
Oct 27, 2026
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 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
MittalMakwana
force-pushed
the
export-D126780535
branch
from
October 27, 2026 19:23
2245612 to
9787c8f
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 2.32 make build of
libnccl.sofailed to link with undefined references tometa::comms::colltracev2::*(CollTraceV2::instance,enabled,selected,newCollId,registerComm, ...), called fromncclx/meta/colltrace/CollTraceWrapper.ccandctran/colltrace/CollTraceWrapper.cc.libcommsutils.so.1/libobservatory.so.1, but the 2.32 Makefile still compiled its own subset ofcomms/utils(onlycolltrace/v1) and never linkedlibcommsutils. Once the shared colltrace wrappers started calling colltrace v2, which lives only inlibcommsutils, the 2.32 link had nothing to resolve those symbols against.comms/utilssource or buildslibobservatory;libnccl.solinks-lobservatory -lcommsutilsfromCOMMSUTILS_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.shis shared across versions and already provisionsCOMMSUTILS_LIB_DIR.ncclx_trainer_contextextension linkslibcommsutilstoo, sinceTrainerContextlives there.Reviewed By: cppccppccppc
Differential Revision: D126780535