Repository navigation
Conversation
…50 rows DeepSeek-V4-Flash-0731 TP8 (N,K = 512/4096, 1536/4096, 4096/12288, 8192/1024 at the M values not yet covered) and DeepSeek-V4-Pro-0813 TP8 (N=7168 K=21504, M 1..16384), tuned with csrc/ck_gemm_a8w8_blockscale/gemm_a8w8_blockscale_tune.py --preshuffle on gfx950 (8x MI350X). All rows errRatio 0. Rows whose (M,N,K) already exist in the file are not re-added. Co-Authored-By: Claude Fable 5.1 <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
There was a problem hiding this comment.
🟢 Approval recommended
The change is limited to appending schema-consistent tuned CSV rows with no detected key duplication within the file and no code-path risk.
Pull request overview
Adds missing tuned GEMM config rows for DeepSeek-V4 TP8 on gfx950 (MI350X) for A8W8 blockscale + B-pre-shuffle, preventing runtime fallback to default configs for previously uncovered (M,N,K) shapes.
Changes:
- Append gfx950 (cu_num=256) tuned rows for DeepSeek-V4-Flash shapes at (N,K) ∈ {(512,4096), (4096,12288), (1536,4096), (8192,1024)} for the missing M values.
- Append gfx950 tuned rows for DeepSeek-V4-Pro shape (N,K)=(7168,21504) covering M=1..16384 (27 discrete rows).
File summaries
| File | Description |
|---|---|
| aiter/configs/model_configs/dsv4_a8w8_blockscale_bpreshuffle_tuned_gemm.csv | Adds gfx950 tuned dispatch rows for previously uncovered DeepSeek-V4 TP8 shapes to eliminate default-config fallback. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Could you also update the untuned shapes in untuned csv? Thanks. |
There was a problem hiding this comment.
🟢 Approval recommended
The change is limited to adding CSV tuning data with schema consistent with existing loaders (and get_config_file excludes untuned files from runtime merges).
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
dsv4 had no bpreshuffle untuned csv, so the shapes tuned here were not in any re-tune input. Lists the 71 (M,N,K) shapes this PR tuned, grouped by (N,K) with M ascending, matching dsv4_a8w8_blockscale_untuned_gemm.csv's layout. Co-Authored-By: Claude Opus 5 <[email protected]>
d720e75 to
1a34ff5
Compare
|
No activity for 15 days, so this is now labelled |
|
No activity for 15 days, so this is now labelled |
|
Updated against main and retained 62 uncovered rows. Nine Pro shapes now have newer upstream entries, so those duplicates were removed instead of replacing upstream picks. The matching 62-row untuned CSV addresses the earlier request. Validation on gfx950 / ROCm 10: the default config merge/collision test passes, and all 62 retained shapes select the intended kernel and pass a synthetic comparison against a dequantized PyTorch reference (finite output; cosine difference < 1e-3). The PR is still useful for these remaining shapes. Stored timings remain the original measurements; new-head CI and human review are still required. |
|
Rechecked against current main Three Pro rows (M=12/24/224) already select the same kernel through main's padded-M lookup. Flash M=2048/N=512/K=4096 tied; M=4096/N=512/K=4096 and M=192/N=4096/K=12288 were slower, so those explicit entries are gone too. The last shape now inherits the retained M=256 row, separately checked at 3.6% faster than main. On an idle gfx950/256-CU MI355X VF, ROCm 10/PyTorch 2.11, all 56 retained shapes reduced GEMM latency by 4.4–58.9% in repeated-weight operator measurements. Same tensors, separate ten-call CUDA graphs, six alternating rounds of 31 replays per arm; baseline preserves main's padded-M dispatch. This is not an end-to-end serving gain. Final runtime config merge/collision passed, all 56 retained rows select their expected kernels, and all six removed shapes were rechecked after trimming. Numerical validation passed for every pre-trim shape; retained choices are unchanged. The description now includes the method, limitations and removed shapes. New-head CI and human review are still required. |
There was a problem hiding this comment.
🔵 Needs a closer look
Static review confirms the dispatch-table shape and schema, but human verification is needed for gfx950 CK/CKTile registry integration and runtime latency/correctness on the MI355X/ROCm environment.
No open issues 🎉
Review effort: Lite
|
No activity for 15 days, so this is now labelled |
|
Closing this stale PR because the DSv4 bpreshuffle table conflicts with main and the last code update was October 28. Please reopen with a rebase and refreshed CI and tuning validation if this work is still needed. |
Summary
Add 56 gfx950 TP8 A8W8 blockscale bpreshuffle tuning rows: 41 DeepSeek-V4-Flash rows across N/K=512/4096, 4096/12288, 1536/4096 and 8192/1024, and 15 DeepSeek-V4-Pro rows at N=7168, K=21504. Matching untuned shapes are included.
The original 71-row patch omits nine shapes covered upstream, three rows that already select the same kernel through main's padded-M lookup, and three rows with no measured benefit on current main.
Current performance validation
Compared against main
1dd826c42on an otherwise idle MI355X VF (gfx950, 256 CUs), ROCm 10 / PyTorch 2.11. The code is identical between arms; the baseline uses the merged main config with the PR's added keys removed, preserving padded-M lookup. Each shape uses identical synthetic tensors, two CUDA graphs of 10 GEMMs, and six alternating rounds of 31 replay timings per arm. Reported latency is the median of the six round medians; JIT compilation and warm-up are excluded.All 56 retained shapes improved GEMM latency by 4.4–58.9% in this experiment. These are operator measurements with repeated weights, not an end-to-end serving or cold-weight benchmark. CSV latency fields retain the original MI350X tuning measurements.
Removed after this comparison:
SGLang's current default DeepSeek-V4 FP32-scale dense path still calls this dispatcher. Its opt-in E8M0 MX-scale path uses a different tuning table; this PR does not claim to accelerate that path.
Correctness and config checks
All 62 pre-trim shapes passed the dequantized PyTorch comparison (finite output, cosine difference <1e-3). The retained kernel choices are unchanged. The comparative run also checked main/PR output agreement for every shape. Runtime config merge/collision passed. All 56 retained rows select the intended kernels. After removal, five shapes select main's kernels; M=192/N=4096/K=12288 inherits the retained M=256 row through padded-M lookup, measured separately at 3.6% faster than main. The six removed shapes were rechecked after trimming with no observed latency regression.