Repository navigation
Commit e7dde59
Fix gfx950 midbatch cap: restore rows>63 L<=65536 fold to bpr=1
C3 lossless A/B (port vs our original topk-robin branch) surfaced a
regression at rows=128 L=65536: port 78.6us vs ours 49.6us. Root cause:
the A3 midbatch_coord_cap port omitted the first rule (rows>63, L<=65536
-> cap=1) and floored the cap at 2, because the kernel had no bpr=1
single-workgroup path at the time. Phase B (B0 bpr=1 support + B2 fold)
added that path, so restore the rule and lower the floor to 1.
The rule caps blocks_per_row to 1 WITHOUT force_single_wg (short_max
stays < L), so the row runs the mid tier with a single cooperating block
(barrier-free, HIP one-block shape) instead of a width-2 cooperative grid
that serializes a wide batch into extra co-resident waves.
Verified gfx950:
- config parity vs ours across rows{1..256} x L{8k..256k}: identical
except the known benign pow2 rounding at rows=1 L=120000 (30->32,
perf-neutral per robin's pow2 commit).
- correctness 24/24 (regime A+B, random/ties/10LSBits) on the newly
folded rows{64,128,256} L=65536.
- perf: rows=128 L=65536 78.6->49.8us (== ours 49.9), rows=64 47.4us
(== ours 47.5); ~5x faster than robin (251us).
Co-authored-by: Cursor <[email protected]>1 parent d839939 commit e7dde59
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| 213 | + | |
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
| |||
218 | 222 | | |
219 | 223 | | |
220 | 224 | | |
221 | | - | |
| 225 | + | |
222 | 226 | | |
223 | 227 | | |
224 | 228 | | |
| |||
0 commit comments