Skip to content

[None][fix] Restore CpType import for HELIX KV cache - #18143

Merged
chzblych merged 1 commit into
NVIDIA:mainfrom
chzblych:fix/release-check-cptype-import
Aug 24, 2026
Merged

[None][fix] Restore CpType import for HELIX KV cache#18143
chzblych merged 1 commit into
NVIDIA:mainfrom
chzblych:fix/release-check-cptype-import

Conversation

@chzblych

@chzblych chzblych commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Description

#18025 removed the CpType import while deleting star-attention support, but tensorrt_llm/_torch/pyexecutor/_util.py still uses CpType.HELIX in the HELIX KV-cache estimation and capacity paths. This leaves those references undefined and causes the baseline-gated legacy lint check to fail.

Restore the shared CpType import. This is an internal one-line fix with no API or runtime behavior change beyond making the existing HELIX paths valid again.

Test Coverage

  • python3 scripts/legacy_utils.py lint-precommit tensorrt_llm/_torch/pyexecutor/_util.py
  • ruff check --config ruff-legacy.toml --select F821 tensorrt_llm/_torch/pyexecutor/_util.py
  • git diff --check

PR Checklist

  • PR description clearly explains what and why.

  • PR follows the TRT-LLM coding guidelines.

  • No API changes, new dependencies, ownership changes, documentation changes, or architecture changes.

  • The targeted CI-equivalent lint checks pass.

  • Please check this after reviewing the above items as appropriate for this PR.

Dev Engineer Review

  • Restores the CpType import in tensorrt_llm/_torch/pyexecutor/_util.py.
  • Fixes undefined CpType.HELIX references in HELIX KV-cache estimation and capacity paths.
  • Preserves API and runtime behavior.
  • No configuration, public entity, or test-list changes.
  • Targeted lint and whitespace checks pass.

QA Engineer Review

No test changes.

Signed-off-by: Yanchao Lu <yanchaol@nvidia.com>
@chzblych
chzblych requested a review from a team as a code owner August 24, 2026 14:15
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Review 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: 7ff60069-3a3e-49e1-a037-eb0dda93c193

📥 Commits

Reviewing files that changed from the base of the PR and between 958d651 and 136872e.

📒 Files selected for processing (1)
  • tensorrt_llm/_torch/pyexecutor/_util.py

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


Walkthrough

The utility module now imports CpType alongside Mapping.

Changes

Context-parallel import

Layer / File(s) Summary
Utility mapping import
tensorrt_llm/_torch/pyexecutor/_util.py
The mapping import includes CpType alongside Mapping.

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

Merge Risk: ⚪ Minimal · up to 13687

This localized fix restores the import required by existing HELIX KV-cache paths without changing product behavior or public interfaces. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: bowenfu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the issue, solution, test coverage, and checklist items clearly and completely.
Title check ✅ Passed The title clearly and concisely describes restoring the CpType import for HELIX KV-cache handling.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
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.

@chzblych

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "Hotfix for release check"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #68830 [ skip ] triggered by Bot. Commit: 136872e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #68830 [ skip ] completed with state SUCCESS. Commit: 136872e
Skipping testing for commit 136872e

Link to invocation

@chzblych
chzblych enabled auto-merge (squash) August 24, 2026 14:39
@chzblych
chzblych disabled auto-merge August 24, 2026 14:39
@chzblych
chzblych merged commit bae4fc5 into NVIDIA:main Aug 24, 2026
13 checks passed
@chzblych
chzblych deleted the fix/release-check-cptype-import branch August 25, 2026 02:00
@lori-ren

Copy link
Copy Markdown
Contributor

Sorry for the inconvenience @chzblych. When drafting the PR, in PR's baseline codebase CpType has only one usage which serves for star attention and it is safe to delete the import. However, #17866 was merged yesterday, which adds a new reference to CpType. Since it appears in a totally different line, git fast-forward did not detect it as a conflict and post-merge breaks unexpectedly.

2ez4bz pushed a commit to 2ez4bz/TensorRT-LLM that referenced this pull request Aug 25, 2026
Signed-off-by: Yanchao Lu <yanchaol@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants