Skip to content

[FlyDSL] fp8_mqa_logits: raise the split oversubscription target to 16x CU - #5682

Closed
akii96 wants to merge 1 commit into
ROCm:mainfrom
akii96:aakif/fp8-mqa-logits-split-oversubscription-gfx942
Closed

akii96 wants to merge 1 commit into
ROCm:mainfrom
akii96:aakif/fp8-mqa-logits-split-oversubscription-gfx942

Conversation

@akii96

@akii96 akii96 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

_auto_num_splits targets 4x CU worth of blocks, which underfills the device on the shapes vLLM issues for DeepSeek-V4 indexer prefill. Raising the target to 16x fills it.

Suggested fix

At seq_len 1024 / seq_len_kv 131072 the 4x target picks 3 splits: 1536 blocks over 304 CUs, six launched waves at 84.2% occupancy, the last holding 16 blocks. At 16x it picks 10 splits — 5120 blocks, 17 waves, 99.1%.

logits[m,n] are independent across n, so splitting a row's window across grid.y is pure parallelism: same work, same numerics. The early-out for an already-oversubscribed row grid still fires first, so large row grids are untouched.

Perf

MI325X (gfx942, 304 CU): 1.10x on the fp8_mqa_logits region, work-weighted over the top 8 call shapes, which are 81% of the region's GPU time. Output is bit-identical.

Composes with #4963. Once _auto_variant can pick rows_per_block, this shape selects r4 and grid_x halves to 256, so the same target moves it 5 → 19 splits. Combined effect measured at 1.82x.

@akii96
akii96 requested a review from a team September 19, 2026 08:29
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
multigpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 5682 --add-label <label>

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to opt this PR out.

@zufayu
zufayu requested a review from coderfeli September 20, 2026 01:11
@akii96
akii96 force-pushed the aakif/fp8-mqa-logits-split-oversubscription-gfx942 branch from dce39a9 to 24246ef Compare September 25, 2026 08:36
@akii96

akii96 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main as #4538 moved the split heuristic into fp8_mqa_logits_kernels.py and turned the multiplier into _SplitPolicy.cu_oversub, so this is now a one-line change on the gfx942 entry (gfx950 left at 4x, different tuning).

This is orthogonal to #4963 and vllm-project/vllm#58366 . Those pick the variant (rows_per_block), this picks grid.y splits, and neither touches _auto_num_splits. They stack rather than overlap, so this can land on its own and doesn't need to queue behind either.

@akii96
akii96 requested a review from vpietila-amd September 25, 2026 08:44
…6x CU

_auto_num_splits aims for 4x CU worth of blocks, which leaves the device
under-filled on the indexer prefill shapes. At seq_len 1024 / seq_len_kv 131072
it picks 3 splits: 1536 blocks over 304 CUs, 84.2% occupancy. A 16x target
picks 10 splits, 99.1%.

logits[m,n] are independent across n, so this only changes how the work is
spread over grid.y. Output is bit-identical. One side effect: the early-out for
an already-oversubscribed row grid moves with the target, so shapes with a row
grid between 4x and 16x CU now get split where they did not before.

ROCm#4538 moved this heuristic into fp8_mqa_logits_kernels.py and made the
multiplier a _SplitPolicy field, so the change is now cu_oversub on the gfx942
entry. gfx950 stays at 4x, it was tuned separately on MI355X.

MI325X (gfx942, 304 CU): 1.10x on the fp8_mqa_logits region, work-weighted over
the top 8 call shapes (81% of the region's GPU time).

Signed-off-by: Aakif Nawaz <aakif.nawaz@amd.com>
@akii96
akii96 force-pushed the aakif/fp8-mqa-logits-split-oversubscription-gfx942 branch from 24246ef to 209e625 Compare September 25, 2026 08:47
@maeehart

Copy link
Copy Markdown
Contributor

If #5921 supersedes this, then should this be closed?

@akii96

akii96 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Yep superceded by #5921

@akii96 akii96 closed this Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants