[ASM] [HIP] [CK] feat(mha): gfx950 hd256 FP8 LINEAR paged-varlen asm prefill - #4971
Open
MiloLurati wants to merge 4 commits into
Open
[ASM] [HIP] [CK] feat(mha): gfx950 hd256 FP8 LINEAR paged-varlen asm prefill#4971MiloLurati wants to merge 4 commits into
MiloLurati wants to merge 4 commits into
Conversation
Select the PAGED_VARLEN asm kernel for gfx950 FP8 hd256 page_size=64, then fall back to CK.
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags: |
Skip page64 asm off gfx950, drop the redundant page16 case, clamp empty-page seqlen_k, and use the file's FP8 threshold.
Fold the -1 ladder into one compound if like fmha_fwd_v3, and restore the CK kUseGlobalLoad comment.
MiloLurati
marked this pull request as ready for review
August 25, 2026 11:33
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.
Motivation
SGLang chunked prefill uses a paged KV cache (page size 64, LINEAR
[N, 64, H, D]). The gfx950 hd256 FP8 asm prefill kernel only accepted contiguous KV, so that path fell back to CK. This PR selects a PAGED_VARLEN asm kernel for that layout.Technical Details
op_tests/test_batch_prefill.py:test_batch_prefill_hd256_fp8_page64_asm(LINEAR, causal/non-causal, including one randomized Q/KV length case) andtest_batch_prefill_hd256_fp8_page16_stays_ck.--pagesizeaccepts 64.Test Plan
op_tests/test_batch_prefill.py:test_batch_prefill_hd256_fp8_page64_asm(gfx950-only skip; LINEAR; causal/non-causal; equal lengths, Q=128/KV=1024, randomized Q/KV with KV ≥ Q, GQA 16:2).--pagesizechoices include 64 (-p 64 --kv_layout linearfor a CLI bench). 64 is not in the default[1, 16, 1024]sweepTest Result
Submission Checklist