Repository navigation
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags: |
|
No activity for 15 days, so this is now labelled |
The shipped DSv4 tables cover gfx950/256, gfx1250/256 and gfx942/80. MI325X reports cu_num=304, so every lookup misses and falls back to the default config -- 100,216 'not found tuned config' messages during a single server startup, across 6,438 raw shapes. Tuned on the target hardware with the in-tree tuner using --compare --update_improved --min_improvement_pct 5 --errRatio 0.001. 464 of 476 shapes cleared the 5% bar; every adopted row has errRatio 0.0. Median speedup: blockscale 1.35x at M<=256 and 2.91x at M>4096; bpreshuffle 2.24x at M<=256. No regression across the 476 shapes. Signed-off-by: zzw09773 <[email protected]>
6fd613a to
e8eba50
Compare
|
Rebased onto current main. The only conflict was #5839 adding 25 gfx942/304 rows to |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8eba50bf7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| gfx942,304,1472,768,7168,ck,11,0,27.7695,a8w8_blockscale_bpreshuffle_1x128x128_256x32x128x256_16x16_16x16_16x16x1_16x16x1_1x32x1x8_8_2x1_intrawave_v1,583.62,659.62,0.0 | ||
| gfx942,304,1536,768,7168,ck,11,0,28.3917,a8w8_blockscale_bpreshuffle_1x128x128_256x32x128x256_16x16_16x16_16x16x1_16x16x1_1x32x1x8_8_2x1_intrawave_v1,595.65,664.78,0.0 | ||
| gfx942,304,1600,768,7168,ck,11,0,28.1849,a8w8_blockscale_bpreshuffle_1x128x128_256x32x128x256_16x16_16x16_16x16x1_16x16x1_1x32x1x8_8_2x1_intrawave_v1,625.02,689.43,0.0 | ||
| gfx942,304,1664,768,7168,asm,1,1,32.0867,_ZN5aiter42fp8gemm_bf16_blockscale_BpreShuffle_48x128E,570.98,622.95,0.0 |
There was a problem hiding this comment.
Keep fp16 calls off bf16-only ASM rows
On gfx942/304, when callers request dtype=torch.float16 for one of the 86 newly added asm shapes (for example this exact key), config lookup ignores dtype and gemm_a8w8_blockscale_bpreshuffle dispatches the row unconditionally. That public function explicitly accepts fp16 (aiter/ops/gemm_op_a8w8.py:1173-1176), but the selected backend rejects it in csrc/py_itfs_cu/asm_a8w8_blockscale_bpreshuffle.cu:64-65 because these _bf16_ kernels only support BF16. These keys previously missed and took the CK fallback, which instantiates F16, so supported fp16 calls now raise at runtime; filter ASM rows by output dtype or retain a CK route for fp16.
Useful? React with 👍 / 👎.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No activity for 15 days, so this is now labelled |
|
Closing this stale PR because it conflicts with main and its last code update was October 17. If you pick it back up, please rebase and check which omitted M values still select added configurations through the padded lookup. |
What
Tuned
a8w8_blockscaleanda8w8_blockscale_bpreshuffleGEMM configs for DeepSeek-V4 on gfx942 withcu_num=304(MI325X) — 464 rows across the 7 (N, K) pairs that a production DSv4 deployment actually reaches.Why
The shipped DSv4 tables cover
gfx950/256,gfx1250/256andgfx942/**80**. MI325X reportscu_num=304, so every lookup misses and falls through to the default config. On an 8×MI325X DeepSeek-V4-Pro-0813 server that is 100,216not found tuned configmessages during startup alone, across 6,438 raw shapes. After this change the same boot emits 72.How the rows were produced
Both files were generated with the in-tree tuner on the target hardware:
python3 csrc/ck_gemm_a8w8_blockscale/gemm_a8w8_blockscale_tune.py \ -i <shapes.csv> -o aiter/configs/model_configs/dsv4_a8w8_blockscale_tuned_gemm.csv \ --compare --update_improved --min_improvement_pct 5 --errRatio 0.001 \ --shape_grouped --mp 8 # ... and the same with --preshuffle for the bpreshuffle tabledsv4_a8w8_blockscale_untuned_gemm.csvM sweep (68 values, 1 – 32768) applied to the (N, K) pairs observed in the running server — blockscale(768,7168) (2048,7168) (7168,384) (7168,21504), bpreshuffle(768,7168) (2048,7168) (7168,2048).--min_improvement_pct 5: 464 of 476 shapes cleared the bar and are included. The other 12 are deliberately absent so they keep using the default kernel.--errRatio 0.001— 50× tighter than the default. Every adopted row haserrRatioexactly0.0.Measured speedup (
--compare, per-shape pre/post in one run)a8w8_blockscale(272 shapes)..._bpreshuffle(204 shapes)Medians. 476 shapes, no regression — the single 0.99× entry did not clear the 5 % bar and is therefore not in the table.
End-to-end check
DeepSeek-V4-Pro-0813, 8×MI325X, TP8,
max_model_len=600000, DSpark speculative decoding, cudagraphs on:Notes
(gfx, cu_num, M, N, K)keys.us/tflops/bware this machine's measurements, consistent with how the existing rows were produced.