Commit 3a97902
committed
[gemma4_31b][cuda][tq4] split-K decode: size BLOCK_M to num_groups (not fixed 64)
The split-K decode launcher hardcoded BLOCK_M=64 for the pack-GQA path, but
only L_q*num_groups rows are valid (=8 for Gemma4 global, H_Q=32/H_KV=4). That
left 56/64 M-rows idle while the QK/PV tensor-core MMAs still computed all 64,
and made acc[64, HEAD_DIM=512] fp32 = 128 KB/CTA, spilling registers to local
memory. Size BLOCK_M = max(16, next_pow2(L_q*num_groups)) instead (16 for
Gemma4 global), removing the wasted MMA rows and the spills. Decode-only;
prefill path unchanged.1 parent 14d4810 commit 3a97902
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
1204 | | - | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1205 | 1213 | | |
1206 | 1214 | | |
1207 | 1215 | | |
| |||
0 commit comments