跳转至

GEMM

本页暂无中文版。以下为英文原文。

6 ops, 108 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.

GemmFwd

a: [M, K]b: [K, N]

  • square-1ka, b: [1024, 1024]trans_b=falsedtype=f16, bf16

a: [M, K]b: [N, K]

  • ds-v3-decode-qkv-aa: [128, 7168]b: [2112, 7168]dtype=bf16
  • ds-v3-decode-downa: [128, 2048]b: [7168, 2048]dtype=bf16
  • ds-v3-prefill-qkv-aa: [4096, 7168]b: [2112, 7168]dtype=bf16
  • ds-v3-prefill-downa: [4096, 2048]b: [7168, 2048]dtype=bf16
  • ds-v3-prefill-mlp-upa, b: [4096, 7168]dtype=f16, bf16
  • ds-v3-prefill-o-proja: [4096, 16384]b: [7168, 16384]dtype=bf16
  • ds-v3-prefill-q-ba: [4096, 1536]b: [24576, 1536]dtype=bf16
  • ds-v3-m16-mlp-upa: [16, 7168]b: [4096, 7168]dtype=bf16
  • ds-v3-m32-mlp-upa: [32, 7168]b: [4096, 7168]dtype=bf16
  • ds-v3-m64-downa: [64, 2048]b: [7168, 2048]dtype=bf16
  • ds-v3-m96-qkv-aa: [96, 7168]b: [2112, 7168]dtype=bf16
  • ds-v3-m1-qkv-aa: [1, 7168]b: [2112, 7168]dtype=bf16
  • ds-v3-m2-qkv-aa: [2, 7168]b: [2112, 7168]dtype=bf16
  • qwen3-8b-gate-up-decodea: [1, 4096]b: [24576, 4096]dtype=bf16
  • qwen3-8b-gate-up-b32a: [32, 4096]b: [24576, 4096]dtype=bf16
  • qwen3-8b-down-prefilla: [128, 12288]b: [4096, 12288]dtype=bf16
  • vit-l16-in21k-heada: [256, 1024]b: [21843, 1024]dtype=bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
square-1kf161.08×0.00669cublaslt-best
torch-cublas
quack
flaggems
0.00723
0.00723
0.0104
0.0115
32244%lat
bf161.08×0.00662cublaslt-best
torch-cublas
quack
flaggems
0.00717
0.00718
0.0104
0.0115
32543%lat
ds-v3-decode-qkv-abf161.12×0.0156torch-cublas
cublaslt-best
deepgemm
quack
0.0174
0.0174
0.0214
0.0431
24946%mem
ds-v3-decode-downbf160.99×0.0134cublaslt-best
torch-cublas
deepgemm
quack
0.0133
0.0134
0.0138
0.0172
28152%mem
ds-v3-prefill-qkv-abf160.97×0.1831torch-cublas
cublaslt-best
deepgemm
quack
0.1767
0.1768
0.1796
0.1934
67889%comp
ds-v3-prefill-downbf160.98×0.1735cublaslt-best
deepgemm
torch-cublas
quack
0.1696
0.1784
0.1798
0.1827
69491%comp
ds-v3-prefill-mlp-upf160.99×0.3378cublaslt-best
torch-cublas
quack
0.3337
0.3342
0.3384
71298%comp
bf160.99×0.3330cublaslt-best
deepgemm
torch-cublas
quack
0.3287
0.3298
0.3313
0.3338
72395%comp
ds-v3-prefill-o-projbf160.99×1.2701deepgemm
torch-cublas
quack
cublaslt-best
1.2540
1.2540
1.2569
1.2690
758100%comp
ds-v3-prefill-q-bbf160.98×0.4122cublaslt-best
deepgemm
quack
torch-cublas
0.4058
0.4398
0.4458
0.4492
75199%comp
ds-v3-m16-mlp-upbf161.15×0.0208cublaslt-best
torch-cublas
deepgemm
quack
0.0239
0.0243
0.0344
0.0434
46.663%mem
ds-v3-m32-mlp-upbf161.15×0.0210torch-cublas
cublaslt-best
deepgemm
quack
0.0242
0.0242
0.0304
0.0435
90.863%mem
ds-v3-m64-downbf161.08×0.0120cublaslt-best
torch-cublas
deepgemm
quack
0.0129
0.0134
0.0135
0.0169
15857%mem
ds-v3-m96-qkv-abf161.08×0.0156cublaslt-best
torch-cublas
deepgemm
quack
0.0169
0.0171
0.0219
0.0429
18746%mem
ds-v3-m1-qkv-abf161.26×0.0118cublaslt-best
torch-cublas
deepgemm
quack
0.0148
0.0158
0.0317
0.0427
3.8657%mem
ds-v3-m2-qkv-abf161.09×0.0137cublaslt-best
torch-cublas
deepgemm
quack
0.0149
0.0158
0.0312
0.0427
5.5349%mem
qwen3-8b-gate-up-decodebf161.05×0.0541cublaslt-best
torch-cublas
deepgemm
quack
0.0567
0.0568
0.0585
0.0722
5.5883%mem
qwen3-8b-gate-up-b32bf161.01×0.0565cublaslt-best
torch-cublas
deepgemm
quack
0.0571
0.0571
0.0586
0.0638
11680%mem
qwen3-8b-down-prefillbf161.04×0.0358cublaslt-best
torch-cublas
deepgemm
quack
0.0373
0.0392
0.0402
0.0718
36265%mem
vit-l16-in21k-headbf168.00×0.0268cublaslt-best
torch-cublas
0.2147
0.2226
42856%comp

GemmFP8Fwd

a: [M, K]b: [N, K]scale_a: [*SA], f32scale_b: [*SB], f32

  • ds-v3-decode-qkv-aa: [128, 7168]b: [2112, 7168]scale_a, scale_b: [1, 1], f32dtype=fp8e4m3/bf16, fp8e4m3/f16
  • ds-v3-decode-downa: [128, 2048]b: [7168, 2048]scale_a, scale_b: [1, 1], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-qkv-aa: [4096, 7168]b: [2112, 7168]scale_a, scale_b: [1, 1], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-downa: [4096, 2048]b: [7168, 2048]scale_a, scale_b: [1, 1], f32dtype=fp8e4m3/bf16
  • ds-v3-decode-qkv-a-blka: [128, 7168]b: [2112, 7168]scale_a: [128, 56], f32scale_b: [2112, 56], f32dtype=fp8e4m3/bf16, fp8e4m3/f16
  • ds-v3-decode-down-blka: [128, 2048]b: [7168, 2048]scale_a: [128, 16], f32scale_b: [7168, 16], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-qkv-a-blka: [4096, 7168]b: [2112, 7168]scale_a: [4096, 56], f32scale_b: [2112, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-down-blka: [4096, 2048]b: [7168, 2048]scale_a: [4096, 16], f32scale_b: [7168, 16], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-mlp-upa, b: [4096, 7168]scale_a, scale_b: [4096, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-o-proja: [4096, 16384]b: [7168, 16384]scale_a: [4096, 128], f32scale_b: [7168, 128], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-q-ba: [4096, 1536]b: [24576, 1536]scale_a: [4096, 12], f32scale_b: [24576, 12], f32dtype=fp8e4m3/bf16
  • ds-v3-m8-downa: [8, 2048]b: [7168, 2048]scale_a, scale_b: [1, 1], f32dtype=fp8e4m3/bf16
  • ds-v3-m1-downa: [1, 2048]b: [7168, 2048]scale_a, scale_b: [1, 1], f32dtype=fp8e4m3/bf16
  • ds-v3-m1-down-blka: [1, 2048]b: [7168, 2048]scale_a: [1, 16], f32scale_b: [7168, 16], f32dtype=fp8e4m3/bf16
  • ds-v3-decode-qkv-a-2da: [128, 7168]b: [2112, 7168]scale_a: [128, 56], f32scale_b: [17, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-decode-down-2da: [128, 2048]b: [7168, 2048]scale_a: [128, 16], f32scale_b: [56, 16], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-qkv-a-2da: [4096, 7168]b: [2112, 7168]scale_a: [4096, 56], f32scale_b: [17, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-down-2da: [4096, 2048]b: [7168, 2048]scale_a: [4096, 16], f32scale_b: [56, 16], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-mlp-up-2da, b: [4096, 7168]scale_a: [4096, 56], f32scale_b: [32, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-o-proj-2da: [4096, 16384]b: [7168, 16384]scale_a: [4096, 128], f32scale_b: [56, 128], f32dtype=fp8e4m3/bf16
  • ds-v3-prefill-q-b-2da: [4096, 1536]b: [24576, 1536]scale_a: [4096, 12], f32scale_b: [192, 12], f32dtype=fp8e4m3/bf16
  • ds-v3-m1-down-2da: [1, 2048]b: [7168, 2048]scale_a: [1, 16], f32scale_b: [56, 16], f32dtype=fp8e4m3/bf16
  • ds-v3-kv-a-m128-s1a: [128, 7168]b: [576, 7168]scale_a: [128, 56], f32scale_b: [576, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-kv-a-m128-s128a: [128, 7168]b: [576, 7168]scale_a: [128, 56], f32scale_b: [5, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-q-b-m128-s1a: [128, 1536]b: [24576, 1536]scale_a: [128, 12], f32scale_b: [24576, 12], f32dtype=fp8e4m3/bf16
  • ds-v3-q-b-m128-s128a: [128, 1536]b: [24576, 1536]scale_a: [128, 12], f32scale_b: [192, 12], f32dtype=fp8e4m3/bf16
  • ds-v3-kv-b-m128-s1a: [128, 512]b: [32768, 512]scale_a: [128, 4], f32scale_b: [32768, 4], f32dtype=fp8e4m3/bf16
  • ds-v3-kv-b-m128-s128a: [128, 512]b: [32768, 512]scale_a: [128, 4], f32scale_b: [256, 4], f32dtype=fp8e4m3/bf16
  • ds-v3-o-proj-m128-s1a: [128, 16384]b: [7168, 16384]scale_a: [128, 128], f32scale_b: [7168, 128], f32dtype=fp8e4m3/bf16
  • ds-v3-o-proj-m128-s128a: [128, 16384]b: [7168, 16384]scale_a: [128, 128], f32scale_b: [56, 128], f32dtype=fp8e4m3/bf16
  • ds-v3-mlp-up-m128-s1a: [128, 7168]b: [4096, 7168]scale_a: [128, 56], f32scale_b: [4096, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-mlp-up-m128-s128a: [128, 7168]b: [4096, 7168]scale_a: [128, 56], f32scale_b: [32, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-kv-a-m4096-s1a: [4096, 7168]b: [576, 7168]scale_a: [4096, 56], f32scale_b: [576, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-kv-a-m4096-s128a: [4096, 7168]b: [576, 7168]scale_a: [4096, 56], f32scale_b: [5, 56], f32dtype=fp8e4m3/bf16
  • ds-v3-kv-b-m4096-s1a: [4096, 512]b: [32768, 512]scale_a: [4096, 4], f32scale_b: [32768, 4], f32dtype=fp8e4m3/bf16
  • ds-v3-kv-b-m4096-s128a: [4096, 512]b: [32768, 512]scale_a: [4096, 4], f32scale_b: [256, 4], f32dtype=fp8e4m3/bf16

a: [M, K]b: [N, K]scale_a: [*SA], f32scale_b: [*SB], f32bias: [N], bf16

  • ds-v3-decode-qkv-a-biasa: [128, 7168]b: [2112, 7168]scale_a, scale_b: [1, 1], f32bias: [2112], bf16dtype=fp8e4m3/bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
ds-v3-decode-qkv-afp8e4m3/bf161.02×0.0116torch-scaled-mm
deepgemm
torch-fp32-ref
0.0118
0.0177
0.2454
33732%mem
fp8e4m3/f161.01×0.0115torch-scaled-mm
deepgemm
torch-fp32-ref
0.0116
0.0268
0.2453
33832%mem
ds-v3-decode-downfp8e4m3/bf161.10×0.00819torch-scaled-mm
deepgemm
torch-fp32-ref
0.00902
0.0145
0.2471
46145%mem
ds-v3-prefill-qkv-afp8e4m3/bf161.00×0.1083torch-scaled-mm
deepgemm
torch-fp32-ref
0.1084
0.1142
3.4374
1,14583%comp
ds-v3-prefill-downfp8e4m3/bf161.04×0.1056torch-scaled-mm
deepgemm
torch-fp32-ref
0.1094
0.1110
3.3412
1,14083%comp
ds-v3-decode-qkv-a-blkfp8e4m3/bf161.40×0.0173deepgemm
torch-fp32-ref
0.0242
0.2818
22522%mem
fp8e4m3/f161.39×0.0173deepgemm
torch-fp32-ref
0.0241
0.2815
22522%mem
ds-v3-decode-down-blkfp8e4m3/bf161.62×0.0118deepgemm
torch-fp32-ref
0.0192
0.2811
31932%mem
ds-v3-prefill-qkv-a-blkfp8e4m3/bf161.12×0.1663deepgemm
torch-fp32-ref
0.1858
3.5357
74654%comp
ds-v3-prefill-down-blkfp8e4m3/bf161.45×0.1760deepgemm
torch-fp32-ref
0.2547
3.3930
68450%comp
ds-v3-prefill-mlp-upfp8e4m3/bf161.03×0.3205deepgemm
torch-fp32-ref
0.3308
6.6838
75154%comp
ds-v3-prefill-o-projfp8e4m3/bf161.01×1.0794deepgemm
torch-fp32-ref
1.0877
26.3639
89165%comp
ds-v3-prefill-q-bfp8e4m3/bf161.72×0.4245deepgemm
torch-fp32-ref
0.7312
8.5299
72953%comp
ds-v3-m8-downfp8e4m3/bf160.94×0.00803torch-scaled-mm
deepgemm
torch-fp32-ref
0.00758
0.0118
0.1691
31.141%mem
ds-v3-m1-downfp8e4m3/bf160.95×0.00806torch-scaled-mm
deepgemm
torch-fp32-ref
0.00768
0.0121
0.1318
5.4640%mem
ds-v3-m1-down-blkfp8e4m3/bf161.80×0.00995deepgemm
torch-fp32-ref
0.0180
0.1658
4.4334%mem
ds-v3-decode-qkv-a-2dfp8e4m3/bf161.10×0.0138deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.0152
0.0155
0.2843
28227%mem
ds-v3-decode-down-2dfp8e4m3/bf161.13×0.0102flashinfer-fp8-blockscale-sm90
deepgemm
torch-fp32-ref
0.0116
0.0122
0.2823
36936%mem
ds-v3-prefill-qkv-a-2dfp8e4m3/bf160.97×0.1145deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.1114
0.1448
3.5377
1,08378%comp
ds-v3-prefill-down-2dfp8e4m3/bf161.00×0.1083deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.1087
0.1469
3.3944
1,11180%comp
ds-v3-prefill-mlp-up-2dfp8e4m3/bf160.99×0.1948deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.1927
0.2204
6.6768
1,23589%comp
ds-v3-prefill-o-proj-2dfp8e4m3/bf160.98×0.7046deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.6895
0.7676
26.3643
1,36699%comp
ds-v3-prefill-q-b-2dfp8e4m3/bf161.00×0.2650deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.2658
0.3850
8.5248
1,16885%comp
ds-v3-m1-down-2dfp8e4m3/bf161.02×0.00922flashinfer-fp8-blockscale-sm90
deepgemm
torch-fp32-ref
0.00944
0.0119
0.1665
4.7835%mem
ds-v3-kv-a-m128-s1fp8e4m3/bf161.51×0.0151deepgemm
torch-fp32-ref
0.0227
0.1015
70.48%lat
ds-v3-kv-a-m128-s128fp8e4m3/bf161.13×0.0117deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.0132
0.0142
0.1043
90.610%lat
ds-v3-q-b-m128-s1fp8e4m3/bf161.52×0.0236deepgemm
torch-fp32-ref
0.0359
0.6857
41143%mem
ds-v3-q-b-m128-s128fp8e4m3/bf161.06×0.0182deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.0193
0.0202
0.6875
53454%mem
ds-v3-kv-b-m128-s1fp8e4m3/bf162.33×0.0124deepgemm
torch-fp32-ref
0.0288
0.2955
34946%mem
ds-v3-kv-b-m128-s128fp8e4m3/bf160.99×0.0121deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.0121
0.0149
0.2960
35646%mem
ds-v3-o-proj-m128-s1fp8e4m3/bf161.06×0.0581deepgemm
torch-fp32-ref
0.0616
1.8502
51948%mem
ds-v3-o-proj-m128-s128fp8e4m3/bf160.96×0.0494flashinfer-fp8-blockscale-sm90
deepgemm
torch-fp32-ref
0.0472
0.0549
1.8540
61155%mem
ds-v3-mlp-up-m128-s1fp8e4m3/bf161.16×0.0259deepgemm
torch-fp32-ref
0.0301
0.4906
29228%mem
ds-v3-mlp-up-m128-s128fp8e4m3/bf161.06×0.0164deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.0175
0.0190
0.4923
46042%mem
ds-v3-kv-a-m4096-s1fp8e4m3/bf161.08×0.0543deepgemm
torch-fp32-ref
0.0584
1.2337
62345%comp
ds-v3-kv-a-m4096-s128fp8e4m3/bf161.18×0.0369deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.0435
0.0472
1.2356
91866%comp
ds-v3-kv-b-m4096-s1fp8e4m3/bf163.19×0.2453deepgemm
torch-fp32-ref
0.7832
4.0980
56141%comp
ds-v3-kv-b-m4096-s128fp8e4m3/bf160.96×0.1583deepgemm
flashinfer-fp8-blockscale-sm90
torch-fp32-ref
0.1517
0.2879
4.0996
87063%comp
ds-v3-decode-qkv-a-biasfp8e4m3/bf161.02×0.0119torch-scaled-mm
deepgemm
torch-fp32-ref
0.0122
0.0331
0.2515
32631%mem

GemmW4A16Fwd

activation: [M, K]packed_weight: [N, K // 2], u8weight_scale: [N, K // group_size]weight_zero: [N, K // group_size], u8

dtype=f16

  • single-tileactivation: [64, 128]packed_weight: [64, 64], u8weight_scale: [64, 1]weight_zero: [64, 1], u8
  • multi-tileactivation: [128, 256]packed_weight: [256, 128], u8weight_scale: [256, 2]weight_zero: [256, 2], u8
  • decode-l2-residentactivation: [1, 8192]packed_weight: [8192, 4096], u8weight_scale: [8192, 64]weight_zero: [8192, 64], u8
  • decode-hbm-streamingactivation: [1, 16384]packed_weight: [8192, 8192], u8weight_scale: [8192, 128]weight_zero: [8192, 128], u8
  • decode-non-pow2activation: [1, 20480]packed_weight: [7168, 10240], u8weight_scale: [7168, 160]weight_zero: [7168, 160], u8
  • decode-long-kactivation: [1, 81920]packed_weight: [8192, 40960], u8weight_scale: [8192, 640]weight_zero: [8192, 640], u8
  • decode-b2activation: [2, 8192]packed_weight: [8192, 4096], u8weight_scale: [8192, 64]weight_zero: [8192, 64], u8
  • decode-b8activation: [8, 8192]packed_weight: [8192, 4096], u8weight_scale: [8192, 64]weight_zero: [8192, 64], u8
  • decode-b32activation: [32, 8192]packed_weight: [8192, 4096], u8weight_scale: [8192, 64]weight_zero: [8192, 64], u8
  • chunked-prefill-tileactivation: [128, 8192]packed_weight: [8192, 4096], u8weight_scale: [8192, 64]weight_zero: [8192, 64], u8
  • prefill-mlp-upactivation: [512, 8192]packed_weight: [8192, 4096], u8weight_scale: [8192, 64]weight_zero: [8192, 64], u8
  • llama-8b-decode-downactivation: [1, 14336]packed_weight: [4096, 7168], u8weight_scale: [4096, 112]weight_zero: [4096, 112], u8
  • llama-8b-prefill-downactivation: [128, 14336]packed_weight: [4096, 7168], u8weight_scale: [4096, 112]weight_zero: [4096, 112], u8
  • qwen3-32b-prefill-downactivation: [128, 25600]packed_weight: [5120, 12800], u8weight_scale: [5120, 200]weight_zero: [5120, 200], u8
  • decode-tp8-attn-outactivation: [1, 8192]packed_weight: [1024, 4096], u8weight_scale: [1024, 64]weight_zero: [1024, 64], u8
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
single-tilef161.06×0.0025torch-dequantized-matmul
marlin-fp32
marlin-fp16
0.00266
0.00662
0.00662
0.4270%lat
multi-tilef161.07×0.00288torch-dequantized-matmul
marlin-fp32
marlin-fp16
0.00307
0.0095
0.00954
5.871%lat
decode-l2-residentf161.16×0.0186marlin-fp32
marlin-fp16
torch-dequantized-matmul
0.0215
0.0218
0.0461
14.442%mem
decode-hbm-streamingf161.06×0.0358marlin-fp32
marlin-fp16
torch-dequantized-matmul
0.0379
0.0382
0.0734
1544%mem
decode-non-pow2f161.09×0.0373marlin-fp16
marlin-fp32
torch-dequantized-matmul
0.0408
0.0408
0.0848
15.846%mem
decode-long-kf161.02×0.1383marlin-fp16
marlin-fp32
torch-dequantized-matmul
0.1414
0.1415
0.3122
19.456%mem
decode-b2f161.15×0.0186marlin-fp32
marlin-fp16
torch-dequantized-matmul
0.0215
0.0219
0.0461
21.742%mem
decode-b8f161.16×0.0187marlin-fp32
marlin-fp16
torch-dequantized-matmul
0.0216
0.0220
0.0457
64.542%mem
decode-b32f161.49×0.0224marlin-fp32
marlin-fp16
torch-dequantized-matmul
0.0333
0.0336
0.0412
19836%mem
chunked-prefill-tilef161.01×0.0422torch-dequantized-matmul
marlin-fp16
marlin-fp32
0.0428
0.0649
0.0654
41056%comp
prefill-mlp-upf161.00×0.1043torch-dequantized-matmul
marlin-fp16
marlin-fp32
0.1041
0.2306
0.2312
66090%comp
llama-8b-decode-downf161.51×0.0169marlin-fp32
marlin-fp16
torch-dequantized-matmul
0.0255
0.0256
0.0389
13.940%mem
llama-8b-prefill-downf161.09×0.0396torch-dequantized-matmul
marlin-fp16
marlin-fp32
0.0434
0.0790
0.0798
38252%comp
qwen3-32b-prefill-downf160.93×0.0887torch-dequantized-matmul
marlin-fp16
marlin-fp32
0.0822
0.1247
0.1271
38152%comp
decode-tp8-attn-outf161.45×0.00726torch-dequantized-matmul
marlin-fp32
marlin-fp16
0.0105
0.0157
0.0161
4.6213%lat

BmmFwd

a: [B, M, K]b: [B, K, N]

  • square-128a, b: [8, 128, 128]dtype=f16, bf16
  • square-1ka, b: [8, 1024, 1024]dtype=f16, bf16
  • square-512a, b: [16, 512, 512]dtype=f16, bf16
  • square-256a, b: [32, 256, 256]dtype=f16, bf16
  • square-4ka, b: [4, 4096, 4096]dtype=bf16
  • square-2ka, b: [8, 2048, 2048]dtype=f16, bf16
  • mha-decode-qka: [64, 128, 128]b: [64, 128, 2048]dtype=f16, bf16
  • mha-decode-pva: [64, 128, 2048]b: [64, 2048, 128]dtype=f16, bf16
  • moe-prefilla: [128, 512, 2048]b: [128, 2048, 512]dtype=bf16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
square-128f161.18×0.00269flaggems
torch-cublas
quack
0.00317
0.00326
0.00454
12.56%lat
bf161.17×0.00272flaggems
torch-cublas
quack
0.00318
0.00323
0.00455
12.36%lat
square-1kf161.00×0.0309torch-cublas
quack
flaggems
0.0308
0.0314
0.0456
55676%comp
bf160.96×0.0308quack
torch-cublas
flaggems
0.0296
0.0310
0.0453
55873%comp
square-512f161.01×0.0119torch-cublas
quack
flaggems
0.0120
0.0129
0.0151
36149%comp
bf161.01×0.0118torch-cublas
quack
flaggems
0.0120
0.0129
0.0151
36448%comp
square-256f161.10×0.0064torch-cublas
quack
flaggems
0.00704
0.00739
0.0079
16844%lat
bf161.10×0.00637torch-cublas
quack
flaggems
0.00701
0.00739
0.0079
16944%lat
square-4kbf161.00×0.7442quack
torch-cublas
flaggems
0.7456
0.7599
0.9631
73997%comp
square-2kf161.00×0.2074torch-cublas
quack
flaggems
0.2067
0.2122
0.2766
66391%comp
bf161.00×0.2046torch-cublas
quack
flaggems
0.2041
0.2079
0.2718
67288%comp
mha-decode-qkf161.07×0.0197torch-cublas
quack
flaggems
0.0212
0.0218
0.0267
21878%mem
bf161.08×0.0196torch-cublas
quack
flaggems
0.0211
0.0219
0.0265
21978%mem
mha-decode-pvf161.02×0.0236torch-cublas
quack
flaggems
0.0241
0.0277
0.0404
18265%mem
bf161.02×0.0236torch-cublas
quack
flaggems
0.0241
0.0278
0.0406
18265%mem
moe-prefillbf161.01×0.2095torch-cublas
quack
flaggems
0.2118
0.2186
0.2958
65686%comp

BmmFP8Fwd

a: [B, M, K]b: [B, K, N]scale_a, scale_b: [], f32

  • square-1ka, b: [4, 1024, 1024]scale_a, scale_b: [], f32dtype=fp8e4m3/bf16, fp8e4m3/f16
  • square-2ka, b: [8, 2048, 2048]scale_a, scale_b: [], f32dtype=fp8e4m3/bf16
  • mha-decode-pva: [32, 128, 2048]b: [32, 2048, 128]scale_a, scale_b: [], f32dtype=fp8e4m3/bf16
  • mha-decode-qka: [64, 128, 128]b: [64, 128, 2048]scale_a, scale_b: [], f32dtype=fp8e4m3/bf16
  • moe-prefilla: [128, 512, 2048]b: [128, 2048, 512]scale_a, scale_b: [], f32dtype=fp8e4m3/bf16

a: [B, M, K]b: [B, N, K]scale_a, scale_b: [], f32

trans_b=truedtype=fp8e4m3/bf16

  • square-1k-nka, b: [4, 1024, 1024]scale_a, scale_b: [], f32
  • square-2k-nka, b: [8, 2048, 2048]scale_a, scale_b: [], f32
  • mha-decode-pv-nka, b: [32, 128, 2048]scale_a, scale_b: [], f32
  • mha-decode-qk-nka: [64, 128, 128]b: [64, 2048, 128]scale_a, scale_b: [], f32
  • moe-prefill-nka, b: [128, 512, 2048]scale_a, scale_b: [], f32
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
square-1kfp8e4m3/bf162.22×0.0160flashinfer-bmm-fp8
torch-fp32-ref
0.0355
0.2939
53839%comp
fp8e4m3/f162.22×0.0160flashinfer-bmm-fp8
torch-fp32-ref
0.0355
0.2937
53839%comp
square-2kfp8e4m3/bf164.43×0.1406flashinfer-bmm-fp8
torch-fp32-ref
0.6234
4.0674
97771%comp
mha-decode-pvfp8e4m3/bf161.35×0.0185flashinfer-bmm-fp8
torch-fp32-ref
0.0250
0.2400
11621%mem
mha-decode-qkfp8e4m3/bf162.04×0.0247flashinfer-bmm-fp8
torch-fp32-ref
0.0503
0.2897
17446%mem
moe-prefillfp8e4m3/bf163.13×0.1994flashinfer-bmm-fp8
torch-fp32-ref
0.6242
5.4322
68950%comp
square-1k-nkfp8e4m3/bf161.12×0.0118flashinfer-bmm-fp8
torch-fp32-ref
0.0132
0.2971
72753%comp
square-2k-nkfp8e4m3/bf161.04×0.1200flashinfer-bmm-fp8
torch-fp32-ref
0.1254
4.0965
1,14583%comp
mha-decode-pv-nkfp8e4m3/bf161.07×0.00902flashinfer-bmm-fp8
torch-fp32-ref
0.00966
0.2359
23844%mem
mha-decode-qk-nkfp8e4m3/bf161.34×0.0158flashinfer-bmm-fp8
torch-fp32-ref
0.0212
0.3175
27172%mem
moe-prefill-nkfp8e4m3/bf161.03×0.1314flashinfer-bmm-fp8
torch-fp32-ref
0.1355
5.4610
1,04676%comp

GroupedGemmFwd

a: [M, K]b: [G, N, K]batch_sizes, batch_offsets: [G], i32

  • moe-fwda: [4096, 4096]b: [16, 4096, 4096]batch_sizes, batch_offsets: [16], i32dtype=f16, bf16
  • qwen3-30b-ep8-emptya: [8, 2048]b: [16, 1536, 2048]batch_sizes, batch_offsets: [16], i32dtype=bf16
  • qwen3-30b-ep8-routed1ka: [1024, 2048]b: [16, 1536, 2048]batch_sizes, batch_offsets: [16], i32dtype=bf16
  • qwen3-30b-ep8-raggeda: [257, 2048]b: [16, 1536, 2048]batch_sizes, batch_offsets: [16], i32dtype=bf16

a: [M, K]b: [G, K, N]batch_sizes, batch_offsets: [G], i32

  • moe-dgrada: [4096, 4096]b: [16, 4096, 4096]batch_sizes, batch_offsets: [16], i32transpose_b=falsedtype=f16

a: [M, N]b: [M, K]batch_sizes, batch_offsets: [G], i32

  • moe-wgrada, b: [4096, 4096]batch_sizes, batch_offsets: [16], i32transpose_a=truetranspose_b=falsedtype=f16
Workload dtype Ratio Device time Alternatives Throughput SOL Bound
alt / ours ms name ms TFLOP/s of ceiling by
moe-fwdf161.01×0.2201quack
torch
torch-compile
torch-ref
0.2216
0.2701
0.5394
2.3285
62586%comp
bf161.01×0.2139quack
torch
torch-compile
torch-ref
0.2158
0.2225
0.5381
2.2868
64385%comp
qwen3-30b-ep8-emptybf161.15×0.0249quack
torch
torch-compile
torch-ref
0.0287
0.0319
0.1071
0.4458
2.1590%mem
qwen3-30b-ep8-routed1kbf161.01×0.0380quack
torch
torch-compile
torch-ref
0.0383
0.0462
0.1772
0.5037
17063%mem
qwen3-30b-ep8-raggedbf161.05×0.0360quack
torch
torch-compile
torch-ref
0.0377
0.0481
0.1730
0.4998
4563%mem
moe-dgradf161.01×0.2176quack
torch
torch-compile
torch-ref
0.2201
0.2688
0.2706
0.3057
63287%comp
moe-wgradf161.05×0.2488quack
torch
torch-compile
torch-ref
0.2606
0.3541
0.3555
0.5226
55376%comp