Skip to content

Attention

24 ops, 285 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.

MHAPagedFwd

q: [B, S_q, H, D]k_cache, v_cache: [N_kv, H, D]block_table: [B, W], i32cache_seqlens: [B], i32

dtype=f16

  • serving-p128q: [1, 1, 16, 128]k_cache, v_cache: [512, 16, 128]block_table: [1, 4], i32cache_seqlens: [1], i32kv_lens=[512]page_size=128
  • serving-b2q: [2, 1, 8, 64]k_cache, v_cache: [1024, 8, 64]block_table: [2, 4], i32cache_seqlens: [2], i32kv_lens=repeat(1024, 2)page_size=256
  • serving-kv1kq: [1, 1, 8, 64]k_cache, v_cache: [1024, 8, 64]block_table: [1, 4], i32cache_seqlens: [1], i32kv_lens=[1024]page_size=256
  • serving-kv512q: [1, 1, 8, 64]k_cache, v_cache: [512, 8, 64]block_table: [1, 2], i32cache_seqlens: [1], i32kv_lens=[512]page_size=256
  • speculative-decodeq: [2, 4, 8, 64]k_cache, v_cache: [1024, 8, 64]block_table: [2, 4], i32cache_seqlens: [2], i32kv_lens=repeat(1000, 2)page_size=256is_causal=true
  • opt-1.3b-b1q: [1, 1, 32, 64]k_cache, v_cache: [2048, 32, 64]block_table: [1, 16], i32cache_seqlens: [1], i32kv_lens=[2048]page_size=128
  • opt-1.3b-b16q: [16, 1, 32, 64]k_cache, v_cache: [32768, 32, 64]block_table: [16, 16], i32cache_seqlens: [16], i32kv_lens=repeat(2048, 16)page_size=128
  • phi-2-b16q: [16, 1, 32, 80]k_cache, v_cache: [32768, 32, 80]block_table: [16, 8], i32cache_seqlens: [16], i32kv_lens=repeat(2048, 16)page_size=256
  • llama-2-7b-spec-b16q: [16, 4, 32, 128]k_cache, v_cache: [32768, 32, 128]block_table: [16, 8], i32cache_seqlens: [16], i32kv_lens=repeat(2048, 16)page_size=256is_causal=true
  • gemma-7b-spec-b8q: [8, 4, 16, 256]k_cache, v_cache: [16384, 16, 256]block_table: [8, 8], i32cache_seqlens: [8], i32kv_lens=repeat(2048, 8)page_size=256is_causal=true
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
serving-p128f161.48×0.00573flashinfer0.008480.74··
serving-b2f161.79×0.00522flashinfer
fa3
0.00931
0.0178
0.82··
serving-kv1kf161.85×0.00493flashinfer
fa3
0.00912
0.0172
0.434··
serving-kv512f162.01×0.00448flashinfer
fa3
0.00899
0.0173
0.239··
speculative-decodef162.56×0.00694fa30.01782.4··
opt-1.3b-b1f161.70×0.00826flashinfer0.01402.07··
opt-1.3b-b16f161.08×0.0629flashinfer0.06774.35··
phi-2-b16f161.61×0.1044fa30.16813.26··
llama-2-7b-spec-b16f161.11×0.1345fa30.149216.1··
gemma-7b-spec-b8f161.12×0.0657fa30.073616.4··

GQADenseBwd

do, q, o: [B, S, H, D]k, v: [B, S, H_kv, D]lse: [B, H, S], f32

is_causal=truedtype=bf16

  • llama-8b-shortdo, q, o: [4, 512, 32, 128]k, v: [4, 512, 8, 128]lse: [4, 32, 512], f32
  • llama-8b-longdo, q, o: [2, 2048, 32, 128]k, v: [2, 2048, 8, 128]lse: [2, 32, 2048], f32
  • llama-70b-shortdo, q, o: [2, 512, 64, 128]k, v: [2, 512, 8, 128]lse: [2, 64, 512], f32
  • llama-70b-longdo, q, o: [1, 2048, 64, 128]k, v: [1, 2048, 8, 128]lse: [1, 64, 2048], f32
  • llama-8b-short-mhado, q, k, v, o: [4, 512, 32, 128]lse: [4, 32, 512], f32
  • llama-8b-long-mhado, q, k, v, o: [2, 2048, 32, 128]lse: [2, 32, 2048], f32
  • llama-70b-short-mhado, q, k, v, o: [2, 512, 64, 128]lse: [2, 64, 512], f32
  • llama-70b-long-mhado, q, k, v, o: [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-shortbf161.28×0.1052fa30.1347204··
llama-8b-longbf161.18×0.3846fa30.4542447··
llama-70b-shortbf161.20×0.1066fa30.1279201··
llama-70b-longbf161.10×0.4003fa30.4410429··
llama-8b-short-mhabf161.10×0.0980fa30.1082219··
llama-8b-long-mhabf161.02×0.3962fa30.4052434··
llama-70b-short-mhabf161.10×0.0987fa30.1085218··
llama-70b-long-mhabf161.03×0.3949fa30.4062435··

GQADenseFwd

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

is_causal=true

  • llama-8b-4kq: [32, 1, 32, 128]k, v: [32, 4096, 8, 128]dtype=bf16
  • llama-8b-32kq: [8, 1, 32, 128]k, v: [8, 32768, 8, 128]dtype=bf16
  • llama-70b-4kq: [16, 1, 64, 128]k, v: [16, 4096, 8, 128]dtype=bf16
  • llama-70b-32kq: [4, 1, 64, 128]k, v: [4, 32768, 8, 128]dtype=bf16
  • llama-8b-softcapq: [32, 1, 32, 128]k, v: [32, 4096, 8, 128]softcap=50dtype=f16
  • llama-8b-4k-draft4q: [32, 4, 32, 128]k, v: [32, 4096, 8, 128]dtype=bf16
  • llama-70b-4k-draft8q: [16, 8, 64, 128]k, v: [16, 4096, 8, 128]dtype=bf16
  • chatglm3-6b-32kq: [1, 1, 32, 128]k, v: [1, 32768, 2, 128]dtype=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=bf16
  • gemma-2b-8k-b16q: [16, 1, 8, 256]k, v: [16, 8192, 1, 256]dtype=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]is_causal=truepos_encoding_mode=roperotary_dim=64dtype=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], f32is_causal=truedtype=fp8e4m3/f16

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

is_causal=truedtype=bf16

  • gpt-oss-sinks-prefill-2kq: [1, 2048, 64, 64]k, v: [1, 2048, 8, 64]sinks: [64], f32
  • gpt-oss-sinks-prefill-4kq: [1, 4096, 64, 64]k, v: [1, 4096, 8, 64]sinks: [64], f32
  • gpt-oss-sinks-prefill-8kq: [1, 8192, 64, 64]k, v: [1, 8192, 8, 64]sinks: [64], f32
  • gpt-oss-sinks-window-128q: [1, 8192, 64, 64]k, v: [1, 8192, 8, 64]sinks: [64], f32window_size_left=127
  • gpt-oss-sinks-decode-8kq: [64, 1, 64, 64]k, v: [64, 8192, 8, 64]sinks: [64], f32

q: [B, S_q, H, D]k, v: [B, S_kv, H_kv, D]q_scale, k_scale, v_scale: [B, H_kv], f32sinks: [H], f32

  • scaled-fp8-sinks-prefillq: [1, 255, 8, 128]k, v: [1, 1793, 2, 128]q_scale, k_scale, v_scale: [1, 2], f32sinks: [8], f32is_causal=truedtype=fp8e4m3/f16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
llama-8b-4kbf161.03×0.1209flashinfer
fa3
0.1251
0.1388
17.9··
llama-8b-32kbf161.03×0.2378flashinfer
fa3
0.2445
0.2500
18.2··
llama-70b-4kbf161.18×0.0622flashinfer
fa3
0.0731
0.0747
34.9··
llama-70b-32kbf161.06×0.1212flashinfer
fa3
0.1286
0.1341
35.8··
llama-8b-softcapf161.03×0.1212flashinfer
fa3
0.1253
0.1640
18··
llama-8b-4k-draft4bf161.06×0.1200fa3
torch-compile
torch-ref
0.1270
3.7266
14.9541
72.3··
llama-70b-4k-draft8bf161.06×0.0633fa3
torch-compile
torch-ref
0.0674
3.6808
15.1231
274··
chatglm3-6b-32kf161.39×0.0143flashinfer
fa3
0.0199
0.0288
37.9··
qwen3-30b-1kf162.10×0.00442flashinfer
fa3
0.00928
0.0162
3.84··
qwen3-30b-4kf161.54×0.00688flashinfer
fa3
0.0106
0.0194
9.85··
qwen3-30b-8kf161.35×0.00925flashinfer
fa3
0.0125
0.0217
14.7··
qwen3-30b-16kf161.44×0.0128flashinfer
fa3
0.0185
0.0265
21.1··
qwen3-30b-32kf161.45×0.0204flashinfer
fa3
0.0296
0.0344
26.6··
qwen3-30b-64kf161.27×0.0354flashinfer
fa3
0.0450
0.0493
30.7··
qwen3-30b-128kf161.12×0.0660flashinfer
fa3
0.0739
0.0814
32.9··
qwen3-30b-256kf161.05×0.1238flashinfer
fa3
0.1306
0.1463
35··
falcon-7b-2kbf161.88×0.0145fa3
flashinfer
0.0273
0.0322
83.6··
starcoder-8kf161.53×0.0206flashinfer
fa3
0.0316
0.0348
158··
starcoderbase-3b-8kbf161.51×0.0202flashinfer
fa3
0.0305
0.0362
74··
gemma-2b-8k-bs1bf161.53×0.00998flashinfer
fa3
0.0153
0.0221
6.75··
gemma-2b-8k-b16bf161.29×0.0353flashinfer
fa3
0.0455
0.0464
30.5··
qwen3-8b-chunked-prefillbf161.91×0.0171fa3
torch-compile
torch-ref
0.0327
0.2559
0.4134
246··
qwen3-8b-chunked-b8bf161.02×0.0607fa3
torch-compile
torch-ref
0.0621
1.3771
3.2914
554··
prefill-ropebf162.38×0.0165fa3
torch-compile
torch-ref
0.0393
0.1249
0.2590
107··
prefill-scaledfp8e4m3/f162.08×0.0276fa3
torch-compile
torch-ref
0.0573
0.1191
0.2256
64··
gpt-oss-sinks-prefill-2kbf161.15×0.0984vllm
flashinfer
torch-compile
torch-ref
0.1135
0.1469
4.1030
8.9305
356··
gpt-oss-sinks-prefill-4kbf161.08×0.3246vllm
flashinfer
torch-compile
torch-ref
0.3492
0.4475
15.7508
33.2132
432··
gpt-oss-sinks-prefill-8kbf161.05×1.1808vllm
flashinfer
torch-compile
torch-ref
1.2359
1.5113
58.6982
138.2180
475··
gpt-oss-sinks-window-128bf161.13×0.1326vllm
flashinfer
torch-compile
torch-ref
0.1503
0.3347
55.8467
142.5020
131··
gpt-oss-sinks-decode-8kbf161.05×0.2421vllm
flashinfer
torch-compile
torch-ref
0.2538
4.1544
9.9905
54.3295
36.2··
scaled-fp8-sinks-prefillfp8e4m3/f161.77×0.0315vllm
torch-compile
torch-ref
0.0557
0.1371
0.2917
55.9··

GQADenseWithLSEFwd

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

is_causal=truedtype=bf16

  • llama-8b-shortq: [4, 512, 32, 128]k, v: [4, 512, 8, 128]
  • llama-8b-longq: [2, 2048, 32, 128]k, v: [2, 2048, 8, 128]
  • llama-70b-longq: [1, 2048, 64, 128]k, v: [1, 2048, 8, 128]
  • llama-8b-long-mhaq, k, v: [2, 2048, 32, 128]
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
llama-8b-shortbf161.13×0.0275fa3
torch-ref
0.0310
2.0365
317··
llama-8b-longbf161.02×0.1238fa3
torch-ref
0.1268
12.6311
561··
llama-70b-longbf161.03×0.1238fa3
torch-ref
0.1269
12.3028
561··
llama-8b-long-mhabf161.02×0.1264fa3
torch-ref
0.1292
12.4971
549··

GQAPagedFwd

q: [T_q, H, D]k_cache, v_cache: [NP, PS, H_kv, D]block_table: [B, W], i32cache_seqlens: [B], i32cu_seqlens_q: [B + 1], i32

  • llama-8bq: [4096, 32, 128]k_cache, v_cache: [576, 64, 8, 128]block_table: [8, 72], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=repeat(512, 8)cache_lens=repeat(4096, 8)is_causal=truedtype=f16/f16
  • llama-8b-p64q: [32, 32, 128]k_cache, v_cache: [2048, 64, 8, 128]block_table: [32, 64], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4096, 32)is_causal=truedtype=f16/f16
  • llama-8b-32k-p64q: [8, 32, 128]k_cache, v_cache: [4096, 64, 8, 128]block_table: [8, 512], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=repeat(1, 8)cache_lens=repeat(32768, 8)is_causal=truedtype=f16/f16
  • llama-8b-b64-p64q: [64, 32, 128]k_cache, v_cache: [2048, 64, 8, 128]block_table: [64, 32], i32cache_seqlens: [64], i32cu_seqlens_q: [65], i32q_lens=repeat(1, 64)cache_lens=repeat(2048, 64)is_causal=truedtype=f16/f16
  • llama-70b-p64q: [8, 64, 128]k_cache, v_cache: [512, 64, 8, 128]block_table: [8, 64], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=repeat(1, 8)cache_lens=repeat(4096, 8)is_causal=truedtype=f16/f16
  • llama-8b-p256q: [32, 32, 128]k_cache, v_cache: [512, 256, 8, 128]block_table: [32, 16], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4096, 32)is_causal=truedtype=f16/f16
  • llama-70b-p256q: [8, 64, 128]k_cache, v_cache: [128, 256, 8, 128]block_table: [8, 16], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=repeat(1, 8)cache_lens=repeat(4096, 8)is_causal=truedtype=f16/f16
  • llama-405b-p256q: [4, 128, 128]k_cache, v_cache: [64, 256, 8, 128]block_table: [4, 16], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32q_lens=repeat(1, 4)cache_lens=repeat(4096, 4)is_causal=truedtype=f16/f16
  • llama-8b-p64-softcapq: [32, 32, 128]k_cache, v_cache: [2048, 64, 8, 128]block_table: [32, 64], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4096, 32)is_causal=truesoftcap=50dtype=f16/f16
  • llama-8b-p16q: [32, 32, 128]k_cache, v_cache: [8192, 16, 8, 128]block_table: [32, 256], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4096, 32)is_causal=truedtype=f16/f16
  • llama-8b-b64-p16q: [64, 32, 128]k_cache, v_cache: [8192, 16, 8, 128]block_table: [64, 128], i32cache_seqlens: [64], i32cu_seqlens_q: [65], i32q_lens=repeat(1, 64)cache_lens=repeat(2048, 64)is_causal=truedtype=f16/f16
  • llama-70b-p16q: [8, 64, 128]k_cache, v_cache: [2048, 16, 8, 128]block_table: [8, 256], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=repeat(1, 8)cache_lens=repeat(4096, 8)is_causal=truedtype=f16/f16
  • llama-8b-p64-cutq: [32, 32, 128]k_cache, v_cache: [2048, 64, 8, 128]block_table: [32, 64], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4001, 32)is_causal=truedtype=f16/f16
  • llama-8b-p256-cutq: [32, 32, 128]k_cache, v_cache: [512, 256, 8, 128]block_table: [32, 16], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(4001, 32)is_causal=truedtype=f16/f16
  • llama-8b-serving-stepq: [1054, 32, 128]k_cache, v_cache: [2048, 64, 8, 128]block_table: [32, 64], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=[1024,1,1,1…]cache_lens=repeat(4096, 32)is_causal=truedtype=f16/f16
  • llama-8b-sliding-windowq: [32, 32, 128]k_cache, v_cache: [8192, 64, 8, 128]block_table: [32, 256], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_lens=repeat(1, 32)cache_lens=repeat(16384, 32)is_causal=truewindow_size_left=4096dtype=f16/f16
  • llama-8b-noncausalq: [263, 32, 128]k_cache, v_cache: [64, 64, 8, 128]block_table: [8, 8], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_lens=[256,1,1,1…]cache_lens=repeat(512, 8)dtype=f16/f16
  • gpt-oss-120b-windowq: [526, 64, 64]k_cache, v_cache: [512, 64, 8, 64]block_table: [16, 32], i32cache_seqlens: [16], i32cu_seqlens_q: [17], i32q_lens=[512,1,1,1…]cache_lens=repeat(2048, 16)is_causal=truewindow_size_left=128dtype=bf16/bf16
  • qwen3-ragged-oddq: [1007, 32, 128]k_cache, v_cache: [774, 48, 8, 128]block_table: [9, 86], i32cache_seqlens: [9], i32cu_seqlens_q: [10], i32q_lens=[1000,1,1,1…]cache_lens=repeat(4099, 9)is_causal=truedtype=bf16/bf16
  • synthetic-softcap-chunkq: [2048, 8, 64]k_cache, v_cache: [288, 64, 2, 64]block_table: [4, 72], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32q_lens=repeat(512, 4)cache_lens=repeat(4608, 4)is_causal=truesoftcap=50dtype=f16/f16
  • falcon-7b-chunkq: [2048, 71, 64]k_cache, v_cache: [288, 64, 1, 64]block_table: [4, 72], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32q_lens=repeat(512, 4)cache_lens=repeat(2048, 4)is_causal=truedtype=bf16/bf16
  • starcoder-chunkq: [2048, 48, 128]k_cache, v_cache: [288, 64, 1, 128]block_table: [4, 72], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32q_lens=repeat(512, 4)cache_lens=repeat(4608, 4)is_causal=truedtype=f16/f16
  • gemma-2b-chunkq: [2048, 8, 256]k_cache, v_cache: [288, 64, 1, 256]block_table: [4, 72], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32q_lens=repeat(512, 4)cache_lens=repeat(4608, 4)is_causal=truedtype=bf16/bf16
  • qwen3.8-27b-prefillq: [4096, 24, 256]k_cache, v_cache: [64, 64, 4, 256]block_table: [1, 64], i32cache_seqlens: [1], i32cu_seqlens_q: [2], i32q_lens=[4096]cache_lens=[4096]is_causal=truedtype=bf16/bf16
  • qwen3.8-27b-decodeq: [1, 24, 256]k_cache, v_cache: [65, 64, 4, 256]block_table: [1, 65], i32cache_seqlens: [1], i32cu_seqlens_q: [2], i32q_lens=[1]cache_lens=[4097]is_causal=truedtype=bf16/bf16

q: [T_q, H, D]k_cache, v_cache: [NP, PS, H_kv, D]block_table: [B, W], i32cache_seqlens: [B], i32cu_seqlens_q: [B + 1], i32rope_cos, rope_sin: [P, R // 2]

is_causal=truepos_encoding_mode=rope

  • llama-8b-rope-decodeq: [8, 32, 128]k_cache, v_cache: [512, 64, 8, 128]block_table: [8, 64], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32rope_cos, rope_sin: [4096, 64]q_lens=1(×8)cache_lens=4096(×8)dtype=bf16/bf16
  • llama-8b-rope-prefillq: [2048, 32, 128]k_cache, v_cache: [256, 64, 8, 128]block_table: [4, 64], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32rope_cos, rope_sin: [4096, 64]q_lens=512(×4)cache_lens=4096(×4)dtype=bf16/bf16
  • qwen-ragged-ropeq: [289, 32, 128]k_cache, v_cache: [88, 48, 8, 128]block_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=256dtype=bf16/bf16
  • qwen35-9b-rope-chunkq: [8192, 32, 256]k_cache, v_cache: [4224, 64, 8, 256]block_table: [8, 528], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32rope_cos, rope_sin: [33792, 32]q_lens=repeat(1024, 8)cache_lens=repeat(33792, 8)rotary_dim=64dtype=f16/f16
  • qwen35-9b-mixed-chunkq: [4608, 32, 256]k_cache, v_cache: [4224, 64, 8, 256]block_table: [8, 528], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32rope_cos, rope_sin: [33792, 32]q_lens=[256,512,768,1024…]cache_lens=[4352,8704,17152,33792…]rotary_dim=64dtype=f16/f16
  • llama-8b-rope-chunkq: [4096, 32, 128]k_cache, v_cache: [576, 64, 8, 128]block_table: [8, 72], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32rope_cos, rope_sin: [4608, 64]q_lens=repeat(512, 8)cache_lens=repeat(4608, 8)dtype=f16/f16

q: [T_q, H, D]k_cache, v_cache: [NP, PS, H_kv, D]block_table: [B, W], i32cache_seqlens: [B], i32cu_seqlens_q: [B + 1], i32sinks: [H], f32

is_causal=truedtype=bf16/bf16

  • gpt-oss-sink-mixedq: [288, 64, 64]k_cache, v_cache: [68, 64, 8, 64]block_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_cache, v_cache: [256, 64, 8, 64]block_table: [8, 32], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32sinks: [64], f32q_lens=1(×8)cache_lens=2048(×8)

q: [T_q, H, D]k_cache, v_cache: [NP, PS, H_kv, D], fp8e4m3block_table: [B, W], i32cache_seqlens: [B], i32cu_seqlens_q: [B + 1], i32k_scale, v_scale: [*SK], f32

is_causal=true

  • llama-8b-fp8kv-decodeq: [32, 32, 128]k_cache, v_cache: [2048, 64, 8, 128], fp8e4m3block_table: [32, 64], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32k_scale, v_scale: [1], f32q_lens=repeat(1, 32)cache_lens=repeat(4096, 32)dtype=f16/fp8e4m3, bf16/fp8e4m3
  • llama-70b-fp8kv-p16q: [8, 64, 128]k_cache, v_cache: [2048, 16, 8, 128], fp8e4m3block_table: [8, 256], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32k_scale, v_scale: [1], f32q_lens=repeat(1, 8)cache_lens=repeat(4096, 8)dtype=bf16/fp8e4m3
  • llama-8b-fp8kv-prefillq: [4096, 32, 128]k_cache, v_cache: [576, 64, 8, 128], fp8e4m3block_table: [8, 72], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32k_scale, v_scale: [1], f32q_lens=repeat(512, 8)cache_lens=repeat(4096, 8)dtype=f16/fp8e4m3, bf16/fp8e4m3
  • qwen35-9b-chunk-fp8kvq: [8192, 32, 256]k_cache, v_cache: [4224, 64, 8, 256], fp8e4m3block_table: [8, 528], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32k_scale, v_scale: [1], f32q_lens=repeat(1024, 8)cache_lens=repeat(33792, 8)dtype=f16/fp8e4m3
  • llama-8b-chunk-fp8kvq: [4096, 32, 128]k_cache, v_cache: [576, 64, 8, 128], fp8e4m3block_table: [8, 72], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32k_scale, v_scale: [1], f32q_lens=repeat(512, 8)cache_lens=repeat(4608, 8)dtype=f16/fp8e4m3
  • softcap-chunk-fp8kvq: [2048, 8, 64]k_cache, v_cache: [288, 64, 2, 64], fp8e4m3block_table: [4, 72], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32k_scale, v_scale: [1], f32q_lens=repeat(512, 4)cache_lens=repeat(4608, 4)softcap=50dtype=f16/fp8e4m3

q: [T_q, H, D]k_cache, v_cache: [NP, PS, H_kv, D]block_table: [B, W], i32cache_seqlens: [B], i32cu_seqlens_q: [B + 1], i32q_scale: [B, H_kv], f32k_scale, v_scale: [*SK], f32

is_causal=truedtype=fp8e4m3/fp8e4m3/bf16

  • llama-8b-fp8-decodeq: [32, 32, 128]k_cache, v_cache: [2048, 64, 8, 128]block_table: [32, 64], i32cache_seqlens: [32], i32cu_seqlens_q: [33], i32q_scale, k_scale, v_scale: [32, 8], f32q_lens=repeat(1, 32)cache_lens=repeat(4096, 32)
  • llama-8b-fp8-prefillq: [4096, 32, 128]k_cache, v_cache: [576, 64, 8, 128]block_table: [8, 72], i32cache_seqlens: [8], i32cu_seqlens_q: [9], i32q_scale, k_scale, v_scale: [8, 8], f32q_lens=repeat(512, 8)cache_lens=repeat(4096, 8)
  • qwen3-fp8-ragged-oddq: [1007, 32, 128]k_cache, v_cache: [774, 48, 8, 128]block_table: [9, 86], i32cache_seqlens: [9], i32cu_seqlens_q: [10], i32q_scale: [9, 8], f32k_scale, v_scale: [1], f32q_lens=[1000,1,1,1…]cache_lens=repeat(4099, 9)

q: [T_q, H, D]k_cache, v_cache: [NP, PS, H_kv, D], fp8e4m3block_table: [B, W], i32cache_seqlens: [B], i32cu_seqlens_q: [B + 1], i32k_scale, v_scale: [*SK], f32rope_cos, rope_sin: [P, R // 2]

  • qwen-fp8kv-ragged-ropeq: [289, 32, 128]k_cache, v_cache: [88, 48, 8, 128], fp8e4m3block_table: [4, 22], i32cache_seqlens: [4], i32cu_seqlens_q: [5], i32k_scale, v_scale: [4, 8], f32rope_cos, rope_sin: [1025, 32]q_lens=[257,1,0,31]cache_lens=[1025,513,0,127]is_causal=truepos_encoding_mode=roperotary_dim=64rope_layout=interleavedwindow_size_left=256dtype=bf16/fp8e4m3
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
llama-8bf16/f161.08×0.4624fa3
flashinfer
torch-ref
0.4972
0.5488
17.1767
563··
llama-8b-p64f16/f161.16×0.1262fa3
flashinfer
torch-ref
0.1465
0.2185
7.1535
17.2··
llama-8b-32k-p64f16/f161.02×0.2638fa3
flashinfer
torch-ref
0.2684
0.4291
13.2200
16.4··
llama-8b-b64-p64f16/f161.17×0.1313fa3
flashinfer
torch-ref
0.1543
0.2214
9.2104
16.5··
llama-70b-p64f16/f161.12×0.0421fa3
flashinfer
torch-ref
0.0471
0.1028
2.9367
25.8··
llama-8b-p256f16/f161.11×0.1314fa3
flashinfer
torch-ref
0.1460
0.2181
7.1410
16.5··
llama-70b-p256f16/f161.16×0.0403fa3
flashinfer
torch-ref
0.0467
0.1026
2.9333
26.9··
llama-405b-p256f16/f161.19×0.0269fa3
flashinfer
torch-ref
0.0320
0.2761
2.6013
40.3··
llama-8b-p64-softcapf16/f161.32×0.1310fa3
flashinfer
torch-ref
0.1724
0.2319
7.2776
16.7··
llama-8b-p16f16/f161.15×0.1287fa3
flashinfer
torch-ref
0.1485
0.2194
7.1601
16.8··
llama-8b-b64-p16f16/f161.17×0.1338fa3
flashinfer
torch-ref
0.1562
0.2227
9.2104
16.2··
llama-70b-p16f16/f161.15×0.0418fa3
flashinfer
torch-ref
0.0480
0.1029
2.9392
25.9··
llama-8b-p64-cutf16/f161.17×0.1252fa3
flashinfer
torch-ref
0.1464
0.2182
7.0873
16.9··
llama-8b-p256-cutf16/f161.09×0.1334fa3
flashinfer
torch-ref
0.1454
0.2179
7.0767
15.9··
llama-8b-serving-stepf16/f161.10×0.2306fa3
flashinfer
torch-ref
0.2548
0.6679
10.8896
272··
llama-8b-sliding-windowf16/f161.16×0.1296fa3
flashinfer
torch-ref
0.1506
0.8668
24.5632
16.7··
llama-8b-noncausalf16/f161.25×0.0156fa3
flashinfer
torch-ref
0.0195
0.0420
0.6047
143··
gpt-oss-120b-windowbf16/bf161.55×0.0223fa3
flashinfer
torch-ref
0.0346
0.1016
3.7911
51··
qwen3-ragged-oddbf16/bf161.10×0.1661fa3
flashinfer
torch-ref
0.1830
0.2742
5.8002
361··
synthetic-softcap-chunkf16/f161.27×0.0855flashinfer
fa3
torch-ref
0.1084
0.1198
3.0949
220··
falcon-7b-chunkbf16/bf161.09×0.1832fa3
flashinfer
torch-ref
0.2006
0.2427
6.9690
371··
starcoder-chunkf16/f161.10×0.3804fa3
flashinfer
torch-ref
0.4195
0.4642
14.5541
582··
gemma-2b-chunkbf16/bf161.14×0.1194fa3
flashinfer
torch-ref
0.1361
0.1932
4.2192
615··
qwen3.8-27b-prefillbf16/bf161.08×0.3291fa3
flashinfer
torch-ref
0.3553
0.6172
17.2539
630··
qwen3.8-27b-decodebf16/bf161.99×0.0108fa3
flashinfer
torch-ref
0.0214
0.0254
0.3063
9.38··
llama-8b-rope-decodebf16/bf166.85×0.0871fa3
torch-ref
0.5966
2.6319
6.22··
llama-8b-rope-prefillbf16/bf161.94×0.2616fa3
torch-ref
0.5079
9.1407
497··
qwen-ragged-ropebf16/bf162.79×0.0224fa3
torch-ref
0.0624
0.7538
51.7··
qwen35-9b-rope-chunkf16/f161.55×12.9088fa3
torch-ref
20.0453
388.3260
695··
qwen35-9b-mixed-chunkf16/f161.80×4.7332fa3
torch-ref
8.5300
152.3690
705··
llama-8b-rope-chunkf16/f161.89×0.5766fa3
torch-ref
1.0904
20.5510
512··
gpt-oss-sink-mixedbf16/bf162.57×0.0128flashinfer
torch-ref
0.0330
0.8528
47.8··
gpt-oss-sink-decodebf16/bf166.90×0.0213flashinfer
torch-ref
0.1471
1.1031
12.8··
llama-8b-fp8kv-decodef16/fp8e4m33.19×0.1025flashinfer
torch-ref
0.3269
8.1987
21.2··
bf16/fp8e4m32.85×0.1134flashinfer
torch-ref
0.3238
8.2049
19.1··
llama-70b-fp8kv-p16bf16/fp8e4m34.64×0.0394flashinfer
torch-ref
0.1828
3.2103
27.5··
llama-8b-fp8kv-prefillf16/fp8e4m31.28×0.8263flashinfer
torch-ref
1.0575
17.4509
315··
bf16/fp8e4m31.15×1.0173flashinfer
torch-ref
1.1674
17.4538
256··
qwen35-9b-chunk-fp8kvf16/fp8e4m31.58×30.1743flashinfer
torch-ref
47.7847
384.9430
298··
llama-8b-chunk-fp8kvf16/fp8e4m31.27×0.9324flashinfer
torch-ref
1.1875
19.6961
316··
softcap-chunk-fp8kvf16/fp8e4m31.64×0.1246flashinfer
torch-ref
0.2043
3.1280
151··
llama-8b-fp8-decodefp8e4m3/fp8e4m3/bf161.25×0.1027fa3
torch-ref
0.1285
8.5151
21.1··
llama-8b-fp8-prefillfp8e4m3/fp8e4m3/bf160.97×0.4519fa3
torch-ref
0.4393
17.6399
576··
qwen3-fp8-ragged-oddfp8e4m3/fp8e4m3/bf161.06×0.1490fa3
torch-ref
0.1573
6.1446
403··
qwen-fp8kv-ragged-ropebf16/fp8e4m33.51×0.0291fa3
torch-ref
0.1021
0.7774
39.7··

GQAVarlenFwd

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

dtype=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)is_causal=true
  • 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]is_causal=true
  • 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]is_causal=true
  • 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)is_causal=true
  • 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]is_causal=true
  • 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)is_causal=truewindow_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)is_causal=truewindow_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)is_causal=truewindow_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)is_causal=truewindow_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)is_causal=true
  • 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]is_causal=true
  • 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]is_causal=true
  • qwen3.6-vision-4x1kq, k, v: [4096, 16, 72]cu_seqlens_q, cu_seqlens_kv: [5], i32q_lens=repeat(1024, 4)kv_lens=repeat(1024, 4)
  • qwen3.6-vision-4kq, k, v: [4096, 16, 72]cu_seqlens_q, cu_seqlens_kv: [2], i32q_lens=[4096]kv_lens=[4096]
  • qwen3.6-vision-16kq, k, v: [16384, 16, 72]cu_seqlens_q, cu_seqlens_kv: [2], i32q_lens=[16384]kv_lens=[16384]
  • llama-8b-serve-mixedq: [1087, 32, 128]k, v: [200385, 8, 128]cu_seqlens_q, cu_seqlens_kv: [65], i32q_lens=[1024,1,1,1…]kv_lens=[3072,2257,3434,3475…]is_causal=true
  • llama-70b-serve-mixedq: [543, 64, 128]k, v: [100304, 8, 128]cu_seqlens_q, cu_seqlens_kv: [33], i32q_lens=[512,1,1,1…]kv_lens=[2560,1370,2809,4163…]is_causal=true
  • llama-8b-chunk-decodesq: [2055, 32, 128]k, v: [28697, 8, 128]cu_seqlens_q, cu_seqlens_kv: [9], i32q_lens=[2048,1,1,1…]kv_lens=[4096,3326,5882,2617…]is_causal=true
  • llama-8b-decode-batchq: [256, 32, 128]k, v: [520474, 8, 128]cu_seqlens_q, cu_seqlens_kv: [257], i32q_lens=repeat(1, 256)kv_lens=[2150,711,2781,2710…]is_causal=true
  • llama-8b-decode-longq: [8, 32, 128]k, v: [135938, 8, 128]cu_seqlens_q, cu_seqlens_kv: [9], i32q_lens=repeat(1, 8)kv_lens=[10536,14999,12739,17932…]is_causal=true
  • llama-8b-spec-verifyq: [128, 32, 128]k, v: [66351, 8, 128]cu_seqlens_q, cu_seqlens_kv: [33], i32q_lens=repeat(4, 32)kv_lens=[1766,2042,1222,3754…]is_causal=true
  • llama-70b-spec-verify16q: [512, 64, 128]k, v: [79772, 8, 128]cu_seqlens_q, cu_seqlens_kv: [33], i32q_lens=repeat(16, 32)kv_lens=[2480,2921,2968,2167…]is_causal=true
  • llama-70b-spec-longq: [128, 64, 128]k, v: [144085, 8, 128]cu_seqlens_q, cu_seqlens_kv: [9], i32q_lens=repeat(16, 8)kv_lens=[21582,21534,25885,20999…]is_causal=true

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]

is_causal=truepos_encoding_mode=ropedtype=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
  • llama-8b-serve-ropeq: [1087, 32, 128]k, v: [200385, 8, 128]cu_seqlens_q, cu_seqlens_kv: [65], i32rope_cos, rope_sin: [6144, 64]q_lens=[1024,1,1,1…]kv_lens=[3072,2257,3434,3475…]
  • llama-8b-long-ropeq: [8, 32, 128]k, v: [135938, 8, 128]cu_seqlens_q, cu_seqlens_kv: [9], i32rope_cos, rope_sin: [32768, 64]q_lens=repeat(1, 8)kv_lens=[10536,14999,12739,17932…]

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

is_causal=truedtype=bf16

  • gpt-oss-serve-mixedq: [543, 64, 64]k, v: [104589, 8, 64]cu_seqlens_q, cu_seqlens_kv: [33], i32sinks: [64], f32q_lens=[512,1,1,1…]kv_lens=[1024,1638,2528,5921…]
  • gpt-oss-serve-windowq: [543, 64, 64]k, v: [104589, 8, 64]cu_seqlens_q, cu_seqlens_kv: [33], i32sinks: [64], f32q_lens=[512,1,1,1…]kv_lens=[1024,1638,2528,5921…]window_size_left=128
  • 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=128

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

is_causal=truedtype=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], 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)is_causal=truedtype=fp8e4m3/bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
llama-8b-uniformbf161.21×0.0314flashinfer
fa3
torch-ref
0.0380
0.0420
1.3030
277··
llama-8b-q-lt-kvbf161.14×0.0447fa3
flashinfer
torch-ref
0.0511
0.0613
1.6781
486··
llama-70b-q-lt-kvbf161.13×0.0828fa3
flashinfer
torch-ref
0.0935
0.1004
3.2070
524··
gpt-oss-uniformbf161.35×0.0432fa3
flashinfer
torch-ref
0.0583
0.0592
1.7972
203··
gpt-oss-q-lt-kvbf161.02×0.0704fa3
flashinfer
torch-ref
0.0721
0.0922
2.3465
311··
llama-8b-short-w256bf161.32×0.0306flashinfer
fa3
torch-ref
0.0404
0.0445
1.3294
214··
llama-8b-long-w1024bf161.22×0.2170fa3
flashinfer
torch-ref
0.2637
0.2692
16.4928
480··
llama-70b-short-w256bf161.28×0.0534flashinfer
fa3
torch-ref
0.0685
0.0794
2.4217
245··
llama-70b-long-w1024bf161.22×0.4236flashinfer
fa3
torch-ref
0.5153
0.5200
30.7092
492··
gemma4-31b-uniformbf1614.31×1.3594torch-ref19.4464203··
gemma4-31b-q-lt-kvbf168.38×0.5031torch-ref4.2159171··
gemma4-26b-a4b-raggedbf1613.97×1.2266torch-ref17.1336190··
qwen3.6-vision-4x1kbf161.33×0.0622fa3
torch-ref
0.0829
1.8758
316··
qwen3.6-vision-4kbf161.10×0.2034fa3
torch-ref
0.2240
6.9080
387··
qwen3.6-vision-16kbf161.02×2.8163fa3
torch-ref
2.8767
102.8820
447··
llama-8b-serve-mixedbf161.18×0.2290fa3
flashinfer
torch-ref
0.2707
0.8043
17.9353
204··
llama-70b-serve-mixedbf161.11×0.1547fa3
flashinfer
torch-ref
0.1724
0.7699
16.0694
273··
llama-8b-chunk-decodesbf160.99×0.2082fa3
flashinfer
torch-ref
0.2057
0.3031
9.7549
502··
llama-8b-decode-batchbf161.11×0.4893fa3
flashinfer
torch-ref
0.5411
2.0001
42.2266
17.6··
llama-8b-decode-longbf162.57×0.1651fa3
flashinfer
torch-ref
0.4237
0.7154
8.8463
13.6··
llama-8b-spec-verifybf161.13×0.0745fa3
flashinfer
torch-ref
0.0840
0.2706
8.5073
58.9··
llama-70b-spec-verify16bf161.07×0.0906fa3
flashinfer
torch-ref
0.0971
0.5828
17.2443
465··
llama-70b-spec-longbf161.82×0.1802fa3
flashinfer
torch-ref
0.3278
1.1119
24.2386
423··
llama-8b-uniform-ropebf161.28×0.0409flashinfer
fa3
torch-ref
0.0523
0.0561
1.6797
213··
gpt-oss-rope-interleavedbf161.33×0.0510fa3
flashinfer
torch-ref
0.0676
0.0691
2.1909
172··
llama-8b-rope-partialbf161.26×0.0349fa3
flashinfer
torch-ref
0.0439
0.0489
1.4353
238··
qwen-ragged-ropebf161.08×0.0860fa3
flashinfer
torch-ref
0.0927
0.1104
5.1448
433··
llama-8b-serve-ropebf161.21×0.4454fa3
flashinfer
torch-ref
0.5379
1.0694
24.7902
105··
llama-8b-long-ropebf161.85×0.3277fa3
flashinfer
torch-ref
0.6049
0.8898
11.9364
6.86··
gpt-oss-serve-mixedbf1610.64×0.0853flashinfer-paged-sink
torch-ref
0.9079
9.1867
97.3··
gpt-oss-serve-windowbf166.95×0.0269flashinfer-paged-sink
torch-ref
0.1869
9.4537
43.6··
gpt-oss-sink-mixedbf162.03×0.0269flashinfer-paged-sink
torch-ref
0.0548
2.5126
77.1··
llama-8b-fp8fp8e4m3/bf161.09×0.0393fa3
torch-ref
0.0426
1.4634
221··
llama-70b-fp8-q-lt-kvfp8e4m3/bf161.03×0.0807fa3
torch-ref
0.0831
3.3874
538··
qwen3-fp8-raggedfp8e4m3/bf161.04×0.0935fa3
torch-ref
0.0973
6.0851
488··
llama-8b-fp8-w256fp8e4m3/bf161.08×0.0458fa3
torch-ref
0.0495
1.4891
143··
llama-8b-fp8-sinkfp8e4m3/bf1645.38×0.0411torch-ref1.8633212··

MLADenseDecodeFwd

q: [B, H, D]q_pe: [B, H, PE]k: [B, N_kv, H_kv, D]k_pe: [B, N_kv, H_kv, PE]

dtype=bf16

  • ds-v2-4kq: [32, 128, 512]q_pe: [32, 128, 64]k: [32, 4096, 1, 512]k_pe: [32, 4096, 1, 64]
  • ds-v2-32kq: [8, 128, 512]q_pe: [8, 128, 64]k: [8, 32768, 1, 512]k_pe: [8, 32768, 1, 64]
  • ds-v3-4kq: [16, 128, 512]q_pe: [16, 128, 64]k: [16, 4096, 1, 512]k_pe: [16, 4096, 1, 64]
  • ds-v3-32kq: [4, 128, 512]q_pe: [4, 128, 64]k: [4, 32768, 1, 512]k_pe: [4, 32768, 1, 64]
  • ds-v3-single-requestq: [1, 128, 512]q_pe: [1, 128, 64]k: [1, 4096, 1, 512]k_pe: [1, 4096, 1, 64]
  • ds-v3-serving-batchq: [12, 128, 512]q_pe: [12, 128, 64]k: [12, 6144, 1, 512]k_pe: [12, 6144, 1, 64]
  • mla-b128-4096q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 4096, 1, 512]k_pe: [128, 4096, 1, 64]
  • mla-b128-8192q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 8192, 1, 512]k_pe: [128, 8192, 1, 64]
  • mla-b128-16384q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 16384, 1, 512]k_pe: [128, 16384, 1, 64]
  • mla-b128-32768q: [128, 128, 512]q_pe: [128, 128, 64]k: [128, 32768, 1, 512]k_pe: [128, 32768, 1, 64]
  • mla-tp-b1q: [1, 64, 512]q_pe: [1, 64, 64]k: [1, 4096, 1, 512]k_pe: [1, 4096, 1, 64]
  • mla-tp-b2q: [2, 64, 512]q_pe: [2, 64, 64]k: [2, 4096, 1, 512]k_pe: [2, 4096, 1, 64]
  • mla-tp-b6q: [6, 64, 512]q_pe: [6, 64, 64]k: [6, 4096, 1, 512]k_pe: [6, 4096, 1, 64]
  • mla-tp-b64q: [64, 64, 512]q_pe: [64, 64, 64]k: [64, 4096, 1, 512]k_pe: [64, 4096, 1, 64]
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v2-4kbf161.11×0.0777flashinfer
flashmla
0.0865
0.1767
471··
ds-v2-32kbf161.11×0.1368flashinfer
flashmla
0.1516
0.3240
535··
ds-v3-4kbf161.11×0.0462flashinfer
flashmla
0.0514
0.1031
396··
ds-v3-32kbf161.08×0.0774flashinfer
flashmla
0.0837
0.1862
473··
ds-v3-single-requestbf161.68×0.0133flashinfer
flashmla
0.0224
0.0424
85.7··
ds-v3-serving-batchbf161.16×0.0520flashinfer
flashmla
0.0603
0.1178
396··
mla-b128-4096bf161.13×0.2560flashinfer
flashmla
0.2881
0.6198
572··
mla-b128-8192bf161.14×0.4866flashinfer
flashmla
0.5526
1.2024
602··
mla-b128-16384bf161.14×0.9488flashinfer
flashmla
1.0831
2.3379
617··
mla-b128-32768bf161.15×1.8730flashinfer
flashmla
2.1519
8.4543
625··
mla-tp-b1bf161.75×0.0129flashinfer
flashmla
0.0225
0.0487
44.4··
mla-tp-b2bf161.68×0.0137flashinfer
flashmla
0.0229
0.0458
83.6··
mla-tp-b6bf161.32×0.0190flashinfer
flashmla
0.0252
0.0619
180··
mla-tp-b64bf161.04×0.0891flashinfer
flashmla
0.0924
0.2731
411··

MLADenseBwd

do, o: [B, S_q, H, D_v]q: [B, S_q, H, D_qk]k: [B, S_kv, H, D_qk]v: [B, S_kv, H, D_v]lse: [B, H, S_q], f32

is_causal=truedtype=bf16

  • ds-v3-4kdo, v, o: [1, 4096, 128, 128]q, k: [1, 4096, 128, 192]lse: [1, 128, 4096], f32
  • ds-v3-b2-8kdo, v, o: [2, 8192, 128, 128]q, k: [2, 8192, 128, 192]lse: [2, 128, 8192], f32
  • kimi-k2-8kdo, v, o: [1, 8192, 64, 128]q, k: [1, 8192, 64, 192]lse: [1, 64, 8192], f32
  • ds-v2-lite-3kdo, v, o: [4, 3072, 16, 128]q, k: [4, 3072, 16, 192]lse: [4, 16, 3072], f32
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v3-4kbf161.04×4.4939fa34.6614399··
ds-v3-b2-8kbf161.05×32.8176fa334.3969437··
kimi-k2-8kbf161.04×8.3306fa38.6557430··
ds-v2-lite-3kbf161.03×1.3435fa31.3876375··

MLAPagedFwd

q: [B, S_q, H, DK]kv_cache: [NP, PS, DK]block_table: [B, W], i32cache_seqlens: [B], i32

is_causal=truekv_lora_rank=512dtype=bf16/bf16

  • ds-v3-4kq: [64, 1, 128, 576]kv_cache: [4096, 64, 576]block_table: [64, 64], i32cache_seqlens: [64], i32cache_lens=repeat(4096, 64)
  • ds-v3-32kq: [64, 1, 128, 576]kv_cache: [32768, 64, 576]block_table: [64, 512], i32cache_seqlens: [64], i32cache_lens=repeat(32768, 64)
  • ds-v3-mtpq: [32, 2, 128, 576]kv_cache: [4096, 64, 576]block_table: [32, 128], i32cache_seqlens: [32], i32cache_lens=repeat(8192, 32)
  • ds-v3-raggedq: [8, 1, 128, 576]kv_cache: [1024, 64, 576]block_table: [8, 40], i32cache_seqlens: [8], i32cache_lens=[2500,1,700,1777…]

q: [B, S_q, H, DK]kv_cache: [NP, PS, DK], fp8e4m3block_table: [B, W], i32cache_seqlens: [B], i32kv_scale: [1], f32

  • kimi-k2-fp8q: [128, 1, 64, 576]kv_cache: [32768, 64, 576], fp8e4m3block_table: [128, 256], i32cache_seqlens: [128], i32kv_scale: [1], f32cache_lens=repeat(16384, 128)is_causal=truekv_lora_rank=512dtype=bf16/fp8e4m3
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v3-4kbf16/bf161.07×0.1368flashinfer
flashmla
0.1467
0.1518
535··
ds-v3-32kbf16/bf161.04×0.9723flashmla
flashinfer
1.0113
1.1827
602··
ds-v3-mtpbf16/bf161.10×0.2446flashmla
flashinfer
0.2690
0.2748
598··
ds-v3-raggedbf16/bf161.36×0.0232flashinfer
flashmla
0.0316
0.0397
131··
kimi-k2-fp8bf16/fp8e4m32.15×1.0482flashinfer2.2537279··

MLAVarlenBwd

do, o: [T_q, H, D_v]q: [T_q, H, D_qk]k: [T_kv, H, D_qk]v: [T_kv, H, D_v]lse: [H, T_q], f32cu_seqlens_q, cu_seqlens_kv: [B + 1], i32

is_causal=truedtype=bf16

  • ds-v3-8x4kdo, v, o: [32768, 128, 128]q, k: [32768, 128, 192]lse: [128, 32768], f32cu_seqlens_q, cu_seqlens_kv: [9], i32q_lens=repeat(4096, 8)kv_lens=repeat(4096, 8)
  • ds-v3-mixeddo, v, o: [32256, 128, 128]q, k: [32256, 128, 192]lse: [128, 32256], f32cu_seqlens_q, cu_seqlens_kv: [7], i32q_lens=[512,1024,2048,4096…]kv_lens=[512,1024,2048,4096…]
  • kimi-k2-4x8kdo, v, o: [32768, 64, 128]q, k: [32768, 64, 192]lse: [64, 32768], f32cu_seqlens_q, cu_seqlens_kv: [5], i32q_lens=repeat(8192, 4)kv_lens=repeat(8192, 4)
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v3-8x4kbf161.04×35.3966fa336.9178405··
ds-v3-mixedbf161.06×85.0248fa390.0990450··
kimi-k2-4x8kbf161.04×32.8677fa334.2642436··

MLAVarlenFwd

q: [T_q, H, DN + PE]k_nope: [T_q, H, DN]k_pe: [T_q, PE]v: [T_q, H, DV]cu_seqlens: [B + 1], i32

is_causal=truedtype=bf16

  • ds-v3-8x4kq: [32768, 128, 192]k_nope, v: [32768, 128, 128]k_pe: [32768, 64]cu_seqlens: [9], i32seq_lens=repeat(4096, 8)
  • ds-v3-mixedq: [32256, 128, 192]k_nope, v: [32256, 128, 128]k_pe: [32256, 64]cu_seqlens: [7], i32seq_lens=[512,1024,2048,4096…]
  • kimi-k2-4x8kq: [32768, 64, 192]k_nope, v: [32768, 64, 128]k_pe: [32768, 64]cu_seqlens: [5], i32seq_lens=repeat(8192, 4)
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v3-8x4kbf161.34×8.6766flashinfer
fa3
11.6444
11.7617
639··
ds-v3-mixedbf161.09×21.8008fa3
flashinfer
23.7224
24.6081
678··
kimi-k2-4x8kbf161.16×8.1556flashinfer
fa3
9.4345
9.5040
679··

NSACompressedVarlenFwd

q: [T_q, H, DK]k_cmp: [C, H_kv, DK]v_cmp: [C, H_kv, DV]cu_seqlens, chunk_offsets: [N + 1], i32token_indices: [T_q, 2], i32

sm_scale=0.0883883block_size=32

  • prefill-8x1kq: [8192, 32, 128]k_cmp, v_cmp: [256, 2, 128]cu_seqlens, 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]cu_seqlens, 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]cu_seqlens, 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.55×0.0394fla0.100354.2··
prefill-4x1kf162.47×0.0217fla0.053649.3··
prefill-raggedbf162.24×0.00883fla0.019818.7··

NSATopKVarlenFwd

q: [T_q, H, D]k_cmp: [C, H_kv, D]cu_seqlens, chunk_offsets: [N + 1], i32token_indices: [T_q, 2], i32

dtype=bf16

  • prefill-8x1kq: [8192, 32, 128]k_cmp: [256, 2, 128]cu_seqlens, chunk_offsets: [9], i32token_indices: [8192, 2], i32seq_lens=repeat(1024, 8)sm_scale=1selected_block_num=16block_size=32
  • prefill-4x1kq: [4096, 32, 128]k_cmp: [128, 2, 128]cu_seqlens, chunk_offsets: [5], i32token_indices: [4096, 2], i32seq_lens=repeat(1024, 4)sm_scale=1selected_block_num=16block_size=32
  • prefill-raggedq: [5153, 32, 128]k_cmp: [163, 2, 128]cu_seqlens, chunk_offsets: [4], i32token_indices: [5153, 2], i32seq_lens=[31,1025,4097]sm_scale=0.0883883selected_block_num=16block_size=32
  • prefill-long-contextq: [16384, 32, 128]k_cmp: [256, 2, 128]cu_seqlens, chunk_offsets: [2], i32token_indices: [16384, 2], i32seq_lens=[16384]sm_scale=0.0883883selected_block_num=32block_size=64
  • prefill-wide-gqaq: [8192, 64, 64]k_cmp: [256, 2, 64]cu_seqlens, chunk_offsets: [5], i32token_indices: [8192, 2], i32seq_lens=repeat(2048, 4)sm_scale=0.125selected_block_num=8block_size=32
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
prefill-8x1kbf161.69×0.0780fla0.131927.6··
prefill-4x1kbf161.67×0.0416fla0.069525.9··
prefill-raggedbf161.98×0.0822fla0.162855.6··
prefill-long-contextbf163.36×0.4037fla1.355485.1··
prefill-wide-gqabf161.31×0.1221fla0.159635.2··

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], i32cu_seqlens: [N + 1], i32token_indices: [T_q, 2], i32

  • prefill-4x2kq: [8192, 16, 64]k, v: [8192, 1, 64]block_indices: [8192, 1, 1], i32block_counts: [8192, 1], i32cu_seqlens: [5], i32token_indices: [8192, 2], i32seq_lens=repeat(2048, 4)kv_lens=repeat(2048, 4)sm_scale=0.1block_size=32dtype=f16
  • prefill-2x4kq: [8192, 16, 64]k, v: [8192, 1, 64]block_indices: [8192, 1, 4], i32block_counts: [8192, 1], i32cu_seqlens: [3], i32token_indices: [8192, 2], i32seq_lens=repeat(4096, 2)kv_lens=repeat(4096, 2)sm_scale=0.1block_size=32dtype=f16
  • prefill-noncausal-2x4kq: [8190, 16, 64]k, v: [8190, 1, 64]block_indices: [8190, 1, 4], i32block_counts: [8190, 1], i32cu_seqlens: [3], i32token_indices: [8190, 2], i32seq_lens=[4000,4190]kv_lens=[4000,4190]is_causal=falsesm_scale=0.1block_size=32dtype=f16
  • prefill-raggedq: [1024, 32, 128]k, v: [1024, 2, 128]block_indices: [1024, 2, 8], i32block_counts, token_indices: [1024, 2], i32cu_seqlens: [3], i32seq_lens=[257,767]kv_lens=[257,767]sm_scale=0.0883883block_size=32dtype=bf16
  • qwen3.8-flash-4kq: [4096, 24, 256]k, v: [4096, 2, 256]block_indices: [4096, 2, 513], i32block_counts, token_indices: [4096, 2], i32cu_seqlens: [2], i32seq_lens=[4096]kv_lens=[4096]sm_scale=0.0625block_size=4dtype=bf16
  • qwen3.8-flash-raggedq: [4096, 24, 256]k, v: [4096, 2, 256]block_indices: [4096, 2, 513], i32block_counts, token_indices: [4096, 2], i32cu_seqlens: [3], i32seq_lens=[1000,3096]kv_lens=[1000,3096]sm_scale=0.0625block_size=4dtype=bf16

q: [T_q, H, D]k, v: [T_kv, H_kv, D]block_indices: [T_q, H_kv, SEL], i32block_counts: [T_q, H_kv], i32cu_seqlens, cu_seqlens_k: [N + 1], i32token_indices: [T_q, 2], i32

sm_scale=0.0625block_size=4dtype=bf16

  • qwen3.8-flash-decode-b64q: [64, 24, 256]k, v: [524288, 2, 256]block_indices: [64, 2, 513], i32block_counts, token_indices: [64, 2], i32cu_seqlens, cu_seqlens_k: [65], i32seq_lens=repeat(1, 64)kv_lens=repeat(8192, 64)
  • qwen3.8-flash-mtp-b16q: [32, 24, 256]k, v: [524288, 2, 256]block_indices: [32, 2, 513], i32block_counts, token_indices: [32, 2], i32cu_seqlens, cu_seqlens_k: [17], i32seq_lens=repeat(2, 16)kv_lens=repeat(32768, 16)
  • qwen3.8-flash-256kq: [1, 24, 256]k, v: [262144, 2, 256]block_indices: [1, 2, 513], i32block_counts, token_indices: [1, 2], i32cu_seqlens, cu_seqlens_k: [2], i32seq_lens=[1]kv_lens=[262144]
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
prefill-4x2kf161.79×0.0147fla0.026372.4··
prefill-2x4kf161.70×0.0270fla0.0459100··
prefill-noncausal-2x4kf1656.67×0.0292torch-ref1.657693.1··
prefill-raggedbf161.71×0.0239fla0.041083.8··
qwen3.8-flash-4kbf161.18×1.5647fa3
torch-ref
1.8385
97.1761
55.2··
qwen3.8-flash-raggedbf161.02×1.5651fa3
torch-ref
1.5997
96.5007
45.4··
qwen3.8-flash-decode-b64bf161.66×0.0517fa3
torch-ref
0.0861
9.0219
30.8··
qwen3.8-flash-mtp-b16bf161.75×0.0325fa3
torch-ref
0.0570
3.9403
25.5··
qwen3.8-flash-256kbf162.90×0.0123fa3
torch-ref
0.0356
1.0153
2.59··

DSADenseFwd

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=1dtype=bf16

  • ds-v32-kv2kq: [1, 1024, 128, 576]kv: [1, 2048, 1, 576]indices: [1, 1024, 1, 2048], i32q_start_index_s=1024
  • ds-v32-kv4kq: [1, 512, 128, 576]kv: [1, 4096, 1, 576]indices: [1, 512, 1, 1024], i32q_start_index_s=512
  • mla-d576-h128-kv8kq: [1, 4096, 128, 576]kv: [1, 8192, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=4096
  • mla-d576-h128-kv32kq: [1, 4096, 128, 576]kv: [1, 32768, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=28672
  • mla-d576-h128-kv64kq: [1, 4096, 128, 576]kv: [1, 65536, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=61440
  • mla-d576-h128-kv96kq: [1, 4096, 128, 576]kv: [1, 98304, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=94208
  • mla-d576-h128-kv128kq: [1, 4096, 128, 576]kv: [1, 131072, 1, 576]indices: [1, 4096, 1, 2048], i32q_start_index_s=126976
  • mla-d512-h64-kv8kq: [1, 4096, 64, 512]kv: [1, 8192, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=4096
  • mla-d512-h64-kv32kq: [1, 4096, 64, 512]kv: [1, 32768, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=28672
  • mla-d512-h64-kv48kq: [1, 4096, 64, 512]kv: [1, 49152, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=45056
  • mla-d512-h64-kv64kq: [1, 4096, 64, 512]kv: [1, 65536, 1, 512]indices: [1, 4096, 1, 512], i32q_start_index_s=61440
  • mla-d512-h128-kv8kq: [1, 4096, 128, 512]kv: [1, 8192, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=4096
  • mla-d512-h128-kv32kq: [1, 4096, 128, 512]kv: [1, 32768, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=28672
  • mla-d512-h128-kv48kq: [1, 4096, 128, 512]kv: [1, 49152, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=45056
  • mla-d512-h128-kv64kq: [1, 4096, 128, 512]kv: [1, 65536, 1, 512]indices: [1, 4096, 1, 1024], i32q_start_index_s=61440

q: [B, S, H, D + dim_tail]kv: [B, S_kv, H_kv, D + dim_tail]indices: [B, S, H_kv, K], i32attn_sink: [H], f32

stride_kv=1is_causal=falsedtype=bf16

  • dsv4-flash-csa-4kq: [1, 4096, 64, 512]kv: [1, 5120, 1, 512]indices: [1, 4096, 1, 640], i32attn_sink: [64], f32q_start_index_s=5120
  • dsv4-flash-csa-32kq: [1, 32768, 64, 512]kv: [1, 40960, 1, 512]indices: [1, 32768, 1, 640], i32attn_sink: [64], f32q_start_index_s=40960
  • dsv4-flash-hca-4kq: [1, 4096, 64, 512]kv: [1, 4128, 1, 512]indices: [1, 4096, 1, 160], i32attn_sink: [64], f32q_start_index_s=4128
  • dsv4-flash-hca-32kq: [1, 32768, 64, 512]kv: [1, 33024, 1, 512]indices: [1, 32768, 1, 384], i32attn_sink: [64], f32q_start_index_s=33024
  • dsv4-flash-csa-mtpq: [16, 2, 64, 512]kv: [16, 8320, 1, 512]indices: [16, 2, 1, 640], i32attn_sink: [64], f32q_start_index_s=8320
  • dsv4-flash-csa-decodeq: [1, 1, 64, 512]kv: [1, 1160, 1, 512]indices: [1, 1, 1, 640], i32attn_sink: [64], f32q_start_index_s=1160
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v32-kv2kbf161.37×0.8575flashmla1.1778512··
ds-v32-kv4kbf161.27×0.2512flashmla0.3193437··
mla-d576-h128-kv8kbf161.10×4.0489flashmla4.4586578··
mla-d576-h128-kv32kbf161.08×4.1410flashmla4.4778566··
mla-d576-h128-kv64kbf161.07×4.2341flashmla4.5452553··
mla-d576-h128-kv96kbf161.07×4.2606flashmla4.5705550··
mla-d576-h128-kv128kbf161.07×4.2771flashmla4.5939548··
mla-d512-h64-kv8kbf161.22×0.5316flashmla0.6464519··
mla-d512-h64-kv32kbf161.20×0.5452flashmla0.6555506··
mla-d512-h64-kv48kbf161.16×0.5716flashmla0.6625482··
mla-d512-h64-kv64kbf161.11×0.6032flashmla0.6717457··
mla-d512-h128-kv8kbf161.15×1.9632flashmla2.2590562··
mla-d512-h128-kv32kbf161.15×1.9884flashmla2.2917554··
mla-d512-h128-kv48kbf161.14×2.0248flashmla2.3060544··
mla-d512-h128-kv64kbf161.13×2.0423flashmla2.3117540··
dsv4-flash-csa-4kbf161.17×0.6597flashmla0.7691522··
dsv4-flash-csa-32kbf161.16×5.2847flashmla6.1388522··
dsv4-flash-hca-4kbf161.50×0.2749flashmla0.4137314··
dsv4-flash-hca-32kbf161.19×3.5013flashmla4.1522472··
dsv4-flash-csa-mtpbf161.33×0.0202flashmla0.0269133··
dsv4-flash-csa-decodebf162.30×0.0114flashmla0.02627.4··

DSAPagedFwd

q: [B, S_q, H, DK], bf16kv_cache: [NP, PS, 656 if KV == 'uint8' else DK]block_table: [B, W], i32cache_seqlens: [B], i32indices: [B, S_q, K], i32

dtype=u8

  • ds-v32-32kq: [64, 1, 128, 576], bf16kv_cache: [32768, 64, 656]block_table: [64, 512], i32cache_seqlens: [64], i32indices: [64, 1, 2048], i32cache_lens=repeat(32768, 64)
  • ds-v32-mtp-128kq: [16, 2, 128, 576], bf16kv_cache: [32768, 64, 656]block_table: [16, 2048], i32cache_seqlens: [16], i32indices: [16, 2, 2048], i32cache_lens=repeat(131072, 16)
  • ds-v32-tp2-1kq: [48, 1, 64, 576], bf16kv_cache: [1056, 64, 656]block_table: [48, 22], i32cache_seqlens: [48], i32indices: [48, 1, 2048], i32cache_lens=balanced_sizes(65544, 48)

q: [B, S_q, H, DK]kv_cache: [NP, PS, 656 if KV == 'uint8' else DK]block_table: [B, W], i32cache_seqlens: [B], i32indices: [B, S_q, K], i32

sm_scale=0.0625dtype=bf16

  • glm-5.3-flash-b64q: [64, 1, 64, 512]kv_cache: [32768, 64, 512]block_table: [64, 512], i32cache_seqlens: [64], i32indices: [64, 1, 2051], i32cache_lens=repeat(32768, 64)
  • glm-5.3-flash-mtpq: [16, 2, 64, 512]kv_cache: [8192, 64, 512]block_table: [16, 512], i32cache_seqlens: [16], i32indices: [16, 2, 2051], i32cache_lens=repeat(32768, 16)

q: [B, S_q, H, DK]kv_cache: [NP, PS, 656 if KV == 'uint8' else DK]block_table: [B, W], i32cache_seqlens: [B], i32indices: [B, S_q, K], i32attn_sink: [H], f32

dtype=bf16

  • dsv4-flash-csa-b64q: [64, 1, 64, 512]kv_cache: [8320, 64, 512]block_table: [64, 130], i32cache_seqlens: [64], i32indices: [64, 1, 640], i32attn_sink: [64], f32cache_lens=repeat(8320, 64)
  • dsv4-flash-csa-mtpq: [16, 2, 64, 512]kv_cache: [2080, 64, 512]block_table: [16, 130], i32cache_seqlens: [16], i32indices: [16, 2, 640], i32attn_sink: [64], f32cache_lens=repeat(8320, 16)
  • dsv4-flash-hca-b64q: [64, 1, 64, 512]kv_cache: [384, 64, 512]block_table: [64, 6], i32cache_seqlens: [64], i32indices: [64, 1, 384], i32attn_sink: [64], f32cache_lens=repeat(384, 64)
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v32-32ku81.05×0.1198flashmla0.1261306··
ds-v32-mtp-128ku81.08×0.0756flashmla0.0816243··
ds-v32-tp2-1ku81.18×0.0599flashmla0.0706153··
glm-5.3-flash-b64bf161.18×0.0661flashmla0.0780261··
glm-5.3-flash-mtpbf161.65×0.0457flashmla0.0753189··
dsv4-flash-csa-b64bf161.06×0.0268flashmla0.0283201··
dsv4-flash-csa-mtpbf161.05×0.0253flashmla0.0267106··
dsv4-flash-hca-b64bf161.01×0.0199flashmla0.0200162··

GatedPoolCompressFwd

kv, score: [T_q, 2 * D]ape: [ratio, 2 * D]kv_state, score_state: [NS, 2 * ratio, 2 * D]cu_seqlens: [N + 1], i32start_pos, state_slots: [N], i32

overlap=truedtype=f32

  • dsv4-flash-csa-4kkv, score: [4096, 1024]ape: [4, 1024]kv_state, score_state: [64, 8, 1024]cu_seqlens: [2], i32start_pos, state_slots: [1], i32seq_lens=[4096]positions=[0]
  • dsv4-flash-csa-32kkv, score: [32768, 1024]ape: [4, 1024]kv_state, score_state: [64, 8, 1024]cu_seqlens: [2], i32start_pos, state_slots: [1], i32seq_lens=[32768]positions=[0]
  • dsv4-flash-csa-b64kv, score: [64, 1024]ape: [4, 1024]kv_state, score_state: [64, 8, 1024]cu_seqlens: [65], i32start_pos, state_slots: [64], i32seq_lens=repeat(1, 64)positions=repeat(32767, 64)
  • dsv4-flash-csa-mtpkv, score: [32, 1024]ape: [4, 1024]kv_state, score_state: [64, 8, 1024]cu_seqlens: [17], i32start_pos, state_slots: [16], i32seq_lens=repeat(2, 16)positions=repeat(32766, 16)
  • dsv4-flash-idx-4kkv, score: [4096, 256]ape: [4, 256]kv_state, score_state: [64, 8, 256]cu_seqlens: [2], i32start_pos, state_slots: [1], i32seq_lens=[4096]positions=[0]
  • dsv4-flash-idx-b64kv, score: [64, 256]ape: [4, 256]kv_state, score_state: [64, 8, 256]cu_seqlens: [65], i32start_pos, state_slots: [64], i32seq_lens=repeat(1, 64)positions=repeat(32767, 64)

kv, score: [T_q, 1 * D]ape: [ratio, 1 * D]kv_state, score_state: [NS, 1 * ratio, 1 * D]cu_seqlens: [N + 1], i32start_pos, state_slots: [N], i32

dtype=f32

  • dsv4-flash-hca-4kkv, score: [4096, 512]ape: [128, 512]kv_state, score_state: [64, 128, 512]cu_seqlens: [2], i32start_pos, state_slots: [1], i32seq_lens=[4096]positions=[0]
  • dsv4-flash-hca-32kkv, score: [32768, 512]ape: [128, 512]kv_state, score_state: [64, 128, 512]cu_seqlens: [2], i32start_pos, state_slots: [1], i32seq_lens=[32768]positions=[0]
  • dsv4-flash-hca-b64kv, score: [64, 512]ape: [128, 512]kv_state, score_state: [64, 128, 512]cu_seqlens: [65], i32start_pos, state_slots: [64], i32seq_lens=repeat(1, 64)positions=repeat(32767, 64)

kv, score: [T_q, 1 * D]ape: [ratio, 1 * D]kv_state, score_state: [NS, 1 * ratio, 1 * D], f32cu_seqlens: [N + 1], i32start_pos, state_slots: [N], i32

dtype=bf16

  • glm-5.3-flash-4kkv, score: [4096, 128]ape: [4, 128]kv_state, score_state: [64, 4, 128], f32cu_seqlens: [2], i32start_pos, state_slots: [1], i32seq_lens=[4096]positions=[0]
  • glm-5.3-flash-raggedkv, score: [32768, 128]ape: [4, 128]kv_state, score_state: [64, 4, 128], f32cu_seqlens: [3], i32start_pos, state_slots: [2], i32seq_lens=[1000,31768]positions=[0,0]
  • glm-5.3-flash-b64kv, score: [64, 128]ape: [4, 128]kv_state, score_state: [64, 4, 128], f32cu_seqlens: [65], i32start_pos, state_slots: [64], i32seq_lens=repeat(1, 64)positions=repeat(32767, 64)
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
dsv4-flash-csa-4kf3230.24×0.0104torch0.31353.23··
dsv4-flash-csa-32kf3223.61×0.0650torch1.53464.13··
dsv4-flash-csa-b64f3247.72×0.00298torch0.14200.639··
dsv4-flash-csa-mtpf3238.29×0.00349torch0.13360.141··
dsv4-flash-idx-4kf3234.42×0.00544torch0.18721.54··
dsv4-flash-idx-b64f3255.24×0.00243torch0.13430.195··
dsv4-flash-hca-4kf3239.68×0.00698torch0.27682.4··
dsv4-flash-hca-32kf3222.65×0.0329torch0.74524.08··
dsv4-flash-hca-b64f3227.24×0.0103torch0.28062.85··
glm-5.3-flash-4kbf1649.74×0.00346torch0.17191.21··
glm-5.3-flash-raggedbf1633.79×0.0107torch0.36013.15··
glm-5.3-flash-b64bf1657.55×0.00227torch0.13080.105··

FP8LightningIndexerFwd

index_q: [B, S, H, D]index_k: [B, S_kv, G, D]weights: [S, H], f32starts, ends: [S], i32

  • chunk-prefillindex_q: [1, 8192, 32, 64]index_k: [1, 32768, 1, 64]weights: [8192, 32], f32starts, ends: [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], f32starts, ends: [2048], i32seq_lens=[2048]first=0dtype=bf16
  • context-chunkindex_q: [1, 3072, 32, 64]index_k: [1, 8192, 1, 64]weights: [3072, 32], f32starts, ends: [3072], i32seq_lens=[8192]first=5120dtype=bf16

index_q: [B, S, H, D]index_k: [B, S_kv, G, D]weights: [S, H], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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], f32starts, ends: [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-prefillbf1618.94×0.3454deepgemm
torch-ref
6.5407
109.5120
25.5··
fp8e4m319.61×0.3333deepgemm
torch-ref
6.5370
109.4510
26.4··
short-prefillbf163.30×0.0528deepgemm
torch-ref
0.1741
1.7381
167··
context-chunkbf164.38×0.2063deepgemm
torch-ref
0.9044
10.2734
416··
chunk-prefill-kscalefp8e4m322.42×0.2891deepgemm
torch-ref
6.4804
109.4380
30.5··
index-q2048-ctx4096fp8e4m33.01×0.1234deepgemm
torch-ref
0.3712
8.9382
846··
index-q2048-ctx8192fp8e4m32.82×0.2670deepgemm
torch-ref
0.7530
17.8438
912··
index-q2048-ctx16384fp8e4m32.74×0.5513deepgemm
torch-ref
1.5106
35.4658
946··
index-q2048-ctx32768fp8e4m32.72×1.1124deepgemm
torch-ref
3.0309
70.7891
969··
index-q2048-ctx65536fp8e4m32.72×2.2299deepgemm
torch-ref
6.0732
141.5170
982··
index-q2048-ctx131072fp8e4m32.73×4.4559deepgemm
torch-ref
12.1664
282.7150
991··
index-q4096-ctx4096fp8e4m33.74×0.1697deepgemm
torch-ref
0.6338
17.8576
820··
index-q4096-ctx8192fp8e4m33.04×0.4553deepgemm
torch-ref
1.3853
35.5562
916··
index-q4096-ctx16384fp8e4m32.83×1.0232deepgemm
torch-ref
2.8998
70.8990
951··
index-q4096-ctx32768fp8e4m32.78×2.1328deepgemm
torch-ref
5.9356
141.6320
978··
index-q4096-ctx65536fp8e4m32.77×4.3431deepgemm
torch-ref
12.0219
283.0120
993··
index-q4096-ctx131072fp8e4m32.76×8.7651deepgemm
torch-ref
24.2049
565.0520
999··
ds-v32-decode-b1fp8e4m318.26×0.00534torch-ref
deepgemm
0.0646
0.0976
50.8··

MergeAttentionStatesFwd

v_a, v_b: [T_q, H, D]s_a, s_b: [T_q, H], f32

  • ds-v3-chunked-prefillv_a, v_b: [8192, 128, 128]s_a, s_b: [8192, 128], f32dtype=bf16
  • llama-70b-cascadev_a, v_b: [4096, 64, 128]s_a, s_b: [4096, 64], f32dtype=bf16
  • qwen3-235b-dcpv_a, v_b: [256, 64, 128]s_a, s_b: [256, 64], f32dtype=bf16
  • qwen3-235b-dcp-raggedv_a, v_b: [1007, 64, 128]s_a, s_b: [1007, 64], f32dtype=f16
  • ds-v3-chunked-log2v_a, v_b: [8192, 128, 128]s_a, s_b: [8192, 128], f32lse_base=2dtype=bf16
  • llama-70b-cascade-log2v_a, v_b: [4096, 64, 128]s_a, s_b: [4096, 64], f32lse_base=2dtype=bf16
  • qwen3-235b-dcp-log2v_a, v_b: [256, 64, 128]s_a, s_b: [256, 64], f32lse_base=2dtype=bf16
  • qwen3-dcp-ragged-log2v_a, v_b: [1007, 64, 128]s_a, s_b: [1007, 64], f32lse_base=2dtype=f16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v3-chunked-prefillbf161.06×0.1838flashinfer
vllm-native
vllm
0.1950
0.2095
0.2384
2.25··
llama-70b-cascadebf161.14×0.0454flashinfer
vllm-native
vllm
0.0516
0.0531
0.0658
2.27··
qwen3-235b-dcpbf161.20×0.00451vllm-native
flashinfer
vllm
0.00541
0.00873
0.0117
1.43··
qwen3-235b-dcp-raggedf161.15×0.0123vllm-native
flashinfer
vllm
0.0141
0.0172
0.0209
2.06··
ds-v3-chunked-log2bf161.00×0.1839flashinfer-native0.18432.25··
llama-70b-cascade-log2bf161.01×0.0454flashinfer-native0.04592.28··
qwen3-235b-dcp-log2bf161.04×0.00451flashinfer-native0.004671.43··
qwen3-dcp-ragged-log2f161.02×0.0123flashinfer-native0.01252.06··

PagedKVCacheWriteFwd

k, v: [N, H_kv, D]k_cache, v_cache: [NP, PS, H_kv, D]slot_mapping: [N], i64

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

k, v: [N, H_kv, D]k_cache, v_cache: [NP, PS, H_kv, D], fp8e4m3slot_mapping: [N], i64k_scale, v_scale: [1], f32

  • qwen3-235b-fp8k, v: [4096, 4, 128]k_cache, v_cache: [4096, 16, 4, 128], fp8e4m3slot_mapping: [4096], i64k_scale, v_scale: [1], f32dtype=bf16/fp8e4m3
  • qwen3-235b-fp8-fp16k, v: [1024, 4, 128]k_cache, v_cache: [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.96×0.00151flashinfer
vllm
torch-ref
0.00294
0.00326
0.0202
···
llama-8b-prefillbf16/bf161.12×0.0163flashinfer
vllm
torch-ref
0.0182
0.0555
0.1275
···
gpt-oss-120bbf16/bf161.87×0.00166flashinfer
vllm
torch-ref
0.0031
0.00374
0.0216
···
odd-tokens-and-pagef16/f161.85×0.00131flashinfer
vllm
torch-ref
0.00243
0.00278
0.0190
···
qwen3-235b-fp8bf16/fp8e4m37.84×0.00582vllm
torch-ref
0.0457
0.0900
1.44··
qwen3-235b-fp8-fp16f16/fp8e4m34.38×0.00294vllm
torch-ref
0.0129
0.0472
0.712··

PagedKVCacheGatherFwd

kv_cache: [NP, PS, *E]block_table: [B, W], i32cu_seqlens: [B + 1], i32kv_scale: [1], f32out: [T_q, *E], bf16

  • ds-v3-chunk-fp8kv_cache: [2048, 64, 576]block_table: [8, 256], i32cu_seqlens: [9], i32kv_scale: [1], f32out: [131072, 576], bf16seq_lens=repeat(16384, 8)dtype=fp8e4m3/bf16

kv_cache: [NP, PS, *E]block_table: [B, W], i32cu_seqlens: [B + 1], i32out: [T_q, *E]

  • ds-v3-mixedkv_cache: [6144, 64, 576]block_table: [6, 1024], i32cu_seqlens: [7], i32out: [129024, 576]seq_lens=[2048,4096,8192,16384…]dtype=bf16
  • mla-smallkv_cache: [8, 64, 576]block_table: [2, 4], i32cu_seqlens: [3], i32out: [31, 576]seq_lens=[17,14]dtype=f16
  • mla-b256kv_cache: [2048, 64, 576]block_table: [256, 8], i32cu_seqlens: [257], i32out: [131072, 576]seq_lens=repeat(512, 256)dtype=bf16

kv_cache: [NP, PS, *E]block_table: [B, W], i32cu_seqlens: [B + 1], i32seq_starts: [B], i32out: [T_q, *E]

dtype=bf16

  • llama-70b-cpkv_cache: [4096, 16, 8, 128]block_table: [8, 512], i32cu_seqlens: [9], i32seq_starts: [8], i32out: [32768, 8, 128]seq_lens=repeat(4096, 8)starts=repeat(2048, 8)
  • llama-cp-unalignedkv_cache: [128, 16, 8, 128]block_table: [2, 64], i32cu_seqlens: [3], i32seq_starts: [2], i32out: [1024, 8, 128]seq_lens=[17,1007]starts=[15,1]

kv_cache: [NP, PS, *E]block_table: [B, W], i32cu_seqlens: [B + 1], i32seq_starts: [B], i32kv_scale: [1], f32out: [T_q, *E], f16

  • mla-chunk-fp8-fp16kv_cache: [256, 64, 576]block_table: [2, 128], i32cu_seqlens: [3], i32seq_starts: [2], i32kv_scale: [1], f32out: [8192, 576], f16seq_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.07×0.0585vllm
torch-ref
0.0629
0.8348
1.29··
ds-v3-mixedbf161.03×0.0734vllm
vllm-cp-gather
torch-ref
0.0757
0.0778
0.1898
···
mla-smallf161.70×0.00211vllm-cp-gather
vllm
torch-ref
0.00358
0.00451
0.0270
···
mla-b256bf161.16×0.0804vllm-cp-gather
vllm
torch-ref
0.0932
0.1048
3.7467
···
llama-70b-cpbf161.03×0.0338vllm-cp-gather
torch-ref
0.0346
0.1661
···
llama-cp-unalignedbf161.39×0.00352vllm-cp-gather
torch-ref
0.0049
0.0374
···
mla-chunk-fp8-fp16fp8e4m3/f162.20×0.00595vllm
torch-ref
0.0131
0.0818
0.793··

MLAKVCacheWriteFwd

kv_c: [N, DC]k_pe: [N, PE]kv_cache: [NP, PS, DC + PE]slot_mapping: [N], i64

dtype=bf16/bf16

  • ds-v3-decodekv_c: [64, 512]k_pe: [64, 64]kv_cache: [2048, 64, 576]slot_mapping: [64], i64
  • ds-v3-prefillkv_c: [16384, 512]k_pe: [16384, 64]kv_cache: [2048, 64, 576]slot_mapping: [16384], i64
  • glm-5.3-flash-decodekv_c: [64, 512]k_pe: [64, 0]kv_cache: [32768, 64, 512]slot_mapping: [64], i64
  • glm-5.3-flash-prefillkv_c: [4096, 512]k_pe: [4096, 0]kv_cache: [32768, 64, 512]slot_mapping: [4096], i64
  • dsv4-flash-decodekv_c: [64, 448]k_pe: [64, 64]kv_cache: [8320, 64, 512]slot_mapping: [64], i64
  • dsv4-flash-prefillkv_c: [4096, 448]k_pe: [4096, 64]kv_cache: [8320, 64, 512]slot_mapping: [4096], i64

kv_c: [N, DC]k_pe: [N, PE]kv_cache: [NP, PS, DC + PE], fp8e4m3slot_mapping, positions: [N], i64kv_scale: [1], f32cos_sin_cache: [P, PE], f32

  • ds-v3-fp8-ropekv_c: [4096, 512]k_pe: [4096, 64]kv_cache: [2048, 64, 576], fp8e4m3slot_mapping, positions: [4096], i64kv_scale: [1], f32cos_sin_cache: [163840, 64], f32seq_lens=repeat(1024, 4)fuse_rope=truerope_layout=interleaveddtype=bf16/fp8e4m3/f32

kv_c: [N, DC]k_pe: [N, PE]kv_cache: [NP, PS, DC + PE]slot_mapping, positions: [N], i64cos_sin_cache: [P, PE]

  • kimi-k2-ropekv_c: [128, 512]k_pe: [128, 64]kv_cache: [2048, 64, 576]slot_mapping, positions: [128], i64cos_sin_cache: [131072, 64]seq_lens=[128]fuse_rope=truerope_layout=interleaveddtype=bf16/bf16/bf16

kv_c: [N, DC]k_pe: [N, PE]kv_cache: [NP, PS, DC + PE], fp8e4m3slot_mapping, positions: [N], i64kv_scale: [1], f32cos_sin_cache: [P, PE]

  • odd-tokens-neox-fp8kv_c: [7, 512]k_pe: [7, 64]kv_cache: [5, 7, 576], fp8e4m3slot_mapping, positions: [7], i64kv_scale: [1], f32cos_sin_cache: [64, 64]seq_lens=[3,4]fuse_rope=truedtype=f16/fp8e4m3/f16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v3-decodebf16/bf161.75×0.00154vllm
flashinfer
torch-ref
0.00269
0.00419
0.0174
···
ds-v3-prefillbf16/bf161.32×0.0100flashinfer
vllm
torch-ref
0.0133
0.0610
0.1007
···
glm-5.3-flash-decodebf16/bf161.45×0.0015vllm
torch-ref
0.00218
0.0156
···
glm-5.3-flash-prefillbf16/bf164.15×0.00333vllm
torch-ref
0.0138
0.0330
···
dsv4-flash-decodebf16/bf161.57×0.0017vllm
torch-ref
0.00266
0.0174
···
dsv4-flash-prefillbf16/bf165.02×0.00333vllm
torch-ref
0.0167
0.0368
···
ds-v3-fp8-ropebf16/fp8e4m3/f323.70×0.00512vllm
torch-ref
0.0189
0.0937
1.07··
kimi-k2-ropebf16/bf16/bf161.30×0.00253vllm
torch-ref
0.0033
0.0390
0.00972··
odd-tokens-neox-fp8f16/fp8e4m3/f161.06×0.00278vllm
torch-ref
0.00294
0.0425
0.00338··

TopKSelectFwd

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

dtype=i32

  • prefill-k1024logits: [1, 32768, 65536, 1], f32starts, ends: [1, 32768]top_k=1024
  • prefill-k2048logits: [1, 32768, 65536, 1], f32starts, ends: [1, 32768]top_k=2048
  • ds-v32-topk-decode-b1logits: [1, 1, 16384, 1], f32starts, ends: [1, 1]top_k=2048
  • dsv4-flash-prefill-4klogits: [1, 4096, 1024, 1], f32starts, ends: [1, 4096]top_k=512fill_value=-1
  • dsv4-flash-prefill-32klogits: [1, 32768, 8192, 1], f32starts, ends: [1, 32768]top_k=512fill_value=-1
  • dsv4-flash-decode-b64logits: [64, 1, 8192, 1], f32starts, ends: [64, 1]top_k=512fill_value=-1
  • dsv4-flash-short-ctxlogits: [1, 1, 25, 1], f32starts, ends: [1, 1]top_k=512fill_value=-1
  • glm-5.3-flash-mtp-b64logits: [64, 2, 8192, 1], f32starts, ends: [64, 2]top_k=512
  • qwen3.8-flash-prefilllogits: [1, 4096, 1024, 1], f32starts, ends: [1, 4096]top_k=512
  • qwen3.8-flash-256k-b64logits: [64, 1, 65536, 1], f32starts, ends: [64, 1]top_k=512
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
prefill-k1024i321.34×5.6138vllm
flashinfer
torch-compile
torch
7.5058
8.9024
36.3951
64.3771
0.383··
prefill-k2048i321.31×6.1366vllm
flashinfer
torch-compile
torch
8.0602
9.6995
37.9807
66.4566
0.35··
ds-v32-topk-decode-b1i321.14×0.00819vllm
flashinfer
torch-compile
torch
0.00933
0.0168
0.1227
0.1472
0.002··
dsv4-flash-prefill-4ki321.70×0.0347vllm
flashinfer
torch-compile
torch
0.0590
0.1572
0.3021
0.3812
0.121··
dsv4-flash-prefill-32ki322.49×1.0156vllm
flashinfer
torch-compile
torch
2.5247
2.7197
5.5639
9.1600
0.264··
dsv4-flash-decode-b64i321.24×0.00525vllm
flashinfer
torch-compile
torch
0.0065
0.0130
0.0805
0.1045
0.0999··
dsv4-flash-short-ctxi321.87×0.00122flashinfer
vllm
torch-compile
torch
0.00227
0.00237
0.0134
0.0276
2.06e-05··
glm-5.3-flash-mtp-b64i321.25×0.00566vllm
flashinfer
torch-compile
torch
0.00707
0.0133
0.0944
0.1239
0.185··
qwen3.8-flash-prefilli321.70×0.0347vllm
flashinfer
torch-compile
torch
0.0590
0.1573
0.3029
0.3811
0.121··
qwen3.8-flash-256k-b64i321.09×0.0304vllm
flashinfer
torch-compile
torch
0.0331
0.0335
0.1450
0.2172
0.138··

FP8LightningIndexQueryFwd

q: [S, H, D]weights: [S, H]cos, sin: [P, Rh], f32seqlen_offsets: [1], i32

  • dsv4-flash-decodeq: [1, 64, 128]weights: [1, 64]cos, sin: [32768, 32], f32seqlen_offsets: [1], i32dtype=bf16

q: [S, H, D]weights: [S, H]cos, sin: [P, Rh], f32

dtype=bf16

  • dsv4-flash-prefill-3000q: [3000, 64, 128]weights: [3000, 64]cos, sin: [32768, 32], f32
  • dsv4-flash-prefill-32kq: [32768, 64, 128]weights: [32768, 64]cos, sin: [32768, 32], f32

q: [S, H, D], bf16weights: [S, H]cos, sin: [P, Rh], f32

  • dsv4-flash-prefill-4kq: [4096, 64, 128], bf16weights: [4096, 64]cos, sin: [32768, 32], f32dtype=bf16, f32
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
dsv4-flash-decodebf163.10×0.00298torch-compile
torch-ref
0.00922
0.1942
0.0514··
dsv4-flash-prefill-3000bf1619.12×0.0512torch-compile
torch-ref
0.9782
5.2644
8.97··
dsv4-flash-prefill-32kbf1622.36×0.4698torch-compile
torch-ref
10.5071
55.2314
10.7··
dsv4-flash-prefill-4kbf1620.80×0.0644torch-compile
torch-ref
1.3403
7.0997
9.73··
f3221.78×0.0615torch-compile
torch-ref
1.3389
7.0969
10.2··