Repository navigation
[Triton/Gluon] [ASM] [HIP] Extend the DeepSeek-V4 a8w8 blockscale GEMM tunings for gfx950 - #5473
Closed
LiuYinfeng01 wants to merge 1 commit into
Closed
LiuYinfeng01 wants to merge 1 commit into
LiuYinfeng01 wants to merge 1 commit into
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
valarLip
requested changes
Sep 12, 2026
Collaborator
There was a problem hiding this comment.
move new configs to model_configs
LiuYinfeng01
force-pushed
the
dsv4-a8w8-blockscale-tuning
branch
from
September 13, 2026 16:17
4bcbe26 to
a3c6694
Compare
Adds 734 rows to aiter/configs/model_configs/dsv4_a8w8_blockscale_tuned_gemm.csv and updates 4. `get_config_file` merges model_configs/ with configs/ at load time, so per-model rows belong here rather than in the global table. The file already covers four of the six (N, K) families this model drives, but only at a coarse M ladder, and has no entry at all for the two vocabulary projections. N K before added after 7168 7168 61 594 655 6144 7168 15 39 54 7168 3072 15 39 54 65536 1536 15 39 54 129280 7168 0 16 16 16160 7168 0 7 7 The 4 updated rows are all N=65536 K=1536, at M = 4, 128, 256 and 512, where tuning moved the pick from the ck kernels to the ck_tile aqrm variants. Timed here against the rows they replace, both kernels back to back in one process on the same tensors, medians over 7 repeats of 50 iterations: 1.26x at M=512, 1.19x at M=128, 1.06x at M=4 and 1.04x at M=256. Tuning also produced a different pick for 15 further shapes already in the file, but re-timing them the same way showed every one within 1% of the existing row: 13 resolve to the same ck_tile tile config and differ only in a trailing variant index, so those rows are left untouched. Otherwise a pure addition: the remaining 306 original rows are byte-identical, no key is duplicated, and every added row has errRatio 0.0. Tuned with aiter's own tuner at the default ERR_RATIO on gfx950 with cu_num=256, matching the rest of the file. Without the added rows the entry point reports "not found tuned config" for every distinct (M, N, K) DeepSeek-V4 issues; in one 3600-second AgentX run on MI355X that fires 14066 times, each falling back to a kernel chosen without knowledge of the tile. Per-shape, 40 shapes sampled across the M range of all six families, measured against the current table where all 40 fall back: median 2.79x, mean 2.94x, max 5.86x, 50860us -> 11700us in aggregate; the gain grows with M. One shape, M=64 N=7168 K=3072, is 0.94x, within run-to-run spread at 12us. In a captured prefill trace the blockscale-family GEMM time per step per rank falls from 500.1ms to 244.8ms, with the untuned ck::kernel_gemm_xdl_cshuffle_v3 fallback going from 171 calls at 2059us to 46 at 555us. End to end on DeepSeek-V4-Pro, MI355X x8, TP1/DP8, FP8 KV, MTP-3, concurrency 64, full 3600-second window with everything else byte-identical: 27,003,552 -> 30,319,229 tokens/$ (+12.3%) and 7.055 -> 8.654 P90 interactivity (+22.7%).
LiuYinfeng01
force-pushed
the
dsv4-a8w8-blockscale-tuning
branch
from
September 13, 2026 16:37
a3c6694 to
fc7139c
Compare
This was referenced Sep 13, 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.
Summary
Adds 734 rows to
aiter/configs/model_configs/dsv4_a8w8_blockscale_tuned_gemm.csv.Addressing @valarLip's review: the first revision put these in the global
aiter/configs/a8w8_blockscale_tuned_gemm.csv. That was wrong twice over. Theper-model file already exists, and 81 of the rows I had proposed duplicated keys
already in it.
get_config_filemergesmodel_configs/withconfigs/at loadtime, so per-model rows belong here.
The file already covers four of the six
(N, K)families this model drives, butonly at a coarse M ladder, and carries no entry at all for the two vocabulary
projections:
Pure addition: the existing 310 rows are byte-identical, no key is duplicated,
every new row has
errRatio = 0.0. Tuned with aiter's own tuner at the defaultERR_RATIOon gfx950 withcu_num=256, matching the rest of the file. M valuesfollow the ladder the file already uses, restricted to the range each family
reaches at runtime.
Without these rows the entry point reports
not found tuned configfor everydistinct
(M, N, K)DeepSeek-V4 issues; in one 3600-second AgentX run on MI355Xthat fires 14066 times.
Per-shape effect
Same entry point the model calls,
aiter.gemm_a8w8_blockscale, run twice in thesame image: once against the current table, where all 40 sampled shapes report
not found tuned config, and once with these rows present. 40 shapes sampledacross the M range of all six families.
Over the 40 sampled shapes: median 2.79x, mean 2.94x, max 5.86x, and
50,860 us to 11,700 us in aggregate. The gain grows with M, which is the
expected shape of the problem.
One shape regresses,
M=64 N=7168 K=3072at 0.94x. It is the only one of the40 and the absolute difference is 0.7 us, within run-to-run spread, but it is
listed rather than omitted.
In situ
The same effect on a live run, summing every blockscale-family GEMM kernel per
prefill step per rank from a captured trace:
ck::kernel_gemm_xdl_cshuffle_v3352.2 ms, n=171, 2059 us/callGEMM time per prefill step halves, and it is the untuned
kernel_gemm_xdl_cshuffle_v3fallback that disappears as the work moves ontotuned cktile kernels.
End to end
DeepSeek-V4-Pro, MI355X x8, TP1/DP8, FP8 KV, MTP-3, concurrency 64, full
3600-second window, everything else held byte-identical:
+12.3% tokens/$ and +22.7% P90 interactivity from a data file alone.
The remaining 7180 fallbacks are M values between ladder points. The lookup
still resolves those, they are simply not exact hits.
Relation to #4664
#4664 added DeepSeek-V4 coverage but left these six families out. The rows here
are diffed against current
main, not against that PR.Scope
Tuned on gfx950 with
cu_num=256only. The shipped table is gfx950/256throughout so this matches it, but these rows say nothing about other
architectures.