Repository navigation
[AMD][DSv4] Add experimental AITER FP4 streaming TopK - #38101
Closed
AMD-yanfeiwang wants to merge 2 commits into
Closed
AMD-yanfeiwang wants to merge 2 commits into
AMD-yanfeiwang wants to merge 2 commits into
Conversation
AMD-yanfeiwang
force-pushed
the
perf/dsv4-aiter-fused-topk
branch
from
September 6, 2026 13:24
36dfcf9 to
0960744
Compare
4 of 5 tasks
3 tasks done
Contributor
|
Thanks @AMD-yanfeiwang. Closing this because it is still a draft and has not been updated in 32 days. Reopen it if the work is still relevant. Some directories moved recently, so an older branch may need retargeting: |
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
The HIP FP4 indexer currently materializes an FP32
[query_rows, c4_context]score matrix before selecting sparse KV positions. #37660 bounds allocator fragmentation with a device-global 2 GiB slab, and #38086 is an independent proposal that replaces it with an accounted 512 MiB workspace.This draft takes the operator-level route instead: use the exact streaming score + TopK API proposed in ROCm/aiter#5282, so eager prefill does not produce the full logits matrix at all.
Changes
flydsl_pa_mqa_topk_fp4_prefillonce during backend construction and freeze the selected execution path before graph capture.SGLANG_DSV4_FP4_FUSED_TOPK=falsekill switch.No
FP4LogitsWorkspace, ModelRunner workspace registry, KV-pool accounting field, or context-sized environment budget is added by this PR.Dependency
Draft dependency: ROCm/aiter#5282.
The integration uses exact symbol probing rather than a package-version comparison, so existing ROCm images retain their current behavior. Once the AITER PR merges, this branch will pin its merge SHA in
docker/rocm.Dockerfileand remove any superseded temporary AITER patch. Development/CI can test the dependency throughAITER_COMMIT_OVERRIDE.Memory geometry
At 768K full-token context, one C4 FP32 score row is approximately 0.75 MiB. A 1024-row local prefill therefore materializes roughly 768 MiB today. The dependent AITER path keeps bounded per-CTA candidates and merge scratch (about 20 MiB for rows=1024/topk=1024), independent of context length.
Validation
Completed:
Queued on MI355X:
Graph-captured decode/verify remains on the existing path in this first draft. This PR remains draft until the dependency and GPU results are attached.
CI States
Latest PR Test (Base): ❌ Run #34035988444
Latest PR Test (Extra): ❌ Run #34035988299
Latest PR Test (AMD ROCm 7.2): ❌ Run #34035988501