Skip to content

[None][fix] Remove context KV cache allocation rollback#14849

Merged
jiaganc merged 1 commit into
NVIDIA:feat/deepseek_v4from
jiaganc:dsv4-scratch-adp-balance
Jun 5, 2026
Merged

[None][fix] Remove context KV cache allocation rollback#14849
jiaganc merged 1 commit into
NVIDIA:feat/deepseek_v4from
jiaganc:dsv4-scratch-adp-balance

Conversation

@jiaganc

@jiaganc jiaganc commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR reverts #13805 for context allocation rollback. The rollback path can resize scratch-reuse-backed KV caches in a way that violates the history/capacity invariant.

Remove the V2 context KV cache allocation rollback path. Keep generation allocation rollback unchanged, since scratch reuse is disabled for generation requests.

Update the KV cache stats coverage so waited context allocations are reported when they are actually scheduled, and add the missing disaggregated-generation flag to the local request test double.

Test Coverage

  • CUDA_VISIBLE_DEVICES=0 python3 -m pytest -q tests/unittest/kv_cache_manager_v2_tests/test_kv_cache_stats_behavior.py on GB200 gb-nvl-082-compute09: 11 passed, 2 warnings
  • git diff --check
  • python3 -m py_compile tensorrt_llm/_torch/pyexecutor/resource_manager.py tensorrt_llm/_torch/pyexecutor/py_executor.py tests/unittest/kv_cache_manager_v2_tests/test_kv_cache_stats_behavior.py

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of my 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.

@jiaganc
jiaganc requested review from a team as code owners June 2, 2026 03:24
@jiaganc
jiaganc requested review from achartier and removed request for a team June 2, 2026 03:24
@jiaganc
jiaganc requested review from lancelly and lfr-0531 June 2, 2026 03:25
@jiaganc

jiaganc commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51489 [ run ] triggered by Bot. Commit: 0f9da64 Link to invocation

@jiaganc
jiaganc force-pushed the dsv4-scratch-adp-balance branch 2 times, most recently from 62658c4 to a70edf3 Compare June 2, 2026 06:44
@jiaganc

jiaganc commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51538 [ run ] triggered by Bot. Commit: a70edf3 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51489 [ run ] completed with state ABORTED. Commit: 0f9da64

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51538 [ run ] completed with state FAILURE. Commit: a70edf3
/LLM/main/L0_MergeRequest_PR pipeline #40932 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

@jiaganc

jiaganc commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51563 [ run ] triggered by Bot. Commit: a70edf3 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51563 [ run ] completed with state SUCCESS. Commit: a70edf3
/LLM/main/L0_MergeRequest_PR pipeline #40955 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

@jiaganc

jiaganc commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51621 [ run ] triggered by Bot. Commit: a70edf3 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51621 [ run ] completed with state SUCCESS. Commit: a70edf3
/LLM/main/L0_MergeRequest_PR pipeline #41006 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

@jiaganc

jiaganc commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51740 [ run ] triggered by Bot. Commit: a70edf3 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51740 [ run ] completed with state FAILURE. Commit: a70edf3
/LLM/main/L0_MergeRequest_PR pipeline #41112 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

@jiaganc
jiaganc force-pushed the dsv4-scratch-adp-balance branch from a70edf3 to d574913 Compare June 3, 2026 05:24
@jiaganc

jiaganc commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51757 [ run ] triggered by Bot. Commit: d574913 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51757 [ run ] completed with state SUCCESS. Commit: d574913
/LLM/main/L0_MergeRequest_PR pipeline #41130 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

@jiaganc
jiaganc force-pushed the dsv4-scratch-adp-balance branch from d574913 to 50839a5 Compare June 3, 2026 09:47
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51818 [ run ] triggered by Bot. Commit: 50839a5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51818 [ run ] completed with state SUCCESS. Commit: 50839a5
/LLM/main/L0_MergeRequest_PR pipeline #41181 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

Link to invocation

@lfr-0531

lfr-0531 commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51865 [ run ] triggered by Bot. Commit: 50839a5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51865 [ run ] completed with state FAILURE. Commit: 50839a5
/LLM/main/L0_MergeRequest_PR pipeline #41224 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

Link to invocation

@jiaganc

jiaganc commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51983 [ run ] triggered by Bot. Commit: 50839a5 Link to invocation

@jiaganc

jiaganc commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@jiaganc
jiaganc force-pushed the dsv4-scratch-adp-balance branch from ad0d588 to 50839a5 Compare June 4, 2026 07:26
@jiaganc

jiaganc commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52007 [ run ] triggered by Bot. Commit: 50839a5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51983 [ run ] completed with state ABORTED. Commit: 50839a5
/LLM/main/L0_MergeRequest_PR pipeline #41329 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 #52009 [ run ] triggered by Bot. Commit: 50839a5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52009 [ run ] completed with state FAILURE. Commit: 50839a5
/LLM/main/L0_MergeRequest_PR pipeline #41350 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

Link to invocation

@jiaganc

jiaganc commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

1 similar comment
@jiaganc

jiaganc commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52041 [ run ] triggered by Bot. Commit: 50839a5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52041 [ run ] completed with state SUCCESS. Commit: 50839a5
/LLM/main/L0_MergeRequest_PR pipeline #41376 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: Jiagan Cheng <jiaganc@nvidia.com>
@Shixiaowei02
Shixiaowei02 force-pushed the dsv4-scratch-adp-balance branch from 50839a5 to f874c5d Compare June 5, 2026 02:59
@Shixiaowei02

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52222 [ run ] triggered by Bot. Commit: f874c5d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52222 [ run ] completed with state SUCCESS. Commit: f874c5d
/LLM/main/L0_MergeRequest_PR pipeline #41540 completed with status: 'SUCCESS'

CI Report

Link to invocation

@jiaganc
jiaganc merged commit 95cd755 into NVIDIA:feat/deepseek_v4 Jun 5, 2026
6 checks passed
@jiaganc
jiaganc deleted the dsv4-scratch-adp-balance branch June 5, 2026 06:32
jiaganc added a commit to jiaganc/TensorRT-LLM that referenced this pull request Jun 26, 2026
Source-Commit: 95cd755
Signed-off-by: Jiagan Cheng <jiaganc@nvidia.com>
jiaganc added a commit to jiaganc/TensorRT-LLM that referenced this pull request Jun 29, 2026
Source-Commit: 95cd755
Signed-off-by: Jiagan Cheng <jiaganc@nvidia.com>
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.

4 participants