Skip to content

[TRTLLM-14846][chore] Group KV Cache managers and reunite the Disaggregation transceiver halves - #17899

Merged
lori-ren merged 20 commits into
NVIDIA:mainfrom
lori-ren:layout/T16-kv-cache-disagg
Sep 5, 2026
Merged

[TRTLLM-14846][chore] Group KV Cache managers and reunite the Disaggregation transceiver halves#17899
lori-ren merged 20 commits into
NVIDIA:mainfrom
lori-ren:layout/T16-kv-cache-disagg

Conversation

@lori-ren

@lori-ren lori-ren commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

…egation transceiver halves

Dev Engineer Review

  • Relocated KV-cache managers to _torch/pyexecutor/kv_cache/.
  • Consolidated disaggregation transceiver modules under _torch/disaggregation/.
  • Updated imports and preserved deferred-import and module-cycle behavior.
  • Added recompute-pause handling to KVCacheV2Scheduler.
  • Added cold-tier statistics aggregation and KV-cache budget-splitting support.
  • Added Minimax M3 sparse-attention validation and FP8 index-cache support.
  • Updated Helix context-parallel KV-size accounting.
  • Updated CODEOWNERS, legacy-file lists, Ruff configuration, and test paths.
  • No apparent correctness, performance, API, error-handling, or ownership regressions.
  • Verdict: sufficient.

QA Engineer Review

  • Added or restored tests for:
    • AsyncTransferManager transfers and state handling.
    • Disaggregated benchmark scheduling and transfer behavior.
    • Early IndexMapper slot release.
    • KV-cache block-offset overlap handling.
    • KV-cache budget splitting and cold-tier statistics.
    • KV-cache pool rebalancing.
  • Updated affected test imports, patch targets, and test paths.
  • Updated tests/integration/test_lists/test-db/l0_a10.yml.
  • Added unittest/_torch/disaggregation to:
    • l0_b300.yml
    • l0_cpu.yml
    • l0_dgx_b300.yml
    • l0_gb300_multi_gpus.yml
    • l0_h100.yml
  • Updated tests/integration/defs/.test_durations and waives.txt.
  • The disaggregation tests are included in CI test lists. Specific coverage for all newly added KV-cache tests is not confirmed.
  • CBTS coverage data is unavailable.
  • Verdict: needs follow-up.

Description

Pure relocation — no production code changed, only import paths.

from to
_torch/pyexecutor/kv_cache_manager_v2.py _torch/pyexecutor/kv_cache/kv_cache_manager_v2.py
_torch/pyexecutor/mamba_cache_manager.py _torch/pyexecutor/kv_cache/mamba_cache_manager.py
_torch/pyexecutor/kv_cache_transceiver.py _torch/disaggregation/kv_cache_transceiver.py
_torch/disaggregation/transceiver.py _torch/disaggregation/transceiver_v2.py

New package _torch/pyexecutor/kv_cache/ groups the two KV cache managers. The
transceiver's two halves — the KvCacheTransceiver interface plus factory, and the
KvCacheTransceiverV2 implementation — now sit in one package, and the file names
distinguish them. The factory's deferred import is kept verbatim: the two modules still
form a cycle, and package membership does not change the module graph.

CODEOWNERS: two exact-file rules for kv_cache_transceiver.py retire (the file now falls
under the _torch/disaggregation directory rule); the KV cache rules collapse into one
pyexecutor/kv_cache directory rule. No file changes owner.

The second commit moves the matching tests so they sit with the modules they cover — 13
to tests/unittest/_torch/executor/kv_cache/, 4 to tests/unittest/_torch/disaggregation/
— along with the CODEOWNERS rules and test-list entries that name them.

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.

@lori-ren
lori-ren force-pushed the layout/T16-kv-cache-disagg branch from 013ad78 to 7241a76 Compare August 19, 2026 01:46
@lori-ren lori-ren added the api-compatible Accepted LLM API contract change that is backwards-compatible label Aug 19, 2026
@lori-ren
lori-ren force-pushed the layout/T16-kv-cache-disagg branch from 7241a76 to 5cb994f Compare August 19, 2026 01:53
@lori-ren
lori-ren marked this pull request as ready for review August 19, 2026 02:27
@lori-ren
lori-ren requested review from a team as code owners August 19, 2026 02:27
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71520 [ run ] completed with state SUCCESS. Commit: 10871ae
/LLM/main/L0_MergeRequest_PR pipeline #58611 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: Lori Ren <lorir@nvidia.com>
… the old module paths

Signed-off-by: Lori Ren <lorir@nvidia.com>
@lori-ren

lori-ren commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71536 [ run ] triggered by Bot. Commit: 3ecec7f Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71536 [ run ] completed with state SUCCESS. Commit: 3ecec7f
/LLM/main/L0_MergeRequest_PR pipeline #58625 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: Lori Ren <lorir@nvidia.com>
@lori-ren

lori-ren commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71628 [ run ] triggered by Bot. Commit: 50302ae Link to invocation

Signed-off-by: Lori Ren <lorir@nvidia.com>
@lori-ren

lori-ren commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71638 [ run ] triggered by Bot. Commit: 3c66d8a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71628 [ run ] completed with state ABORTED. Commit: 50302ae

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71638 [ run ] completed with state FAILURE. Commit: 3c66d8a
/LLM/main/L0_MergeRequest_PR pipeline #58725 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

@lori-ren

lori-ren commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71658 [ run ] triggered by Bot. Commit: 3c66d8a Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71658 [ run ] completed with state FAILURE. Commit: 3c66d8a
/LLM/main/L0_MergeRequest_PR pipeline #58742 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

@lori-ren

lori-ren commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71668 [ run ] triggered by Bot. Commit: 3c66d8a Link to invocation

Signed-off-by: Lori Ren <lorir@nvidia.com>
@lori-ren

lori-ren commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71685 [ run ] triggered by Bot. Commit: d77955c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71668 [ run ] completed with state ABORTED. Commit: 3c66d8a

Link to invocation

@lori-ren

lori-ren commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

/bot run --disable-fail-fast

@lori-ren

lori-ren commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

/bot help

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

GitHub Bot Help

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

Details

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental) --high-priority]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Supports wildcard * for pattern matching (e.g., "*PerfSanity*" matches all stages containing PerfSanity). Examples: "A10-PyTorch-1, xxx", "PerfSanity". The patterns "*", "*Post-Merge*", and "*PerfSanity*", including equivalent escaped or repeated-star forms and their use in comma-separated lists, require the ci: post-merge approved PR label. Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Requires the ci: full pre-merge approved label on the PR (ask a member of NVIDIA/trt-llm-ci-approvers). Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline. Requires the ci: full pre-merge approved label on the PR (ask a member of NVIDIA/trt-llm-ci-approvers).

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline. Requires the ci: post-merge approved PR label applied by an active member of NVIDIA/trt-llm-ci-approvers. The approval label remains in place when new commits are pushed.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Supports wildcard * for pattern matching. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx", --extra-stage "Post-Merge". The patterns "*", "*Post-Merge*", and "*PerfSanity*", including equivalent escaped or repeated-star forms and their use in comma-separated lists, require the ci: post-merge approved PR label.

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

--high-priority (OPTIONAL) : Run the pipeline with high priority. This option is restricted to authorized users only and will route the job to a high-priority queue.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71718 [ run ] triggered by Bot. Commit: d77955c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71685 [ run ] completed with state ABORTED. Commit: d77955c

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #71718 [ run ] completed with state SUCCESS. Commit: d77955c
/LLM/main/L0_MergeRequest_PR pipeline #58799 completed with status: 'SUCCESS'

CI Report

Link to invocation

@lori-ren
lori-ren merged commit c3c207a into NVIDIA:main Sep 5, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-compatible Accepted LLM API contract change that is backwards-compatible ci: full pre-merge approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.