[None][perf] Skip transceiver tp_allgather when no sessions ever opened - #14042
Merged
Shixiaowei02 merged 1 commit intoMay 13, 2026
Merged
Conversation
Shixiaowei02
force-pushed
the
user/xiaoweis/skip-allgather
branch
from
May 12, 2026 08:21
64791f5 to
684e049
Compare
Shixiaowei02
marked this pull request as ready for review
May 12, 2026 08:21
Shixiaowei02
requested review from
chuangz0,
liji-nv and
suyoggupta
and removed request for
a team
May 12, 2026 08:21
liji-nv
approved these changes
May 12, 2026
qiaoxj07
approved these changes
May 12, 2026
chuangz0
approved these changes
May 12, 2026
Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
force-pushed
the
user/xiaoweis/skip-allgather
branch
from
May 12, 2026 13:30
684e049 to
70162aa
Compare
Collaborator
Author
|
/bot run --add-multi-gpu-test --disable-fail-fast |
Collaborator
|
PR_Github #47973 [ run ] triggered by Bot. Commit: |
Collaborator
|
PR_Github #47973 [ run ] completed with state |
lfr-0531
pushed a commit
that referenced
this pull request
May 14, 2026
…ed (#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
2 tasks
1 task
lfr-0531
pushed a commit
to lfr-0531/TensorRT-LLM
that referenced
this pull request
Jun 10, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 10, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 10, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 10, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…nsensus deadlock The sticky-role short-circuits in KvCacheTransceiverV2.check_context_transfer_status and check_gen_transfer_status (sticky markers from NVIDIA#14042) returned early when a transceiver had never opened a send/recv session, to skip the per-iter consensus allgather on pure-role transceivers. Under pipeline parallelism (and ADP request sharding) the per-rank _ever_had_send_session / _ever_had_recv_session markers flip asymmetrically across PP stages, so some ranks short-circuited and skipped the _ctx_consensus pp_allgather barrier while peers entered it, deadlocking the collective. This was observed as a hang in tests/unittest/disaggregated/test_cache_transceiver_single_process.py ::test_cache_transceiver[*-tp4_pp2_dp_both] (8-rank ADP+PP2). Guard the short-circuit with `not self._ctx_need_pp_sync` (pp_size == 1) so it only fires when there is no cross-stage consensus barrier: preserves the pure-role tp_allgather-skip optimization for PP=1 while doing the full symmetric consensus whenever pipeline parallelism is enabled. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…nsensus deadlock The sticky-role short-circuits in KvCacheTransceiverV2.check_context_transfer_status and check_gen_transfer_status (sticky markers from NVIDIA#14042) returned early when a transceiver had never opened a send/recv session, to skip the per-iter consensus allgather on pure-role transceivers. Under pipeline parallelism (and ADP request sharding) the per-rank _ever_had_send_session / _ever_had_recv_session markers flip asymmetrically across PP stages, so some ranks short-circuited and skipped the _ctx_consensus pp_allgather barrier while peers entered it, deadlocking the collective. This was observed as a hang in tests/unittest/disaggregated/test_cache_transceiver_single_process.py ::test_cache_transceiver[*-tp4_pp2_dp_both] (8-rank ADP+PP2). Guard the short-circuit with `not self._ctx_need_pp_sync` (pp_size == 1) so it only fires when there is no cross-stage consensus barrier: preserves the pure-role tp_allgather-skip optimization for PP=1 while doing the full symmetric consensus whenever pipeline parallelism is enabled. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…and_schedule_batch The cherry-pick of NVIDIA#14042-era "Fix deepseekv4 stall" replaced main's immediate "Insufficient KV cache for gen-only benchmark mode" guard with a time-based gen-count stall watchdog. On current main that watchdog is both superseded and incompatible: main already handles the ADP fill-completion case via _is_benchmark_disagg_fill_complete (per-rank allgather), and the time-based watchdog never fires on a single scheduling iteration, so it regressed tests/unittest/_torch/executor/test_benchmark_disagg.py (TestFailFastDuringBenchmarkFill, TestFillPhaseEndToEnd) which assert an immediate fail-fast when all benchmark requests are fetched (or the fill phase is over) and the scheduler can fit no INIT request. Restore main's immediate guard (fail once all requests are fetched and no INIT request fits, suppressed during warmup) and drop the now-unused benchmark_fill_stall_timeout_s. Verified on 8xB200: test_benchmark_disagg.py, test_py_executor.py and the tp4_pp2_dp_both transceiver cases all pass (240 passed, 0 failed). Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…nsensus deadlock The sticky-role short-circuits in KvCacheTransceiverV2.check_context_transfer_status and check_gen_transfer_status (sticky markers from NVIDIA#14042) returned early when a transceiver had never opened a send/recv session, to skip the per-iter consensus allgather on pure-role transceivers. Under pipeline parallelism (and ADP request sharding) the per-rank _ever_had_send_session / _ever_had_recv_session markers flip asymmetrically across PP stages, so some ranks short-circuited and skipped the _ctx_consensus pp_allgather barrier while peers entered it, deadlocking the collective. This was observed as a hang in tests/unittest/disaggregated/test_cache_transceiver_single_process.py ::test_cache_transceiver[*-tp4_pp2_dp_both] (8-rank ADP+PP2). Guard the short-circuit with `not self._ctx_need_pp_sync` (pp_size == 1) so it only fires when there is no cross-stage consensus barrier: preserves the pure-role tp_allgather-skip optimization for PP=1 while doing the full symmetric consensus whenever pipeline parallelism is enabled. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…and_schedule_batch The cherry-pick of NVIDIA#14042-era "Fix deepseekv4 stall" replaced main's immediate "Insufficient KV cache for gen-only benchmark mode" guard with a time-based gen-count stall watchdog. On current main that watchdog is both superseded and incompatible: main already handles the ADP fill-completion case via _is_benchmark_disagg_fill_complete (per-rank allgather), and the time-based watchdog never fires on a single scheduling iteration, so it regressed tests/unittest/_torch/executor/test_benchmark_disagg.py (TestFailFastDuringBenchmarkFill, TestFillPhaseEndToEnd) which assert an immediate fail-fast when all benchmark requests are fetched (or the fill phase is over) and the scheduler can fit no INIT request. Restore main's immediate guard (fail once all requests are fetched and no INIT request fits, suppressed during warmup) and drop the now-unused benchmark_fill_stall_timeout_s. Verified on 8xB200: test_benchmark_disagg.py, test_py_executor.py and the tp4_pp2_dp_both transceiver cases all pass (240 passed, 0 failed). Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…nsensus deadlock The sticky-role short-circuits in KvCacheTransceiverV2.check_context_transfer_status and check_gen_transfer_status (sticky markers from NVIDIA#14042) returned early when a transceiver had never opened a send/recv session, to skip the per-iter consensus allgather on pure-role transceivers. Under pipeline parallelism (and ADP request sharding) the per-rank _ever_had_send_session / _ever_had_recv_session markers flip asymmetrically across PP stages, so some ranks short-circuited and skipped the _ctx_consensus pp_allgather barrier while peers entered it, deadlocking the collective. This was observed as a hang in tests/unittest/disaggregated/test_cache_transceiver_single_process.py ::test_cache_transceiver[*-tp4_pp2_dp_both] (8-rank ADP+PP2). Guard the short-circuit with `not self._ctx_need_pp_sync` (pp_size == 1) so it only fires when there is no cross-stage consensus barrier: preserves the pure-role tp_allgather-skip optimization for PP=1 while doing the full symmetric consensus whenever pipeline parallelism is enabled. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…and_schedule_batch The cherry-pick of NVIDIA#14042-era "Fix deepseekv4 stall" replaced main's immediate "Insufficient KV cache for gen-only benchmark mode" guard with a time-based gen-count stall watchdog. On current main that watchdog is both superseded and incompatible: main already handles the ADP fill-completion case via _is_benchmark_disagg_fill_complete (per-rank allgather), and the time-based watchdog never fires on a single scheduling iteration, so it regressed tests/unittest/_torch/executor/test_benchmark_disagg.py (TestFailFastDuringBenchmarkFill, TestFillPhaseEndToEnd) which assert an immediate fail-fast when all benchmark requests are fetched (or the fill phase is over) and the scheduler can fit no INIT request. Restore main's immediate guard (fail once all requests are fetched and no INIT request fits, suppressed during warmup) and drop the now-unused benchmark_fill_stall_timeout_s. Verified on 8xB200: test_benchmark_disagg.py, test_py_executor.py and the tp4_pp2_dp_both transceiver cases all pass (240 passed, 0 failed). Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
lfr-0531
pushed a commit
to lfr-0531/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 12, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
lfr-0531
pushed a commit
to lfr-0531/TensorRT-LLM
that referenced
this pull request
Jun 12, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 12, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 14, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 16, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 17, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 21, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 22, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 23, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 23, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 23, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 24, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 24, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 24, 2026
…ed (NVIDIA#14042) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
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.
@coderabbitai summary
Description
V4-Pro 8k/1k MTP3 disagg (ctx1 TP=4 + gen4 TP=8), concurrency=4/server (total 16), 128 prompts × 8 rounds, gb300:
GPU compute is unchanged . The full 4.4% e2e throughput win comes from eliminating one
tp_allgatherper decode iter on the GEN worker, which had previously synced all 8 TP ranks every iter against an empty consensus list.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)
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.