Repository navigation
fix(tune): restore late AS and split issue/wait for M-major W4A8 grouped GEMM - #126
Merged
jinzhen-lin merged 2 commits intoOct 9, 2026
Conversation
…ped GEMM vllm-project#121 made late activation-scale promotion and split WGMMA issue/wait opt-in tuning flags that default to off. Before vllm-project#121 both were implied by kUsePackedLateAS for the M-major grouped-contiguous MXFP4 x FP8_BLOCK schedule from vllm-project#95, but _set_w4a8_config was never updated, so that schedule regressed by ~20% at M >= 2048. Set wgmma_use_late_as on every tile and wgmma_split_issue_wait up to M160. M176 exceeds the split register budget; late AS without split is slower on M144/M160 tiles. Output is bit-identical to the flags-off path. Extend test_grouped_w4a8_ranges_match_direct_selection to assert both flags and that every selected config passes the register budget check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: LopezCastroRoberto <rocastro@redhat.com>
jinzhen-lin
reviewed
Oct 9, 2026
jinzhen-lin
left a comment
Collaborator
There was a problem hiding this comment.
Thank you! I missed this before.
Signed-off-by: LopezCastroRoberto <rocastro@redhat.com>
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(tune): restore late AS and split issue/wait for M-major W4A8 grouped GEMM
Summary
#121 made late activation-scale promotion and split WGMMA issue/wait opt-in tuning flags (
wgmma_use_late_as,wgmma_split_issue_wait, both defaultFalse). Before #121, both behaviors were implied at compile time bykUsePackedLateASfor exactly the M-major grouped-contiguous MXFP4 (GS32) × FP8 (GS128) schedule added in #95._set_w4a8_configwas not updated, so from #121 on that schedule compiles with both disabled, and grouped M-major prefill regressed by ~20% at M ≥ 2048.This PR sets both flags in
_set_w4a8_config:wgmma_use_late_as=Truefor every tile.wgmma_split_issue_wait=Truefor tiles up to M160. M176 exceeds the split issue/wait register budget (accumulator 176 + single-buffer 16 + input scales 44 = 236 >= 224); M160 fits. Late AS without split is slower than neither flag on M144/M160 tiles, so the split cutoff matters.There are no CUDA changes. Output is bit-identical to the flags-off path on every tile size the policy selects (64, 144, 160, 176) for N4096/K6144 and N6144/K2048.
test_grouped_w4a8_ranges_match_direct_selectionnow asserts both flags on every selected range and that each selected config passesget_register_budget_error. The updated test fails on currentmain(16/16) and passes with this change.Where the regression comes from
M-major grouped-contiguous, N4096/K6144, 32 experts, top-k 8, balanced, latency in ms:
wgmma_use_late_asNo other commit between #95 and
mainmoves these numbers.Benchmarks
H200,
benchmarks/bench_humming.py,main(f40f6ec) vs this branch, latency in ms. 32 experts, top-k 8, default (unbalanced) routing, M-major input scales. Each value is the median of 3 runs, alternating between the two branches.Gate/up (N=4096, K=6144)
Down (N=6144, K=2048)
Only the M-major grouped-contiguous path changes; other GEMM types and row-major scales do not use
_set_w4a8_config.Split cutoff on M160 tiles (gate/up, balanced, ms):
Tests
All run on H200 against this branch:
pytest tests/test_sm90_heuristics.py tests/test_tuning_candidates.py: 77 passed, 99 skippedpytest tests/kernels/humming/test_moe.py tests/kernels/humming/test_mxfp4.py tests/kernels/humming/test_special_paths.py: 1538 passed, 12 skippedruff checkandruff format --checkclean on the changed filesNote on #124
#124 sets the same two flags in
_set_w4a8_configas part of a broader change, with the split cutoff at M144. This PR is the minimal fix for the #121 regression. With an M144 cutoff, M160 tiles stay ~4-6% slower than before #121 (table above), so whichever PR lands second should use the M160 cutoff.🤖 Generated with Claude Code