Skip to content

[https://nvbugs/6670516][fix] Call build_kv_page_indices with current signature - #18980

Merged
brb-nv merged 1 commit into
NVIDIA:mainfrom
brb-nv:user/brb/fix-msa-signature-mismatch
Sep 10, 2026
Merged

[https://nvbugs/6670516][fix] Call build_kv_page_indices with current signature#18980
brb-nv merged 1 commit into
NVIDIA:mainfrom
brb-nv:user/brb/fix-msa-signature-mismatch

Conversation

@brb-nv

@brb-nv brb-nv commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixed the last stale 4-arg build_kv_page_indices caller (the microbenchmark) and removed the waives. MR-18106 had already repaired the two waived tests.

Test Coverage

$ pytest tests/unittest/_torch/attention/sparse/msa/test_minimax_m3_index_decode_score.py::test_index_decode_score_matches_msa_proxy[dtype0]
$ pytest tests/unittest/_torch/attention/sparse/msa/test_minimax_m3_index_decode_score.py::test_index_decode_score_matches_msa_proxy[dtype1]
$ pytest tests/unittest/_torch/attention/sparse/msa/test_minimax_m3_sparse_attn_decode.py::test_sparse_decode_matches_msa_kernel

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.

Dev Engineer Review

  • Updated _flat_page_table to use the current build_kv_page_indices signature.
  • Removed obsolete token-index expansion and synthetic request-index construction.
  • Removed three sparse MSA attention waivers. This re-enables repaired tests without expanding scope.

QA Engineer Review

  • Modified tests/integration/test_lists/waives.txt.
  • Removed three skip entries for sparse MSA attention tests, including MSA proxy index decoding and sparse decode coverage.
  • The restored tests should validate proxy index decoding and sparse decode behavior. Coverage verdict: sufficient.

Per-File QA Perspective

  • tests/microbenchmarks/minimax_m3_index_decode_score.py: Verify that the benchmark produces correct page indices with the current build_kv_page_indices API and preserves sparse decode behavior.
  • tests/integration/test_lists/waives.txt: Verify that the three repaired sparse MSA attention tests run successfully after waiver removal.

…nature it has

PR 17986 narrowed build_kv_page_indices from the req_to_token plus slot_ids
pair to a single block_ids_cpu table and migrated its production caller. The
three-argument callers that landed 47 minutes later in PR 17842 still passed
four, so the two unit tests below raised TypeError on every run and were
waived. PR 18106 has since repaired both tests, leaving the page-table
microbenchmark as the last stale caller and the waivers with nothing to hide.

Repoints the microbenchmark at the current helper, which already holds the
block table the old code was expanding to token slots and folding back, and
drops the three waivers.

Unwaived: test_index_decode_score_matches_msa_proxy[dtype0], the same case at
[dtype1], and test_sparse_decode_matches_msa_kernel.

Signed-off-by: Balaram Buddharaju <169953907+brb-nv@users.noreply.github.com>
@brb-nv
brb-nv requested a review from a team as a code owner September 9, 2026 22:11
@brb-nv
brb-nv requested review from dc3671 and hyukn September 9, 2026 22:11
@coderabbitai

coderabbitai Bot commented Sep 9, 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: b9228e94-0f9d-491f-903e-bad238a07ac6

📥 Commits

Reviewing files that changed from the base of the PR and between 5f7e4cc and 613b012.

📒 Files selected for processing (2)
  • tests/integration/test_lists/waives.txt
  • tests/microbenchmarks/minimax_m3_index_decode_score.py
💤 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; 11 remain after this review.


Walkthrough

The change simplifies KV page-index construction in a minimax microbenchmark and removes three skip waivers for sparse MSA attention integration tests.

Changes

Index decode updates

Layer / File(s) Summary
Direct page-index construction
tests/microbenchmarks/minimax_m3_index_decode_score.py
_flat_page_table passes the CPU-converted block table directly to build_kv_page_indices with the page size and KV lengths.
Sparse MSA test activation
tests/integration/test_lists/waives.txt
Removes skip waivers for two test_index_decode_score_matches_msa_proxy cases and one test_sparse_decode_matches_msa_kernel case.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 613b0

This updates the microbenchmark for the current page-index helper signature and re-enables repaired sparse MSA tests. No merge-blocking risk is evident.

Suggested reviewers: bowenfu

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title follows the required NVBugs and type format and clearly describes the main change: updating the build_kv_page_indices caller to use its current signature.
Description check ✅ Passed The description explains the issue and solution, lists relevant test coverage, and includes the required checklist with the review confirmation marked.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@brb-nv
brb-nv requested a review from lfr-0531 September 9, 2026 22:14
@brb-nv

brb-nv commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #72545 [ run ] triggered by Bot. Commit: 613b012 Link to invocation

@brb-nv
brb-nv enabled auto-merge (squash) September 10, 2026 00:24
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #72545 [ run ] completed with state SUCCESS. Commit: 613b012
/LLM/main/L0_MergeRequest_PR pipeline #59552 completed with status: 'SUCCESS'

CI Report

Link to invocation

@brb-nv
brb-nv merged commit d77225c into NVIDIA:main Sep 10, 2026
21 checks passed
@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.

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