Skip to content

Produce BOLT-compatible libraries - #3383

Merged
fheinecke merged 14 commits into
NVIDIA:mainfrom
fheinecke:fred/bolt-compatible-libs-1
Oct 2, 2026
Merged

fheinecke merged 14 commits into
NVIDIA:mainfrom
fheinecke:fred/bolt-compatible-libs-1

Conversation

@fheinecke

@fheinecke fheinecke commented Aug 14, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This is the first in a series of changes to produce BOLT-optimized TE libraries for arm64. This does not produce binaries actually optimized by BOLT, rather, it produces binaries that can be optimized by BOLT. We'll need to start producing and publishing profiles to be able to actually start release with this optimization built in.

This is arguably a breaking change, but in an area where we haven't explicitly defined compatibility guarantees. NCCL >= 2.30.4 is now required for arm64 builds, and older compilers that don't support the newly added build-time flags will fail. In addition, A53 core errata workarounds 835769 and 843419 are now disabled, which may cause correctness problems on older A53 core revisions.

This change is enabled by default for arm64 builds.

This needs #3434 prior to merge.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Please list the changes introduced in this PR:

  • Made all shared libraries compatible with BOLT

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@fheinecke
fheinecke force-pushed the fred/bolt-compatible-libs-1 branch from 9a0da74 to 8a42b4e Compare August 14, 2026 18:53
@fheinecke

Copy link
Copy Markdown
Collaborator Author

/te-ci

@fheinecke

Copy link
Copy Markdown
Collaborator Author

CI failures are all runner scheduling failures, not related to this changeset

@fheinecke
fheinecke marked this pull request as ready for review August 17, 2026 19:32
@greptile-apps

greptile-apps Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Build system adds BOLT optimization flags across all targets.

The PR appears safe to merge based on the reviewed changes and resolved findings.

Summary

This PR adds BOLT-compatible compiler and linker settings to the common library, PyTorch and JAX extensions, and the NCCL EP build.

  • The current code does not establish a new actionable issue in the PR changes.
  • All previous Greptile threads are resolved.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  CXX["Configured C++ compiler"] --> Probe["Target and flag probes"]
  Probe --> Frameworks["PyTorch and JAX extensions"]
  Probe --> NCCL["NCCL EP build"]
  CMake["CMake target checks"] --> Common["Common library"]
Loading

Reviews (12) · Last reviewed commit: "fix greptile PR comments about compiler ..."

Comment thread build_tools/utils.py Outdated
@ptrendx

ptrendx commented Aug 18, 2026

Copy link
Copy Markdown
Member

@fheinecke Why is the supported NCCL change needed here (not yet really looked at the PR, just at the description)?

@fheinecke

Copy link
Copy Markdown
Collaborator Author

@ptrendx so today, there are two different minimum versions of NCCL: no defined version when NCCL EP is not used, and 2.30.4 when NCCL EP is used (actually there is also 2.30.0 for when cuBLASMp is used as well, but that has no impact here). A separate NCCL EP minimum version is supported by allowing any NCCL version to load (the default path), and only erroring if NCCL EP logic is hit at runtime. If users never use NCCL EP-backed logic, they can use NCCL versions older than 2.30.4.

This PR adds -z now to the linker flags. This tells ld.so at load time to resolve all dynamic symbols used before the first line of TE logic is executed, regardless of whether or not there is runtime logic gating access to these symbols based on library version. This means that because the TE library references symbols only in NCCL >= 2.30.4 anywhere, they must be resolved by ld.so. This is what raises the minimum version.

@fheinecke
fheinecke force-pushed the fred/bolt-compatible-libs-1 branch from 8a42b4e to 0982a20 Compare September 1, 2026 20:35
Comment thread build_tools/utils.py Outdated
Comment thread build_tools/utils.py
@fheinecke
fheinecke requested a review from ptrendx September 1, 2026 20:55
Comment thread build_tools/utils.py Outdated
Comment thread build_tools/utils.py Outdated
@fheinecke
fheinecke requested a review from ptrendx September 4, 2026 16:36
@ptrendx ptrendx self-assigned this Sep 8, 2026
Comment thread build_tools/utils.py Outdated
@fheinecke
fheinecke requested a review from ptrendx September 9, 2026 22:33
@nvMelissa nvMelissa added the 2.20 label Sep 10, 2026
Comment thread transformer_engine/common/CMakeLists.txt Outdated
Comment thread build_tools/utils.py Outdated
@ptrendx

ptrendx commented Sep 17, 2026

Copy link
Copy Markdown
Member

/te-ci

@ptrendx ptrendx added 2.21 and removed 2.20 labels Sep 21, 2026
fheinecke and others added 5 commits September 29, 2026 13:22
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
fheinecke and others added 9 commits September 29, 2026 13:22
… arch

Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
…s consistent)

Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
…d arch mismatch

Signed-off-by: Fred Heinecke <fheinecke@nvidia.com>
@fheinecke
fheinecke force-pushed the fred/bolt-compatible-libs-1 branch from a184ad4 to c4ba4ae Compare September 29, 2026 18:22
@fheinecke

Copy link
Copy Markdown
Collaborator Author

/te-ci

@fheinecke
fheinecke merged commit 4fcb7ca into NVIDIA:main Oct 2, 2026
35 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants