[AMD] [GLM5] use tuned MXFP4 kernels for MLA absorbed BMM - #34317
Open
Raiden-Makoto wants to merge 6 commits into
Open
Raiden-Makoto wants to merge 6 commits into
Raiden-Makoto wants to merge 6 commits into
Conversation
5 tasks
Raiden-Makoto
marked this pull request as ready for review
August 10, 2026 20:52
Raiden-Makoto
requested review from
Fridge003,
ch-wan,
fzyzcjy and
ispobock
as code owners
August 10, 2026 20:52
Raiden-Makoto
added a commit
to Raiden-Makoto/squidward
that referenced
this pull request
Aug 10, 2026
Contributor
Author
|
Doesn't work on image |
Raiden-Makoto
force-pushed
the
RM/glm52-mxfp4-absorbed-bmm-v2
branch
from
August 11, 2026 00:58
53490a2 to
fc7e369
Compare
Contributor
Author
|
Resolved: now works on new image as well. |
Raiden-Makoto
force-pushed
the
RM/glm52-mxfp4-absorbed-bmm-v2
branch
from
August 13, 2026 20:27
fc7e369 to
66f4bc6
Compare
Collaborator
|
/tag-and-rerun-ci |
Preserve packed MXFP4 absorbed weights and route current ROCm MLA K/V BMMs through shape-aware A16WFP4 kernels without changing decode tiles.
Create the conditionally imported AITER symbol in the mock so CPU CI can exercise wrapper argument forwarding.
Raiden-Makoto
force-pushed
the
RM/glm52-mxfp4-absorbed-bmm-v2
branch
from
August 17, 2026 17:15
aed261d to
ecdc6fe
Compare
Mock the symbol imported into deepseek_weight_loader so CPU CI observes the GLM rollback conversion call after the upstream import refactor.
Contributor
Author
|
MI35x, AMD stage-A, AMD nondeterministic, AMD large 1-GPU, AMD small 1-GPU shards 1–13, and AMD 2-GPU shard 0 passed. Failures appear unrelated:
Failed AMD root causes:
cc @HaiShaw |
Contributor
Author
|
/rerun-failed-ci |
This was referenced Aug 20, 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.
Motivation
The absorbed K/V projections remain the largest dense-attention bottleneck in GLM-5.2 prefill because the existing path does not use the checkpoint’s MXFP4 weights. This change preserves those weights in MXFP4 and runs the absorbed BMMs on the matching gfx950 kernels.
Modifications
w_kc/w_vcweights and scales in packed MXFP4 behindSGLANG_USE_MXFP4_MLA_BMM=1.NUM_KSPLIT=1.BLOCK_SIZE_K=64for GLM K-up (K=192).BLOCK_SIZE_M=128,BLOCK_SIZE_K=128for V-up whenM>256; preserve AITER's small-M decode buckets.MLA_ROCMK/V path through the tuned dispatch helpers.Accuracy Tests
Speed Benchmarks
GLM-5.2-MXFP4, TP4 MI355X, 8192 input / 1024 output,
REPS=3.A. Pre-tuning A16WFP4:
B. Tuned A16WFP4 (delta vs A):
Baseline =
rocm/sgl-dev:v0.5.16-rocm720-mi35x-20260804, plus these 7 PRsPR #30575: Triton sparse MLA prefill/decode
PR #30715: fused indexer query Hadamard + FP8 quant
PR #30808: gfx950 dense-MHA short-context fallback
PR #31323: fused shared-expert append
PR #31324: skip unnecessary dense-regime decode indexer work
PR #33602: FP8 dense GEMMs
PR #33620: pre-tuning A16WFP4 absorbed K/V BMM
This PR = Baseline + M128/K128 V-BMM tuning
Checklist
Review and Merge Process
CI States
Latest PR Test (Base): ❌ Run #33441160421
Latest PR Test (Extra): ❌ Run #33441159899
Latest PR Test (AMD ROCm 7.2): ❌ Run #33441160098