Repository navigation
[Bugfix][MiniMax-M3] Guard sparse decode sentinel indices - #54597
benchislett merged 7 commits into
Conversation
78b6065 to
991029d
Compare
991029d to
f0736aa
Compare
f0736aa to
b663838
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #90309 for commit |
Head branch was pushed to by a user without write access
|
/ci run |
|
❌ This PR is 15 commits behind upstream |
9f43f7d to
d3ad848
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #90441 for commit |
d3ad848 to
1bcbaaa
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #90452 for commit |
1bcbaaa to
90a990b
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #90694 for commit |
90a990b to
dafeddc
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #91309 for commit |
dafeddc to
22d85e2
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #91417 for commit |
ebf2b31 to
1e2fc48
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #92185 for commit |
CI selector (shadow): 39 test steps (87 jobs) instead of 51 (87 jobs)Shadow mode: this changes nothing about what CI runs. It shows what the evidence-based selector would pick for this PR, next to today's rules. How it works. Feedback welcome: reply here if it would skip a step this change needs, or runs something unrelated.
Selector would run (39)
Would skip (today's rules run them) (20)
Would add (today's rules do not run them) (8)
AMD mirrors: would skip (19)
AMD mirrors: would add (3)
3 changed files · base |
Map invalid top-k entries to a safe logical block and preserve neutral softmax state without branching in the split-K loop. Assisted-by: OpenAI Codex Signed-off-by: Kyle Liang <kylliang@nvidia.com>
Exercise sentinels and positive out-of-range indices before and after valid entries with both split-K and single-chunk execution. Retain layout and graph coverage after rebasing onto current main. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Kyle Liang <kyleliang-nv@users.noreply.github.com>
Compare the poisoned invalid-entry path with a valid-only run on identical Q/K/V, using exact output equality. Preserve the full layout, split-K, and CUDA graph matrix and leave independent reference-accuracy tests unchanged. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Kyle Liang <kyleliang-nv@users.noreply.github.com>
Move the existing MiniMax-M3 attention suite out of the fail-fast mixed kernel shard so unrelated failures cannot prevent its regression coverage from running. Keep all other commands and the L4/AMD coverage unchanged. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Kyle Liang <kyleliang-nv@users.noreply.github.com>
1e2fc48 to
4a4e4ee
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #92915 for commit |
|
/ci run |
|
✅ Triggered Buildkite CI #93659 for commit |
Overview
Guard MiniMax-M3's Triton sparse-decode block-table dereference against negative sentinel and out-of-range logical block indices. The independent metadata-producer correction remains #54604.
Rebased on October 5, 2026 onto public main
54d93af9fb89d0bb8392bdb72db42bb6a17cb4ca; head4a4e4ee62ddc232d930a2666403356cad436eefc. All four PR patches are unchanged according togit range-diff. Main still has the unguarded dereference. Ready for code review, with the remaining validation below explicit.Claims
Validation
pre-commit run --from-ref 54d93af9fb89d0bb8392bdb72db42bb6a17cb4ca --to-ref HEADandgit diff --checkpassed.1e2fc48cc515, Buildkite #92185's standalone B200 job passed: 121 passed, 45 skipped. The overall build failed in the AMD sleep-mode job, which exited with code 139; the full build is not claimed as green.dafeddcc063fpassed all 16 regression cases on each of B200, L4, and MI300 (48 total) in Buildkite #91309. Historical results validate those exact commits, not the October 5 head./ci runstarted Buildkite #92915 for the October 5 head4a4e4ee62ddc232d930a2666403356cad436eefc. Current-head GPU results are pending.Reproduce the focused suite on a supported accelerator:
.venv/bin/python -m pytest tests/kernels/attention/test_minimax_m3.py \ -k 'decode_sparse_attention or decode_wrong_layout' -vDetails
Triton's
bt_row + blkuses raw pointer arithmetic. Forblk == -1, the unsafe access reads immediately before the request's row, not its final element. The regression uses contiguous rows and runs request 1 with a poisoned final entry in row 0, making this address deterministic.The kernel maps invalid logical blocks to safe block 0, masks their K/V and scale loads, and preserves softmax state for those entries. The upper bound is this query token's
ceil(kv_len / 128): a block that becomes valid for a later speculative token contributes nothing to the earlier token because it was already fully causally masked. This does not redefine all-empty query output in the merge kernel.The regression covers negative and large positive invalid indices, invalid-before/after-valid orderings, split-K and single-chunk execution, both KV layouts, eager execution, capture, and three graph replays. It requires finite output and exact parity with a valid-only run on identical inputs; independent FP32-reference tests and their tolerances are unchanged. Run unfixed-kernel controls in a dedicated process because an illegal access can poison the device context.
Open-PR searches were refreshed on October 5. Related #56932 adds specialized decode paths but does not replace the general-loop guard; #57420 concerns prefill, #49054 empty-row merge NaNs, and #52060 scalar KV scales. This PR does not duplicate those changes.
The checklist review found no new rebase-related code issue. The scope remains a local kernel safety fix plus regression/CI coverage; it adds no model-runner or scheduler policy.
Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.
Testing and Validation remains unchecked because the GPU/end-to-end items above have not all been completed. OpenAI Codex assisted with implementation, review, rebases, and tests. The human submitter must review every changed line and run/confirm the relevant validation before merge.
BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)