Repository navigation
Commit 549977e
perf(prims-ts): run short-list H128 FP8 sparse MLA on the 2CTA schedule
_choose_fp8 only picked the H128 2CTA family for capacity >= 512. A short list
(capacity 256-384, e.g. HCA at moderate context: one 128-slot SWA tile plus
one or two compressed tiles) fell through to the 1CTA M64 "keep" fallback,
which repeats the single KV stream for every head tile and cannot retain K.
Lower the threshold to 256. On B200 (fp32 fused output, graph timing,
interleaved 3 rounds):
B1 Q8192 K192 (capacity 256) 1.2549 -> 0.5281 ms (2.38x)
B2 Q8192 K192 2.5005 -> 1.0386 ms (2.41x)
B1 Q8192 KV32768 K384 (capacity 384) 1.5452 -> 0.6297 ms (2.45x)
decode B128 K192 0.0231 -> 0.0139 ms (1.66x)
decode B128 K384 0.0289 -> 0.0154 ms (1.88x)
decode B32 / B64 K192 (below the rows*2 >= sm_count gate): unchanged
capacity 512 control: unchanged (same schedule)
Tests cover capacity 256 and 384 with H128 FP8 and BF16: decode, prefill,
independent source scales, and fused RoPE/quant output.
The cutoffs in this policy were measured on GB300; this one was measured on
B200 only and should be confirmed on GB300.
AI-assisted.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
(cherry picked from commit 1e09032)1 parent 19bfa5d commit 549977e
2 files changed
Lines changed: 17 additions & 2 deletions
File tree
- flashinfer/attention/prims_ts/kernels/mla_decode
- tests/attention
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
262 | 265 | | |
263 | 266 | | |
264 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
378 | 382 | | |
379 | 383 | | |
380 | 384 | | |
| |||
739 | 743 | | |
740 | 744 | | |
741 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
742 | 754 | | |
743 | 755 | | |
744 | 756 | | |
| |||
0 commit comments