Skip to content

Link commsutils in the 2.32 make build (#4524) - #4524

Open
MittalMakwana wants to merge 1 commit into
meta-pytorch:mainfrom
MittalMakwana:export-D126780535
Open

MittalMakwana wants to merge 1 commit into
meta-pytorch:mainfrom
MittalMakwana:export-D126780535

Conversation

@MittalMakwana

@MittalMakwana MittalMakwana commented Oct 21, 2026 •

Copy link
Copy Markdown

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 21, 2026
@meta-codesync

meta-codesync Bot commented Oct 21, 2026

Copy link
Copy Markdown
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
@meta-codesync meta-codesync Bot changed the title Link commsutils in the 2.32 make build Link commsutils in the 2.32 make build (#4524) Oct 27, 2026

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

CLA Signed This label is managed by the Meta Open Source bot. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants