[https://nvbugs/6487038][fix] Stop single-rank disagg errors from crashing all gen ranks - #16834
Conversation
WalkthroughChangesTransfer admission behavior
Executor runtime safeguards
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
adad095 to
d290731
Compare
|
/bot run --post-merge --stage-list "GB200-16_GPUs-4_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE2-GPU8-GEN1-NODE2-GPU8-Post-Merge, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge, GB300-12_GPUs-3_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE2-GPU8-Post-Merge" |
|
PR_Github #61811 [ run ] triggered by Bot. Commit: |
|
PR_Github #61811 Bot args parsing error: CI requested by |
05f16c5 to
9727efc
Compare
|
/bot run --post-merge --stage-list "GB200-16_GPUs-4_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE2-GPU8-GEN1-NODE2-GPU8-Post-Merge, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge, GB300-12_GPUs-3_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE2-GPU8-Post-Merge" |
|
PR_Github #61826 [ run ] triggered by Bot. Commit: |
|
PR_Github #61826 Bot args parsing error: CI requested by |
|
Removed the "ci: post-merge approved" label because @niukuo could not be verified as an active member of NVIDIA/trt-llm-ci-approvers. Ask a member of that team to apply it. |
9727efc to
e14fc1b
Compare
cf36915 to
cf19cfd
Compare
|
/bot run --disable-fail-fast --extra-stage "GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-1, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-2, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-3, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-4, GB300-12_GPUs-3_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE2-GPU8-Post-Merge-1, GB300-12_GPUs-3_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE2-GPU8-Post-Merge-2" |
|
PR_Github #62209 [ run ] triggered by Bot. Commit: |
|
PR_Github #62205 [ run ] completed with state |
chienchunhung
left a comment
There was a problem hiding this comment.
Thanks for the PR!
|
PR_Github #62209 [ run ] completed with state
|
|
/bot run --disable-fail-fast --only-multi-gpu-test |
|
PR_Github #62476 [ run ] triggered by Bot. Commit: |
|
PR_Github #62476 [ run ] completed with state
|
8a400e1 to
ad17083
Compare
|
/bot run --add-multi-gpu-test --disable-fail-fast --extra-stage "GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-1, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-2, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-3, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-4, GB300-12_GPUs-3_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE2-GPU8-Post-Merge-1, GB300-12_GPUs-3_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE2-GPU8-Post-Merge-2" |
|
PR_Github #63367 [ run ] triggered by Bot. Commit: |
|
PR_Github #63367 [ run ] completed with state
|
…rt cascade start_thread() restarted the already-finished await-response thread, raising "threads can only be started once" and masking the real cause: the engine event loop crashed (AwaitResponseHelper broadcasts _event_loop_error and returns, so the thread exits). The misleading RuntimeError then cascaded into a peer MPI-collective hang across ranks. Detect the finished thread and re-raise the stashed engine event-loop error instead. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
…st overshoot _pad_attention_dp_dummy_request asserted expected_num_active_requests >= len(active_requests). When disagg KV-transfer-error requests linger in active_requests for a tick before cleanup drains them, that assert fires and takes down the generation loop on every attention-DP rank at once, turning a self-correcting transient into a hard failure of the whole gen server. Warn once and continue instead. The padding decision below keys on the schedulable count, so the overshoot does not affect the result. Note: an earlier revision of this commit also bypassed the DisaggTransferAdmissionController budget on the async transfer path. That part was dropped: an isolated A/B on gb300 deepseek-r1 8k1k con4096 e2e (async path, KV-cache bounce enabled on both arms, wheels differing only in that early return) showed no benefit -- 20480/20480 both, 11587 vs 11661 tok/s output and 347.1 s vs 344.5 s median TTFT, i.e. within noise and marginally favouring the unmodified code. With bounce enabled a transfer completes in ~3 ms, so the budget drains immediately and never becomes the bottleneck. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
…es to transceiver V2 (PYTHON) The V2 migration (NVIDIA#16669) left these two gb300 cases on the C++ transceiver because they regressed on the Python one. The crash-cascade and admission-throttle fixes in this PR unblock them: - con4096 (8k1k, con=4096): enable PYTHON + KV-cache bounce (2048 MiB) + sender concurrency. Bounce coalesces the scattered per-fragment WRITE that otherwise overflows the transfer queue at this concurrency (652/4096 -> 20480/20480). - con256 (128k8k, con=256): enable PYTHON only. The 128k transfer is bandwidth-bound and measured on par with the C++ transceiver (v1 ~= v2), so no bounce is needed and there is no regression. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
….5 con4096 disagg perf case
The gen_only case timed out on the CTX side: 2939 "KV cache transfer timeout:
elapsed ~60244ms > kv_transfer_timeout_ms=60000ms" lines across CTX ranks 0-3 and
4096/4096 failed requests.
Root cause is the data plane, not the timeout budget. With bounce disabled, each
8k request submits its KV as ~15.6k scattered per-block fragments in a single
NIXL transfer request, which UCX cannot stripe across rails, so transfers queue
behind one another until the 60s budget expires. Coalescing the request's blocks
into one contiguous fabric-VMM buffer restores a single multi-rail write.
Reproduced and verified locally on GB300 (20 GPUs / 5 nodes, gen_only), both arms
on the same commit, wheel and container:
as-is : FAILED - 0/4096 successful, 2879 CTX transfer timeouts
+ bounce : PASSED - 4096/4096 successful, 0 timeouts, 11580 tok/s output
per-transfer latency p50 2.16 ms / p90 2.99 ms
"[kv-bounce] coalesced 256 blocks / 274MiB into one region across 1 writer(s)"
Bounce engages on the single-writer path here because attention DP is enabled on
both sides, so each request has exactly one peer rank (expected_transfers == 1).
This mirrors the settings NVIDIA#15966 already applied to the other Kimi disagg cases.
The timeout budget is left at the 60s default on purpose: coalesced transfers
complete in ~2 ms, four orders of magnitude inside it.
Un-waives only the gen_only case, which is the one covered by this bug and the
one verified above. The e2e variant stays waived pending its own validation.
Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
ad17083 to
ca0c515
Compare
|
/bot run --add-multi-gpu-test --disable-fail-fast --extra-stage "GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-1, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-2, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-3, GB300-20_GPUs-5_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE4-GPU16-Post-Merge-4, GB300-12_GPUs-3_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE2-GPU8-Post-Merge-1, GB300-12_GPUs-3_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU4-GEN1-NODE2-GPU8-Post-Merge-2" |
|
PR_Github #63438 [ run ] triggered by Bot. Commit: |
Description
This pull request introduces several improvements and fixes related to disaggregated attention data parallel (ADP) execution and configuration for NIXL cache transceivers. The main changes include making the ADP executor more robust to transient request overshoots, improving thread management and error surfacing in the worker engine, and updating test and configuration files to support new runtime and tuning options.
ADP executor robustness and error handling:
_pad_attention_dp_dummy_requestto a warning whenactive_requeststemporarily exceedsexpected_num_active_requests, preventing crashes during transient disagg KV-transfer errors and allowing the system to self-correct.test_pad_dummy_tolerates_active_request_overshootto ensure the executor warns and continues (instead of raising an error) when overshoots occur.start_threadin the worker engine to avoid masking event loop crashes by checking thread state and surfacing the real error if a restart is attempted after a failure.Configuration and test tuning for NIXL cache transceiver:
transceiver_runtime: PYTHONand added or increasedkv_cache_bounce_size_mbfor better memory management and to enable Python runtime for the NIXL backend. [1] [2] [3] [4] [5] [6]TRTLLM_KV_TRANSFER_NUM_THREADS=4in worker environments to control the number of threads used for KV transfer, improving parallelism and performance. [1] [2]Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.