Skip to content

Linear Attention & SSM

22 ops, 158 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.

Linear Attention / SSM

CBProducerFwd (2 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
mamba2-2p7b-b4-s2k-bfloat164.48×0.0118torch0.053122.7
mamba2-780m-b1-s4k-float165.30×0.00714torch0.037818.8

DeltaNetDecodeFwd (8 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
delta-decode-serving-b1-h16-d128-bfloat164.57×0.0031torch-compile
torch
0.0142
0.0353
0.508
delta-decode-serving-b1-h32-d128-bfloat164.81×0.00336torch-compile
torch
0.0162
0.0391
0.938
delta-decode-serving-b1-h48-d128-bfloat165.42×0.00355torch-compile
torch
0.0192
0.0434
1.33
delta-decode-serving-b1-h64-d128-bfloat164.51×0.00384torch-compile
torch
0.0173
0.0438
1.64
delta-decode-serving-b1-h8-d128-bfloat164.60×0.00285torch-compile
torch
0.0131
0.0335
0.277
delta-decode-serving-b8-h32-d128-bfloat164.38×0.0087torch-compile
torch
0.0381
0.0896
2.9
delta-decode-serving-b8-h48-d128-bfloat163.22×0.0123torch-compile
torch
0.0396
0.1111
3.07
delta-decode-serving-b8-h64-d128-bfloat163.15×0.0163torch-compile
torch
0.0515
0.1420
3.09

EngramGateConvBwd (3 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
bwd-b1-s128-d256-bfloat163.24×0.0168torch-compile
torch
0.0544
0.1838
0.118
bwd-b1-s32-d256-float164.48×0.0111torch-compile
torch
0.0498
0.1677
0.0444
bwd-b2-s64-d512-float163.01×0.0198torch-compile
torch
0.0595
0.2003
0.199

GatedDeltaNetPrefillBTHDFwd (26 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
fallback-gdn-prefill-b1-s4k-h16-d128-bthd-bfloat162.49×0.0794fla0.1974108
fallback-gdn-prefill-b1-s4k-h16-d128-bthd-float162.48×0.0792fla0.1960109
qwen35-gdn-prefill-b1-s128k-h16-d128-bthd-bfloat164.50×1.2814fla5.7677215
qwen35-gdn-prefill-b1-s128k-h16-d128-bthd-float164.59×1.2572fla5.7713219
qwen35-gdn-prefill-b1-s128k-h32-d128-bthd-bfloat163.50×2.5076fla8.7773219
qwen35-gdn-prefill-b1-s128k-h32-d128-bthd-float163.58×2.4458fla8.7477225
qwen35-gdn-prefill-b1-s128k-h48-d128-bthd-bfloat163.30×3.8074fla12.5781217
qwen35-gdn-prefill-b1-s128k-h48-d128-bthd-float163.34×3.7766fla12.5997218
qwen35-gdn-prefill-b1-s128k-h64-d128-bthd-bfloat163.26×4.7856fla15.5906230
qwen35-gdn-prefill-b1-s128k-h64-d128-bthd-float163.35×4.6645fla15.6272236
qwen35-gdn-prefill-b1-s32k-h16-d128-bthd-bfloat163.96×0.3711fla1.4701185
qwen35-gdn-prefill-b1-s32k-h16-d128-bthd-float164.01×0.3653fla1.4649188
qwen35-gdn-prefill-b1-s32k-h32-d128-bthd-bfloat163.17×0.7005fla2.2183196
qwen35-gdn-prefill-b1-s32k-h32-d128-bthd-float163.23×0.6862fla2.2146200
qwen35-gdn-prefill-b1-s32k-h48-d128-bthd-bfloat162.97×1.0652fla3.1612194
qwen35-gdn-prefill-b1-s32k-h48-d128-bthd-float163.02×1.0493fla3.1685196
qwen35-gdn-prefill-b1-s32k-h64-d128-bthd-bfloat163.11×1.2532fla3.8987219
qwen35-gdn-prefill-b1-s32k-h64-d128-bthd-float163.19×1.2242fla3.9055225
qwen35-gdn-prefill-b1-s64k-h16-d128-bthd-bfloat164.13×0.7069fla2.9162194
qwen35-gdn-prefill-b1-s64k-h16-d128-bthd-float164.17×0.6972fla2.9043197
qwen35-gdn-prefill-b1-s64k-h32-d128-bthd-bfloat163.45×1.2767fla4.4014215
qwen35-gdn-prefill-b1-s64k-h32-d128-bthd-float163.53×1.2458fla4.3951221
qwen35-gdn-prefill-b1-s64k-h48-d128-bthd-bfloat163.25×1.9437fla6.3077212
qwen35-gdn-prefill-b1-s64k-h48-d128-bthd-float163.29×1.9168fla6.3109215
qwen35-gdn-prefill-b1-s64k-h64-d128-bthd-bfloat163.21×2.4273fla7.7806226
qwen35-gdn-prefill-b1-s64k-h64-d128-bthd-float163.29×2.3772fla7.8149231

EngramGateConvFwd (3 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
fwd-b1-s128-d256-bfloat162.60×0.00448torch-compile
torch-ref
0.0116
0.0802
0.176
fwd-b1-s32-d256-float162.72×0.004torch-compile
torch-ref
0.0109
0.0740
0.0493
fwd-b2-s64-d512-float162.46×0.00506torch-compile
torch-ref
0.0124
0.0856
0.312

SSDDecodeFwd (4 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
mamba2-1p3b-decode-b1-bfloat162.30×0.00397torch-compile
torch-ref
0.00912
0.0304
1.06
mamba2-1p3b-decode-b1-float162.28×0.00397torch-compile
torch-ref
0.00906
0.0304
1.06
mamba2-2p7b-decode-b8-float161.84×0.0163torch-compile
torch-ref
0.0301
0.1119
2.57
mamba2-780m-decode-b32-float161.92×0.0361torch-compile
torch-ref
0.0695
0.2409
2.79

SSDStatePassingFwd (6 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
mamba2-1p3b-b1-s4k-dstate-bfloat162.10×0.00195torch-compile
mamba
torch-ref
0.0041
0.00835
0.1229
0.135
mamba2-1p3b-b1-s4k-dstate-float162.10×0.00195torch-compile
mamba
torch-ref
0.0041
0.00842
0.1215
0.135
mamba2-1p3b-b1-s4k-dstate-init-states-bfloat161.11×0.00197torch-compile
mamba
torch-ref
0.00218
0.0087
0.1220
0.134
mamba2-1p3b-b1-s4k-dstate-init-states-float161.71×0.002torch-compile
mamba
torch-ref
0.00342
0.0087
0.1206
0.132
mamba2-1p3b-b1-s4k-flat-init-states-float320.93×0.0219torch-compile
mamba
torch-ref
0.0204
0.0216
0.1270
0.765
mamba2-2p7b-b2-s32k-dstate-float165.65×0.0106mamba
torch-compile
torch-ref
0.0599
0.0912
1.1537
0.497

GatedDeltaNetDecodeFwd (8 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
gdn-decode-serving-b1-h16-d128-bfloat161.27×0.0033fla0.004190.478
gdn-decode-serving-b1-h32-d128-bfloat161.30×0.00362fla0.004690.872
gdn-decode-serving-b1-h48-d128-bfloat161.37×0.00384fla0.005251.23
gdn-decode-serving-b1-h64-d128-bfloat161.38×0.00419fla0.005791.5
gdn-decode-serving-b1-h8-d128-bfloat161.29×0.0031fla0.0040.254
gdn-decode-serving-b8-h32-d128-bfloat161.67×0.00874fla0.01462.89
gdn-decode-serving-b8-h48-d128-bfloat161.56×0.0124fla0.01933.05
gdn-decode-serving-b8-h64-d128-bfloat161.56×0.0161fla0.02523.14

SSDChunkScanFwd (4 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
mamba2-1p3b-b2-s32k-float161.39×1.4677mamba
torch-compile
torch-ref
2.0346
9.9818
40.0654
93.6
mamba2-2p7b-b4-s2k-bfloat161.30×0.2372mamba
torch-compile
torch-ref
0.3088
1.6394
6.5129
90.5
mamba2-780m-b1-s4k-bfloat161.34×0.0759mamba
torch-compile
torch-ref
0.1018
0.5090
1.9619
84.9
mamba2-780m-b1-s4k-float161.38×0.0732mamba
torch-compile
torch-ref
0.1007
0.5073
1.9596
88.1

GatedDeltaNetBTHDFwd (12 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
gdn-bthd-b1-s4k-h16-d128-bfloat161.12×0.1742fla0.194858.6
gdn-bthd-b1-s4k-h16-d128-float161.11×0.1750fla0.193558.3
gdn-bthd-b2-s16k-h4-d64-bfloat160.91×0.4327fla0.393219.9
gdn-bthd-b2-s16k-h4-d64-float160.91×0.4290fla0.390720
gdn-bthd-b2-s2k-h4-d64-bfloat161.02×0.0664fla0.067516.2
gdn-bthd-b2-s2k-h4-d64-float161.00×0.0669fla0.067216
gdn-bthd-b2-s32k-h4-d64-bfloat163.95×0.1950fla0.769388.1
gdn-bthd-b2-s32k-h4-d64-float163.94×0.1949fla0.767988.2
gdn-bthd-b2-s4k-h4-d64-bfloat160.95×0.1145fla0.108318.8
gdn-bthd-b2-s4k-h4-d64-float160.94×0.1151fla0.107718.7
gdn-bthd-b2-s8k-h4-d64-bfloat160.93×0.2204fla0.205619.5
gdn-bthd-b2-s8k-h4-d64-float160.94×0.2192fla0.205119.6

SSDChunkStateFwd (6 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
mamba2-1p3b-b2-s32k-seq-idx-float161.41×0.4492mamba
torch-compile
torch-ref
0.6315
16.6703
173.1990
154
mamba2-2p7b-b4-s2k-bfloat161.22×0.0656mamba
torch-compile
torch-ref
0.0802
2.4482
27.1195
164
mamba2-780m-b1-s4k-bfloat161.10×0.0240mamba
torch-compile
torch-ref
0.0265
0.6755
8.1408
135
mamba2-780m-b1-s4k-float161.05×0.0238mamba
torch-compile
torch-ref
0.0250
0.6331
8.1358
136
mamba2-780m-b1-s4k-seq-idx-bfloat161.01×0.0290mamba
torch-compile
torch-ref
0.0292
0.7870
8.1521
112
mamba2-780m-b1-s4k-seq-idx-float161.21×0.0287mamba
torch-compile
torch-ref
0.0347
0.7499
8.1473
113

Mamba2Fwd (8 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
mamba2-1p3b-b1-s8k-dt-bias-float161.08×0.2904mamba
torch-compile
torch-ref
0.3123
2.0138
6.9145
89.9
mamba2-1p3b-b1-s8k-dt-bias-init-states-float161.08×0.2899mamba
torch-compile
torch-ref
0.3125
2.0123
6.9059
90.1
mamba2-1p3b-b1-s8k-float161.08×0.2909mamba
torch-compile
torch-ref
0.3127
2.0180
6.9113
89.8
mamba2-1p3b-b1-s8k-init-states-float161.07×0.2915mamba
torch-compile
torch-ref
0.3126
2.0172
6.9060
89.6
mamba2-2p7b-b1-s2k-bfloat160.99×0.1100mamba
torch-compile
torch-ref
0.1093
0.6874
2.1548
74
mamba2-2p7b-b1-s2k-dt-bias-bfloat161.00×0.1091mamba
torch-compile
torch-ref
0.1096
0.6885
2.1567
74.6
mamba2-2p7b-b1-s2k-dt-bias-init-states-bfloat161.01×0.1099mamba
torch-compile
torch-ref
0.1106
0.6791
2.1555
74.1
mamba2-2p7b-b1-s2k-init-states-bfloat161.00×0.1106mamba
torch-compile
torch-ref
0.1108
0.6784
2.1521
73.6

GLADecodeFwd (8 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
gla-decode-serving-b1-h16-d128-bfloat160.90×0.00742torch-compile
fla
torch
0.00669
0.00704
0.0318
0.142
gla-decode-serving-b1-h32-d128-bfloat160.94×0.00784fla
torch-compile
torch
0.00736
0.00835
0.0358
0.269
gla-decode-serving-b1-h48-d128-bfloat161.13×0.00794fla
torch-compile
torch
0.00896
0.0103
0.0404
0.398
gla-decode-serving-b1-h64-d128-bfloat161.09×0.00816fla
torch-compile
torch
0.00886
0.00973
0.0419
0.516
gla-decode-serving-b1-h8-d128-bfloat160.81×0.00742torch-compile
fla
torch
0.00598
0.00672
0.0304
0.0709
gla-decode-serving-b8-h32-d128-bfloat161.10×0.0159fla
torch-compile
torch
0.0175
0.0211
0.0895
1.06
gla-decode-serving-b8-h48-d128-bfloat160.96×0.0231fla
torch-compile
torch
0.0223
0.0246
0.1208
1.09
gla-decode-serving-b8-h64-d128-bfloat160.89×0.0304fla
torch-compile
torch
0.0269
0.0320
0.1579
1.11

DeltaNetFwd (8 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
dn-b2-s16k-h4-d64-bfloat160.78×0.4729fla0.37002.27
dn-b2-s16k-h4-d64-float160.77×0.4726fla0.36612.27
dn-b2-s2k-h4-d64-bfloat160.99×0.0629fla0.06242.13
dn-b2-s2k-h4-d64-float160.99×0.0628fla0.06202.14
dn-b2-s4k-h4-d64-bfloat160.91×0.1097fla0.09932.45
dn-b2-s4k-h4-d64-float160.90×0.1095fla0.09852.45
dn-b2-s8k-h4-d64-bfloat160.81×0.2346fla0.19102.29
dn-b2-s8k-h4-d64-float160.81×0.2337fla0.18942.3

DeltaNetBwd (8 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
dn-bwd-b2-s16k-h4-d64-bfloat160.87×1.0041fla0.87012.14
dn-bwd-b2-s16k-h4-d64-float160.87×0.9924fla0.86422.16
dn-bwd-b2-s2k-h4-d64-bfloat160.87×0.1316fla0.11452.04
dn-bwd-b2-s2k-h4-d64-float160.87×0.1307fla0.11332.05
dn-bwd-b2-s4k-h4-d64-bfloat160.83×0.2619fla0.21672.05
dn-bwd-b2-s4k-h4-d64-float160.83×0.2595fla0.21442.07
dn-bwd-b2-s8k-h4-d64-bfloat160.85×0.5107fla0.43622.1
dn-bwd-b2-s8k-h4-d64-float160.86×0.5052fla0.43232.13

GatedDeltaNetPrefillBHTDFwd (4 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
bhtd-fallback-gdn-prefill-b1-s4k-h16-d128-bfloat160.78×0.2526fla0.197934
bhtd-fallback-gdn-prefill-b1-s4k-h16-d128-float160.78×0.2508fla0.196034.2
bhtd-qwen35-gdn-prefill-b1-s128k-h64-d128-bfloat160.89×17.5479fla15.579462.7
bhtd-qwen35-gdn-prefill-b1-s128k-h64-d128-float160.90×17.4198fla15.629463.1

GLABwd (8 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
gla-bwd-b2-s16k-h4-d64-bfloat160.75×1.4487fla1.08091.48
gla-bwd-b2-s16k-h4-d64-float160.71×1.5163fla1.08121.42
gla-bwd-b2-s2k-h4-d64-bfloat160.80×0.1844fla0.14811.46
gla-bwd-b2-s2k-h4-d64-float160.81×0.1829fla0.14821.47
gla-bwd-b2-s4k-h4-d64-bfloat160.79×0.3648fla0.28791.47
gla-bwd-b2-s4k-h4-d64-float160.78×0.3686fla0.28821.46
gla-bwd-b2-s8k-h4-d64-bfloat160.77×0.7267fla0.55691.48
gla-bwd-b2-s8k-h4-d64-float160.75×0.7446fla0.55761.44

GLAFwd (8 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
gla-init-b2-s16k-h4-d64-bfloat160.74×0.6112fla0.45221.76
gla-init-b2-s16k-h4-d64-float160.75×0.6180fla0.46521.74
gla-init-b2-s4k-h4-d64-bfloat160.76×0.1564fla0.11911.72
gla-init-b2-s4k-h4-d64-float160.80×0.1569fla0.12541.71
gla-noinit-b2-s2k-h4-d64-bfloat160.68×0.0969fla0.06591.39
gla-noinit-b2-s2k-h4-d64-float160.71×0.0986fla0.07021.36
gla-noinit-b2-s8k-h4-d64-bfloat160.71×0.3114fla0.22001.72
gla-noinit-b2-s8k-h4-d64-float160.79×0.3132fla0.24761.71

GatedDeltaNetBHTDFwd (8 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
gdn-bhtd-b2-s16k-h4-d64-bfloat160.62×0.6370fla0.393613.5
gdn-bhtd-b2-s16k-h4-d64-float160.61×0.6363fla0.390813.5
gdn-bhtd-b2-s2k-h4-d64-bfloat160.78×0.0866fla0.067512.4
gdn-bhtd-b2-s2k-h4-d64-float160.78×0.0866fla0.067212.4
gdn-bhtd-b2-s4k-h4-d64-bfloat160.75×0.1445fla0.108214.9
gdn-bhtd-b2-s4k-h4-d64-float160.72×0.1488fla0.107714.4
gdn-bhtd-b2-s8k-h4-d64-bfloat160.65×0.3166fla0.205613.6
gdn-bhtd-b2-s8k-h4-d64-float160.65×0.3138fla0.205113.7

GatedDeltaNetBwd (8 workloads)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
gdn-bwd-b2-s16k-h4-d64-bfloat160.65×1.4680fla0.95361.46
gdn-bwd-b2-s16k-h4-d64-float160.65×1.4237fla0.92041.51
gdn-bwd-b2-s2k-h4-d64-bfloat160.68×0.2049fla0.14011.31
gdn-bwd-b2-s2k-h4-d64-float160.66×0.2017fla0.13371.33
gdn-bwd-b2-s4k-h4-d64-bfloat160.67×0.3875fla0.25841.39
gdn-bwd-b2-s4k-h4-d64-float160.66×0.3809fla0.24951.41
gdn-bwd-b2-s8k-h4-d64-bfloat160.67×0.7504fla0.50181.43
gdn-bwd-b2-s8k-h4-d64-float160.67×0.7228fla0.48671.49

DaCumsumFwd (5 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
mamba2-1p3b-b8-s2k-bfloat160.42×0.0154mamba
torch-compile
torch-ref
0.00643
0.0114
0.0912
0.477
mamba2-1p3b-b8-s2k-dt-bias-bfloat160.43×0.0148mamba
torch-compile
torch-ref
0.00637
0.0115
0.0964
0.565
mamba2-2p7b-b2-s32k-dt-bias-float160.37×0.0599mamba
torch-compile
torch-ref
0.0223
0.0346
0.2369
0.7
mamba2-780m-b1-s4k-dt-bias-float160.81×0.00429mamba
torch-compile
torch-ref
0.00346
0.0048
0.0742
0.367
mamba2-780m-b1-s4k-float160.65×0.00509mamba
torch-compile
torch-ref
0.00333
0.00477
0.0713
0.27

EngramDecodeFwd (3 workloads · ✅)

Workload Ratio Device time Alternatives Throughput
alt / ours ms name ms TFLOP/s
decode-b1-dmem512-d256-float160.40×0.0330torch-compile
torch-ref
0.0133
0.0946
0.0161
decode-b4-dmem1024-d512-float160.31×0.0827torch-compile
torch-ref
0.0256
0.1212
0.102
decode-b8-dmem512-d256-bfloat160.63×0.0334torch-compile
torch-ref
0.0212
0.1114
0.127