Skip to content

[https://nvbugs/6948129][fix] Test H=96 single-token MLA routing at its measured batch floor - #20652

Merged
reasonsolo merged 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6948129
Oct 20, 2026
Merged

reasonsolo merged 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6948129

Conversation

@trtllm-agent

@trtllm-agent trtllm-agent commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: The test is stale. [https://nvbugs/6691772][fix] Update trtllm-gen fmha autotuner to enable 96 head MLA #18599 deliberately raised _PERF_MIN_BATCH_FP8[(96, 1)] from 1 to 8, but the [None][feat] Kimi K3 optimizations on Rubin #19960 test helper hard-codes batch 4, so the single-token H=96 FP8 row correctly routes to TRTLLM-Gen while still expecting CuTe DSL.
  • Fix: Test H=96 single-token MLA routing at its measured batch floor. The helper takes batch_size as a required keyword; only the single-token row uses batch 8, the nine multi-token rows stay at 4, a new exact test checks that batch 4 falls through to TRTLLM-Gen, and this bug's waiver is removed.
  • Original test: bash .repair-bot/handoff/run_repro.sh
  • Automated fix generated by repair-bot

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Reproduction comparison

  • Failed commit: skipped — the NVBug report states the failure ToT reproduced
  • ToT (main) 7695494: reproduced (7 runs) — AssertionError: assert 'trtllm_gen' == 'cute_dsl_mla'

The failure on ToT is the one the report describes, so the bug is still present on ToT.

Dev Engineer Review

The test helper now requires an explicit batch_size. H=96 FP8 single-token tests use batch 8, while multi-token tests use batch 4. A new batch-4 test verifies fallback from Cute DSL MLA to TRTLLM-Gen below the performance floor. No production source changes are present.

QA Engineer Review

Modified tests/unittest/_torch/attention/test_cute_dsl_mla.py and removed the NVBug 6948129 waiver from tests/integration/test_lists/waives.txt. Coverage includes H=96 FP8 routing above and below the batch threshold. Coverage verdict: needs follow-up, because test execution results and CI/manual-QA list membership were not supplied.

Per-File QA Perspective

  • tests/unittest/_torch/attention/test_cute_dsl_mla.py: Covers H=96 FP8 single-token routing at batch 8, multi-token routing at batch 4, and TRTLLM-Gen fallback at batch 4. CI or manual-QA list membership is not confirmed.
  • tests/integration/test_lists/waives.txt: Removes the waiver for the MLA routing test. QA should confirm that the test passes without the waiver.

…ts batch floor

NVIDIA#18599 raised the measured FP8 perf-table entry for single-token H=96
MLA decode, _PERF_MIN_BATCH_FP8[(96, 1)], from 1 to 8. Below batch 8,
CuteDslMlaFmha now declines that shape and selection falls through to
TRTLLM-Gen, as intended. NVIDIA#19960 then added
test_mla_generation_routes_wide_head_fp8_verify_away_from_trtllm_gen,
whose helper hard-codes batch_size=4 and whose [103-96-1-True-False]
row still expects CuTe DSL under the old entry of 1.

Pass the batch size to the helper. The single-token row now runs at the
batch-8 floor, where its perf-table entry admits CuTe DSL. The
multi-token rows stay at batch 4, below the floor, so they keep checking
that the verify-group carve-outs do not depend on the batch size. Add a
batch-4 single-token case that pins the below-floor fall-through to
TRTLLM-Gen, and remove this bug's waiver.

Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/TensorRT-LLM/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 895821ea-dc56-4fb2-b65e-cc580b57b846
📥 Commits

Reviewing files that changed from the base of the PR and between 3af4d78 and f9711a8.

📒 Files selected for processing: 2
  • tests/integration/test_lists/waives.txt
  • tests/unittest/_torch/attention/test_cute_dsl_mla.py
💤 Files with no reviewable changes: 1
  • tests/integration/test_lists/waives.txt

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

Walkthrough

The MLA selection helper now receives batch size from its callers. Routing tests cover batch sizes 8 and 4, including TRTLLM-Gen selection for single-token FP8 H=96 requests at batch size 4. The associated skip entry is removed.

Changes

MLA routing coverage

Layer / File(s) Summary
Batch-aware MLA routing coverage
tests/unittest/_torch/attention/test_cute_dsl_mla.py, tests/integration/test_lists/waives.txt
The selection helper accepts a caller-provided batch size. Routing tests use batch size 8 for single-token requests and 4 for multi-token requests. A new test checks TRTLLM-Gen selection for single-token FP8 H=96 requests at batch size 4. The corresponding skip entry is removed.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f9711

The routing test is covered by the repository's CI test lists, and no merge-blocking risk is identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the NVBug, fix type, and primary change: testing H=96 single-token MLA routing at the measured batch floor.
Description check Passed The description explains the root cause, fix, affected test cases, waiver removal, reproduction result, and test plan. It does not include a separate PR Checklist section, but the key required informa…
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.
Full details: Description check

Explanation

The description explains the root cause, fix, affected test cases, waiver removal, reproduction result, and test plan. It does not include a separate PR Checklist section, but the key required information is present.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@yuxianq

yuxianq commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

@PerkzZheng, could you help to review this PR as trt-llm-torch-attention-devs? Thanks~

Assignment explanation
Componentsintegration/attention-tests (100%)
Tagsrepresentation:mla (100%); phase:decode (100%); features:quantization (100%)
PR effort2 points — Small localized test repair requiring verification of explicit batch propagation, batch-8 acceptance, batch-4 fallback, and preservation of multi-token cases at batch 4.
Affinity (0–1)0.583 component/tag match
Outstanding points at selection46 → 48 (+2)
Points already reserved on this PR0
Effective weight1
Completed review points (preceding 168 hours)34
Combined points after assignment82
Demand-derived target81.00 points (soft share)
Additional fair share before assignment1.00 points
Share explanationWhole PR / qualification or coverage constraint exceeds a soft share; assignment is allowed.
Selection rulebalance-first maintenance
Assignment scope (PerkzZheng)all

Affinity and workload are snapshots at selection, not live counters. Existing reservations on this PR are counted once.

@yuxianq
yuxianq requested review from PerkzZheng and removed request for heyuhhh and lfr-0531 October 20, 2026 03:14
@reasonsolo

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

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

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79131 [ run ] triggered by Bot. Commit: f9711a8 Link to invocation

@reasonsolo
reasonsolo enabled auto-merge (squash) October 20, 2026 04:18
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

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

@reasonsolo

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79215 [ run ] triggered by Bot. Commit: f9711a8 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #79215 [ run ] completed with state SUCCESS. Commit: f9711a8
/LLM/main/L0_MergeRequest_PR pipeline #65249 completed with status: 'SUCCESS'

CI Report

Link to invocation

@reasonsolo
reasonsolo merged commit 4c0197d into NVIDIA:main Oct 20, 2026
18 checks passed
lucifer1004 pushed a commit to lucifer1004/TensorRT-LLM that referenced this pull request Oct 22, 2026
Check the FP8 batch floor of single-token H=96 decode at 4 / 7 / 8 / 9 and
that BF16 KV is not gated, and mark the routing tests cpu_only so they run in
the CPU-Generic stages.

Signed-off-by: Vismay Shrouty <vismayshrouty@rediffmail.com>
[Zihua Wu: rebased onto main after NVIDIA#20652, which added the batch_size
argument to the routing helper; the threshold cases now use it directly.]
Signed-off-by: Zihua Wu <13583761+lucifer1004@users.noreply.github.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