Repository navigation
[https://nvbugs/6463987][fix] Cherry-pick #20103 to release/1.3: pin GB300 GLM-5 ctx workers to their GPU's NUMA node in perf-sanity - #20136
Merged
chenfeiz0326 merged 1 commit intoOct 13, 2026
Merged
chenfeiz0326 merged 1 commit into
chenfeiz0326 merged 1 commit into
Conversation
…: pin GB300 GLM-5 ctx workers to their GPU's NUMA node in perf-sanity
The GB300 GLM-5 ctx worker (TP2/EP2, attention DP, CUTEDSL MoE) is bimodal on
NCCL >= 2.30: some runs take ~1.6x longer per prefill step. The slow mode
appears exactly when the two ranks' executor threads land on different Grace
sockets (19/19 slow reps split; 101/101 fast reps on one socket, measured over
120 reps).
Cause: Slurm binds each task to socket 0, and configure_cpu_affinity() widens
that to all CPUs when TLLM_NUMA_AWARE_WORKER_AFFINITY is unset. NCCL 2.29.x
then re-pinned the thread that creates the communicator back to the GPU-local
CPUs at the end of initTransportsRank; 2.30.3 fixed that ("CPU affinity mask is
not restored in initTransportsRank"), so rank 1's executor now floats across
both sockets.
Set TLLM_NUMA_AWARE_WORKER_AFFINITY=1 on the ctx worker so TRT-LLM binds each
rank to its GPU's NUMA node itself, independent of the NCCL version. Applied
to the six GB300 GLM-5 1k1k/8k1k cases that share this ctx worker shape.
(cherry picked from commit e913e44)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: chenfeiz0326 <[email protected]>
Contributor
Contributor
|
Add Carrot credits or activate Agent usage billing to use Autofix |
reasonsolo
approved these changes
Oct 12, 2026
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
hyukn
approved these changes
Oct 12, 2026
chenfeiz0326
enabled auto-merge (squash)
October 12, 2026 09:45
Collaborator
Author
|
/bot skip --comment "Only modify some perf tests' config, no need to run the whole CI pipeline" |
Collaborator
|
PR_Github #77406 [ skip ] triggered by Bot. Commit: |
Collaborator
|
PR_Github #77406 [ skip ] completed with state |
Shixiaowei02
approved these changes
Oct 13, 2026
1 task done
SimengLiu-nv
pushed a commit
to SimengLiu-nv/TensorRT-LLM
that referenced
this pull request
Oct 26, 2026
….3: Pin GB300 GLM-5 ctx workers to their GPU's NUMA node in perf-sanity Forward-port of release/1.3 PR NVIDIA#20136 (release/1.3 commit 47c0479) to main. The release PR cherry-picked main PR NVIDIA#20103, which was closed without merging, so this change was not on main. Signed-off-by: chenfeiz0326 <[email protected]> Co-authored-by: chenfeiz0326 <[email protected]> Co-authored-by: Claude <[email protected]> Signed-off-by: Simeng Liu <[email protected]>
SimengLiu-nv
pushed a commit
to SimengLiu-nv/TensorRT-LLM
that referenced
this pull request
Nov 2, 2026
….3: Pin GB300 GLM-5 ctx workers to their GPU's NUMA node in perf-sanity Forward-port of release/1.3 PR NVIDIA#20136 (release/1.3 commit 47c0479) to main. The release PR cherry-picked main PR NVIDIA#20103, which was closed without merging, so this change was not on main. Signed-off-by: chenfeiz0326 <[email protected]> Co-authored-by: chenfeiz0326 <[email protected]> Co-authored-by: Claude <[email protected]> Signed-off-by: Simeng Liu <[email protected]>
SimengLiu-nv
pushed a commit
to SimengLiu-nv/TensorRT-LLM
that referenced
this pull request
Nov 2, 2026
….3: Pin GB300 GLM-5 ctx workers to their GPU's NUMA node in perf-sanity Forward-port of release/1.3 PR NVIDIA#20136 (release/1.3 commit 47c0479) to main. The release PR cherry-picked main PR NVIDIA#20103, which was closed without merging, so this change was not on main. Signed-off-by: chenfeiz0326 <[email protected]> Co-authored-by: chenfeiz0326 <[email protected]> Co-authored-by: Claude <[email protected]> Signed-off-by: Simeng Liu <[email protected]>
SimengLiu-nv
pushed a commit
to SimengLiu-nv/TensorRT-LLM
that referenced
this pull request
Nov 3, 2026
….3: Pin GB300 GLM-5 ctx workers to their GPU's NUMA node in perf-sanity Forward-port of release/1.3 PR NVIDIA#20136 (release/1.3 commit 47c0479) to main. The release PR cherry-picked main PR NVIDIA#20103, which was closed without merging, so this change was not on main. Signed-off-by: chenfeiz0326 <[email protected]> Co-authored-by: chenfeiz0326 <[email protected]> Co-authored-by: Claude <[email protected]> Signed-off-by: Simeng Liu <[email protected]>
SimengLiu-nv
pushed a commit
to SimengLiu-nv/TensorRT-LLM
that referenced
this pull request
Nov 3, 2026
….3: Pin GB300 GLM-5 ctx workers to their GPU's NUMA node in perf-sanity Forward-port of release/1.3 PR NVIDIA#20136 (release/1.3 commit 47c0479) to main. The release PR cherry-picked main PR NVIDIA#20103, which was closed without merging, so this change was not on main. Signed-off-by: chenfeiz0326 <[email protected]> Co-authored-by: chenfeiz0326 <[email protected]> Co-authored-by: Claude <[email protected]> Signed-off-by: Simeng Liu <[email protected]>
SimengLiu-nv
pushed a commit
to SimengLiu-nv/TensorRT-LLM
that referenced
this pull request
Nov 3, 2026
….3: Pin GB300 GLM-5 ctx workers to their GPU's NUMA node in perf-sanity Forward-port of release/1.3 PR NVIDIA#20136 (release/1.3 commit 47c0479) to main. The release PR cherry-picked main PR NVIDIA#20103, which was closed without merging, so this change was not on main. Signed-off-by: chenfeiz0326 <[email protected]> Co-authored-by: chenfeiz0326 <[email protected]> Co-authored-by: Claude <[email protected]> Signed-off-by: Simeng Liu <[email protected]>
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.
Description
Cherry-pick of #20103 to
release/1.3. It applies cleanly; the six YAMLs onrelease/1.3are identical tomain's before #20103.Fixes nvbugs/6463987:
ctx_only-gb300_glm-5-fp4_1k1k_con1_ctx1_dep2_gen1_tep4_eplb0_mtp3_ccb-NIXLregressed ~38 % inoutput_token_throughputafter the image update in #15087, which moved NCCL from 2.29.7 to 2.30.4. The regression is intermittent: affected runs drop to ~2.6 tok/s.release/1.3is exposed the same way:pytorch-26.08) ships NCCL 2.30.7 (nvidia-nccl-cu13==2.30.7), which restores the widened mask exactly like 2.30.4.configure_cpu_affinity()and its NUMA helpers are identical tomain's, and rank N still runs on GPU N.ctx_worker_env_varreaches the ctx_only worker through the samesubmit.py/test_perf_sanity.pypath.8k1k_con1,8k1k_con512and8k1k_con1024run inrelease/1.3CI (l0_gb300_multi_gpus_perf_sanity.yml); none are waived.main, not onrelease/1.3.Performance:
ctx_only-gb300_glm-5-fp4_1k1k_con1_ctx1_dep2_gen1_tep4_eplb0_mtp3_ccb-NIXLoutput_token_throughput(tok/s), every run, in submission order. All runs on oci-aga GB300; each completed 10/10 requests with 0 failed. Bold = slow-mode run (prefill step > 320 ms).46bf21b1, pytorch-26.05, NCCL 2.30.4TLLM_NUMA_AWARE_WORKER_AFFINITY=143931299604, pytorch-26.09, NCCL 2.31.2, +TLLM_NUMA_AWARE_WORKER_AFFINITY=1Per-run details.
Bad commit — 10 runs
Bad commit + fix — 10 runs
Main ToT + fix — 17 runs
1662a877(NCCL 2.29.7), same cluster: 4.08, 4.12, 4.17, 4.17, 4.28 (0/5 slow).Why NCCL 2.29.7 was fast, 2.30.4 is slow, and why
TLLM_NUMA_AWARE_WORKER_AFFINITY=1fixes itThe setup.
device_id = global_rank % torch.cuda.device_count()), so the ranks use GPUs 0 and 1, which are attached to CPU socket 0 (CPUs 0-71).TLLM_NUMA_AWARE_WORKER_AFFINITYunset,configure_cpu_affinity()(tensorrt_llm/llmapi/utils.py) sees a restricted mask and removes it: it logsRemoving CPU affinity constraintsand widens the rank to all CPUs (0-143). Onmainboth ranks end up on 0-143. On the bad commit only rank 1 does; rank 0 creates its NCCL communicator on a different thread and keeps 0-71.What NCCL changed. During communicator setup,
initTransportsRank()temporarily pins the calling thread to the CPUs near its GPU. The last line decides what that thread is left with:initTransportsRank()ncclOsSetAffinity(comm->cpuAffinity)ncclOsSetAffinity(affinitySave)ncclCommInitRank. The thread ends on 0-71 with 2.29.7, and on 0-143 with 2.30.4 and 2.30.7.Why that makes it slow.
Why
TLLM_NUMA_AWARE_WORKER_AFFINITY=1fixes it.=1,configure_cpu_affinity()doesn't remove the mask. It asks NVML which CPUs are attached to the rank's GPU and pins the rank there: 0-71 for GPUs 0 and 1. Onmainit binds every existing thread; on the bad commit it binds the process's main thread, and threads created afterwards inherit the mask. Both were enough here.Why only these six YAMLs.
Change
ctx_worker_env_var: TLLM_NUMA_AWARE_WORKER_AFFINITY=1to the six GB300 GLM-5ctx1_dep2perf-sanity YAMLs: one line per file, no code change, gen workers untouched.s_test_case_name,s_gpu_type,s_runtime,s_branch) are unchanged, so each case keeps its history.Files:
gb300_glm-5-fp4_1k1k_con1_ctx1_dep2_gen1_tep4_eplb0_mtp3_ccb-NIXLgb300_glm-5-fp4_1k1k_con4096_ctx1_dep2_gen1_dep8_eplb256_mtp1_ccb-NIXLgb300_glm-5-fp4_1k1k_con512_ctx1_dep2_gen1_dep32_eplb0_mtp3_ccb-NIXLgb300_glm-5-fp4_8k1k_con1024_ctx1_dep2_gen1_dep8_eplb256_mtp1_ccb-NIXLgb300_glm-5-fp4_8k1k_con1_ctx1_dep2_gen1_tep8_eplb0_mtp3_ccb-NIXLgb300_glm-5-fp4_8k1k_con512_ctx1_dep2_gen1_dep32_eplb0_mtp3_ccb-NIXLTest Coverage
perf/test_perf_sanity.py::test_e2e[aggr_upload-ctx_only-gb300_glm-5-fp4_*_ctx1_dep2_*](the six cases above).PR Checklist
🤖 Generated with Claude Code
Dev Engineer Review
The six GB300 GLM-5
ctx1_dep2perf-sanity YAML files setTLLM_NUMA_AWARE_WORKER_AFFINITY=1for context workers. This targets CPU affinity for the affected workers. The supplied evidence reports improved placement consistency, but the throughput measurements were taken onmain, not rerun onrelease/1.3.QA Engineer Review
No test functions, selectors, waivers, or test-list entries changed. The reported test coverage is
perf/test_perf_sanity.py::test_e2e[aggr_upload-ctx_only-gb300_glm-5-fp4_*_ctx1_dep2_*]; pre-commit hooks reportedly passed on the changed files. The supplied evidence does not establish CI or manual-QA list coverage. Coverage verdict: needs follow-up, because the measurements were not rerun on the target branch.Per-File QA Perspective
tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_1k1k_con1_ctx1_dep2_gen1_tep4_eplb0_mtp3_ccb-NIXL.yaml: Enables NUMA-aware affinity for context workers. Verify worker CPU placement and perf-sanity behavior.tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_1k1k_con4096_ctx1_dep2_gen1_dep8_eplb256_mtp1_ccb-NIXL.yaml: Enables NUMA-aware affinity for context workers. Verify worker CPU placement and perf-sanity behavior.tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_1k1k_con512_ctx1_dep2_gen1_dep32_eplb0_mtp3_ccb-NIXL.yaml: Enables NUMA-aware affinity for context workers. Verify worker CPU placement and perf-sanity behavior.tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_8k1k_con1024_ctx1_dep2_gen1_dep8_eplb256_mtp1_ccb-NIXL.yaml: Enables NUMA-aware affinity for context workers. Verify worker CPU placement and perf-sanity behavior.tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_8k1k_con1_ctx1_dep2_gen1_tep8_eplb0_mtp3_ccb-NIXL.yaml: Enables NUMA-aware affinity for context workers. Verify worker CPU placement and perf-sanity behavior.tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_8k1k_con512_ctx1_dep2_gen1_dep32_eplb0_mtp3_ccb-NIXL.yaml: Enables NUMA-aware affinity for context workers. Verify worker CPU placement and perf-sanity behavior.