Skip to content

[None][fix] Initialize KV cache fixtures and unwaive nine cases on all platforms - #19382

Merged
yizhang-nv merged 2 commits into
NVIDIA:mainfrom
yizhang-nv:codex/fix-kv-cache-test-fixtures
Sep 18, 2026
Merged

yizhang-nv merged 2 commits into
NVIDIA:mainfrom
yizhang-nv:codex/fix-kv-cache-test-fixtures

Conversation

@yizhang-nv

@yizhang-nv yizhang-nv commented Sep 18, 2026

Copy link
Copy Markdown
Member

Dev Engineer Review

The fixtures now initialize kv_connector_manager=None and is_estimating_kv_cache=False. Nine global waivers were removed, restoring two cached-token attribution cases and seven connector-prefix cases. No production or public API changes are included. Material review findings are unavailable.

QA Engineer Review

Two unit-test fixture files and tests/integration/test_lists/waives.txt changed. The waiver file removes nine KV-cache entries. The affected KV-cache manager suite is registered in test-db/l0_b200.yml, l0_cpu.yml, and l0_h100.yml; related connector-prefix coverage is registered in test-db/l0_a10.yml. Test results were not supplied. Coverage verdict: needs follow-up.

Per-File QA Perspective

  • tests/unittest/_torch/executor/kv_cache/test_kv_cache_manager_v2.py: Initializes kv_connector_manager for cached-token attribution tests. The suite is listed in the test-db CI files; verify the restored cases.
  • tests/unittest/_torch/executor/test_kv_connector_v2_prefix.py: Initializes is_estimating_kv_cache for connector-prefix tests. Related connector-prefix coverage is listed in test-db/l0_a10.yml; verify the restored cases across applicable platforms.
  • tests/integration/test_lists/waives.txt: Removes nine KV-cache waivers. Verify that all restored cases pass on applicable platforms.

Description

After #18583 and #18762 landed together, nine KV cache unit tests fail with AttributeError because their fixtures bypass KVCacheManagerV2.__init__. Initialize is_estimating_kv_cache=False in the connector fixture and kv_connector_manager=None in the cached-token attribution fixture so the tests reach their existing assertions.

The fixture fix adds two initialization lines in test setup. Failure example: main pre-merge #60944.

After #19384 merged, this branch was rebased onto origin/main including its merge commit ffddc5abd188f308adb5a2906112c2b1e7192d7d. This PR explicitly removes all nine global SKIP entries introduced by #19384: two cached-token attribution cases and seven connector-prefix cases (AskTiming, ReEntryAfterAServe, and SwaScratchReuse). These deletions restore the cases on all platforms where their existing CI lists select them, including H100 and B300 pre-merge. Jenkins applies explicit PR waiver deletions when combining the current main waiver list. The final diff is three files, +2/-9.

Test Coverage

  • Existing connector-prefix and cached-token attribution tests in tests/unittest/_torch/executor/test_kv_connector_v2_prefix.py and tests/unittest/_torch/executor/kv_cache/test_kv_cache_manager_v2.py cover both fixtures.
  • Normal commit hooks and DCO sign-off are retained for both commits.
  • Static inspection confirms the nine cases remain selected by existing GPU CI lists and are not disabled by broader waivers or case-level skip conditions. Fresh CI on the final rebased head is the requested runtime validation; earlier-head CI does not cover this unwaive.
  • Attempted both test files on umbriel-b200-034 on the earlier fixture-only head. Collection was blocked while loading tests/unittest/conftest.py: the existing libth_common.so could not resolve the PyTorch torch::Library::_def symbol. No tests executed in this local attempt; runtime validation remains pending CI.

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why.

  • PR follows the TRT-LLM coding guidelines.

  • Existing tests cover the changed fixture initialization.

  • No API, dependency, ownership, documentation, or architecture changes.

  • Reviewers are assigned according to CODEOWNERS.

  • 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.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a8f54342-29d6-41ef-9f88-b30f4b5129c7

📥 Commits

Reviewing files that changed from the base of the PR and between 8f499c4 and 743b06b.

📒 Files selected for processing (1)
  • tests/integration/test_lists/waives.txt
💤 Files with no reviewable changes (1)
  • tests/integration/test_lists/waives.txt

Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.


Walkthrough

Two KV-cache test fixtures now initialize previously unset manager state. One sets kv_connector_manager to None. The other sets is_estimating_kv_cache to False. Nine related integration-test skip entries are removed.

Changes

KV-cache test fixture defaults

Layer / File(s) Summary
Explicit KV-cache fixture defaults
tests/unittest/_torch/executor/kv_cache/test_kv_cache_manager_v2.py, tests/unittest/_torch/executor/test_kv_connector_v2_prefix.py, tests/integration/test_lists/waives.txt
The admission manager fixture initializes kv_connector_manager to None. The prefix test manager fixture disables KV-cache estimation mode by default. Nine related test skip entries are removed.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Suggested reviewers: brnguyen2

Merge Risk: ⚪ Minimal · up to 743b0

The restored tests now receive the state required for their intended paths, with no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required [None][fix] format and clearly summarizes both fixture initialization and removal of the nine skipped cases.
Description check ✅ Passed The description explains the issue, solution, affected tests, unwaive scope, test coverage, validation limits, and checklist status. It is sufficiently complete for this change.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files.
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 a new PR

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

@yizhang-nv

Copy link
Copy Markdown
Member Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74264 [ run ] triggered by Bot. Commit: 4292b39 Link to invocation

@zhaoyangwang-nvidia zhaoyangwang-nvidia 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.

Approve with nit.

Comment thread tests/unittest/_torch/executor/kv_cache/test_kv_cache_manager_v2.py
@github-actions

Copy link
Copy Markdown

Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements.

@yizhang-nv

Copy link
Copy Markdown
Member Author

/bot kill

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74271 [ kill ] triggered by Bot. Commit: 4292b39 Link to invocation

@yizhang-nv yizhang-nv changed the title [None][fix] Initialize KV cache test fixture state [None][fix] Initialize KV cache fixtures and unwaive nine cases on all platforms Sep 18, 2026
@yizhang-nv
yizhang-nv force-pushed the codex/fix-kv-cache-test-fixtures branch from 4292b39 to 8f499c4 Compare September 18, 2026 02:55
@yizhang-nv

Copy link
Copy Markdown
Member Author

/bot run --disable-fail-fast --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74264 [ run ] completed with state ABORTED. Commit: 4292b39

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74271 [ kill ] completed with state SUCCESS. Commit: 4292b39
Successfully killed previous jobs for commit 4292b39

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74280 [ run ] triggered by Bot. Commit: 8f499c4 Link to invocation

@yizhang-nv

Copy link
Copy Markdown
Member Author

/bot kill

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74288 [ kill ] triggered by Bot. Commit: 8f499c4 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74280 [ run ] completed with state ABORTED. Commit: 8f499c4

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74288 [ kill ] completed with state SUCCESS. Commit: 8f499c4
Successfully killed previous jobs for commit 8f499c4

Link to invocation

@yizhang-nv

Copy link
Copy Markdown
Member Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74299 [ run ] triggered by Bot. Commit: 8f499c4 Link to invocation

Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>
Signed-off-by: Yi Zhang <187001205+yizhang-nv@users.noreply.github.com>

# Conflicts:
#	tests/integration/test_lists/waives.txt
@yizhang-nv
yizhang-nv force-pushed the codex/fix-kv-cache-test-fixtures branch from 8f499c4 to 743b06b Compare September 18, 2026 03:39
@yizhang-nv

Copy link
Copy Markdown
Member Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74308 [ run ] triggered by Bot. Commit: 743b06b Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74299 [ run ] completed with state ABORTED. Commit: 8f499c4

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74308 [ run ] completed with state SUCCESS. Commit: 743b06b
/LLM/main/L0_MergeRequest_PR pipeline #61126 completed with status: 'SUCCESS'

CI Report

Link to invocation

@yizhang-nv

Copy link
Copy Markdown
Member Author

/bot run --disable-fail-fast --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74321 [ run ] triggered by Bot. Commit: 743b06b Link to invocation

@yizhang-nv
yizhang-nv enabled auto-merge (squash) September 18, 2026 05:28
@yizhang-nv

Copy link
Copy Markdown
Member Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74328 [ run ] triggered by Bot. Commit: 743b06b Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74321 [ run ] completed with state ABORTED. Commit: 743b06b

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #74328 [ run ] completed with state SUCCESS. Commit: 743b06b
/LLM/main/L0_MergeRequest_PR pipeline #61145 completed with status: 'SUCCESS'

CI Report

Link to invocation

@yizhang-nv
yizhang-nv merged commit 9f26cc3 into NVIDIA:main Sep 18, 2026
11 checks passed
brnguyen2 added a commit to brnguyen2/TensorRT-LLM that referenced this pull request Sep 22, 2026
…st waives

The directory-level waive added in NVIDIA#19381 for https://nvbugs/6800103 was
left in place after NVIDIA#19382 fixed that bug, so every test under
unittest/_torch/executor has been skipped in CI since 2026-09-18.

Running the tree on main with the line removed gives 2436 passed and
54 failed. Replace the blanket entry with waives for exactly the failing
tests, so the rest of the tree runs again:

- test_kv_cache_budget_split.py: class-level waives for
  TestSplitGpuBudgetForDraft and TestExternalDrafterKvDtype, tracked
  under the existing https://nvbugs/6800223 (same stale-fixture cause).
- test_mamba_cache_manager.py: 16 test functions whose fixture lacks
  the `mapping` attribute production now reads.
- test_kv_cache_v2_vocab_size.py: 11 parametrizations whose fixture
  lacks `_max_cuda_graph_batch_size`.
- test_pytorch_model_engine.py: test_prepare_tp_inputs_with_helix_parallelism,
  base update_helix_param signature lacks helix_owned_new_tokens.

The last three are tracked under https://nvbugs/6818710.

Signed-off-by: Brian Nguyen <brnguyen@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.

5 participants