Skip to content

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-p128q: [1, 1, 16, 128]k, v: [512, 16, 128]real_seqlen_kv: [1], i32block_table: [1, 4], i32kv_lens=[512]page_size=128
  • serving-b2q: [2, 1, 8, 64]k, v: [1024, 8, 64]real_seqlen_kv: [2], i32block_table: [2, 4], i32kv_lens=repeat(1024, 2)page_size=256
  • serving-kv1kq: [1, 1, 8, 64]k, v: [1024, 8, 64]real_seqlen_kv: [1], i32block_table: [1, 4], i32kv_lens=[1024]page_size=256
  • serving-kv512q: [1, 1, 8, 64]k, v: [512, 8, 64]real_seqlen_kv: [1], i32block_table: [1, 2], i32kv_lens=[512]page_size=256
  • speculative-decodeq: [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=true
  • opt-1.3b-b1q: [1, 1, 32, 64]k, v: [2048, 32, 64]real_seqlen_kv: [1], i32block_table: [1, 16], i32kv_lens=[2048]page_size=128
  • opt-1.3b-b16q: [16, 1, 32, 64]k, v: [32768, 32, 64]real_seqlen_kv: [16], i32block_table: [16, 16], i32kv_lens=repeat(2048, 16)page_size=128
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
serving-p128f161.44×0.00643flashinfer0.009250.65915%lat
serving-b2f161.71×0.00576flashinfer
fa3
0.00982
0.0184
0.7438%lat
serving-kv1kf161.80×0.00538flashinfer
fa3
0.00966
0.0183
0.3989%lat
serving-kv512f161.95×0.00477flashinfer
fa3
0.00928
0.0178
0.2245%lat
speculative-decodef162.51×0.00739fa30.01862.266%lat
opt-1.3b-b1f161.51×0.0102flashinfer0.01541.6837%mem
opt-1.3b-b16f160.98×0.0793flashinfer0.07743.4575%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-8b-shortq, o, do: [4, 512, 32, 128]k, v: [4, 512, 8, 128]lse: [4, 32, 512], f32
  • llama-8b-longq, o, do: [2, 2048, 32, 128]k, v: [2, 2048, 8, 128]lse: [2, 32, 2048], f32
  • llama-70b-shortq, o, do: [2, 512, 64, 128]k, v: [2, 512, 8, 128]lse: [2, 64, 512], f32
  • llama-70b-longq, o, do: [1, 2048, 64, 128]k, v: [1, 2048, 8, 128]lse: [1, 64, 2048], f32
  • llama-8b-short-mhaq, k, v, o, do: [4, 512, 32, 128]lse: [4, 32, 512], f32
  • llama-8b-long-mhaq, k, v, o, do: [2, 2048, 32, 128]lse: [2, 32, 2048], f32
  • llama-70b-short-mhaq, k, v, o, do: [2, 512, 64, 128]lse: [2, 64, 512], f32
  • llama-70b-long-mhaq, k, v, o, do: [1, 2048, 64, 128]lse: [1, 64, 2048], f32
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
llama-8b-shortf160.91×0.1503fa30.137314320%comp
bf160.91×0.1492fa30.136414419%comp
llama-8b-longf160.81×0.5705fa30.459930141%comp
bf160.81×0.5686fa30.458430240%comp
llama-70b-shortf160.92×0.1418fa30.130915121%comp
bf160.93×0.1415fa30.130915220%comp
llama-70b-longf160.79×0.5656fa30.447930442%comp
bf160.79×0.5647fa30.445930440%comp
llama-8b-short-mhaf161.00×0.1123fa30.112319127%mem
bf161.00×0.1120fa30.111619227%mem
llama-8b-long-mhaf160.94×0.4425fa30.414738853%comp
bf160.95×0.4391fa30.415339151%comp
llama-70b-short-mhaf161.00×0.1130fa30.112519026%mem
bf161.00×0.1126fa30.112219127%mem
llama-70b-long-mhaf160.94×0.4417fa30.415538953%comp
bf160.94×0.4410fa30.413739051%comp

GQADenseFwd

q: [B, S_q, H, D]k, v: [B, S_kv, H_kv, D]

  • llama-8b-4kq: [32, 1, 32, 128]k, v: [32, 4096, 8, 128]dtype=f16, bf16
  • llama-8b-32kq: [8, 1, 32, 128]k, v: [8, 32768, 8, 128]dtype=f16, bf16
  • llama-70b-4kq: [16, 1, 64, 128]k, v: [16, 4096, 8, 128]dtype=f16, bf16
  • llama-70b-32kq: [4, 1, 64, 128]k, v: [4, 32768, 8, 128]dtype=f16, bf16
  • llama-8b-softcapq: [32, 1, 32, 128]k, v: [32, 4096, 8, 128]softcap=50dtype=f16
  • qwen3-30b-1kq: [1, 1, 32, 128]k, v: [1, 1024, 4, 128]dtype=f16
  • qwen3-30b-4kq: [1, 1, 32, 128]k, v: [1, 4096, 4, 128]dtype=f16
  • qwen3-30b-8kq: [1, 1, 32, 128]k, v: [1, 8192, 4, 128]dtype=f16
  • qwen3-30b-16kq: [1, 1, 32, 128]k, v: [1, 16384, 4, 128]dtype=f16
  • qwen3-30b-32kq: [1, 1, 32, 128]k, v: [1, 32768, 4, 128]dtype=f16
  • qwen3-30b-64kq: [1, 1, 32, 128]k, v: [1, 65536, 4, 128]dtype=f16
  • qwen3-30b-128kq: [1, 1, 32, 128]k, v: [1, 131072, 4, 128]dtype=f16
  • qwen3-30b-256kq: [1, 1, 32, 128]k, v: [1, 262144, 4, 128]dtype=f16
  • falcon-7b-2kq: [32, 1, 71, 64]k, v: [32, 2048, 1, 64]dtype=bf16
  • starcoder-8kq: [16, 1, 48, 128]k, v: [16, 8192, 1, 128]dtype=f16
  • starcoderbase-3b-8kq: [16, 1, 22, 128]k, v: [16, 8192, 1, 128]dtype=bf16
  • gemma-2b-8k-bs1q: [1, 1, 8, 256]k, v: [1, 8192, 1, 256]dtype=f16, bf16
  • gemma-2b-8k-b16q: [16, 1, 8, 256]k, v: [16, 8192, 1, 256]dtype=f16, bf16
  • qwen3-8b-chunked-prefillq: [1, 128, 32, 128]k, v: [1, 2048, 8, 128]dtype=bf16
  • qwen3-8b-chunked-b8q: [8, 128, 32, 128]k, v: [8, 2048, 8, 128]dtype=bf16

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-ropeq: [1, 256, 8, 128]k, v: [1, 1792, 2, 128]rope_cos, rope_sin: [1792, 32]pos_encoding_mode=roperotary_dim=64dtype=f16, bf16

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-scaledq: [1, 256, 8, 128]k, v: [1, 1792, 2, 128]q_scale, k_scale, v_scale: [1, 2], f32dtype=fp8e4m3/f16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
llama-8b-4kf160.95×0.1422flashinfer
fa3
0.1354
0.1516
15.384%mem
bf160.95×0.1416flashinfer
fa3
0.1353
0.1504
15.384%mem
llama-8b-32kf160.95×0.2667flashinfer
fa3
0.2541
0.2633
16.389%mem
bf160.95×0.2664flashinfer
fa3
0.2542
0.2626
16.390%mem
llama-70b-4kf161.06×0.0780flashinfer
fa3
0.0823
0.0841
27.877%mem
bf161.05×0.0779flashinfer
fa3
0.0822
0.0838
27.877%mem
llama-70b-32kf160.97×0.1432flashinfer
fa3
0.1388
0.1478
30.383%mem
bf160.97×0.1422flashinfer
fa3
0.1386
0.1468
30.584%mem
llama-8b-softcapf160.87×0.1564flashinfer
fa3
0.1355
0.1710
13.976%mem
qwen3-30b-1kf161.66×0.00582flashinfer
fa3
0.0097
0.0173
2.918%lat
qwen3-30b-4kf161.37×0.00854flashinfer
fa3
0.0117
0.0212
7.9322%lat
qwen3-30b-8kf161.27×0.0112flashinfer
fa3
0.0142
0.0234
12.133%mem
qwen3-30b-16kf161.33×0.0163flashinfer
fa3
0.0217
0.0283
16.646%mem
qwen3-30b-32kf161.30×0.0265flashinfer
fa3
0.0346
0.0375
20.456%mem
qwen3-30b-64kf161.21×0.0436flashinfer
fa3
0.0525
0.0569
24.968%mem
qwen3-30b-128kf161.09×0.0756flashinfer
fa3
0.0822
0.0907
28.779%mem
qwen3-30b-256kf161.03×0.1354flashinfer
fa3
0.1393
0.1587
3288%mem
falcon-7b-2kbf160.75×0.0372fa3
flashinfer
0.0278
0.0321
32.710%mem
starcoder-8kf161.09×0.0317flashinfer
fa3
0.0345
0.0368
10347%mem
starcoderbase-3b-8kbf161.05×0.0318flashinfer
fa3
0.0333
0.0391
46.947%mem
gemma-2b-8k-bs1f160.94×0.0172flashinfer
fa3
0.0162
0.0238
3.9211%lat
bf160.95×0.0172flashinfer
fa3
0.0163
0.0237
3.9211%lat
gemma-2b-8k-b16f161.16×0.0461flashinfer
fa3
0.0537
0.0541
23.465%mem
bf161.17×0.0461flashinfer
fa3
0.0537
0.0540
23.465%mem
qwen3-8b-chunked-prefillbf161.27×0.00915flashinfer
fa3
0.0116
0.0207
3.720%lat
qwen3-8b-chunked-b8bf161.11×0.0300flashinfer
fa3
0.0333
0.0347
9.0350%mem
prefill-ropef161.25×0.0319fa3
torch-compile
torch-ref
0.0399
0.1272
0.2717
55.28%comp
bf161.25×0.0319fa3
torch-compile
torch-ref
0.0399
0.1271
0.2728
55.37%comp
prefill-scaledfp8e4m3/f162.13×0.0270fa3
torch-compile
torch-ref
0.0573
0.1230
0.2385
65.35%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-8bq: [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/f16
  • llama-8b-p64q: [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/f16
  • llama-8b-32k-p64q: [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/f16
  • llama-8b-b64-p64q: [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/f16
  • llama-70b-p64q: [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/f16
  • llama-8b-p256q: [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/f16
  • llama-70b-p256q: [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/f16
  • llama-405b-p256q: [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/f16
  • llama-8b-p64-softcapq: [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/f16
  • llama-8b-p16q: [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/f16
  • llama-8b-b64-p16q: [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/f16
  • llama-70b-p16q: [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/f16
  • llama-8b-p64-cutq: [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/f16
  • llama-8b-p256-cutq: [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/f16
  • llama-8b-serving-stepq: [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/f16
  • llama-8b-sliding-windowq: [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/f16
  • llama-8b-noncausalq: [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/f16
  • gpt-oss-120b-windowq: [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/bf16
  • qwen3-ragged-oddq: [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/bf16

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-8b-rope-decodeq: [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)
  • llama-8b-rope-prefillq: [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)
  • qwen-ragged-ropeq: [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=256

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-oss-sink-mixedq: [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=128
  • gpt-oss-sink-decodeq: [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)
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
llama-8bf16/f161.05×0.4825fa3
flashinfer
torch-ref
0.5060
0.5534
15.9288
53974%comp
llama-8b-p64f16/f161.18×0.1354fa3
flashinfer
torch-ref
0.1594
0.2246
6.9859
1688%mem
llama-8b-32k-p64f16/f161.00×0.2815fa3
flashinfer
torch-ref
0.2827
0.4359
13.1393
15.485%mem
llama-8b-b64-p64f16/f161.18×0.1405fa3
flashinfer
torch-ref
0.1663
0.2279
8.9220
15.485%mem
llama-70b-p64f16/f161.07×0.0512fa3
flashinfer
torch-ref
0.0547
0.1044
2.8987
21.258%mem
llama-8b-p256f16/f161.13×0.1402fa3
flashinfer
torch-ref
0.1581
0.2245
6.9774
15.585%mem
llama-70b-p256f16/f161.02×0.0521fa3
flashinfer
torch-ref
0.0530
0.1041
2.8941
20.857%mem
llama-405b-p256f16/f160.92×0.0395fa3
flashinfer
torch-ref
0.0364
0.2812
2.5816
27.538%mem
llama-8b-p64-softcapf16/f161.29×0.1395fa3
flashinfer
torch-ref
0.1796
0.2298
7.1265
15.686%mem
llama-8b-p16f16/f161.16×0.1385fa3
flashinfer
torch-ref
0.1607
0.2254
7.0022
15.786%mem
llama-8b-b64-p16f16/f161.16×0.1439fa3
flashinfer
torch-ref
0.1676
0.2288
8.9227
15.183%mem
llama-70b-p16f16/f160.99×0.0558fa3
flashinfer
torch-ref
0.0552
0.1043
2.9011
19.454%mem
llama-8b-p64-cutf16/f161.18×0.1343fa3
flashinfer
torch-ref
0.1584
0.2244
6.9156
15.887%mem
llama-8b-p256-cutf16/f161.11×0.1421fa3
flashinfer
torch-ref
0.1574
0.2242
6.9121
14.982%mem
llama-8b-serving-stepf16/f161.03×0.2586fa3
flashinfer
torch-ref
0.2664
0.6729
10.4514
24346%mem
llama-8b-sliding-windowf16/f161.18×0.1381fa3
flashinfer
torch-ref
0.1631
0.8667
24.3383
15.786%mem
llama-8b-noncausalf16/f161.23×0.0164fa3
flashinfer
torch-ref
0.0203
0.0424
0.5562
13628%mem
gpt-oss-120b-windowbf16/bf161.48×0.0245fa3
flashinfer
torch-ref
0.0362
0.1011
3.5841
46.412%mem
qwen3-ragged-oddbf16/bf160.96×0.1975fa3
flashinfer
torch-ref
0.1894
0.2814
5.4834
30440%comp
llama-8b-rope-decodef16/f164.20×0.1438fa3
torch-ref
0.6040
2.5531
3.7721%mem
bf16/bf164.29×0.1406fa3
torch-ref
0.6039
2.5555
3.8621%mem
llama-8b-rope-prefillf16/f161.63×0.3193fa3
torch-ref
0.5218
8.4965
40756%comp
bf16/bf161.63×0.3185fa3
torch-ref
0.5189
8.4952
40954%comp
qwen-ragged-ropef16/f162.02×0.0315fa3
torch-ref
0.0636
0.7036
36.76%mem
bf16/bf162.07×0.0310fa3
torch-ref
0.0643
0.7042
37.26%mem
gpt-oss-sink-mixedbf16/bf162.37×0.0140flashinfer
torch-ref
0.0332
0.7200
43.810%lat
gpt-oss-sink-decodebf16/bf165.26×0.0281flashinfer
torch-ref
0.1479
1.0388
9.7327%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-9b-ropeq: [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=f16
  • qwen35-9b-mixedq: [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=f16
  • llama-8b-ropeq: [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=f16
  • synthetic-softcapq: [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=f16
  • falcon-7bq: [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=bf16
  • 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=f16
  • gemma-2bq: [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=bf16

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-softcapq: [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=50
  • qwen35-9bq: [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=1024
  • llama-8bq: [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=512
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
qwen35-9b-ropef160.33×42.4098fa3
torch-ref
14.1401
374.8520
21229%comp
qwen35-9b-mixedf160.23×22.7306fa3
torch-ref
5.1875
148.3550
14720%comp
llama-8b-ropef160.41×1.6757fa3
torch-ref
0.6898
20.1232
17624%comp
synthetic-softcapf161.04×0.1318fa3
torch-ref
0.1374
3.0103
14320%comp
falcon-7bbf160.81×0.3136fa3
torch-ref
0.2533
6.6964
21729%comp
starcoderf160.64×0.7879fa3
torch-ref
0.5060
14.3921
28138%comp
gemma-2bbf160.56×0.3033fa3
torch-ref
0.1686
4.3211
24232%comp
synthetic-softcapf16/fp8e4m31.21×0.1750fa3
torch-ref
0.2114
3.1301
10815%comp
qwen35-9bf16/fp8e4m30.41×56.6261fa3
torch-ref
23.4157
381.6930
15922%comp
llama-8bf16/fp8e4m30.71×1.9787fa3
torch-ref
1.4050
19.7368
14920%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-8b-uniformq: [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)
  • llama-8b-q-lt-kvq: [1024, 32, 128]k, v: [3072, 8, 128]cu_seqlens_q, cu_seqlens_kv: [3], i32q_lens=repeat(512, 2)kv_lens=[1024,2048]
  • llama-70b-q-lt-kvq: [1024, 64, 128]k, v: [3072, 8, 128]cu_seqlens_q, cu_seqlens_kv: [3], i32q_lens=repeat(512, 2)kv_lens=[1024,2048]
  • gpt-oss-uniformq: [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)
  • gpt-oss-q-lt-kvq: [1024, 64, 64]k, v: [3072, 8, 64]cu_seqlens_q, cu_seqlens_kv: [3], i32q_lens=repeat(512, 2)kv_lens=[1024,2048]
  • llama-8b-short-w256q: [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=256
  • llama-8b-long-w1024q: [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=1024
  • llama-70b-short-w256q: [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=256
  • llama-70b-long-w1024q: [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=1024
  • gemma4-31b-uniformq: [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)
  • gemma4-31b-q-lt-kvq: [1024, 32, 512]k, v: [3072, 4, 512]cu_seqlens_q, cu_seqlens_kv: [3], i32q_lens=repeat(512, 2)kv_lens=[1024,2048]
  • gemma4-26b-a4b-raggedq: [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]

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-8b-uniform-ropeq: [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)
  • gpt-oss-rope-interleavedq: [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=interleaved
  • llama-8b-rope-partialq: [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=64
  • qwen-ragged-ropeq: [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=interleaved

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-8b-fp8q: [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)
  • llama-70b-fp8-q-lt-kvq: [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]
  • qwen3-fp8-raggedq: [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…]
  • llama-8b-fp8-w256q: [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=256

q: [T_q, H, D]k, v: [T_kv, H_kv, D]cu_seqlens_q, cu_seqlens_kv: [B + 1], i32sinks: [H], f32

  • gpt-oss-sink-mixedq: [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, bf16

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-8b-fp8-sinkq: [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/bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
llama-8b-uniformf161.10×0.0360flashinfer
fa3
torch-ref
0.0395
0.0449
1.3825
24133%comp
bf161.10×0.0357flashinfer
fa3
torch-ref
0.0392
0.0449
1.3804
24332%comp
llama-8b-q-lt-kvf161.13×0.0474fa3
flashinfer
torch-ref
0.0536
0.0633
1.7887
45863%comp
bf161.12×0.0473fa3
flashinfer
torch-ref
0.0533
0.0632
1.7910
45860%comp
llama-70b-q-lt-kvf161.13×0.0871fa3
flashinfer
torch-ref
0.0987
0.1065
3.4193
49868%comp
bf161.14×0.0861fa3
flashinfer
torch-ref
0.0981
0.1055
3.4240
50466%comp
gpt-oss-uniformf161.19×0.0495flashinfer
fa3
torch-ref
0.0587
0.0608
1.9537
17724%comp
bf161.19×0.0492flashinfer
fa3
torch-ref
0.0585
0.0608
1.9527
17923%comp
gpt-oss-q-lt-kvf161.05×0.0712fa3
flashinfer
torch-ref
0.0745
0.0935
2.5629
30842%comp
bf161.05×0.0711fa3
flashinfer
torch-ref
0.0744
0.0929
2.5634
30841%comp
llama-8b-short-w256f161.05×0.0394flashinfer
fa3
torch-ref
0.0412
0.0469
1.4067
16624%mem
bf161.06×0.0389flashinfer
fa3
torch-ref
0.0412
0.0469
1.4065
16824%mem
llama-8b-long-w1024f161.13×0.2423fa3
flashinfer
torch-ref
0.2728
0.2800
17.6706
43059%comp
bf161.12×0.2414fa3
flashinfer
torch-ref
0.2715
0.2780
17.6730
43257%comp
llama-70b-short-w256f161.04×0.0661flashinfer
fa3
torch-ref
0.0688
0.0833
2.5719
19827%comp
bf161.04×0.0660flashinfer
fa3
torch-ref
0.0688
0.0832
2.5729
19826%comp
llama-70b-long-w1024f161.12×0.4638flashinfer
fa3
torch-ref
0.5212
0.5307
33.0182
44962%comp
bf161.13×0.4624flashinfer
fa3
torch-ref
0.5209
0.5277
33.0353
45159%comp
gemma4-31b-uniformf1614.78×1.3547torch-ref20.016820428%comp
bf1614.83×1.3517torch-ref20.041720427%comp
gemma4-31b-q-lt-kvf168.60×0.5032torch-ref4.327117123%comp
bf168.61×0.5029torch-ref4.328117123%comp
gemma4-26b-a4b-raggedf1614.42×1.2174torch-ref17.557619226%comp
bf1614.42×1.2175torch-ref17.560819225%comp
llama-8b-uniform-ropef161.12×0.0486flashinfer
fa3
torch-ref
0.0543
0.0586
1.7464
17925%comp
bf161.09×0.0500flashinfer
fa3
torch-ref
0.0544
0.0587
1.7477
17423%comp
gpt-oss-rope-interleavedf161.07×0.0657flashinfer
fa3
torch-ref
0.0704
0.0714
2.3336
13418%comp
bf161.06×0.0663flashinfer
fa3
torch-ref
0.0703
0.0711
2.3366
13217%comp
llama-8b-rope-partialf160.91×0.0514fa3
flashinfer
torch-ref
0.0468
0.0514
1.4933
16222%comp
bf160.90×0.0520fa3
flashinfer
torch-ref
0.0469
0.0514
1.4956
16021%comp
qwen-ragged-ropef160.96×0.1012fa3
flashinfer
torch-ref
0.0968
0.1162
5.4322
36850%comp
bf160.95×0.1012fa3
flashinfer
torch-ref
0.0965
0.1156
5.4350
36848%comp
llama-8b-fp8fp8e4m3/bf161.03×0.0425fa3
torch-ref
0.0438
1.5430
20515%mem
llama-70b-fp8-q-lt-kvfp8e4m3/bf160.85×0.1011fa3
torch-ref
0.0857
3.6087
42931%comp
qwen3-fp8-raggedfp8e4m3/bf160.91×0.1098fa3
torch-ref
0.0996
6.4426
41630%comp
llama-8b-fp8-w256fp8e4m3/bf161.08×0.0467fa3
torch-ref
0.0506
1.5693
14014%mem
gpt-oss-sink-mixedf161.48×0.0373flashinfer-paged-sink
torch-ref
0.0554
2.6547
55.713%mem
bf161.48×0.0374flashinfer-paged-sink
torch-ref
0.0553
2.6552
55.513%mem
llama-8b-fp8-sinkfp8e4m3/bf1644.98×0.0433torch-ref1.946120115%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-v2-4kq: [32, 128, 512]q_pe: [32, 128, 64]k: [32, 4096, 1, 512]k_pe: [32, 4096, 1, 64]dtype=f16, bf16
  • ds-v2-32kq: [8, 128, 512]q_pe: [8, 128, 64]k: [8, 32768, 1, 512]k_pe: [8, 32768, 1, 64]dtype=f16, bf16
  • ds-v3-4kq: [16, 128, 512]q_pe: [16, 128, 64]k: [16, 4096, 1, 512]k_pe: [16, 4096, 1, 64]dtype=bf16
  • ds-v3-32kq: [4, 128, 512]q_pe: [4, 128, 64]k: [4, 32768, 1, 512]k_pe: [4, 32768, 1, 64]dtype=bf16
  • ds-v3-single-requestq: [1, 128, 512]q_pe: [1, 128, 64]k: [1, 4096, 1, 512]k_pe: [1, 4096, 1, 64]dtype=f16, bf16
  • ds-v3-serving-batchq: [12, 128, 512]q_pe: [12, 128, 64]k: [12, 6144, 1, 512]k_pe: [12, 6144, 1, 64]dtype=f16, bf16
  • mla-b128-4096q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 4096, 1, 512]k_pe: [128, 4096, 1, 64]dtype=f16, bf16
  • mla-b128-8192q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 8192, 1, 512]k_pe: [128, 8192, 1, 64]dtype=f16, bf16
  • mla-b128-16384q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 16384, 1, 512]k_pe: [128, 16384, 1, 64]dtype=f16, bf16
  • mla-b128-32768q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 32768, 1, 512]k_pe: [128, 32768, 1, 64]dtype=f16, bf16
  • mla-tp-b1q: [1, 64, 512]q_pe: [1, 64, 64]k: [1, 4096, 1, 512]k_pe: [1, 4096, 1, 64]dtype=f16, bf16
  • mla-tp-b2q: [2, 64, 512]q_pe: [2, 64, 64]k: [2, 4096, 1, 512]k_pe: [2, 4096, 1, 64]dtype=f16, bf16
  • mla-tp-b6q: [6, 64, 512]q_pe: [6, 64, 64]k: [6, 4096, 1, 512]k_pe: [6, 4096, 1, 64]dtype=f16, bf16
  • mla-tp-b64q: [64, 64, 512]q_pe: [64, 64, 64]k: [64, 4096, 1, 512]k_pe: [64, 4096, 1, 64]dtype=f16, bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v2-4kf160.77×0.1167flashinfer
flashmla
0.0898
0.1802
31443%comp
bf160.77×0.1158flashinfer
flashmla
0.0894
0.1810
31642%comp
ds-v2-32kf160.41×0.3915flashinfer
flashmla
0.1592
0.3270
18726%comp
bf160.41×0.3916flashinfer
flashmla
0.1594
0.3288
18725%comp
ds-v3-4kbf160.82×0.0656flashinfer
flashmla
0.0535
0.1066
27937%comp
ds-v3-32kbf160.22×0.3926flashinfer
flashmla
0.0870
0.1921
93.212%comp
ds-v3-single-requestf160.41×0.0553flashinfer
flashmla
0.0228
0.0419
20.73%comp
bf160.41×0.0553flashinfer
flashmla
0.0228
0.0424
20.73%comp
ds-v3-serving-batchf160.70×0.0889flashinfer
flashmla
0.0625
0.1221
23132%comp
bf160.70×0.0886flashinfer
flashmla
0.0621
0.1224
23231%comp
mla-b128-4096f160.72×0.4141flashinfer
flashmla
0.2974
0.6202
35448%comp
bf160.71×0.4144flashinfer
flashmla
0.2953
0.6222
35346%comp
mla-b128-8192f160.70×0.8004flashinfer
flashmla
0.5636
1.2032
36650%comp
bf160.70×0.7977flashinfer
flashmla
0.5589
1.2038
36748%comp
mla-b128-16384f160.70×1.5651flashinfer
flashmla
1.0929
2.3395
37451%comp
bf160.70×1.5624flashinfer
flashmla
1.0937
2.3391
37549%comp
mla-b128-32768f160.68×3.1716flashinfer
flashmla
2.1604
8.4949
36951%comp
bf160.68×3.1715flashinfer
flashmla
2.1564
8.4964
36949%comp
mla-tp-b1f160.42×0.0551flashinfer
flashmla
0.0233
0.0459
10.42%mem
bf160.42×0.0551flashinfer
flashmla
0.0233
0.0477
10.42%mem
mla-tp-b2f160.43×0.0557flashinfer
flashmla
0.0238
0.0448
20.54%mem
bf160.43×0.0557flashinfer
flashmla
0.0239
0.0467
20.54%mem
mla-tp-b6f160.44×0.0610flashinfer
flashmla
0.0268
0.0636
56.211%mem
bf160.44×0.0610flashinfer
flashmla
0.0269
0.0649
56.211%mem
mla-tp-b64f160.79×0.1252flashinfer
flashmla
0.0992
0.2768
29255%mem
bf160.79×0.1247flashinfer
flashmla
0.0987
0.2775
29355%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-8x1kq: [8192, 32, 128]k_cmp, v_cmp: [256, 2, 128]offsets, chunk_offsets: [9], i32token_indices: [8192, 2], i32seq_lens=repeat(1024, 8)dtype=f16
  • prefill-4x1kq: [4096, 32, 128]k_cmp, v_cmp: [128, 2, 128]offsets, chunk_offsets: [5], i32token_indices: [4096, 2], i32seq_lens=repeat(1024, 4)dtype=f16
  • prefill-raggedq: [1024, 32, 128]k_cmp, v_cmp: [33, 2, 128]offsets, chunk_offsets: [3], i32token_indices: [1024, 2], i32seq_lens=[257,767]dtype=bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
prefill-8x1kf162.25×0.0450fla0.101447.567%mem
prefill-4x1kf162.12×0.0255fla0.054141.959%mem
prefill-raggedbf161.91×0.00947fla0.018117.440%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-8x1kq: [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=32
  • prefill-4x1kq: [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=32
  • prefill-raggedq: [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=32
  • prefill-long-contextq: [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=64
  • prefill-wide-gqaq: [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=32
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
prefill-8x1kf161.70×0.0795fla0.134827.119%mem
bf161.68×0.0805fla0.135126.719%mem
prefill-4x1kf161.65×0.0431fla0.07092518%mem
bf161.64×0.0435fla0.071124.717%mem
prefill-raggedf161.90×0.0832fla0.158354.911%mem
bf161.92×0.0826fla0.158555.312%mem
prefill-long-contextf163.59×0.4029fla1.446285.312%comp
bf163.57×0.4061fla1.449584.611%comp
prefill-wide-gqaf161.34×0.1207fla0.162035.612%mem
bf161.34×0.1220fla0.163035.212%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-4x2kq: [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=f16
  • prefill-2x4kq: [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=f16
  • prefill-noncausal-2x4kq: [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=f16
  • prefill-raggedq: [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=bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
prefill-4x2kf161.53×0.0178fla0.027259.945%mem
prefill-2x4kf161.60×0.0282fla0.045195.828%mem
prefill-noncausal-2x4kf16939×0.0310torch-ref29.138187.726%mem
prefill-raggedbf161.71×0.0250fla0.042880.316%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-v32-kv2kq: [1, 1024, 128, 576]kv: [1, 2048, 1, 576]indices: [1, 1024, 1, 2048], i32q_start_index_s=1024dtype=f16, bf16
  • ds-v32-kv4kq: [1, 512, 128, 576]kv: [1, 4096, 1, 576]indices: [1, 512, 1, 1024], i32q_start_index_s=512dtype=f16, bf16
  • mla-d576-h128-kv8kq: [1, 4096, 128, 576]kv: [1, 8192, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=4096dtype=bf16
  • mla-d576-h128-kv32kq: [1, 4096, 128, 576]kv: [1, 32768, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=28672dtype=bf16
  • mla-d576-h128-kv64kq: [1, 4096, 128, 576]kv: [1, 65536, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=61440dtype=bf16
  • mla-d576-h128-kv96kq: [1, 4096, 128, 576]kv: [1, 98304, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=94208dtype=bf16
  • mla-d576-h128-kv128kq: [1, 4096, 128, 576]kv: [1, 131072, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=126976dtype=bf16
  • mla-d512-h64-kv8kq: [1, 4096, 64, 512]kv: [1, 8192, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=4096dtype=bf16
  • mla-d512-h64-kv32kq: [1, 4096, 64, 512]kv: [1, 32768, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=28672dtype=bf16
  • mla-d512-h64-kv48kq: [1, 4096, 64, 512]kv: [1, 49152, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=45056dtype=bf16
  • mla-d512-h64-kv64kq: [1, 4096, 64, 512]kv: [1, 65536, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=61440dtype=bf16
  • mla-d512-h128-kv8kq: [1, 4096, 128, 512]kv: [1, 8192, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=4096dtype=bf16
  • mla-d512-h128-kv32kq: [1, 4096, 128, 512]kv: [1, 32768, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=28672dtype=bf16
  • mla-d512-h128-kv48kq: [1, 4096, 128, 512]kv: [1, 49152, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=45056dtype=bf16
  • mla-d512-h128-kv64kq: [1, 4096, 128, 512]kv: [1, 65536, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=61440dtype=bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v32-kv2kf164.85×1.1002torch-sdpa
torch-compile
torch-ref
5.3383
16.8663
19.3138
39955%comp
bf161.12×1.0970flashmla1.228240053%comp
ds-v32-kv4kf165.82×0.3128torch-gather
torch-sdpa
torch-compile
torch-ref
1.8203
5.2870
16.5532
19.5675
35148%comp
bf161.12×0.3107flashmla0.347135346%comp
mla-d576-h128-kv8kbf161.14×4.0602flashmla4.633257776%comp
mla-d576-h128-kv32kbf161.12×4.1493flashmla4.654056474%comp
mla-d576-h128-kv64kbf161.11×4.2377flashmla4.713155373%comp
mla-d576-h128-kv96kbf161.11×4.2677flashmla4.745054972%comp
mla-d576-h128-kv128kbf161.11×4.2840flashmla4.762954772%comp
mla-d512-h64-kv8kbf161.13×0.6210flashmla0.699544458%comp
mla-d512-h64-kv32kbf161.10×0.6460flashmla0.710542756%comp
mla-d512-h64-kv48kbf161.09×0.6617flashmla0.718841755%comp
mla-d512-h64-kv64kbf161.08×0.6725flashmla0.728541054%comp
mla-d512-h128-kv8kbf161.13×2.0808flashmla2.347353070%comp
mla-d512-h128-kv32kbf161.12×2.1359flashmla2.383751668%comp
mla-d512-h128-kv48kbf161.10×2.1701flashmla2.397650867%comp
mla-d512-h128-kv64kbf161.10×2.1874flashmla2.404450466%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-prefillindex_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, fp8e4m3
  • short-prefillindex_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=bf16
  • context-chunkindex_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=bf16

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-prefill-kscaleindex_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=24576
  • index-q2048-ctx4096index_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=2048
  • index-q2048-ctx8192index_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=6144
  • index-q2048-ctx16384index_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=14336
  • index-q2048-ctx32768index_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=30720
  • index-q2048-ctx65536index_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=63488
  • index-q2048-ctx131072index_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=129024
  • index-q4096-ctx4096index_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=0
  • index-q4096-ctx8192index_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=4096
  • index-q4096-ctx16384index_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=12288
  • index-q4096-ctx32768index_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=28672
  • index-q4096-ctx65536index_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=61440
  • index-q4096-ctx131072index_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=126976
  • ds-v32-decode-b1index_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=16383
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
chunk-prefillbf160.73×0.5294deepgemm
torch-ref
0.3847
109.3380
16.647%mem
fp8e4m30.72×0.5153deepgemm
torch-ref
0.3720
109.3340
17.147%mem
short-prefillbf160.81×0.0701deepgemm
torch-ref
0.0565
1.7409
1259%comp
context-chunkbf160.66×0.3203deepgemm
torch-ref
0.2116
10.2699
26819%comp
chunk-prefill-kscalefp8e4m30.68×0.4719deepgemm
torch-ref
0.3211
109.4180
18.751%mem
index-q2048-ctx4096fp8e4m30.57×0.2336deepgemm
torch-ref
0.1324
8.9373
44632%comp
index-q2048-ctx8192fp8e4m30.56×0.5040deepgemm
torch-ref
0.2803
17.7869
48335%comp
index-q2048-ctx16384fp8e4m30.55×1.0429deepgemm
torch-ref
0.5729
35.4839
50036%comp
index-q2048-ctx32768fp8e4m30.54×2.1352deepgemm
torch-ref
1.1484
70.8616
50537%comp
index-q2048-ctx65536fp8e4m30.53×4.3488deepgemm
torch-ref
2.2911
141.3730
50436%comp
index-q2048-ctx131072fp8e4m30.52×8.7765deepgemm
torch-ref
4.5616
282.2890
50336%comp
index-q4096-ctx4096fp8e4m30.58×0.3269deepgemm
torch-ref
0.1900
17.8794
42531%comp
index-q4096-ctx8192fp8e4m30.55×0.8641deepgemm
torch-ref
0.4787
35.5649
48335%comp
index-q4096-ctx16384fp8e4m30.54×1.9426deepgemm
torch-ref
1.0512
71.0273
50136%comp
index-q4096-ctx32768fp8e4m30.53×4.1456deepgemm
torch-ref
2.1981
141.8950
50336%comp
index-q4096-ctx65536fp8e4m30.52×8.5583deepgemm
torch-ref
4.4803
283.6260
50436%comp
index-q4096-ctx131072fp8e4m30.52×17.4120deepgemm
torch-ref
8.9723
565.1990
50336%comp
ds-v32-decode-b1fp8e4m30.25×0.2888torch-ref
deepgemm
0.0659
0.0724
0.940%mem

PagedKVCacheWriteFwd

k, v: [N, H_kv, D]k_pages, v_pages: [NP, PS, H_kv, D]slot_mapping: [N], i64

  • llama-8b-decodek, v: [64, 8, 128]k_pages, v_pages: [4096, 16, 8, 128]slot_mapping: [64], i64dtype=bf16/bf16, f16/f16
  • llama-8b-prefillk, v: [8192, 8, 128]k_pages, v_pages: [4096, 16, 8, 128]slot_mapping: [8192], i64dtype=bf16/bf16
  • gpt-oss-120bk, v: [256, 8, 64]k_pages, v_pages: [4096, 16, 8, 64]slot_mapping: [256], i64dtype=bf16/bf16
  • odd-tokens-and-pagek, v: [7, 2, 64]k_pages, v_pages: [5, 7, 2, 64]slot_mapping: [7], i64dtype=f16/f16

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-235b-fp8k, v: [4096, 4, 128]k_pages, v_pages: [4096, 16, 4, 128], fp8e4m3slot_mapping: [4096], i64k_scale, v_scale: [1], f32dtype=bf16/fp8e4m3
  • qwen3-235b-fp8-fp16k, v: [1024, 4, 128]k_pages, v_pages: [512, 32, 4, 128], fp8e4m3slot_mapping: [1024], i64k_scale, v_scale: [1], f32dtype=f16/fp8e4m3
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
llama-8b-decodebf16/bf161.18×0.00278vllm
flashinfer
torch-ref
0.0033
0.00352
0.0199
·4%lat
f16/f161.18×0.00285vllm
flashinfer
torch-ref
0.00336
0.00365
0.0203
·4%lat
llama-8b-prefillbf16/bf161.05×0.0202flashinfer
vllm
torch-ref
0.0213
0.0587
0.1270
·74%mem
gpt-oss-120bbf16/bf161.28×0.00301vllm
flashinfer
torch-ref
0.00384
0.0039
0.0213
·8%lat
odd-tokens-and-pagef16/f161.63×0.00163vllm
flashinfer
torch-ref
0.00266
0.00307
0.0186
·0%lat
qwen3-235b-fp8bf16/fp8e4m35.11×0.00915vllm
torch-ref
0.0467
0.0905
0.91731%lat
qwen3-235b-fp8-fp16f16/fp8e4m31.68×0.00784vllm
torch-ref
0.0132
0.0468
0.2679%lat

TopKSelectFwd

index_score: [B, S, S_kv, G], f32starts, ends: [B, S]

dtype=i32

  • prefill-k1024index_score: [1, 32768, 65536, 1], f32starts, ends: [1, 32768]topk=1024
  • prefill-k2048index_score: [1, 32768, 65536, 1], f32starts, ends: [1, 32768]topk=2048
  • ds-v32-topk-decode-b1index_score: [1, 1, 16384, 1], f32starts, ends: [1, 1]topk=2048
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
prefill-k1024i320.85×10.9833flashinfer
torch-compile
torch
9.3230
36.4245
63.2675
0.19618%mem
prefill-k2048i320.81×13.1517flashinfer
torch-compile
torch
10.7128
38.0025
65.3694
0.16315%mem
ds-v32-topk-decode-b1i320.34×0.0644flashinfer
torch-compile
torch
0.0218
0.1213
0.1464
0.0002550%mem

PagedKVCacheGatherFwd

dst: [T_q, *E], bf16cache: [NP, PS, *E]block_table: [B, W], i32cu_seq_lens: [B + 1], i32scale: [1], f32

  • ds-v3-chunk-fp8dst: [131072, 576], bf16cache: [2048, 64, 576]block_table: [8, 256], i32cu_seq_lens: [9], i32scale: [1], f32seq_lens=repeat(16384, 8)dtype=fp8e4m3/bf16

dst: [T_q, *E]cache: [NP, PS, *E]block_table: [B, W], i32cu_seq_lens: [B + 1], i32

  • ds-v3-mixeddst: [129024, 576]cache: [6144, 64, 576]block_table: [6, 1024], i32cu_seq_lens: [7], i32seq_lens=[2048,4096,8192,16384…]dtype=bf16
  • mla-smalldst: [31, 576]cache: [8, 64, 576]block_table: [2, 4], i32cu_seq_lens: [3], i32seq_lens=[17,14]dtype=f16
  • mla-b256dst: [131072, 576]cache: [2048, 64, 576]block_table: [256, 8], i32cu_seq_lens: [257], i32seq_lens=repeat(512, 256)dtype=bf16

dst: [T_q, *E]cache: [NP, PS, *E]block_table: [B, W], i32cu_seq_lens: [B + 1], i32seq_starts: [B], i32

dtype=bf16

  • llama-70b-cpdst: [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)
  • llama-cp-unaligneddst: [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]

dst: [T_q, *E], f16cache: [NP, PS, *E]block_table: [B, W], i32cu_seq_lens: [B + 1], i32seq_starts: [B], i32scale: [1], f32

  • mla-chunk-fp8-fp16dst: [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/f16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v3-chunk-fp8fp8e4m3/bf161.15×0.0899vllm
torch-ref
0.1035
0.8339
0.8456%mem
ds-v3-mixedbf161.48×0.0910vllm
torch-ref
vllm-cp-gather
0.1343
0.1905
2.3382
·73%mem
mla-smallf161.06×0.00307vllm
vllm-cp-gather
torch-ref
0.00325
0.00333
0.0274
·1%lat
mla-b256bf161.41×0.0975vllm
vllm-cp-gather
torch-ref
0.1376
0.3734
3.7555
·69%mem
llama-70b-cpbf164.41×0.0379vllm-cp-gather
torch-ref
0.1672
0.1684
·79%mem
llama-cp-unalignedbf168.70×0.00483torch-ref
vllm-cp-gather
0.0389
0.0420
·19%lat
mla-chunk-fp8-fp16fp8e4m3/f161.19×0.00842vllm
torch-ref
0.00998
0.0825
0.56137%mem