feat(distributed): wire TensorRT-LLM all-reduce backend#580
Draft
Xiangyi1996 wants to merge 6 commits into
Draft
feat(distributed): wire TensorRT-LLM all-reduce backend#580Xiangyi1996 wants to merge 6 commits into
Xiangyi1996 wants to merge 6 commits into
Conversation
Signed-off-by: jiyingd <87510204+dongjiyingdjy@users.noreply.github.com>
Signed-off-by: jiyingd <87510204+dongjiyingdjy@users.noreply.github.com>
Signed-off-by: Xiangyi Zhang <xiangyiz@nvidia.com>
Signed-off-by: Xiangyi Zhang <xiangyiz@nvidia.com>
Signed-off-by: Xiangyi Zhang <xiangyiz@nvidia.com>
dongjiyingdjy
force-pushed
the
perf/v4-trtllm-indexer-q
branch
from
July 6, 2026 06:22
0c08602 to
63f0b66
Compare
This was referenced Jul 7, 2026
|
This PR has been inactive for 14 days and is marked as stale. It will be closed in 3 days if there is no further activity. |
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.
Summary
--enable-trtllm-allreduceopt-in for eligible single-node NVIDIA tensor-parallel collectivestokenspeed-kernelboundaryRoot cause
TrtllmAllReduceBackendexisted, but no runtime call configured its per-group IPC workspace. ConsequentlyAutoBackend.has_trtllm_ar()remained false and DeepSeek-V4-Pro TP8 decode collectives fell back to NCCL Ring LL.This PR wires the workspace explicitly after process-group initialization and before model CUDA Graph capture. The feature remains disabled by default.
Selection and fallback
The Lamport path is selected only for configured, contiguous, 2-D CUDA BF16 SUM tensors that fit the workspace shape and the 2 MiB one-shot byte limit. Large prefill tensors, non-2-D layouts, unsupported dtypes/ops, and unconfigured groups continue to use NCCL. MoE groups containing expert parallelism are intentionally out of scope for this change.
Decode trace evidence
Matched exact p4 decode traces show the backend switch directly:
ncclDevKernel_AllReduce_Sum_bf16_RING_LLallreduce_fusion_kernel_oneshot_lamportThe on-side decode window therefore executed the Lamport kernel rather than silently falling back. The nearly identical launch counts show that the comparison switches the backend for the same collective workload.
Validation
pre-commit run --all-filespassed on the final local headruntime-2gpusuite; it covers eager correctness, oversized and 1-D NCCL fallback, and 10 changing-input CUDA Graph replays[1, 2, 4, 8, 16, 24, 32, 40, 48, 56, 64, 72, 79, 80]At p4, enabling the backend improved CI TPS/user by 8.99%, CI TPS/GPU by 10.29%, and steady completion throughput by 11.69%; TPOT decreased by 8.25%. Cache hit and speculative acceptance were unchanged. Across p1, p2, p4, and p8, TPS/user improved by 8.99–12.69% and TPOT decreased by 8.25–11.26%.
The endpoint curve currently has one matched off/on run per concurrency point, so it does not claim a variance estimate.
Stacking
This draft is intentionally based on the head branch of #563 so that its diff contains only the all-reduce wiring changes.