Repository navigation
[https://nvbugs/6463987][fix] Pin GB300 GLM-5 ctx workers to their GPU's NUMA node in perf-sanity - #20103
Closed
chenfeiz0326 wants to merge 1 commit into
Conversation
…U'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.
Co-Authored-By: Claude <[email protected]>
Signed-off-by: chenfeiz0326 <[email protected]>
Contributor
This was referenced Oct 11, 2026
chenfeiz0326
added a commit
that referenced
this pull request
Oct 13, 2026
…GB300 GLM-5 ctx workers to their GPU's NUMA node in perf-sanity (#20136) Signed-off-by: chenfeiz0326 <[email protected]> Co-authored-by: chenfeiz0326 <[email protected]> Co-authored-by: Claude <[email protected]>
chenfeiz0326
enabled auto-merge (squash)
October 13, 2026 04:58
auto-merge was automatically disabled
October 13, 2026 05:44
Pull request was closed
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
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.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).🤖 Generated with Claude Code
Dev Engineer Review
The six GB300 GLM-5 FP4 perf-sanity configurations set
TLLM_NUMA_AWARE_WORKER_AFFINITY=1for context workers. This targets NUMA-aware worker affinity without changing generator-worker settings or the broader default. The reported verification shows fewer slow-mode runs and a modest increase in median output-token throughput; these results are author-reported.QA Engineer Review
The change modifies six perf-sanity YAML configuration files and adds no test functions, IDs, selectors, or waivers. The reported comparison used the same wheel for both arms and changed only the case YAML. Coverage verdict: needs follow-up; the supplied evidence covers 10 repetitions per arm and does not establish broader behavior.
Per-File QA Perspective
tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_1k1k_con1_ctx1_dep2_gen1_tep4_eplb0_mtp3_ccb-NIXL.yaml: Sets NUMA-aware affinity for context workers. Verify context-worker CPU masks and prefill behavior; generator settings remain unchanged.tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_1k1k_con4096_ctx1_dep2_gen1_dep8_eplb256_mtp1_ccb-NIXL.yaml: Sets NUMA-aware affinity for context workers. Verify the setting takes effect in this high-concurrency case.tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_1k1k_con512_ctx1_dep2_gen1_dep32_eplb0_mtp3_ccb-NIXL.yaml: Sets NUMA-aware affinity for context workers. Verify the setting takes effect with this generator configuration.tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_8k1k_con1024_ctx1_dep2_gen1_dep8_eplb256_mtp1_ccb-NIXL.yaml: Sets NUMA-aware affinity for context workers. Verify context-worker placement and prefill behavior.tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_8k1k_con1_ctx1_dep2_gen1_tep8_eplb0_mtp3_ccb-NIXL.yaml: Sets NUMA-aware affinity for context workers. Verify the setting takes effect with this context length and generator configuration.tests/scripts/perf-sanity/disaggregated/gb300_glm-5-fp4_8k1k_con512_ctx1_dep2_gen1_dep32_eplb0_mtp3_ccb-NIXL.yaml: Sets NUMA-aware affinity for context workers. Verify context-worker placement and prefill behavior.