Attention¶
15 ops, 223 workloads.
One table per op, one row per workload. Ratio is the fastest other implementation's device time divided by ours, so green is faster than it, plain is level with it, red is slower. Times are in ms. How these numbers are taken.
MHADecodePagedWithKVCacheFwd¶
q: [B, S_q, H, D]k, v: [N_kv, H, D]real_seqlen_kv: [B], i32block_table: [B, W], i32
dtype=f16
serving-q: [1, 1, 16, 128]k, v: [512, 16, 128]real_seqlen_kv: [1], i32block_table: [1, 4], i32kv_lens=[512]page_size=128p128 serving-q: [2, 1, 8, 64]k, v: [1024, 8, 64]real_seqlen_kv: [2], i32block_table: [2, 4], i32kv_lens=repeat(1024, 2)page_size=256b2 serving-q: [1, 1, 8, 64]k, v: [1024, 8, 64]real_seqlen_kv: [1], i32block_table: [1, 4], i32kv_lens=[1024]page_size=256kv1k serving-q: [1, 1, 8, 64]k, v: [512, 8, 64]real_seqlen_kv: [1], i32block_table: [1, 2], i32kv_lens=[512]page_size=256kv512 speculative-q: [2, 4, 8, 64]k, v: [1024, 8, 64]real_seqlen_kv: [2], i32block_table: [2, 4], i32kv_lens=repeat(1000, 2)page_size=256is_causal=truedecode opt-q: [1, 1, 32, 64]k, v: [2048, 32, 64]real_seqlen_kv: [1], i32block_table: [1, 16], i32kv_lens=[2048]page_size=1281.3b- b1 opt-q: [16, 1, 32, 64]k, v: [32768, 32, 64]real_seqlen_kv: [16], i32block_table: [16, 16], i32kv_lens=repeat(2048, 16)page_size=1281.3b- b16
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
serving- | f16 | 1.44× | 0.00643 | flashinfer | 0.00925 | 0.659 | 15% | lat |
serving- | f16 | 1.71× | 0.00576 | flashinferfa3 | 0.00982 0.0184 | 0.743 | 8% | lat |
serving- | f16 | 1.80× | 0.00538 | flashinferfa3 | 0.00966 0.0183 | 0.398 | 9% | lat |
serving- | f16 | 1.95× | 0.00477 | flashinferfa3 | 0.00928 0.0178 | 0.224 | 5% | lat |
speculative- | f16 | 2.51× | 0.00739 | fa3 | 0.0186 | 2.26 | 6% | lat |
opt- | f16 | 1.51× | 0.0102 | flashinfer | 0.0154 | 1.68 | 37% | mem |
opt- | f16 | 0.98× | 0.0793 | flashinfer | 0.0774 | 3.45 | 75% | mem |
GQABwd¶
q, o, do: [B, S, H, D]k, v: [B, S, H_kv, D]lse: [B, H, S], f32
dtype=f16, bf16
llama-q, o, do: [4, 512, 32, 128]k, v: [4, 512, 8, 128]lse: [4, 32, 512], f328b- short llama-q, o, do: [2, 2048, 32, 128]k, v: [2, 2048, 8, 128]lse: [2, 32, 2048], f328b- long llama-q, o, do: [2, 512, 64, 128]k, v: [2, 512, 8, 128]lse: [2, 64, 512], f3270b- short llama-q, o, do: [1, 2048, 64, 128]k, v: [1, 2048, 8, 128]lse: [1, 64, 2048], f3270b- long llama-q, k, v, o, do: [4, 512, 32, 128]lse: [4, 32, 512], f328b- short- mha llama-q, k, v, o, do: [2, 2048, 32, 128]lse: [2, 32, 2048], f328b- long- mha llama-q, k, v, o, do: [2, 512, 64, 128]lse: [2, 64, 512], f3270b- short- mha llama-q, k, v, o, do: [1, 2048, 64, 128]lse: [1, 64, 2048], f3270b- long- mha
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
llama- | f16 | 0.91× | 0.1503 | fa3 | 0.1373 | 143 | 20% | comp |
| bf16 | 0.91× | 0.1492 | fa3 | 0.1364 | 144 | 19% | comp | |
llama- | f16 | 0.81× | 0.5705 | fa3 | 0.4599 | 301 | 41% | comp |
| bf16 | 0.81× | 0.5686 | fa3 | 0.4584 | 302 | 40% | comp | |
llama- | f16 | 0.92× | 0.1418 | fa3 | 0.1309 | 151 | 21% | comp |
| bf16 | 0.93× | 0.1415 | fa3 | 0.1309 | 152 | 20% | comp | |
llama- | f16 | 0.79× | 0.5656 | fa3 | 0.4479 | 304 | 42% | comp |
| bf16 | 0.79× | 0.5647 | fa3 | 0.4459 | 304 | 40% | comp | |
llama- | f16 | 1.00× | 0.1123 | fa3 | 0.1123 | 191 | 27% | mem |
| bf16 | 1.00× | 0.1120 | fa3 | 0.1116 | 192 | 27% | mem | |
llama- | f16 | 0.94× | 0.4425 | fa3 | 0.4147 | 388 | 53% | comp |
| bf16 | 0.95× | 0.4391 | fa3 | 0.4153 | 391 | 51% | comp | |
llama- | f16 | 1.00× | 0.1130 | fa3 | 0.1125 | 190 | 26% | mem |
| bf16 | 1.00× | 0.1126 | fa3 | 0.1122 | 191 | 27% | mem | |
llama- | f16 | 0.94× | 0.4417 | fa3 | 0.4155 | 389 | 53% | comp |
| bf16 | 0.94× | 0.4410 | fa3 | 0.4137 | 390 | 51% | comp | |
GQADenseFwd¶
q: [B, S_q, H, D]k, v: [B, S_kv, H_kv, D]
llama-q: [32, 1, 32, 128]k, v: [32, 4096, 8, 128]dtype=f16, bf168b- 4k llama-q: [8, 1, 32, 128]k, v: [8, 32768, 8, 128]dtype=f16, bf168b- 32k llama-q: [16, 1, 64, 128]k, v: [16, 4096, 8, 128]dtype=f16, bf1670b- 4k llama-q: [4, 1, 64, 128]k, v: [4, 32768, 8, 128]dtype=f16, bf1670b- 32k llama-q: [32, 1, 32, 128]k, v: [32, 4096, 8, 128]softcap=50dtype=f168b- softcap qwen3-q: [1, 1, 32, 128]k, v: [1, 1024, 4, 128]dtype=f1630b- 1k qwen3-q: [1, 1, 32, 128]k, v: [1, 4096, 4, 128]dtype=f1630b- 4k qwen3-q: [1, 1, 32, 128]k, v: [1, 8192, 4, 128]dtype=f1630b- 8k qwen3-q: [1, 1, 32, 128]k, v: [1, 16384, 4, 128]dtype=f1630b- 16k qwen3-q: [1, 1, 32, 128]k, v: [1, 32768, 4, 128]dtype=f1630b- 32k qwen3-q: [1, 1, 32, 128]k, v: [1, 65536, 4, 128]dtype=f1630b- 64k qwen3-q: [1, 1, 32, 128]k, v: [1, 131072, 4, 128]dtype=f1630b- 128k qwen3-q: [1, 1, 32, 128]k, v: [1, 262144, 4, 128]dtype=f1630b- 256k falcon-q: [32, 1, 71, 64]k, v: [32, 2048, 1, 64]dtype=bf167b- 2k starcoder-q: [16, 1, 48, 128]k, v: [16, 8192, 1, 128]dtype=f168k starcoderbase-q: [16, 1, 22, 128]k, v: [16, 8192, 1, 128]dtype=bf163b- 8k gemma-q: [1, 1, 8, 256]k, v: [1, 8192, 1, 256]dtype=f16, bf162b- 8k- bs1 gemma-q: [16, 1, 8, 256]k, v: [16, 8192, 1, 256]dtype=f16, bf162b- 8k- b16 qwen3-q: [1, 128, 32, 128]k, v: [1, 2048, 8, 128]dtype=bf168b- chunked- prefill qwen3-q: [8, 128, 32, 128]k, v: [8, 2048, 8, 128]dtype=bf168b- chunked- b8
q: [B, S_q, H, D]k, v: [B, S_kv, H_kv, D]rope_cos, rope_sin: [S_kv + P_pad, R // 2]
prefill-q: [1, 256, 8, 128]k, v: [1, 1792, 2, 128]rope_cos, rope_sin: [1792, 32]pos_encoding_mode=roperotary_dim=64dtype=f16, bf16rope
q: [B, S_q, H, D]k, v: [B, S_kv, H_kv, D]q_scale, k_scale, v_scale: [B, H_kv], f32
prefill-q: [1, 256, 8, 128]k, v: [1, 1792, 2, 128]q_scale, k_scale, v_scale: [1, 2], f32dtype=fp8e4m3/f16scaled
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
llama- | f16 | 0.95× | 0.1422 | flashinferfa3 | 0.1354 0.1516 | 15.3 | 84% | mem |
| bf16 | 0.95× | 0.1416 | flashinferfa3 | 0.1353 0.1504 | 15.3 | 84% | mem | |
llama- | f16 | 0.95× | 0.2667 | flashinferfa3 | 0.2541 0.2633 | 16.3 | 89% | mem |
| bf16 | 0.95× | 0.2664 | flashinferfa3 | 0.2542 0.2626 | 16.3 | 90% | mem | |
llama- | f16 | 1.06× | 0.0780 | flashinferfa3 | 0.0823 0.0841 | 27.8 | 77% | mem |
| bf16 | 1.05× | 0.0779 | flashinferfa3 | 0.0822 0.0838 | 27.8 | 77% | mem | |
llama- | f16 | 0.97× | 0.1432 | flashinferfa3 | 0.1388 0.1478 | 30.3 | 83% | mem |
| bf16 | 0.97× | 0.1422 | flashinferfa3 | 0.1386 0.1468 | 30.5 | 84% | mem | |
llama- | f16 | 0.87× | 0.1564 | flashinferfa3 | 0.1355 0.1710 | 13.9 | 76% | mem |
qwen3- | f16 | 1.66× | 0.00582 | flashinferfa3 | 0.0097 0.0173 | 2.91 | 8% | lat |
qwen3- | f16 | 1.37× | 0.00854 | flashinferfa3 | 0.0117 0.0212 | 7.93 | 22% | lat |
qwen3- | f16 | 1.27× | 0.0112 | flashinferfa3 | 0.0142 0.0234 | 12.1 | 33% | mem |
qwen3- | f16 | 1.33× | 0.0163 | flashinferfa3 | 0.0217 0.0283 | 16.6 | 46% | mem |
qwen3- | f16 | 1.30× | 0.0265 | flashinferfa3 | 0.0346 0.0375 | 20.4 | 56% | mem |
qwen3- | f16 | 1.21× | 0.0436 | flashinferfa3 | 0.0525 0.0569 | 24.9 | 68% | mem |
qwen3- | f16 | 1.09× | 0.0756 | flashinferfa3 | 0.0822 0.0907 | 28.7 | 79% | mem |
qwen3- | f16 | 1.03× | 0.1354 | flashinferfa3 | 0.1393 0.1587 | 32 | 88% | mem |
falcon- | bf16 | 0.75× | 0.0372 | fa3flashinfer | 0.0278 0.0321 | 32.7 | 10% | mem |
starcoder- | f16 | 1.09× | 0.0317 | flashinferfa3 | 0.0345 0.0368 | 103 | 47% | mem |
starcoderbase- | bf16 | 1.05× | 0.0318 | flashinferfa3 | 0.0333 0.0391 | 46.9 | 47% | mem |
gemma- | f16 | 0.94× | 0.0172 | flashinferfa3 | 0.0162 0.0238 | 3.92 | 11% | lat |
| bf16 | 0.95× | 0.0172 | flashinferfa3 | 0.0163 0.0237 | 3.92 | 11% | lat | |
gemma- | f16 | 1.16× | 0.0461 | flashinferfa3 | 0.0537 0.0541 | 23.4 | 65% | mem |
| bf16 | 1.17× | 0.0461 | flashinferfa3 | 0.0537 0.0540 | 23.4 | 65% | mem | |
qwen3- | bf16 | 1.27× | 0.00915 | flashinferfa3 | 0.0116 0.0207 | 3.7 | 20% | lat |
qwen3- | bf16 | 1.11× | 0.0300 | flashinferfa3 | 0.0333 0.0347 | 9.03 | 50% | mem |
prefill- | f16 | 1.25× | 0.0319 | fa3torch-compiletorch-ref | 0.0399 0.1272 0.2717 | 55.2 | 8% | comp |
| bf16 | 1.25× | 0.0319 | fa3torch-compiletorch-ref | 0.0399 0.1271 0.2728 | 55.3 | 7% | comp | |
prefill- | fp8e4m3/f16 | 2.13× | 0.0270 | fa3torch-compiletorch-ref | 0.0573 0.1230 0.2385 | 65.3 | 5% | comp |
GQAPagedFwd¶
q: [T_q, H, D]k_pages, v_pages: [NP, PS, H_kv, D]page_table: [B, W], i32cache_seqlens: [B], i32cu_seqlens_q: [B + 1], i32
llama-q: [4096, 32, 128]k_pages, v_pages: [576, 64, 8, 128]page_table: [8, 72], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=repeat(512, 8)cache_lens=repeat(4096, 8)dtype=f16/f168b llama-q: [32, 32, 128]k_pages, v_pages: [2048, 64, 8, 128]page_table: [32, 64], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4096, 32)dtype=f16/f168b- p64 llama-q: [8, 32, 128]k_pages, v_pages: [4096, 64, 8, 128]page_table: [8, 512], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=repeat(1, 8)cache_lens=repeat(32768, 8)dtype=f16/f168b- 32k- p64 llama-q: [64, 32, 128]k_pages, v_pages: [2048, 64, 8, 128]page_table: [64, 32], i32cache_seqlens: [64], i32cu_seqlens_q: [65], i32q_lens=repeat(1, 64)cache_lens=repeat(2048, 64)dtype=f16/f168b- b64- p64 llama-q: [8, 64, 128]k_pages, v_pages: [512, 64, 8, 128]page_table: [8, 64], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=repeat(1, 8)cache_lens=repeat(4096, 8)dtype=f16/f1670b- p64 llama-q: [32, 32, 128]k_pages, v_pages: [512, 256, 8, 128]page_table: [32, 16], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4096, 32)dtype=f16/f168b- p256 llama-q: [8, 64, 128]k_pages, v_pages: [128, 256, 8, 128]page_table: [8, 16], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=repeat(1, 8)cache_lens=repeat(4096, 8)dtype=f16/f1670b- p256 llama-q: [4, 128, 128]k_pages, v_pages: [64, 256, 8, 128]page_table: [4, 16], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32q_lens=repeat(1, 4)cache_lens=repeat(4096, 4)dtype=f16/f16405b- p256 llama-q: [32, 32, 128]k_pages, v_pages: [2048, 64, 8, 128]page_table: [32, 64], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4096, 32)softcap=50dtype=f16/f168b- p64- softcap llama-q: [32, 32, 128]k_pages, v_pages: [8192, 16, 8, 128]page_table: [32, 256], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4096, 32)dtype=f16/f168b- p16 llama-q: [64, 32, 128]k_pages, v_pages: [8192, 16, 8, 128]page_table: [64, 128], i32cache_seqlens: [64], i32cu_seqlens_q: [65], i32q_lens=repeat(1, 64)cache_lens=repeat(2048, 64)dtype=f16/f168b- b64- p16 llama-q: [8, 64, 128]k_pages, v_pages: [2048, 16, 8, 128]page_table: [8, 256], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=repeat(1, 8)cache_lens=repeat(4096, 8)dtype=f16/f1670b- p16 llama-q: [32, 32, 128]k_pages, v_pages: [2048, 64, 8, 128]page_table: [32, 64], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4001, 32)dtype=f16/f168b- p64- cut llama-q: [32, 32, 128]k_pages, v_pages: [512, 256, 8, 128]page_table: [32, 16], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4001, 32)dtype=f16/f168b- p256- cut llama-q: [1054, 32, 128]k_pages, v_pages: [2048, 64, 8, 128]page_table: [32, 64], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=[1024,1,1,1…]cache_lens=repeat(4096, 32)dtype=f16/f168b- serving- step llama-q: [32, 32, 128]k_pages, v_pages: [8192, 64, 8, 128]page_table: [32, 256], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(16384, 32)window_size_left=4096dtype=f16/f168b- sliding- window llama-q: [263, 32, 128]k_pages, v_pages: [64, 64, 8, 128]page_table: [8, 8], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=[256,1,1,1…]cache_lens=repeat(512, 8)is_causal=falsedtype=f16/f168b- noncausal gpt-q: [526, 64, 64]k_pages, v_pages: [512, 64, 8, 64]page_table: [16, 32], i32cache_seqlens: [16], i32cu_seqlens_q: [17], i32q_lens=[512,1,1,1…]cache_lens=repeat(2048, 16)window_size_left=128dtype=bf16/bf16oss- 120b- window qwen3-q: [1007, 32, 128]k_pages, v_pages: [774, 48, 8, 128]page_table: [9, 86], i32cache_seqlens: [9], i32cu_seqlens_q: [10], i32q_lens=[1000,1,1,1…]cache_lens=repeat(4099, 9)dtype=bf16/bf16ragged- odd
q: [T_q, H, D]k_pages, v_pages: [NP, PS, H_kv, D]page_table: [B, W], i32cache_seqlens: [B], i32cu_seqlens_q: [B + 1], i32rope_cos, rope_sin: [P, R // 2]
pos_encoding_mode=ropedtype=f16/f16, bf16/bf16
llama-q: [8, 32, 128]k_pages, v_pages: [512, 64, 8, 128]page_table: [8, 64], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32rope_cos, rope_sin: [4096, 64]q_lens=1(×8)cache_lens=4096(×8)8b- rope- decode llama-q: [2048, 32, 128]k_pages, v_pages: [256, 64, 8, 128]page_table: [4, 64], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32rope_cos, rope_sin: [4096, 64]q_lens=512(×4)cache_lens=4096(×4)8b- rope- prefill qwen-q: [289, 32, 128]k_pages, v_pages: [88, 48, 8, 128]page_table: [4, 22], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32rope_cos, rope_sin: [1025, 32]q_lens=[257,1,0,31]cache_lens=[1025,513,0,127]rotary_dim=64rope_layout=interleavedwindow_size_left=256ragged- rope
q: [T_q, H, D]k_pages, v_pages: [NP, PS, H_kv, D]page_table: [B, W], i32cache_seqlens: [B], i32cu_seqlens_q: [B + 1], i32sinks: [H], f32
dtype=bf16/bf16
gpt-q: [288, 64, 64]k_pages, v_pages: [68, 64, 8, 64]page_table: [4, 17], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32sinks: [64], f32q_lens=[256,1,0,31]cache_lens=[1025,513,0,127]window_size_left=128oss- sink- mixed gpt-q: [8, 64, 64]k_pages, v_pages: [256, 64, 8, 64]page_table: [8, 32], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32sinks: [64], f32q_lens=1(×8)cache_lens=2048(×8)oss- sink- decode
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
llama- | f16/f16 | 1.05× | 0.4825 | fa3flashinfertorch-ref | 0.5060 0.5534 15.9288 | 539 | 74% | comp |
llama- | f16/f16 | 1.18× | 0.1354 | fa3flashinfertorch-ref | 0.1594 0.2246 6.9859 | 16 | 88% | mem |
llama- | f16/f16 | 1.00× | 0.2815 | fa3flashinfertorch-ref | 0.2827 0.4359 13.1393 | 15.4 | 85% | mem |
llama- | f16/f16 | 1.18× | 0.1405 | fa3flashinfertorch-ref | 0.1663 0.2279 8.9220 | 15.4 | 85% | mem |
llama- | f16/f16 | 1.07× | 0.0512 | fa3flashinfertorch-ref | 0.0547 0.1044 2.8987 | 21.2 | 58% | mem |
llama- | f16/f16 | 1.13× | 0.1402 | fa3flashinfertorch-ref | 0.1581 0.2245 6.9774 | 15.5 | 85% | mem |
llama- | f16/f16 | 1.02× | 0.0521 | fa3flashinfertorch-ref | 0.0530 0.1041 2.8941 | 20.8 | 57% | mem |
llama- | f16/f16 | 0.92× | 0.0395 | fa3flashinfertorch-ref | 0.0364 0.2812 2.5816 | 27.5 | 38% | mem |
llama- | f16/f16 | 1.29× | 0.1395 | fa3flashinfertorch-ref | 0.1796 0.2298 7.1265 | 15.6 | 86% | mem |
llama- | f16/f16 | 1.16× | 0.1385 | fa3flashinfertorch-ref | 0.1607 0.2254 7.0022 | 15.7 | 86% | mem |
llama- | f16/f16 | 1.16× | 0.1439 | fa3flashinfertorch-ref | 0.1676 0.2288 8.9227 | 15.1 | 83% | mem |
llama- | f16/f16 | 0.99× | 0.0558 | fa3flashinfertorch-ref | 0.0552 0.1043 2.9011 | 19.4 | 54% | mem |
llama- | f16/f16 | 1.18× | 0.1343 | fa3flashinfertorch-ref | 0.1584 0.2244 6.9156 | 15.8 | 87% | mem |
llama- | f16/f16 | 1.11× | 0.1421 | fa3flashinfertorch-ref | 0.1574 0.2242 6.9121 | 14.9 | 82% | mem |
llama- | f16/f16 | 1.03× | 0.2586 | fa3flashinfertorch-ref | 0.2664 0.6729 10.4514 | 243 | 46% | mem |
llama- | f16/f16 | 1.18× | 0.1381 | fa3flashinfertorch-ref | 0.1631 0.8667 24.3383 | 15.7 | 86% | mem |
llama- | f16/f16 | 1.23× | 0.0164 | fa3flashinfertorch-ref | 0.0203 0.0424 0.5562 | 136 | 28% | mem |
gpt- | bf16/bf16 | 1.48× | 0.0245 | fa3flashinfertorch-ref | 0.0362 0.1011 3.5841 | 46.4 | 12% | mem |
qwen3- | bf16/bf16 | 0.96× | 0.1975 | fa3flashinfertorch-ref | 0.1894 0.2814 5.4834 | 304 | 40% | comp |
llama- | f16/f16 | 4.20× | 0.1438 | fa3torch-ref | 0.6040 2.5531 | 3.77 | 21% | mem |
| bf16/bf16 | 4.29× | 0.1406 | fa3torch-ref | 0.6039 2.5555 | 3.86 | 21% | mem | |
llama- | f16/f16 | 1.63× | 0.3193 | fa3torch-ref | 0.5218 8.4965 | 407 | 56% | comp |
| bf16/bf16 | 1.63× | 0.3185 | fa3torch-ref | 0.5189 8.4952 | 409 | 54% | comp | |
qwen- | f16/f16 | 2.02× | 0.0315 | fa3torch-ref | 0.0636 0.7036 | 36.7 | 6% | mem |
| bf16/bf16 | 2.07× | 0.0310 | fa3torch-ref | 0.0643 0.7042 | 37.2 | 6% | mem | |
gpt- | bf16/bf16 | 2.37× | 0.0140 | flashinfertorch-ref | 0.0332 0.7200 | 43.8 | 10% | lat |
gpt- | bf16/bf16 | 5.26× | 0.0281 | flashinfertorch-ref | 0.1479 1.0388 | 9.73 | 27% | mem |
GQAPrefillPagedWithKVCacheFwd¶
q: [T_q, H, D]k_new, v_new: [T_q, H_kv, D]k_pages, v_pages: [PT, H_kv, D]k_scale, v_scale: [1], f32cu_seqlens_q: [B + 1], i32cache_seqlens: [B], i32block_table: [B, W], i32
page_size=64
qwen35-q: [8192, 32, 256]k_new, v_new: [8192, 8, 256]k_pages, v_pages: [270336, 8, 256]k_scale, v_scale: [1], f32cu_seqlens_q: [9], i32cache_seqlens: [8], i32block_table: [8, 528], i32q_lens=repeat(1024, 8)cache_lens=repeat(32768, 8)max_seqlen_q=1024fuse_rope=truemax_position=33792rotary_dim=64dtype=f169b- rope qwen35-q: [4608, 32, 256]k_new, v_new: [4608, 8, 256]k_pages, v_pages: [270336, 8, 256]k_scale, v_scale: [1], f32cu_seqlens_q: [9], i32cache_seqlens: [8], i32block_table: [8, 528], i32q_lens=[256,512,768,1024…]cache_lens=[4096,8192,16384,32768…]max_seqlen_q=1024fuse_rope=truemax_position=33792rotary_dim=64dtype=f169b- mixed llama-q: [4096, 32, 128]k_new, v_new: [4096, 8, 128]k_pages, v_pages: [36864, 8, 128]k_scale, v_scale: [1], f32cu_seqlens_q: [9], i32cache_seqlens: [8], i32block_table: [8, 72], i32q_lens=repeat(512, 8)cache_lens=repeat(4096, 8)max_seqlen_q=512fuse_rope=truemax_position=4608dtype=f168b- rope synthetic-q: [2048, 8, 64]k_new, v_new: [2048, 2, 64]k_pages, v_pages: [18432, 2, 64]k_scale, v_scale: [1], f32cu_seqlens_q: [5], i32cache_seqlens: [4], i32block_table: [4, 72], i32q_lens=repeat(512, 4)cache_lens=repeat(4096, 4)max_seqlen_q=512softcap=50dtype=f16softcap falcon-q: [2048, 71, 64]k_new, v_new: [2048, 1, 64]k_pages, v_pages: [18432, 1, 64]k_scale, v_scale: [1], f32cu_seqlens_q: [5], i32cache_seqlens: [4], i32block_table: [4, 72], i32q_lens=repeat(512, 4)cache_lens=repeat(1536, 4)max_seqlen_q=512dtype=bf167b starcoderq: [2048, 48, 128]k_new, v_new: [2048, 1, 128]k_pages, v_pages: [18432, 1, 128]k_scale, v_scale: [1], f32cu_seqlens_q: [5], i32cache_seqlens: [4], i32block_table: [4, 72], i32q_lens=repeat(512, 4)cache_lens=repeat(4096, 4)max_seqlen_q=512dtype=f16gemma-q: [2048, 8, 256]k_new, v_new: [2048, 1, 256]k_pages, v_pages: [18432, 1, 256]k_scale, v_scale: [1], f32cu_seqlens_q: [5], i32cache_seqlens: [4], i32block_table: [4, 72], i32q_lens=repeat(512, 4)cache_lens=repeat(4096, 4)max_seqlen_q=512dtype=bf162b
q: [T_q, H, D]k_new, v_new: [T_q, H_kv, D]k_pages, v_pages: [PT, H_kv, D], fp8e4m3k_scale, v_scale: [1], f32cu_seqlens_q: [B + 1], i32cache_seqlens: [B], i32block_table: [B, W], i32
page_size=64dtype=f16/fp8e4m3
synthetic-q: [2048, 8, 64]k_new, v_new: [2048, 2, 64]k_pages, v_pages: [18432, 2, 64], fp8e4m3k_scale, v_scale: [1], f32cu_seqlens_q: [5], i32cache_seqlens: [4], i32block_table: [4, 72], i32q_lens=repeat(512, 4)cache_lens=repeat(4096, 4)max_seqlen_q=512softcap=50softcap qwen35-q: [8192, 32, 256]k_new, v_new: [8192, 8, 256]k_pages, v_pages: [270336, 8, 256], fp8e4m3k_scale, v_scale: [1], f32cu_seqlens_q: [9], i32cache_seqlens: [8], i32block_table: [8, 528], i32q_lens=repeat(1024, 8)cache_lens=repeat(32768, 8)max_seqlen_q=10249b llama-q: [4096, 32, 128]k_new, v_new: [4096, 8, 128]k_pages, v_pages: [36864, 8, 128], fp8e4m3k_scale, v_scale: [1], f32cu_seqlens_q: [9], i32cache_seqlens: [8], i32block_table: [8, 72], i32q_lens=repeat(512, 8)cache_lens=repeat(4096, 8)max_seqlen_q=5128b
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
qwen35- | f16 | 0.33× | 42.4098 | fa3torch-ref | 14.1401 374.8520 | 212 | 29% | comp |
qwen35- | f16 | 0.23× | 22.7306 | fa3torch-ref | 5.1875 148.3550 | 147 | 20% | comp |
llama- | f16 | 0.41× | 1.6757 | fa3torch-ref | 0.6898 20.1232 | 176 | 24% | comp |
synthetic- | f16 | 1.04× | 0.1318 | fa3torch-ref | 0.1374 3.0103 | 143 | 20% | comp |
falcon- | bf16 | 0.81× | 0.3136 | fa3torch-ref | 0.2533 6.6964 | 217 | 29% | comp |
starcoder | f16 | 0.64× | 0.7879 | fa3torch-ref | 0.5060 14.3921 | 281 | 38% | comp |
gemma- | bf16 | 0.56× | 0.3033 | fa3torch-ref | 0.1686 4.3211 | 242 | 32% | comp |
synthetic- | f16/fp8e4m3 | 1.21× | 0.1750 | fa3torch-ref | 0.2114 3.1301 | 108 | 15% | comp |
qwen35- | f16/fp8e4m3 | 0.41× | 56.6261 | fa3torch-ref | 23.4157 381.6930 | 159 | 22% | comp |
llama- | f16/fp8e4m3 | 0.71× | 1.9787 | fa3torch-ref | 1.4050 19.7368 | 149 | 20% | comp |
GQAVarlenFwd¶
q: [T_q, H, D]k, v: [T_kv, H_kv, D]cu_seqlens_q, cu_seqlens_kv: [B + 1], i32
dtype=f16, bf16
llama-q: [2048, 32, 128]k, v: [2048, 8, 128]cu_seqlens_q, cu_seqlens_kv: [5], i32q_lens=repeat(512, 4)kv_lens=repeat(512, 4)8b- uniform llama-q: [1024, 32, 128]k, v: [3072, 8, 128]cu_seqlens_q, cu_seqlens_kv: [3], i32q_lens=repeat(512, 2)kv_lens=[1024,2048]8b- q- lt- kv llama-q: [1024, 64, 128]k, v: [3072, 8, 128]cu_seqlens_q, cu_seqlens_kv: [3], i32q_lens=repeat(512, 2)kv_lens=[1024,2048]70b- q- lt- kv gpt-q: [2048, 64, 64]k, v: [2048, 8, 64]cu_seqlens_q, cu_seqlens_kv: [5], i32q_lens=repeat(512, 4)kv_lens=repeat(512, 4)oss- uniform gpt-q: [1024, 64, 64]k, v: [3072, 8, 64]cu_seqlens_q, cu_seqlens_kv: [3], i32q_lens=repeat(512, 2)kv_lens=[1024,2048]oss- q- lt- kv llama-q: [2048, 32, 128]k, v: [2048, 8, 128]cu_seqlens_q, cu_seqlens_kv: [5], i32q_lens=repeat(512, 4)kv_lens=repeat(512, 4)window_size_left=2568b- short- w256 llama-q: [8192, 32, 128]k, v: [8192, 8, 128]cu_seqlens_q, cu_seqlens_kv: [5], i32q_lens=repeat(2048, 4)kv_lens=repeat(2048, 4)window_size_left=10248b- long- w1024 llama-q: [2048, 64, 128]k, v: [2048, 8, 128]cu_seqlens_q, cu_seqlens_kv: [5], i32q_lens=repeat(512, 4)kv_lens=repeat(512, 4)window_size_left=25670b- short- w256 llama-q: [8192, 64, 128]k, v: [8192, 8, 128]cu_seqlens_q, cu_seqlens_kv: [5], i32q_lens=repeat(2048, 4)kv_lens=repeat(2048, 4)window_size_left=102470b- long- w1024 gemma4-q: [4096, 32, 512]k, v: [4096, 4, 512]cu_seqlens_q, cu_seqlens_kv: [3], i32q_lens=repeat(2048, 2)kv_lens=repeat(2048, 2)31b- uniform gemma4-q: [1024, 32, 512]k, v: [3072, 4, 512]cu_seqlens_q, cu_seqlens_kv: [3], i32q_lens=repeat(512, 2)kv_lens=[1024,2048]31b- q- lt- kv gemma4-q: [6048, 16, 512]k, v: [6048, 2, 512]cu_seqlens_q, cu_seqlens_kv: [4], i32q_lens=[1000,2048,3000]kv_lens=[1000,2048,3000]26b- a4b- ragged
q: [T_q, H, D]k, v: [T_kv, H_kv, D]cu_seqlens_q, cu_seqlens_kv: [B + 1], i32rope_cos, rope_sin: [P, R // 2]
pos_encoding_mode=ropedtype=f16, bf16
llama-q: [2048, 32, 128]k, v: [2048, 8, 128]cu_seqlens_q, cu_seqlens_kv: [5], i32rope_cos, rope_sin: [512, 64]q_lens=repeat(512, 4)kv_lens=repeat(512, 4)8b- uniform- rope gpt-q: [2048, 64, 64]k, v: [2048, 8, 64]cu_seqlens_q, cu_seqlens_kv: [5], i32rope_cos, rope_sin: [512, 32]q_lens=repeat(512, 4)kv_lens=repeat(512, 4)rope_layout=interleavedoss- rope- interleaved llama-q: [1018, 32, 128]k, v: [2041, 8, 128]cu_seqlens_q, cu_seqlens_kv: [5], i32rope_cos, rope_sin: [1024, 32]q_lens=[1,0,1000,17]kv_lens=[1024,0,1000,17]rotary_dim=648b- rope- partial qwen-q: [3018, 16, 128]k, v: [4017, 2, 128]cu_seqlens_q, cu_seqlens_kv: [4], i32rope_cos, rope_sin: [3000, 64]q_lens=[3000,1,17]kv_lens=[3000,1000,17]rope_layout=interleavedragged- rope
q: [T_q, H, D]k, v: [T_kv, H_kv, D]cu_seqlens_q, cu_seqlens_kv: [B + 1], i32q_scale, k_scale, v_scale: [B, H_kv], f32
dtype=fp8e4m3/bf16
llama-q: [2048, 32, 128]k, v: [2048, 8, 128]cu_seqlens_q, cu_seqlens_kv: [5], i32q_scale, k_scale, v_scale: [4, 8], f32q_lens=repeat(512, 4)kv_lens=repeat(512, 4)8b- fp8 llama-q: [1024, 64, 128]k, v: [3072, 8, 128]cu_seqlens_q, cu_seqlens_kv: [3], i32q_scale, k_scale, v_scale: [2, 8], f32q_lens=repeat(512, 2)kv_lens=[1024,2048]70b- fp8- q- lt- kv qwen3-q: [3017, 32, 128]k, v: [6146, 4, 128]cu_seqlens_q, cu_seqlens_kv: [6], i32q_scale, k_scale, v_scale: [5, 4], f32q_lens=[1,17,1000,0…]kv_lens=[1,17,1000,3000…]fp8- ragged llama-q: [2048, 32, 128]k, v: [2048, 8, 128]cu_seqlens_q, cu_seqlens_kv: [5], i32q_scale, k_scale, v_scale: [4, 8], f32q_lens=repeat(512, 4)kv_lens=repeat(512, 4)window_size_left=2568b- fp8- w256
q: [T_q, H, D]k, v: [T_kv, H_kv, D]cu_seqlens_q, cu_seqlens_kv: [B + 1], i32sinks: [H], f32
gpt-q: [1042, 64, 64]k, v: [2066, 8, 64]cu_seqlens_q, cu_seqlens_kv: [5], i32sinks: [64], f32q_lens=[1024,1,0,17]kv_lens=[1024,1025,0,17]window_size_left=128dtype=f16, bf16oss- sink- mixed
q: [T_q, H, D]k, v: [T_kv, H_kv, D]cu_seqlens_q, cu_seqlens_kv: [B + 1], i32q_scale, k_scale, v_scale: [B, H_kv], f32sinks: [H], f32
llama-q: [2048, 32, 128]k, v: [2048, 8, 128]cu_seqlens_q, cu_seqlens_kv: [5], i32q_scale, k_scale, v_scale: [4, 8], f32sinks: [32], f32q_lens=repeat(512, 4)kv_lens=repeat(512, 4)dtype=fp8e4m3/bf168b- fp8- sink
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
llama- | f16 | 1.10× | 0.0360 | flashinferfa3torch-ref | 0.0395 0.0449 1.3825 | 241 | 33% | comp |
| bf16 | 1.10× | 0.0357 | flashinferfa3torch-ref | 0.0392 0.0449 1.3804 | 243 | 32% | comp | |
llama- | f16 | 1.13× | 0.0474 | fa3flashinfertorch-ref | 0.0536 0.0633 1.7887 | 458 | 63% | comp |
| bf16 | 1.12× | 0.0473 | fa3flashinfertorch-ref | 0.0533 0.0632 1.7910 | 458 | 60% | comp | |
llama- | f16 | 1.13× | 0.0871 | fa3flashinfertorch-ref | 0.0987 0.1065 3.4193 | 498 | 68% | comp |
| bf16 | 1.14× | 0.0861 | fa3flashinfertorch-ref | 0.0981 0.1055 3.4240 | 504 | 66% | comp | |
gpt- | f16 | 1.19× | 0.0495 | flashinferfa3torch-ref | 0.0587 0.0608 1.9537 | 177 | 24% | comp |
| bf16 | 1.19× | 0.0492 | flashinferfa3torch-ref | 0.0585 0.0608 1.9527 | 179 | 23% | comp | |
gpt- | f16 | 1.05× | 0.0712 | fa3flashinfertorch-ref | 0.0745 0.0935 2.5629 | 308 | 42% | comp |
| bf16 | 1.05× | 0.0711 | fa3flashinfertorch-ref | 0.0744 0.0929 2.5634 | 308 | 41% | comp | |
llama- | f16 | 1.05× | 0.0394 | flashinferfa3torch-ref | 0.0412 0.0469 1.4067 | 166 | 24% | mem |
| bf16 | 1.06× | 0.0389 | flashinferfa3torch-ref | 0.0412 0.0469 1.4065 | 168 | 24% | mem | |
llama- | f16 | 1.13× | 0.2423 | fa3flashinfertorch-ref | 0.2728 0.2800 17.6706 | 430 | 59% | comp |
| bf16 | 1.12× | 0.2414 | fa3flashinfertorch-ref | 0.2715 0.2780 17.6730 | 432 | 57% | comp | |
llama- | f16 | 1.04× | 0.0661 | flashinferfa3torch-ref | 0.0688 0.0833 2.5719 | 198 | 27% | comp |
| bf16 | 1.04× | 0.0660 | flashinferfa3torch-ref | 0.0688 0.0832 2.5729 | 198 | 26% | comp | |
llama- | f16 | 1.12× | 0.4638 | flashinferfa3torch-ref | 0.5212 0.5307 33.0182 | 449 | 62% | comp |
| bf16 | 1.13× | 0.4624 | flashinferfa3torch-ref | 0.5209 0.5277 33.0353 | 451 | 59% | comp | |
gemma4- | f16 | 14.78× | 1.3547 | torch-ref | 20.0168 | 204 | 28% | comp |
| bf16 | 14.83× | 1.3517 | torch-ref | 20.0417 | 204 | 27% | comp | |
gemma4- | f16 | 8.60× | 0.5032 | torch-ref | 4.3271 | 171 | 23% | comp |
| bf16 | 8.61× | 0.5029 | torch-ref | 4.3281 | 171 | 23% | comp | |
gemma4- | f16 | 14.42× | 1.2174 | torch-ref | 17.5576 | 192 | 26% | comp |
| bf16 | 14.42× | 1.2175 | torch-ref | 17.5608 | 192 | 25% | comp | |
llama- | f16 | 1.12× | 0.0486 | flashinferfa3torch-ref | 0.0543 0.0586 1.7464 | 179 | 25% | comp |
| bf16 | 1.09× | 0.0500 | flashinferfa3torch-ref | 0.0544 0.0587 1.7477 | 174 | 23% | comp | |
gpt- | f16 | 1.07× | 0.0657 | flashinferfa3torch-ref | 0.0704 0.0714 2.3336 | 134 | 18% | comp |
| bf16 | 1.06× | 0.0663 | flashinferfa3torch-ref | 0.0703 0.0711 2.3366 | 132 | 17% | comp | |
llama- | f16 | 0.91× | 0.0514 | fa3flashinfertorch-ref | 0.0468 0.0514 1.4933 | 162 | 22% | comp |
| bf16 | 0.90× | 0.0520 | fa3flashinfertorch-ref | 0.0469 0.0514 1.4956 | 160 | 21% | comp | |
qwen- | f16 | 0.96× | 0.1012 | fa3flashinfertorch-ref | 0.0968 0.1162 5.4322 | 368 | 50% | comp |
| bf16 | 0.95× | 0.1012 | fa3flashinfertorch-ref | 0.0965 0.1156 5.4350 | 368 | 48% | comp | |
llama- | fp8e4m3/bf16 | 1.03× | 0.0425 | fa3torch-ref | 0.0438 1.5430 | 205 | 15% | mem |
llama- | fp8e4m3/bf16 | 0.85× | 0.1011 | fa3torch-ref | 0.0857 3.6087 | 429 | 31% | comp |
qwen3- | fp8e4m3/bf16 | 0.91× | 0.1098 | fa3torch-ref | 0.0996 6.4426 | 416 | 30% | comp |
llama- | fp8e4m3/bf16 | 1.08× | 0.0467 | fa3torch-ref | 0.0506 1.5693 | 140 | 14% | mem |
gpt- | f16 | 1.48× | 0.0373 | flashinfer-paged-sinktorch-ref | 0.0554 2.6547 | 55.7 | 13% | mem |
| bf16 | 1.48× | 0.0374 | flashinfer-paged-sinktorch-ref | 0.0553 2.6552 | 55.5 | 13% | mem | |
llama- | fp8e4m3/bf16 | 44.98× | 0.0433 | torch-ref | 1.9461 | 201 | 15% | mem |
MLADecodeWithKVCacheFwd¶
q: [B, H, D]q_pe: [B, H, PE]k: [B, N_kv, H_kv, D]k_pe: [B, N_kv, H_kv, PE]
ds-q: [32, 128, 512]q_pe: [32, 128, 64]k: [32, 4096, 1, 512]k_pe: [32, 4096, 1, 64]dtype=f16, bf16v2- 4k ds-q: [8, 128, 512]q_pe: [8, 128, 64]k: [8, 32768, 1, 512]k_pe: [8, 32768, 1, 64]dtype=f16, bf16v2- 32k ds-q: [16, 128, 512]q_pe: [16, 128, 64]k: [16, 4096, 1, 512]k_pe: [16, 4096, 1, 64]dtype=bf16v3- 4k ds-q: [4, 128, 512]q_pe: [4, 128, 64]k: [4, 32768, 1, 512]k_pe: [4, 32768, 1, 64]dtype=bf16v3- 32k ds-q: [1, 128, 512]q_pe: [1, 128, 64]k: [1, 4096, 1, 512]k_pe: [1, 4096, 1, 64]dtype=f16, bf16v3- single- request ds-q: [12, 128, 512]q_pe: [12, 128, 64]k: [12, 6144, 1, 512]k_pe: [12, 6144, 1, 64]dtype=f16, bf16v3- serving- batch mla-q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 4096, 1, 512]k_pe: [128, 4096, 1, 64]dtype=f16, bf16b128- 4096 mla-q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 8192, 1, 512]k_pe: [128, 8192, 1, 64]dtype=f16, bf16b128- 8192 mla-q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 16384, 1, 512]k_pe: [128, 16384, 1, 64]dtype=f16, bf16b128- 16384 mla-q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 32768, 1, 512]k_pe: [128, 32768, 1, 64]dtype=f16, bf16b128- 32768 mla-q: [1, 64, 512]q_pe: [1, 64, 64]k: [1, 4096, 1, 512]k_pe: [1, 4096, 1, 64]dtype=f16, bf16tp- b1 mla-q: [2, 64, 512]q_pe: [2, 64, 64]k: [2, 4096, 1, 512]k_pe: [2, 4096, 1, 64]dtype=f16, bf16tp- b2 mla-q: [6, 64, 512]q_pe: [6, 64, 64]k: [6, 4096, 1, 512]k_pe: [6, 4096, 1, 64]dtype=f16, bf16tp- b6 mla-q: [64, 64, 512]q_pe: [64, 64, 64]k: [64, 4096, 1, 512]k_pe: [64, 4096, 1, 64]dtype=f16, bf16tp- b64
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
ds- | f16 | 0.77× | 0.1167 | flashinferflashmla | 0.0898 0.1802 | 314 | 43% | comp |
| bf16 | 0.77× | 0.1158 | flashinferflashmla | 0.0894 0.1810 | 316 | 42% | comp | |
ds- | f16 | 0.41× | 0.3915 | flashinferflashmla | 0.1592 0.3270 | 187 | 26% | comp |
| bf16 | 0.41× | 0.3916 | flashinferflashmla | 0.1594 0.3288 | 187 | 25% | comp | |
ds- | bf16 | 0.82× | 0.0656 | flashinferflashmla | 0.0535 0.1066 | 279 | 37% | comp |
ds- | bf16 | 0.22× | 0.3926 | flashinferflashmla | 0.0870 0.1921 | 93.2 | 12% | comp |
ds- | f16 | 0.41× | 0.0553 | flashinferflashmla | 0.0228 0.0419 | 20.7 | 3% | comp |
| bf16 | 0.41× | 0.0553 | flashinferflashmla | 0.0228 0.0424 | 20.7 | 3% | comp | |
ds- | f16 | 0.70× | 0.0889 | flashinferflashmla | 0.0625 0.1221 | 231 | 32% | comp |
| bf16 | 0.70× | 0.0886 | flashinferflashmla | 0.0621 0.1224 | 232 | 31% | comp | |
mla- | f16 | 0.72× | 0.4141 | flashinferflashmla | 0.2974 0.6202 | 354 | 48% | comp |
| bf16 | 0.71× | 0.4144 | flashinferflashmla | 0.2953 0.6222 | 353 | 46% | comp | |
mla- | f16 | 0.70× | 0.8004 | flashinferflashmla | 0.5636 1.2032 | 366 | 50% | comp |
| bf16 | 0.70× | 0.7977 | flashinferflashmla | 0.5589 1.2038 | 367 | 48% | comp | |
mla- | f16 | 0.70× | 1.5651 | flashinferflashmla | 1.0929 2.3395 | 374 | 51% | comp |
| bf16 | 0.70× | 1.5624 | flashinferflashmla | 1.0937 2.3391 | 375 | 49% | comp | |
mla- | f16 | 0.68× | 3.1716 | flashinferflashmla | 2.1604 8.4949 | 369 | 51% | comp |
| bf16 | 0.68× | 3.1715 | flashinferflashmla | 2.1564 8.4964 | 369 | 49% | comp | |
mla- | f16 | 0.42× | 0.0551 | flashinferflashmla | 0.0233 0.0459 | 10.4 | 2% | mem |
| bf16 | 0.42× | 0.0551 | flashinferflashmla | 0.0233 0.0477 | 10.4 | 2% | mem | |
mla- | f16 | 0.43× | 0.0557 | flashinferflashmla | 0.0238 0.0448 | 20.5 | 4% | mem |
| bf16 | 0.43× | 0.0557 | flashinferflashmla | 0.0239 0.0467 | 20.5 | 4% | mem | |
mla- | f16 | 0.44× | 0.0610 | flashinferflashmla | 0.0268 0.0636 | 56.2 | 11% | mem |
| bf16 | 0.44× | 0.0610 | flashinferflashmla | 0.0269 0.0649 | 56.2 | 11% | mem | |
mla- | f16 | 0.79× | 0.1252 | flashinferflashmla | 0.0992 0.2768 | 292 | 55% | mem |
| bf16 | 0.79× | 0.1247 | flashinferflashmla | 0.0987 0.2775 | 293 | 55% | mem | |
NSACompressedVarlenFwd¶
q: [T_q, H, DK]k_cmp: [C, H_kv, DK]v_cmp: [C, H_kv, DV]offsets, chunk_offsets: [N + 1], i32token_indices: [T_q, 2], i32
scale=0.0883883bs=32
prefill-q: [8192, 32, 128]k_cmp, v_cmp: [256, 2, 128]offsets, chunk_offsets: [9], i32token_indices: [8192, 2], i32seq_lens=repeat(1024, 8)dtype=f168x1k prefill-q: [4096, 32, 128]k_cmp, v_cmp: [128, 2, 128]offsets, chunk_offsets: [5], i32token_indices: [4096, 2], i32seq_lens=repeat(1024, 4)dtype=f164x1k prefill-q: [1024, 32, 128]k_cmp, v_cmp: [33, 2, 128]offsets, chunk_offsets: [3], i32token_indices: [1024, 2], i32seq_lens=[257,767]dtype=bf16ragged
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
prefill- | f16 | 2.25× | 0.0450 | fla | 0.1014 | 47.5 | 67% | mem |
prefill- | f16 | 2.12× | 0.0255 | fla | 0.0541 | 41.9 | 59% | mem |
prefill- | bf16 | 1.91× | 0.00947 | fla | 0.0181 | 17.4 | 40% | mem |
NSATopKVarlenFwd¶
q: [T_q, H, D]k_cmp: [C, H_kv, D]offsets, chunk_offsets: [N + 1], i32token_indices: [T_q, 2], i32
dtype=f16, bf16
prefill-q: [8192, 32, 128]k_cmp: [256, 2, 128]offsets, chunk_offsets: [9], i32token_indices: [8192, 2], i32seq_lens=repeat(1024, 8)scale=1selected_block_num=16bs=328x1k prefill-q: [4096, 32, 128]k_cmp: [128, 2, 128]offsets, chunk_offsets: [5], i32token_indices: [4096, 2], i32seq_lens=repeat(1024, 4)scale=1selected_block_num=16bs=324x1k prefill-q: [5153, 32, 128]k_cmp: [163, 2, 128]offsets, chunk_offsets: [4], i32token_indices: [5153, 2], i32seq_lens=[31,1025,4097]scale=0.0883883selected_block_num=16bs=32ragged prefill-q: [16384, 32, 128]k_cmp: [256, 2, 128]offsets, chunk_offsets: [2], i32token_indices: [16384, 2], i32seq_lens=[16384]scale=0.0883883selected_block_num=32bs=64long- context prefill-q: [8192, 64, 64]k_cmp: [256, 2, 64]offsets, chunk_offsets: [5], i32token_indices: [8192, 2], i32seq_lens=repeat(2048, 4)scale=0.125selected_block_num=8bs=32wide- gqa
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
prefill- | f16 | 1.70× | 0.0795 | fla | 0.1348 | 27.1 | 19% | mem |
| bf16 | 1.68× | 0.0805 | fla | 0.1351 | 26.7 | 19% | mem | |
prefill- | f16 | 1.65× | 0.0431 | fla | 0.0709 | 25 | 18% | mem |
| bf16 | 1.64× | 0.0435 | fla | 0.0711 | 24.7 | 17% | mem | |
prefill- | f16 | 1.90× | 0.0832 | fla | 0.1583 | 54.9 | 11% | mem |
| bf16 | 1.92× | 0.0826 | fla | 0.1585 | 55.3 | 12% | mem | |
prefill- | f16 | 3.59× | 0.4029 | fla | 1.4462 | 85.3 | 12% | comp |
| bf16 | 3.57× | 0.4061 | fla | 1.4495 | 84.6 | 11% | comp | |
prefill- | f16 | 1.34× | 0.1207 | fla | 0.1620 | 35.6 | 12% | mem |
| bf16 | 1.34× | 0.1220 | fla | 0.1630 | 35.2 | 12% | mem | |
NSAVarlenFwd¶
q: [T_q, H, D]k, v: [T_q, H_kv, D]block_indices: [T_q, H_kv, SEL], i32block_counts: [T_q, H_kv], i32offsets: [N + 1], i32token_indices: [T_q, 2], i32
block_size=32
prefill-q: [8192, 16, 64]k, v: [8192, 1, 64]block_indices: [8192, 1, 1], i32block_counts: [8192, 1], i32offsets: [5], i32token_indices: [8192, 2], i32seq_lens=repeat(2048, 4)is_causal=truescale=0.1dtype=f164x2k prefill-q: [8192, 16, 64]k, v: [8192, 1, 64]block_indices: [8192, 1, 4], i32block_counts: [8192, 1], i32offsets: [3], i32token_indices: [8192, 2], i32seq_lens=repeat(4096, 2)is_causal=truescale=0.1dtype=f162x4k prefill-q: [8190, 16, 64]k, v: [8190, 1, 64]block_indices: [8190, 1, 4], i32block_counts: [8190, 1], i32offsets: [3], i32token_indices: [8190, 2], i32seq_lens=[4000,4190]is_causal=falsescale=0.1dtype=f16noncausal- 2x4k prefill-q: [1024, 32, 128]k, v: [1024, 2, 128]block_indices: [1024, 2, 8], i32block_counts, token_indices: [1024, 2], i32offsets: [3], i32seq_lens=[257,767]is_causal=truescale=0.0883883dtype=bf16ragged
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
prefill- | f16 | 1.53× | 0.0178 | fla | 0.0272 | 59.9 | 45% | mem |
prefill- | f16 | 1.60× | 0.0282 | fla | 0.0451 | 95.8 | 28% | mem |
prefill- | f16 | 939× | 0.0310 | torch-ref | 29.1381 | 87.7 | 26% | mem |
prefill- | bf16 | 1.71× | 0.0250 | fla | 0.0428 | 80.3 | 16% | mem |
DSADecodeWithKVCacheFwd¶
q: [B, S, H, D + dim_tail]kv: [B, S_kv, H_kv, D + dim_tail]indices: [B, S, H_kv, K], i32
stride_kv=1
ds-q: [1, 1024, 128, 576]kv: [1, 2048, 1, 576]indices: [1, 1024, 1, 2048], i32q_start_index_s=1024dtype=f16, bf16v32- kv2k ds-q: [1, 512, 128, 576]kv: [1, 4096, 1, 576]indices: [1, 512, 1, 1024], i32q_start_index_s=512dtype=f16, bf16v32- kv4k mla-q: [1, 4096, 128, 576]kv: [1, 8192, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=4096dtype=bf16d576- h128- kv8k mla-q: [1, 4096, 128, 576]kv: [1, 32768, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=28672dtype=bf16d576- h128- kv32k mla-q: [1, 4096, 128, 576]kv: [1, 65536, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=61440dtype=bf16d576- h128- kv64k mla-q: [1, 4096, 128, 576]kv: [1, 98304, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=94208dtype=bf16d576- h128- kv96k mla-q: [1, 4096, 128, 576]kv: [1, 131072, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=126976dtype=bf16d576- h128- kv128k mla-q: [1, 4096, 64, 512]kv: [1, 8192, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=4096dtype=bf16d512- h64- kv8k mla-q: [1, 4096, 64, 512]kv: [1, 32768, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=28672dtype=bf16d512- h64- kv32k mla-q: [1, 4096, 64, 512]kv: [1, 49152, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=45056dtype=bf16d512- h64- kv48k mla-q: [1, 4096, 64, 512]kv: [1, 65536, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=61440dtype=bf16d512- h64- kv64k mla-q: [1, 4096, 128, 512]kv: [1, 8192, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=4096dtype=bf16d512- h128- kv8k mla-q: [1, 4096, 128, 512]kv: [1, 32768, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=28672dtype=bf16d512- h128- kv32k mla-q: [1, 4096, 128, 512]kv: [1, 49152, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=45056dtype=bf16d512- h128- kv48k mla-q: [1, 4096, 128, 512]kv: [1, 65536, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=61440dtype=bf16d512- h128- kv64k
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
ds- | f16 | 4.85× | 1.1002 | torch-sdpatorch-compiletorch-ref | 5.3383 16.8663 19.3138 | 399 | 55% | comp |
| bf16 | 1.12× | 1.0970 | flashmla | 1.2282 | 400 | 53% | comp | |
ds- | f16 | 5.82× | 0.3128 | torch-gathertorch-sdpatorch-compiletorch-ref | 1.8203 5.2870 16.5532 19.5675 | 351 | 48% | comp |
| bf16 | 1.12× | 0.3107 | flashmla | 0.3471 | 353 | 46% | comp | |
mla- | bf16 | 1.14× | 4.0602 | flashmla | 4.6332 | 577 | 76% | comp |
mla- | bf16 | 1.12× | 4.1493 | flashmla | 4.6540 | 564 | 74% | comp |
mla- | bf16 | 1.11× | 4.2377 | flashmla | 4.7131 | 553 | 73% | comp |
mla- | bf16 | 1.11× | 4.2677 | flashmla | 4.7450 | 549 | 72% | comp |
mla- | bf16 | 1.11× | 4.2840 | flashmla | 4.7629 | 547 | 72% | comp |
mla- | bf16 | 1.13× | 0.6210 | flashmla | 0.6995 | 444 | 58% | comp |
mla- | bf16 | 1.10× | 0.6460 | flashmla | 0.7105 | 427 | 56% | comp |
mla- | bf16 | 1.09× | 0.6617 | flashmla | 0.7188 | 417 | 55% | comp |
mla- | bf16 | 1.08× | 0.6725 | flashmla | 0.7285 | 410 | 54% | comp |
mla- | bf16 | 1.13× | 2.0808 | flashmla | 2.3473 | 530 | 70% | comp |
mla- | bf16 | 1.12× | 2.1359 | flashmla | 2.3837 | 516 | 68% | comp |
mla- | bf16 | 1.10× | 2.1701 | flashmla | 2.3976 | 508 | 67% | comp |
mla- | bf16 | 1.10× | 2.1874 | flashmla | 2.4044 | 504 | 66% | comp |
FP8LightningIndexerFwd¶
index_q: [B, S, H, D]index_k: [B, S_kv, G, D]weights: [S, H], f32cu_seqlen_ks, cu_seqlen_ke: [S], i32
chunk-index_q: [1, 8192, 32, 64]index_k: [1, 32768, 1, 64]weights: [8192, 32], f32cu_seqlen_ks, cu_seqlen_ke: [8192], i32seq_lens=repeat(512, 64)first=24576dtype=bf16, fp8e4m3prefill short-index_q: [1, 2048, 32, 64]index_k: [1, 2048, 1, 64]weights: [2048, 32], f32cu_seqlen_ks, cu_seqlen_ke: [2048], i32seq_lens=[2048]first=0dtype=bf16prefill context-index_q: [1, 3072, 32, 64]index_k: [1, 8192, 1, 64]weights: [3072, 32], f32cu_seqlen_ks, cu_seqlen_ke: [3072], i32seq_lens=[8192]first=5120dtype=bf16chunk
index_q: [B, S, H, D]index_k: [B, S_kv, G, D]weights: [S, H], f32cu_seqlen_ks, cu_seqlen_ke: [S], i32index_k_scale: [B, S_kv, G], f32
dtype=fp8e4m3
chunk-index_q: [1, 8192, 32, 64]index_k: [1, 32768, 1, 64]weights: [8192, 32], f32cu_seqlen_ks, cu_seqlen_ke: [8192], i32index_k_scale: [1, 32768, 1], f32seq_lens=repeat(512, 64)first=24576prefill- kscale index-index_q: [1, 2048, 64, 128]index_k: [1, 4096, 1, 128]weights: [2048, 64], f32cu_seqlen_ks, cu_seqlen_ke: [2048], i32index_k_scale: [1, 4096, 1], f32seq_lens=[4096]first=2048q2048- ctx4096 index-index_q: [1, 2048, 64, 128]index_k: [1, 8192, 1, 128]weights: [2048, 64], f32cu_seqlen_ks, cu_seqlen_ke: [2048], i32index_k_scale: [1, 8192, 1], f32seq_lens=[8192]first=6144q2048- ctx8192 index-index_q: [1, 2048, 64, 128]index_k: [1, 16384, 1, 128]weights: [2048, 64], f32cu_seqlen_ks, cu_seqlen_ke: [2048], i32index_k_scale: [1, 16384, 1], f32seq_lens=[16384]first=14336q2048- ctx16384 index-index_q: [1, 2048, 64, 128]index_k: [1, 32768, 1, 128]weights: [2048, 64], f32cu_seqlen_ks, cu_seqlen_ke: [2048], i32index_k_scale: [1, 32768, 1], f32seq_lens=[32768]first=30720q2048- ctx32768 index-index_q: [1, 2048, 64, 128]index_k: [1, 65536, 1, 128]weights: [2048, 64], f32cu_seqlen_ks, cu_seqlen_ke: [2048], i32index_k_scale: [1, 65536, 1], f32seq_lens=[65536]first=63488q2048- ctx65536 index-index_q: [1, 2048, 64, 128]index_k: [1, 131072, 1, 128]weights: [2048, 64], f32cu_seqlen_ks, cu_seqlen_ke: [2048], i32index_k_scale: [1, 131072, 1], f32seq_lens=[131072]first=129024q2048- ctx131072 index-index_q: [1, 4096, 64, 128]index_k: [1, 4096, 1, 128]weights: [4096, 64], f32cu_seqlen_ks, cu_seqlen_ke: [4096], i32index_k_scale: [1, 4096, 1], f32seq_lens=[4096]first=0q4096- ctx4096 index-index_q: [1, 4096, 64, 128]index_k: [1, 8192, 1, 128]weights: [4096, 64], f32cu_seqlen_ks, cu_seqlen_ke: [4096], i32index_k_scale: [1, 8192, 1], f32seq_lens=[8192]first=4096q4096- ctx8192 index-index_q: [1, 4096, 64, 128]index_k: [1, 16384, 1, 128]weights: [4096, 64], f32cu_seqlen_ks, cu_seqlen_ke: [4096], i32index_k_scale: [1, 16384, 1], f32seq_lens=[16384]first=12288q4096- ctx16384 index-index_q: [1, 4096, 64, 128]index_k: [1, 32768, 1, 128]weights: [4096, 64], f32cu_seqlen_ks, cu_seqlen_ke: [4096], i32index_k_scale: [1, 32768, 1], f32seq_lens=[32768]first=28672q4096- ctx32768 index-index_q: [1, 4096, 64, 128]index_k: [1, 65536, 1, 128]weights: [4096, 64], f32cu_seqlen_ks, cu_seqlen_ke: [4096], i32index_k_scale: [1, 65536, 1], f32seq_lens=[65536]first=61440q4096- ctx65536 index-index_q: [1, 4096, 64, 128]index_k: [1, 131072, 1, 128]weights: [4096, 64], f32cu_seqlen_ks, cu_seqlen_ke: [4096], i32index_k_scale: [1, 131072, 1], f32seq_lens=[131072]first=126976q4096- ctx131072 ds-index_q: [1, 1, 64, 128]index_k: [1, 16384, 1, 128]weights: [1, 64], f32cu_seqlen_ks, cu_seqlen_ke: [1], i32index_k_scale: [1, 16384, 1], f32seq_lens=[16384]first=16383v32- decode- b1
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
chunk- | bf16 | 0.73× | 0.5294 | deepgemmtorch-ref | 0.3847 109.3380 | 16.6 | 47% | mem |
| fp8e4m3 | 0.72× | 0.5153 | deepgemmtorch-ref | 0.3720 109.3340 | 17.1 | 47% | mem | |
short- | bf16 | 0.81× | 0.0701 | deepgemmtorch-ref | 0.0565 1.7409 | 125 | 9% | comp |
context- | bf16 | 0.66× | 0.3203 | deepgemmtorch-ref | 0.2116 10.2699 | 268 | 19% | comp |
chunk- | fp8e4m3 | 0.68× | 0.4719 | deepgemmtorch-ref | 0.3211 109.4180 | 18.7 | 51% | mem |
index- | fp8e4m3 | 0.57× | 0.2336 | deepgemmtorch-ref | 0.1324 8.9373 | 446 | 32% | comp |
index- | fp8e4m3 | 0.56× | 0.5040 | deepgemmtorch-ref | 0.2803 17.7869 | 483 | 35% | comp |
index- | fp8e4m3 | 0.55× | 1.0429 | deepgemmtorch-ref | 0.5729 35.4839 | 500 | 36% | comp |
index- | fp8e4m3 | 0.54× | 2.1352 | deepgemmtorch-ref | 1.1484 70.8616 | 505 | 37% | comp |
index- | fp8e4m3 | 0.53× | 4.3488 | deepgemmtorch-ref | 2.2911 141.3730 | 504 | 36% | comp |
index- | fp8e4m3 | 0.52× | 8.7765 | deepgemmtorch-ref | 4.5616 282.2890 | 503 | 36% | comp |
index- | fp8e4m3 | 0.58× | 0.3269 | deepgemmtorch-ref | 0.1900 17.8794 | 425 | 31% | comp |
index- | fp8e4m3 | 0.55× | 0.8641 | deepgemmtorch-ref | 0.4787 35.5649 | 483 | 35% | comp |
index- | fp8e4m3 | 0.54× | 1.9426 | deepgemmtorch-ref | 1.0512 71.0273 | 501 | 36% | comp |
index- | fp8e4m3 | 0.53× | 4.1456 | deepgemmtorch-ref | 2.1981 141.8950 | 503 | 36% | comp |
index- | fp8e4m3 | 0.52× | 8.5583 | deepgemmtorch-ref | 4.4803 283.6260 | 504 | 36% | comp |
index- | fp8e4m3 | 0.52× | 17.4120 | deepgemmtorch-ref | 8.9723 565.1990 | 503 | 36% | comp |
ds- | fp8e4m3 | 0.25× | 0.2888 | torch-refdeepgemm | 0.0659 0.0724 | 0.94 | 0% | mem |
PagedKVCacheWriteFwd¶
k, v: [N, H_kv, D]k_pages, v_pages: [NP, PS, H_kv, D]slot_mapping: [N], i64
llama-k, v: [64, 8, 128]k_pages, v_pages: [4096, 16, 8, 128]slot_mapping: [64], i64dtype=bf16/bf16, f16/f168b- decode llama-k, v: [8192, 8, 128]k_pages, v_pages: [4096, 16, 8, 128]slot_mapping: [8192], i64dtype=bf16/bf168b- prefill gpt-k, v: [256, 8, 64]k_pages, v_pages: [4096, 16, 8, 64]slot_mapping: [256], i64dtype=bf16/bf16oss- 120b odd-k, v: [7, 2, 64]k_pages, v_pages: [5, 7, 2, 64]slot_mapping: [7], i64dtype=f16/f16tokens- and- page
k, v: [N, H_kv, D]k_pages, v_pages: [NP, PS, H_kv, D], fp8e4m3slot_mapping: [N], i64k_scale, v_scale: [1], f32
qwen3-k, v: [4096, 4, 128]k_pages, v_pages: [4096, 16, 4, 128], fp8e4m3slot_mapping: [4096], i64k_scale, v_scale: [1], f32dtype=bf16/fp8e4m3235b- fp8 qwen3-k, v: [1024, 4, 128]k_pages, v_pages: [512, 32, 4, 128], fp8e4m3slot_mapping: [1024], i64k_scale, v_scale: [1], f32dtype=f16/fp8e4m3235b- fp8- fp16
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
llama- | bf16/bf16 | 1.18× | 0.00278 | vllmflashinfertorch-ref | 0.0033 0.00352 0.0199 | · | 4% | lat |
| f16/f16 | 1.18× | 0.00285 | vllmflashinfertorch-ref | 0.00336 0.00365 0.0203 | · | 4% | lat | |
llama- | bf16/bf16 | 1.05× | 0.0202 | flashinfervllmtorch-ref | 0.0213 0.0587 0.1270 | · | 74% | mem |
gpt- | bf16/bf16 | 1.28× | 0.00301 | vllmflashinfertorch-ref | 0.00384 0.0039 0.0213 | · | 8% | lat |
odd- | f16/f16 | 1.63× | 0.00163 | vllmflashinfertorch-ref | 0.00266 0.00307 0.0186 | · | 0% | lat |
qwen3- | bf16/fp8e4m3 | 5.11× | 0.00915 | vllmtorch-ref | 0.0467 0.0905 | 0.917 | 31% | lat |
qwen3- | f16/fp8e4m3 | 1.68× | 0.00784 | vllmtorch-ref | 0.0132 0.0468 | 0.267 | 9% | lat |
TopKSelectFwd¶
index_score: [B, S, S_kv, G], f32starts, ends: [B, S]
dtype=i32
prefill-index_score: [1, 32768, 65536, 1], f32starts, ends: [1, 32768]topk=1024k1024 prefill-index_score: [1, 32768, 65536, 1], f32starts, ends: [1, 32768]topk=2048k2048 ds-index_score: [1, 1, 16384, 1], f32starts, ends: [1, 1]topk=2048v32- topk- decode- b1
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
prefill- | i32 | 0.85× | 10.9833 | flashinfertorch-compiletorch | 9.3230 36.4245 63.2675 | 0.196 | 18% | mem |
prefill- | i32 | 0.81× | 13.1517 | flashinfertorch-compiletorch | 10.7128 38.0025 65.3694 | 0.163 | 15% | mem |
ds- | i32 | 0.34× | 0.0644 | flashinfertorch-compiletorch | 0.0218 0.1213 0.1464 | 0.000255 | 0% | mem |
PagedKVCacheGatherFwd¶
dst: [T_q, *E], bf16cache: [NP, PS, *E]block_table: [B, W], i32cu_seq_lens: [B + 1], i32scale: [1], f32
ds-dst: [131072, 576], bf16cache: [2048, 64, 576]block_table: [8, 256], i32cu_seq_lens: [9], i32scale: [1], f32seq_lens=repeat(16384, 8)dtype=fp8e4m3/bf16v3- chunk- fp8
dst: [T_q, *E]cache: [NP, PS, *E]block_table: [B, W], i32cu_seq_lens: [B + 1], i32
ds-dst: [129024, 576]cache: [6144, 64, 576]block_table: [6, 1024], i32cu_seq_lens: [7], i32seq_lens=[2048,4096,8192,16384…]dtype=bf16v3- mixed mla-dst: [31, 576]cache: [8, 64, 576]block_table: [2, 4], i32cu_seq_lens: [3], i32seq_lens=[17,14]dtype=f16small mla-dst: [131072, 576]cache: [2048, 64, 576]block_table: [256, 8], i32cu_seq_lens: [257], i32seq_lens=repeat(512, 256)dtype=bf16b256
dst: [T_q, *E]cache: [NP, PS, *E]block_table: [B, W], i32cu_seq_lens: [B + 1], i32seq_starts: [B], i32
dtype=bf16
llama-dst: [32768, 8, 128]cache: [4096, 16, 8, 128]block_table: [8, 512], i32cu_seq_lens: [9], i32seq_starts: [8], i32seq_lens=repeat(4096, 8)starts=repeat(2048, 8)70b- cp llama-dst: [1024, 8, 128]cache: [128, 16, 8, 128]block_table: [2, 64], i32cu_seq_lens: [3], i32seq_starts: [2], i32seq_lens=[17,1007]starts=[15,1]cp- unaligned
dst: [T_q, *E], f16cache: [NP, PS, *E]block_table: [B, W], i32cu_seq_lens: [B + 1], i32seq_starts: [B], i32scale: [1], f32
mla-dst: [8192, 576], f16cache: [256, 64, 576]block_table: [2, 128], i32cu_seq_lens: [3], i32seq_starts: [2], i32scale: [1], f32seq_lens=[2048,6144]starts=[3,127]dtype=fp8e4m3/f16chunk- fp8- fp16
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
ds- | fp8e4m3/bf16 | 1.15× | 0.0899 | vllmtorch-ref | 0.1035 0.8339 | 0.84 | 56% | mem |
ds- | bf16 | 1.48× | 0.0910 | vllmtorch-refvllm-cp-gather | 0.1343 0.1905 2.3382 | · | 73% | mem |
mla- | f16 | 1.06× | 0.00307 | vllmvllm-cp-gathertorch-ref | 0.00325 0.00333 0.0274 | · | 1% | lat |
mla- | bf16 | 1.41× | 0.0975 | vllmvllm-cp-gathertorch-ref | 0.1376 0.3734 3.7555 | · | 69% | mem |
llama- | bf16 | 4.41× | 0.0379 | vllm-cp-gathertorch-ref | 0.1672 0.1684 | · | 79% | mem |
llama- | bf16 | 8.70× | 0.00483 | torch-refvllm-cp-gather | 0.0389 0.0420 | · | 19% | lat |
mla- | fp8e4m3/f16 | 1.19× | 0.00842 | vllmtorch-ref | 0.00998 0.0825 | 0.561 | 37% | mem |