[AMD] Enable deepseek-v4 topk_transform v2 kernel - #36684
Merged
Merged
Conversation
1am9trash
requested review from
BBuf,
DarkSharpness,
HaiShaw,
HydraQYH,
celve and
yuan-luo
as code owners
August 27, 2026 10:52
1am9trash
marked this pull request as draft
August 27, 2026 10:53
1am9trash
marked this pull request as ready for review
August 28, 2026 03:57
saturn-acc
pushed a commit
to saturn-acc/sglang
that referenced
this pull request
Aug 31, 2026
nzr-niu
pushed a commit
to nzr-niu/sglang
that referenced
this pull request
Sep 1, 2026
5 tasks
14 tasks
ChangLiu0709
added a commit
to ChangLiu0709/sglang
that referenced
this pull request
Sep 14, 2026
- Update Docker image from v0.5.19-rocm720-mi35x-20260910 to v0.5.19-rocm720-mi35x-20260913 for the MI355X MXFP4 cells. - Add SGLANG_OPT_USE_TOPK_V2=true env to all four MXFP4 cells (low-latency, balanced, high-throughput, mtp-314): the v2 fused top-k kernel is now available for GLM-5.x on ROCm after upstream sgl-project#36684 and sgl-project#36851. - Update the MTP validation note in the MDX cookbook page to reference the new image and document the TOPK_V2 enablement. Upstream InferenceX PR: SemiAnalysisAI/InferenceX#3081
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
Topk transform v2 kernel replaces v1's 8-bit coarse key and 128KB LDS candidate buffer with a 12-bit key, register-resident rows, so far fewer candidates reach the refinement pass and the GPU no longer runs one block per CU.
Modifications
server_args.pygate.test_topk_v2.py.Accuracy Tests
Unit test added in
test/registered/kernels/ops/attention/test_topk_v2.py:GSM8k, 1319:
Speed Tests and Profiling
Kernel side:
E2E server run on long context:
Server script to reproduce:
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Run #33067512788
Latest PR Test (Extra): ✅ Run #33140291705
Latest PR Test (AMD ROCm 7.2): ❌ Run #33067512757