[None][fix] Avoid TP collective deadlock in ADP disagg error path - #13900
Merged
Shixiaowei02 merged 2 commits intoMay 9, 2026
Merged
Conversation
Collaborator
Author
|
/bot run --add-multi-gpu-test --disable-fail-fast |
Collaborator
|
PR_Github #47381 [ run ] triggered by Bot. Commit: |
Closed
2 tasks
Collaborator
|
PR_Github #47381 [ run ] completed with state
|
Shixiaowei02
force-pushed
the
user/xiaoweis/dsv4-adp-fix
branch
from
May 9, 2026 01:30
b06d7af to
57977cd
Compare
Collaborator
Author
|
/bot run --add-multi-gpu-test --disable-fail-fast |
Collaborator
|
PR_Github #47460 [ run ] triggered by Bot. Commit: |
Shixiaowei02
marked this pull request as ready for review
May 9, 2026 04:53
Shixiaowei02
requested review from
StanleySun639,
bo-nv,
byshiue,
chuangz0,
dongxuy04,
lfr-0531,
pcastonguay and
reasonsolo
and removed request for
a team
May 9, 2026 04:53
Collaborator
|
PR_Github #47460 [ run ] completed with state
|
Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
force-pushed
the
user/xiaoweis/dsv4-adp-fix
branch
from
May 9, 2026 06:15
57977cd to
803c68b
Compare
Collaborator
Author
|
/bot run --add-multi-gpu-test --disable-fail-fast |
lfr-0531
pushed a commit
that referenced
this pull request
May 14, 2026
…3900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
lfr-0531
pushed a commit
to lfr-0531/TensorRT-LLM
that referenced
this pull request
Jun 10, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 10, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 10, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 10, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
lfr-0531
pushed a commit
to lfr-0531/TensorRT-LLM
that referenced
this pull request
Jun 11, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 12, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
lfr-0531
pushed a commit
to lfr-0531/TensorRT-LLM
that referenced
this pull request
Jun 12, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 12, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 14, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 16, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 17, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 21, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 22, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 23, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 23, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 23, 2026
…regation Squash of the post-cherry-pick work layered on top of the 8 DeepSeek-V4 disaggregation cherry-picks. Fixes: - ADP disagg error path: restore per-request hang signal (_event_loop_error), scan all candidates + prefer CTX role for mixed-batch dummy padding, and keep charge_budget=False on KV-transfer timeouts so they don't exhaust the global error budget and shut down the executor. - _count_schedulable_active_requests: revert the GENERATION_TO_COMPLETE exclusion that NVIDIA#13900 added (upstream has no such exclusion). Under V1 ADP it undercounted -> a spurious ADP dummy was inserted on top of a real request -> the batch exceeded max_batch_size=1 and tripped the mamba dummy-mask assert / "No free slots". Restores upstream's exact method (fixes test_ptp_quickstart_advanced_deepseek_v3_lite_4gpus_adp_balance). - transceiver: only short-circuit the tp_allgather skip when pp_size==1 (_ctx_need_pp_sync) -- the PP>1 path asymmetrically flips send/recv markers across pipeline stages and deadlocks the _ctx_consensus pp_allgather. - py_executor: restore main's immediate benchmark fail-fast guard. - resource_manager: do NOT narrow trim_to_history's except (resize() can raise non-ValueError under v2 SWA + uneven-PP; narrowing leaked KV blocks). Tests (added to existing files): - test_py_executor.py: disagg cache-error sync + ADP no-op paths; ADP dummy-role behavior; GENERATION_TO_COMPLETE counts as active (adp_balance regression). - test_kv_cache_v2_scheduler.py: trim_to_history. - test_cache_reuse_adapter.py: trim-to-prompt-history + transceiver ctx mgr. - test_router.py: finish_request explicit-session forwarding. - test_agent.py: BindingsNixlTransferStatus + shutdown idempotency (NVIDIA#14137). - transferAgentTest.cpp: status-outlives-agent (weak_ptr UAF safety) + concurrent submitTransferRequests. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 23, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 23, 2026
…regation Squash of the post-cherry-pick work layered on top of the 8 DeepSeek-V4 disaggregation cherry-picks. Fixes: - ADP disagg error path: restore per-request hang signal (_event_loop_error), scan all candidates + prefer CTX role for mixed-batch dummy padding, and keep charge_budget=False on KV-transfer timeouts so they don't exhaust the global error budget and shut down the executor. - _count_schedulable_active_requests: revert the GENERATION_TO_COMPLETE exclusion that NVIDIA#13900 added (upstream has no such exclusion). Under V1 ADP it undercounted -> a spurious ADP dummy was inserted on top of a real request -> the batch exceeded max_batch_size=1 and tripped the mamba dummy-mask assert / "No free slots". Restores upstream's exact method (fixes test_ptp_quickstart_advanced_deepseek_v3_lite_4gpus_adp_balance). - transceiver: only short-circuit the tp_allgather skip when pp_size==1 (_ctx_need_pp_sync) -- the PP>1 path asymmetrically flips send/recv markers across pipeline stages and deadlocks the _ctx_consensus pp_allgather. - py_executor: restore main's immediate benchmark fail-fast guard. - resource_manager: do NOT narrow trim_to_history's except (resize() can raise non-ValueError under v2 SWA + uneven-PP; narrowing leaked KV blocks). Tests (added to existing files): - test_py_executor.py: disagg cache-error sync + ADP no-op paths; ADP dummy-role behavior; GENERATION_TO_COMPLETE counts as active (adp_balance regression). - test_kv_cache_v2_scheduler.py: trim_to_history. - test_cache_reuse_adapter.py: trim-to-prompt-history + transceiver ctx mgr. - test_router.py: finish_request explicit-session forwarding. - test_agent.py: BindingsNixlTransferStatus + shutdown idempotency (NVIDIA#14137). - transferAgentTest.cpp: status-outlives-agent (weak_ptr UAF safety) + concurrent submitTransferRequests. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 24, 2026
…regation Squash of the post-cherry-pick work layered on top of the 8 DeepSeek-V4 disaggregation cherry-picks. Fixes: - ADP disagg error path: restore per-request hang signal (_event_loop_error), scan all candidates + prefer CTX role for mixed-batch dummy padding, and keep charge_budget=False on KV-transfer timeouts so they don't exhaust the global error budget and shut down the executor. - _count_schedulable_active_requests: revert the GENERATION_TO_COMPLETE exclusion that NVIDIA#13900 added (upstream has no such exclusion). Under V1 ADP it undercounted -> a spurious ADP dummy was inserted on top of a real request -> the batch exceeded max_batch_size=1 and tripped the mamba dummy-mask assert / "No free slots". Restores upstream's exact method (fixes test_ptp_quickstart_advanced_deepseek_v3_lite_4gpus_adp_balance). - _handle_responses KV-timeout: gate the tp_allgather on disagg (kv_cache_transceiver is not None), not just enable_attention_dp. py_kv_transfer_timed_out is disagg-only, so in non-disagg ADP this added a spurious per-iteration collective that desynced adp_router's tp_allgather (gather_all_rank_states received a bool -> TypeError). Verified by 4-GPU DeepSeek-V3-Lite adp_balance e2e A/B (buggy: timeout hang; fixed: completes). - transceiver: only short-circuit the tp_allgather skip when pp_size==1 (_ctx_need_pp_sync) -- the PP>1 path asymmetrically flips send/recv markers across pipeline stages and deadlocks the _ctx_consensus pp_allgather. - py_executor: restore main's immediate benchmark fail-fast guard. - resource_manager: do NOT narrow trim_to_history's except (resize() can raise non-ValueError under v2 SWA + uneven-PP; narrowing leaked KV blocks). Tests (added to existing files): - test_py_executor.py: disagg cache-error sync + ADP no-op paths; ADP dummy-role behavior; GENERATION_TO_COMPLETE counts as active (adp_balance regression); CTX dummy padding for disagg idle ranks (incl. awaiting-KV-transfer-only). - test_kv_cache_v2_scheduler.py: trim_to_history. - test_cache_reuse_adapter.py: trim-to-prompt-history + transceiver ctx mgr; _create_kv_slice TokenRange (stub sets py_beam_width for the NVIDIA#14876 path). - test_router.py: finish_request explicit-session forwarding. - test_agent.py: BindingsNixlTransferStatus + shutdown idempotency (NVIDIA#14137). - transferAgentTest.cpp: status-outlives-agent (weak_ptr UAF safety) + concurrent submitTransferRequests. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 24, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 24, 2026
…regation Squash of the post-cherry-pick work layered on top of the 8 DeepSeek-V4 disaggregation cherry-picks. Fixes: - ADP disagg error path: restore per-request hang signal (_event_loop_error), scan all candidates + prefer CTX role for mixed-batch dummy padding, and keep charge_budget=False on KV-transfer timeouts so they don't exhaust the global error budget and shut down the executor. - _count_schedulable_active_requests: revert the GENERATION_TO_COMPLETE exclusion that NVIDIA#13900 added (upstream has no such exclusion). Under V1 ADP it undercounted -> a spurious ADP dummy was inserted on top of a real request -> the batch exceeded max_batch_size=1 and tripped the mamba dummy-mask assert / "No free slots". Restores upstream's exact method (fixes test_ptp_quickstart_advanced_deepseek_v3_lite_4gpus_adp_balance). - _handle_responses KV-timeout: gate the tp_allgather on disagg (kv_cache_transceiver is not None), not just enable_attention_dp. py_kv_transfer_timed_out is disagg-only, so in non-disagg ADP this added a spurious per-iteration collective that desynced adp_router's tp_allgather (gather_all_rank_states received a bool -> TypeError). Verified by 4-GPU DeepSeek-V3-Lite adp_balance e2e A/B (buggy: timeout hang; fixed: completes). - transceiver: only short-circuit the tp_allgather skip when pp_size==1 (_ctx_need_pp_sync) -- the PP>1 path asymmetrically flips send/recv markers across pipeline stages and deadlocks the _ctx_consensus pp_allgather. - py_executor: restore main's immediate benchmark fail-fast guard. - resource_manager: do NOT narrow trim_to_history's except (resize() can raise non-ValueError under v2 SWA + uneven-PP; narrowing leaked KV blocks). Tests (added to existing files): - test_py_executor.py: disagg cache-error sync + ADP no-op paths; ADP dummy-role behavior; GENERATION_TO_COMPLETE counts as active (adp_balance regression); CTX dummy padding for disagg idle ranks (incl. awaiting-KV-transfer-only). - test_kv_cache_v2_scheduler.py: trim_to_history. - test_cache_reuse_adapter.py: trim-to-prompt-history + transceiver ctx mgr; _create_kv_slice TokenRange (stub sets py_beam_width for the NVIDIA#14876 path). - test_router.py: finish_request explicit-session forwarding. - test_agent.py: BindingsNixlTransferStatus + shutdown idempotency (NVIDIA#14137). - transferAgentTest.cpp: status-outlives-agent (weak_ptr UAF safety) + concurrent submitTransferRequests. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 24, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 24, 2026
…regation Squash of the post-cherry-pick work layered on top of the 8 DeepSeek-V4 disaggregation cherry-picks. Fixes: - ADP disagg error path: restore per-request hang signal (_event_loop_error), scan all candidates + prefer CTX role for mixed-batch dummy padding, and keep charge_budget=False on KV-transfer timeouts so they don't exhaust the global error budget and shut down the executor. - _count_schedulable_active_requests: revert the GENERATION_TO_COMPLETE exclusion that NVIDIA#13900 added (upstream has no such exclusion). Under V1 ADP it undercounted -> a spurious ADP dummy was inserted on top of a real request -> the batch exceeded max_batch_size=1 and tripped the mamba dummy-mask assert / "No free slots". Restores upstream's exact method (fixes test_ptp_quickstart_advanced_deepseek_v3_lite_4gpus_adp_balance). - _handle_responses KV-timeout: gate the tp_allgather on disagg (kv_cache_transceiver is not None), not just enable_attention_dp. py_kv_transfer_timed_out is disagg-only, so in non-disagg ADP this added a spurious per-iteration collective that desynced adp_router's tp_allgather (gather_all_rank_states received a bool -> TypeError). Verified by 4-GPU DeepSeek-V3-Lite adp_balance e2e A/B (buggy: timeout hang; fixed: completes). - transceiver: only short-circuit the tp_allgather skip when pp_size==1 (_ctx_need_pp_sync) -- the PP>1 path asymmetrically flips send/recv markers across pipeline stages and deadlocks the _ctx_consensus pp_allgather. - py_executor: restore main's immediate benchmark fail-fast guard. - resource_manager: do NOT narrow trim_to_history's except (resize() can raise non-ValueError under v2 SWA + uneven-PP; narrowing leaked KV blocks). Tests (added to existing files): - test_py_executor.py: disagg cache-error sync + ADP no-op paths; ADP dummy-role behavior; GENERATION_TO_COMPLETE counts as active (adp_balance regression); CTX dummy padding for disagg idle ranks (incl. awaiting-KV-transfer-only). - test_kv_cache_v2_scheduler.py: trim_to_history. - test_cache_reuse_adapter.py: trim-to-prompt-history + transceiver ctx mgr; _create_kv_slice TokenRange (stub sets py_beam_width for the NVIDIA#14876 path). - test_router.py: finish_request explicit-session forwarding. - test_agent.py: BindingsNixlTransferStatus + shutdown idempotency (NVIDIA#14137). - transferAgentTest.cpp: status-outlives-agent (weak_ptr UAF safety) + concurrent submitTransferRequests. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 24, 2026
…IDIA#13900) Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Xiaowei Shi <39303645+Shixiaowei02@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Shixiaowei02
added a commit
to Shixiaowei02/TensorRT-LLM
that referenced
this pull request
Jun 24, 2026
…regation Squash of the post-cherry-pick work layered on top of the 8 DeepSeek-V4 disaggregation cherry-picks. Fixes: - ADP disagg error path: restore per-request hang signal (_event_loop_error), scan all candidates + prefer CTX role for mixed-batch dummy padding, and keep charge_budget=False on KV-transfer timeouts so they don't exhaust the global error budget and shut down the executor. - _count_schedulable_active_requests: revert the GENERATION_TO_COMPLETE exclusion that NVIDIA#13900 added (upstream has no such exclusion). Under V1 ADP it undercounted -> a spurious ADP dummy was inserted on top of a real request -> the batch exceeded max_batch_size=1 and tripped the mamba dummy-mask assert / "No free slots". Restores upstream's exact method (fixes test_ptp_quickstart_advanced_deepseek_v3_lite_4gpus_adp_balance). - _handle_responses KV-timeout: gate the tp_allgather on disagg (kv_cache_transceiver is not None), not just enable_attention_dp. py_kv_transfer_timed_out is disagg-only, so in non-disagg ADP this added a spurious per-iteration collective that desynced adp_router's tp_allgather (gather_all_rank_states received a bool -> TypeError). Verified by 4-GPU DeepSeek-V3-Lite adp_balance e2e A/B (buggy: timeout hang; fixed: completes). - transceiver: only short-circuit the tp_allgather skip when pp_size==1 (_ctx_need_pp_sync) -- the PP>1 path asymmetrically flips send/recv markers across pipeline stages and deadlocks the _ctx_consensus pp_allgather. - py_executor: restore main's immediate benchmark fail-fast guard. - resource_manager: do NOT narrow trim_to_history's except (resize() can raise non-ValueError under v2 SWA + uneven-PP; narrowing leaked KV blocks). Tests (added to existing files): - test_py_executor.py: disagg cache-error sync + ADP no-op paths; ADP dummy-role behavior; GENERATION_TO_COMPLETE counts as active (adp_balance regression); CTX dummy padding for disagg idle ranks (incl. awaiting-KV-transfer-only). - test_kv_cache_v2_scheduler.py: trim_to_history. - test_cache_reuse_adapter.py: trim-to-prompt-history + transceiver ctx mgr; _create_kv_slice TokenRange (stub sets py_beam_width for the NVIDIA#14876 path). - test_router.py: finish_request explicit-session forwarding. - test_agent.py: BindingsNixlTransferStatus + shutdown idempotency (NVIDIA#14137). - transferAgentTest.cpp: status-outlives-agent (weak_ptr UAF safety) + concurrent submitTransferRequests. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@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
Stabilizes disaggregated serving when ADP is enabled.
max_num_tokensso the MoE all-to-all sees aligned token counts across ranks.tp_gatherin response enqueue no longer deadlocks. Includes matching transceiver/NIXL plumbing and a disagg+ADP accuracy test.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.