Repository navigation
[ROCm][DSV4] Add opt-in C4 compressor GEMM fusion - #38920
Open
AMD-yanfeiwang wants to merge 2 commits into
Open
AMD-yanfeiwang wants to merge 2 commits into
AMD-yanfeiwang wants to merge 2 commits into
Conversation
2 tasks done
AMD-yanfeiwang
force-pushed
the
perf/dsv4-c4-compressor-gemm-fusion
branch
from
September 11, 2026 02:38
551aed4 to
7dd089c
Compare
This was referenced Sep 30, 2026
Draft
AMD-yanfeiwang
force-pushed
the
perf/dsv4-c4-compressor-gemm-fusion
branch
from
October 1, 2026 04:03
7dd089c to
3b32242
Compare
AMD-yanfeiwang
marked this pull request as ready for review
October 3, 2026 11:16
AMD-yanfeiwang
requested review from
BBuf,
DarkSharpness,
Fridge003,
HaiShaw,
HydraQYH,
Qiaolin-Yu,
celve,
hebiao064,
ispobock,
merrymercy and
yuan-luo
as code owners
October 3, 2026 11:16
This branch has not been deployed
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
DeepSeek V4 C4 computes 2048-wide main-compressor and 512-wide indexer projections from the same hidden state. This PR, stacked on #38919, combines them into one 2560-wide GEMM and splits the result into zero-copy row-strided views. PR2-only diff.
Modifications
SGLANG_OPT_DSV4_C4_COMPRESSOR_GEMM_FUSION=1.Accuracy Tests
8 passed.37 passed.33 passed.Speed Tests and Profiling
The projection microbenchmark improved 11/12 graph buckets, with a
10.29%median latency reduction.DeepSeek-V4-Pro TP8 serving on 8x MI355X/gfx950 used one fresh-container unfused-A/fused/unfused-B sandwich. C1/C4/C8/C16 all used random lengths in the 0.8-1.0x range with 8K/1K maxima, seeds 1001/1002/1003,
10 * concurrencymeasured requests, and an explicit2 * concurrencywarmup before every sample. Each arm also ran two full-shape priming sweeps. Radix cache, HiCache, and LMCache were disabled. All 36 measured windows were free of serving-time compilation, and request/token workloads matched exactly across arms.+0.36%(+2.51/-0.60/+0.36%)+0.19%3.11% / 3.29%-0.01%(-1.00/-0.01/+1.65%)+0.08%2.94% / 2.87%+1.64%(+2.26/-1.07/+1.64%)+1.77%2.17% / 2.05%+3.19%(+2.58/+4.57/+3.19%)+2.99%3.06% / 3.07%The strict per-workload gate requires all three throughput and TPOT deltas to be positive, at least
+1%median improvement for both metrics, and at most5%A/B control drift per seed. C16 passes and supports a stable gain for this exact service workload. C1/C4 are neutral; C8 has a positive median but one negative seed. The feature remains default-off because API concurrency is not a reliable local-GEMM shape gate and the benefit is not uniform across workloads.Checklist
CI States
Latest PR Test (Base): ❌ Run #36813359346
Latest PR Test (Extra): ❌ Run #36813359178
Latest PR Test (AMD ROCm 10): ❌ Run #36813359504