Skip to content

[None][fix] fix disagg overlap slot headroom without MTP - #17282

Open
reasonsolo wants to merge 5 commits into
NVIDIA:mainfrom
reasonsolo:fix/dsv4-overlap-slot-headroom-draft0
Open

[None][fix] fix disagg overlap slot headroom without MTP#17282
reasonsolo wants to merge 5 commits into
NVIDIA:mainfrom
reasonsolo:fix/dsv4-overlap-slot-headroom-draft0

Conversation

@reasonsolo

@reasonsolo reasonsolo commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • Updated overlap headroom logic for disaggregated attention-DP deployments.
  • Removed the DeepSeek-V4 and MTP-specific eligibility check.
  • Preserved 2 * max_batch_size sequence-slot headroom only for eligible disaggregated attention-DP deployments.
  • Updated model engine and guided decoder allocation to use _enable_disagg_adp_overlap_headroom.
  • Added configurable disaggregated test startup timeouts.
  • Updated the DeepSeek V3 Lite configuration to use KV cache manager v2 and the NIXL Python cache transceiver.
  • Removed the obsolete waiver entry.
  • The changes are consistent across helper APIs, engine initialization, slot allocation, and tests.
  • No configuration typos or unintended model-specific scope changes are evident.

QA Engineer Review

  • Updated the sequence-slot sizing gate test for disaggregated attention-DP conditions.
  • Updated the DeepSeek attention-DP overlap integration test to remove the Hopper-only restriction.
  • Updated the integration configuration used by the test.
  • Removed the corresponding waiver from tests/integration/test_lists/waives.txt.
  • The integration test is covered by the waiver removal. The unit test is not listed in the provided test-list changes.
  • Verdict: needs follow-up because CBTS coverage data is unavailable.

Description

With overlap scheduling, requests completed in the previous iteration still hold their sequence slots when the next iteration calls prepare_resources(). Meanwhile, the scheduler has already removed those terminal requests from its capacity budget and may schedule replacement requests or ADP dummy requests.

This creates a transient requirement of up to 2 * max_batch_size sequence slots.

DeepSeek-V4 already had this overlap headroom, but it was incorrectly restricted to one-model MTP configurations. With draft length 0, the slot pool remained at max_batch_size, allowing dummy allocation to fail when the pool was saturated.

Once some rank event loops exited with NoFreeSlotsError, the remaining ranks blocked in distributed collectives, presenting externally as a server hang.

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-compatible or api-breaking. For api-breaking, include BREAKING in 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.

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Sequence-slot overlap headroom now applies to disaggregated attention-DP deployments. Eligibility uses topology, cache-transceiver configuration, pipeline parallelism, and overlap scheduling. Unit and integration tests cover the updated behavior.

Changes

Disaggregated attention-DP overlap headroom

Layer / File(s) Summary
Headroom eligibility and capacity wiring
tensorrt_llm/_torch/pyexecutor/_util.py, tensorrt_llm/_torch/pyexecutor/model_engine.py, tensorrt_llm/_torch/pyexecutor/py_executor_creator.py
The helper now gates headroom for disaggregated attention-DP without pipeline parallelism and with overlap scheduling enabled. Model initialization, speculative metadata sizing, and guided decoder allocation use the resulting sequence-slot capacity.
Topology and integration validation
tests/unittest/_torch/executor/test_seq_slot_sizing.py, tests/integration/defs/disaggregated/...
Unit tests cover the new topology gates. The integration configuration uses KV cache manager v2 and NIXL. The test adds a configurable startup timeout, removes the Hopper restriction, and runs one iteration.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • NVIDIA/TensorRT-LLM#17278: Both changes modify ADP-related gating in _util.py, including overlap-headroom and dummy-fix behavior.

Suggested reviewers: longlee0622, schetlur-nv, chuangz0

Sequence Diagram(s)

sequenceDiagram
  participant ModelEngine
  participant HeadroomUtility
  participant SequenceSlotSizing
  participant GuidedDecoder
  ModelEngine->>HeadroomUtility: evaluate topology, cache-transceiver config, and overlap setting
  HeadroomUtility-->>ModelEngine: return headroom eligibility
  ModelEngine->>SequenceSlotSizing: calculate maximum sequence slots
  SequenceSlotSizing-->>ModelEngine: return slot capacity
  ModelEngine->>GuidedDecoder: use expanded slot capacity when enabled
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the failure mechanism but omits the solution details and leaves the Test Coverage section empty. Add a concise solution summary and list the relevant unit and integration tests that validate the new headroom behavior.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the fix for disaggregated overlap slot headroom when MTP is disabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/unittest/_torch/executor/test_seq_slot_sizing.py (1)

50-52: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add annotations to the modified test function.

test_dsv4_overlap_headroom_gate has untyped parameters and no return annotation. Add precise parameter annotations and -> None.

Proposed change
 def test_dsv4_overlap_headroom_gate(
-    model_type, pp_size, disable_overlap, expected
-) :
+    model_type: str,
+    pp_size: int,
+    disable_overlap: bool,
+    expected: bool,
+) -> None:

As per coding guidelines, annotate every function.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unittest/_torch/executor/test_seq_slot_sizing.py` around lines 50 - 52,
Update the test_dsv4_overlap_headroom_gate function signature with precise
annotations for model_type, pp_size, disable_overlap, and expected, and add a ->
None return annotation. Preserve the existing parameterization and test
behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/unittest/_torch/executor/test_seq_slot_sizing.py`:
- Around line 42-56: Complete the coverage follow-up for
test_dsv4_overlap_headroom_gate by running pytest tests/unittest/ and reporting
the results; preserve the existing parameterized cases and test behavior.

---

Nitpick comments:
In `@tests/unittest/_torch/executor/test_seq_slot_sizing.py`:
- Around line 50-52: Update the test_dsv4_overlap_headroom_gate function
signature with precise annotations for model_type, pp_size, disable_overlap, and
expected, and add a -> None return annotation. Preserve the existing
parameterization and test behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5a15a08d-d92f-4ad4-b6eb-603d9dd513b8

📥 Commits

Reviewing files that changed from the base of the PR and between 7f1f219 and d55d013.

📒 Files selected for processing (3)
  • tensorrt_llm/_torch/pyexecutor/_util.py
  • tensorrt_llm/_torch/pyexecutor/model_engine.py
  • tests/unittest/_torch/executor/test_seq_slot_sizing.py

Comment thread tests/unittest/_torch/executor/test_seq_slot_sizing.py Outdated
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63941 [ run ] triggered by Bot. Commit: d55d013 Link to invocation

Signed-off-by: Lizhi Zhou <lizhiz@oci-aga-slurm-1-login-01.cm.cluster>
@reasonsolo
reasonsolo force-pushed the fix/dsv4-overlap-slot-headroom-draft0 branch from d55d013 to e2f7e71 Compare August 5, 2026 05:21
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63947 [ run ] triggered by Bot. Commit: e2f7e71 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63941 [ run ] completed with state ABORTED. Commit: d55d013

Link to invocation

@reasonsolo
reasonsolo enabled auto-merge (squash) August 5, 2026 07:27
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63947 [ run ] completed with state SUCCESS. Commit: e2f7e71
/LLM/main/L0_MergeRequest_PR pipeline #51882 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64021 [ run ] triggered by Bot. Commit: e2f7e71 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64021 [ run ] completed with state SUCCESS. Commit: e2f7e71
/LLM/main/L0_MergeRequest_PR pipeline #51952 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@longlee0622

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64041 [ run ] triggered by Bot. Commit: e2f7e71 Link to invocation

@fredricz-20070104 fredricz-20070104 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary - Approve (non-blocking)

Approving so this is not blocked on me. The points raised in my review comment above are non-blocking — please read them and address what you agree with before merging.

Worth doing before this is relied on: Bug fix whose unit test does not reproduce the original NoFreeSlotsError hang; a waiver was removed (test re-enabled) and the test config/backend simultaneously changed; and an arch guard was dropped from an fp8 test. A human should run the disagg DSv4 overlap path (draft_len 0, overlap on) and confirm the test only lands on supported hardware.

Automated review by NVCortex Lite, run by @fredricz-20070104.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64440 [ run ] completed with state FAILURE. Commit: 474df5c
/LLM/main/L0_MergeRequest_PR pipeline #52316 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64539 [ run ] triggered by Bot. Commit: 474df5c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64539 [ run ] completed with state FAILURE. Commit: 474df5c
/LLM/main/L0_MergeRequest_PR pipeline #52406 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64575 [ run ] triggered by Bot. Commit: 474df5c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64575 [ run ] completed with state FAILURE. Commit: 474df5c
/LLM/main/L0_MergeRequest_PR pipeline #52439 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64592 [ run ] triggered by Bot. Commit: b1a8860 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64592 [ run ] completed with state FAILURE. Commit: b1a8860
/LLM/main/L0_MergeRequest_PR pipeline #52456 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64745 [ run ] triggered by Bot. Commit: b1a8860 Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64745 [ run ] completed with state SUCCESS. Commit: b1a8860
/LLM/main/L0_MergeRequest_PR pipeline #52597 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64758 [ run ] triggered by Bot. Commit: 1ce3636 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64758 [ run ] completed with state FAILURE. Commit: 1ce3636
/LLM/main/L0_MergeRequest_PR pipeline #52607 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64788 [ run ] triggered by Bot. Commit: 1ce3636 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64788 [ run ] completed with state SUCCESS. Commit: 1ce3636
/LLM/main/L0_MergeRequest_PR pipeline #52633 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64823 [ run ] triggered by Bot. Commit: 1ce3636 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64823 [ run ] completed with state FAILURE. Commit: 1ce3636
/LLM/main/L0_MergeRequest_PR pipeline #52665 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@reasonsolo

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64837 [ run ] triggered by Bot. Commit: 1ce3636 Link to invocation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.