Skip to content

[cherry-pick][release/2.13] MD-TRT: move USE_C10D_NCCL from copts to defines (#4358 BUILD)#4424

Merged
lanluo-nvidia merged 2 commits into
release/2.13from
cherrypick_4358_buildfix
Jul 22, 2026
Merged

[cherry-pick][release/2.13] MD-TRT: move USE_C10D_NCCL from copts to defines (#4358 BUILD)#4424
lanluo-nvidia merged 2 commits into
release/2.13from
cherrypick_4358_buildfix

Conversation

@apbose

@apbose apbose commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Corrected cherry-pick of the core/runtime/BUILD change from #4358 onto current release/2.13, replacing the earlier PR #4374 which dropped it.

What this fixes
The BUILD portion of #4358 moves the NCCL macro from a target-local copts flag to a propagating defines:

-    copts = if_torch_nccl(["-DUSE_C10D_NCCL"]),
-    defines = select({ ...TRT_HAS_IRUNTIME_CONFIG... }),
+    defines = if_torch_nccl(["USE_C10D_NCCL"]) + select({ ...TRT_HAS_IRUNTIME_CONFIG... }),

This matters because copts applies -DUSE_C10D_NCCL only to runtime_base's own translation units, whereas defines propagates USE_C10D_NCCL to every dependent that compiles against the runtime headers — keeping the #ifdef USE_C10D_NCCL code paths consistent across the dependency graph.

Why a new PR
The original cherry-pick was resolved when release/2.13 predated the IRuntimeConfig infrastructure, and the BUILD change was dropped entirely. release/2.13 has since added RuntimeSettings.* / TRTRuntimeConfig.* and the defines = select({TRT_HAS_IRUNTIME_CONFIG}) block, so #4358's BUILD change now applies cleanly on top of it. This branch is rebuilt on current release/2.13; the only delta is the coptsdefines merge — RuntimeSettings/TRTRuntimeConfig are retained, nothing dropped.

The other two files from #4358 (_utils.py, _TRTInterpreter.py) are already present on release/2.13, so they produce no delta here.

Supersedes #4374. Original PR: #4358

🤖 Generated with Claude Code

@meta-cla meta-cla Bot added the cla signed label Jul 22, 2026
@github-actions github-actions Bot added component: core Issues re: The core compiler component: runtime labels Jul 22, 2026
…chtrtrun

The example used the multinode form (--nnodes/--node_rank/--rdzv_endpoint),
which is only for multinode. Use the single-node 2-GPU invocation instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lanluo-nvidia
lanluo-nvidia merged commit 21efc66 into release/2.13 Jul 22, 2026
168 of 171 checks passed
@apbose
apbose deleted the cherrypick_4358_buildfix branch July 23, 2026 17:49
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.

2 participants