Reduction¶
本页暂无中文版。以下为英文原文。
19 ops, 144 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.
SumFwd¶
input: [*S]
hidden-input: [2048, 4096]dim=-1dtype=bf16, bf16/f32state long-input: [64, 32768]dim=-1dtype=bf16seq hidden-input: [2048, 4096]dim=0dtype=bf16state- dim0 hidden-input: [2048, 4096]dim=-1keepdim=truedtype=bf16state- keepdim 3d-input: [4, 128, 4096]dim=[0,2]dtype=f16multidim mlp-input: [2048, 11008]dim=-1dtype=f32intermediate
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
hidden- | bf16 | 1.31× | 0.00566 | flaggemstorch-compiletorch | 0.00741 0.00755 0.0110 | 1.48 | · | · |
| bf16/f32 | 1.31× | 0.00568 | torch-compiletorch | 0.00742 0.0110 | 1.48 | · | · | |
long- | bf16 | 1.07× | 0.00294 | flaggemstorch-compiletorch | 0.00314 0.00368 0.00688 | 0.712 | · | · |
hidden- | bf16 | 1.12× | 0.00666 | torch-compileflaggemstorch | 0.00746 0.0117 0.0123 | 1.26 | · | · |
hidden- | bf16 | 1.29× | 0.0057 | flaggemstorch-compiletorch | 0.00733 0.00742 0.0110 | 1.47 | · | · |
3d- | f16 | 1.36× | 0.00282 | torch-compiletorchflaggems | 0.00384 0.0107 0.0131 | 0.745 | · | · |
mlp- | f32 | 1.02× | 0.0211 | flaggemstorch-compiletorch | 0.0214 0.0218 0.0314 | 1.07 | · | · |
MeanFwd¶
input: [*S]
hidden-input: [2048, 4096]dim=-1dtype=bf16, bf16/f32state long-input: [64, 32768]dim=-1dtype=bf16seq 3d-input: [4, 128, 4096]dim=[0,2]dtype=f16multidim mlp-input: [2048, 11008]dim=-1dtype=f32intermediate
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
hidden- | bf16 | 1.30× | 0.0057 | flaggemstorch-compiletorch | 0.00742 0.00746 0.0110 | 1.47 | · | · |
| bf16/f32 | 1.32× | 0.00566 | torch-compiletorch | 0.00746 0.0110 | 1.48 | · | · | |
long- | bf16 | 1.18× | 0.00294 | flaggemstorch-compiletorch | 0.00349 0.00374 0.00691 | 0.712 | · | · |
3d- | f16 | 1.36× | 0.00282 | torch-compiletorchflaggems | 0.00384 0.0106 0.0131 | 0.745 | · | · |
mlp- | f32 | 1.02× | 0.0212 | flaggemstorch-compiletorch | 0.0215 0.0218 0.0312 | 1.06 | · | · |
ProdFwd¶
input: [*S]
hidden-input: [2048, 4096]dim=-1dtype=bf16, bf16/f32state long-input: [64, 32768]dim=-1dtype=bf16seq 3d-input: [4, 128, 4096]dim=0dtype=f16non- last- axis mlp-input: [2048, 11008]dim=-1dtype=f32intermediate
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
hidden- | bf16 | 1.11× | 0.00563 | flaggemstorch-compiletorch | 0.00624 0.00736 0.0167 | 1.49 | · | · |
| bf16/f32 | 1.31× | 0.0056 | torch-compiletorch | 0.00736 0.0166 | 1.5 | · | · | |
long- | bf16 | 1.26× | 0.00294 | torch-compiletorchflaggems | 0.00371 0.00986 0.0129 | 0.712 | · | · |
3d- | f16 | 1.02× | 0.00262 | torch-compiletorchflaggems | 0.00269 0.00442 0.2859 | 0.799 | · | · |
mlp- | f32 | 0.99× | 0.0211 | torch-compileflaggemstorch | 0.0209 0.0229 0.0311 | 1.07 | · | · |
AmaxFwd¶
input: [*S]
hidden-input: [2048, 4096]dim=-1dtype=bf16state long-input: [64, 32768]dim=-1dtype=bf16seq 3d-input: [4, 128, 4096]dim=[0,2]dtype=f16multidim mlp-input: [2048, 11008]dim=-1dtype=f32intermediate
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
hidden- | bf16 | 1.11× | 0.0057 | flaggemstorch-compiletorch | 0.00634 0.00723 0.0179 | 1.47 | · | · |
long- | bf16 | 1.24× | 0.00298 | torch-compiletorchflaggems | 0.00368 0.0108 0.0130 | 0.705 | · | · |
3d- | f16 | 1.43× | 0.00278 | torch-compileflaggemstorch | 0.00397 0.0121 0.0127 | 0.753 | · | · |
mlp- | f32 | 0.99× | 0.0212 | torch-compileflaggemstorch | 0.0210 0.0229 0.0327 | 1.07 | · | · |
AminFwd¶
input: [*S]
hidden-input: [2048, 4096]dim=-1dtype=bf16state long-input: [64, 32768]dim=-1dtype=bf16seq 3d-input: [4, 128, 4096]dim=[0,2]dtype=f16multidim mlp-input: [2048, 11008]dim=-1dtype=f32intermediate
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
hidden- | bf16 | 1.28× | 0.0057 | torch-compiletorch | 0.00726 0.0179 | 1.47 | · | · |
long- | bf16 | 1.26× | 0.00298 | torch-compiletorch | 0.00374 0.0108 | 0.705 | · | · |
3d- | f16 | 1.35× | 0.00278 | torch-compiletorch | 0.00375 0.0127 | 0.753 | · | · |
mlp- | f32 | 0.99× | 0.0211 | torch-compiletorch | 0.0210 0.0327 | 1.07 | · | · |
VarFwd¶
input: [*S]
hidden-input: [2048, 4096]dim=-1dtype=bf16state long-input: [64, 32768]dim=-1dtype=bf16seq 3d-input: [4, 128, 4096]dim=[0,2]dtype=f16multidim mlp-input: [2048, 11008]dim=-1dtype=f32intermediate hidden-input: [2048, 4096]dim=-1correction=0dtype=bf16state- biased
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
hidden- | bf16 | 1.32× | 0.00778 | torch-compileflaggemstorch | 0.0103 0.0153 0.0370 | 4.32 | · | · |
long- | bf16 | 1.28× | 0.00438 | torch-compileflaggemstorch | 0.0056 0.0108 0.0211 | 1.91 | · | · |
3d- | f16 | 1.25× | 0.00435 | torch-compileflaggemstorch | 0.00544 0.0138 0.0179 | 1.93 | · | · |
mlp- | f32 | 1.29× | 0.0236 | torch-compileflaggemstorch | 0.0305 0.0340 0.0517 | 3.83 | · | · |
hidden- | bf16 | 1.36× | 0.00755 | torch-compileflaggemstorch | 0.0103 0.0152 0.0370 | 4.44 | · | · |
VarMeanFwd¶
input: [*S]
hidden-input: [2048, 4096]dim=-1dtype=bf16state long-input: [64, 32768]dim=-1dtype=bf16seq 3d-input: [4, 128, 4096]dim=[0,2]dtype=f16multidim mlp-input: [2048, 11008]dim=-1dtype=f32intermediate hidden-input: [2048, 4096]dim=-1correction=0dtype=bf16state- biased
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
hidden- | bf16 | 1.35× | 0.00784 | torch-compileflaggemstorch | 0.0106 0.0154 0.0370 | 4.28 | · | · |
long- | bf16 | 1.26× | 0.00438 | torch-compileflaggemstorch | 0.00554 0.0108 0.0211 | 1.91 | · | · |
3d- | f16 | 1.26× | 0.00435 | torch-compileflaggemstorch | 0.0055 0.0138 0.0179 | 1.93 | · | · |
mlp- | f32 | 1.31× | 0.0234 | torch-compileflaggemstorch | 0.0307 0.0336 0.0518 | 3.86 | · | · |
hidden- | bf16 | 1.38× | 0.00765 | torch-compileflaggemstorch | 0.0106 0.0154 0.0370 | 4.39 | · | · |
StdFwd¶
input: [*S]
hidden-input: [2048, 4096]dim=-1dtype=bf16state long-input: [64, 32768]dim=-1dtype=bf16seq 3d-input: [4, 128, 4096]dim=[0,2]dtype=f16multidim mlp-input: [2048, 11008]dim=-1dtype=f32intermediate hidden-input: [2048, 4096]dim=-1correction=0dtype=bf16state- biased
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
hidden- | bf16 | 1.23× | 0.00803 | flaggemstorch-compiletorch | 0.00989 0.0187 0.0370 | 4.18 | · | · |
long- | bf16 | 1.28× | 0.00442 | torch-compileflaggemstorch | 0.00563 0.0192 0.0211 | 1.9 | · | · |
3d- | f16 | 1.30× | 0.00438 | torch-compileflaggemstorch | 0.0057 0.0158 0.0180 | 1.91 | · | · |
mlp- | f32 | 1.31× | 0.0236 | torch-compileflaggemstorch | 0.0309 0.0415 0.0520 | 3.82 | · | · |
hidden- | bf16 | 1.27× | 0.00778 | flaggemstorch-compiletorch | 0.00989 0.0187 0.0371 | 4.31 | · | · |
ArgmaxFwd¶
input: [*S]
lm-input: [4, 102400]dim=-1dtype=bf16head hidden-input: [2048, 4096]dim=-1dtype=bf16state 3d-input: [4, 128, 4096]dim=0dtype=f16non- last- axis llama-input: [4, 128256]dim=-1dtype=f328b- lm- head
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
lm- | bf16 | 7.24× | 0.00362 | flaggemstorch-compiletorch | 0.0262 0.0292 0.0362 | 0.113 | · | · |
hidden- | bf16 | 1.39× | 0.00746 | flaggemstorch-compiletorch | 0.0104 0.0189 0.0240 | 1.13 | · | · |
3d- | f16 | 1.01× | 0.0032 | flaggemstorch-compiletorch | 0.00323 0.0033 0.0113 | 0.655 | · | · |
llama- | f32 | 4.86× | 0.00707 | flaggemstorch-compiletorch | 0.0344 0.0369 0.0441 | 0.0725 | · | · |
ArgminFwd¶
input: [*S]
lm-input: [4, 102400]dim=-1dtype=f16, bf16head hidden-input: [2048, 4096]dim=-1dtype=bf16state 3d-input: [4, 128, 4096]dim=0dtype=f16non- last- axis llama-input: [4, 128256]dim=-1dtype=f328b- lm- head
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
lm- | f16 | 7.86× | 0.00365 | torch-compiletorchflaggems | 0.0287 0.0355 0.1028 | 0.112 | · | · |
| bf16 | 4.55× | 0.0064 | torch-compiletorchflaggems | 0.0291 0.0363 0.0825 | 0.064 | · | · | |
hidden- | bf16 | 1.00× | 0.00752 | flaggemstorch-compiletorch | 0.00752 0.0189 0.0239 | 1.12 | · | · |
3d- | f16 | 1.02× | 0.00323 | torch-compiletorch | 0.0033 0.0112 | 0.649 | · | · |
llama- | f32 | 5.19× | 0.0071 | torch-compiletorchflaggems | 0.0369 0.0440 0.0824 | 0.0722 | · | · |
SoftmaxFwd¶
x: [*S]
dim=-1
attn-x: [32, 32, 4096]dtype=bf16, f32weights- 4k attn-x: [32, 32, 32768]dtype=bf16weights- 32k lm-x: [4, 102400]dtype=bf16, f32head llama-x: [4, 128256]dtype=bf16/f328b- lm- head quack-x: [32768, 256]dtype=bf16, f32throughput- 256 quack-x: [32768, 512]dtype=bf16, f32throughput- 512 quack-x: [32768, 1024]dtype=bf16, f32throughput- 1024 quack-x: [32768, 2048]dtype=bf16, f32throughput- 2048 quack-x: [32768, 4096]dtype=bf16, f32throughput- 4096 quack-x: [32768, 8192]dtype=bf16, f32throughput- 8192 quack-x: [32768, 16384]dtype=bf16, f32throughput- 16384 quack-x: [32768, 32768]dtype=bf16, f32throughput- 32768 quack-x: [32768, 65536]dtype=bf16, f32throughput- 65536 quack-x: [16384, 131072]dtype=bf16, f32throughput- 131072 quack-x: [8192, 262144]dtype=bf16, f32throughput- 262144 qwen3-x: [1, 151936]dtype=f328b- lm- head- b1
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
attn- | bf16 | 1.13× | 0.00554 | quackflaggemstorch-compiletorch | 0.00624 0.00726 0.0151 0.0192 | 3.79 | · | · |
| f32 | 1.12× | 0.00845 | flaggemsquacktorch-compiletorch | 0.0095 0.00966 0.0151 0.0191 | 2.48 | · | · | |
attn- | bf16 | 1.07× | 0.0332 | quackflaggemstorchtorch-compile | 0.0356 0.0540 0.0812 0.0839 | 5.05 | · | · |
lm- | bf16 | 1.17× | 0.00365 | quacktorch-compileflaggemstorch | 0.00426 0.00838 0.0299 0.0337 | 0.561 | · | · |
| f32 | 1.63× | 0.00474 | quacktorch-compileflaggemstorch | 0.00771 0.0117 0.0314 0.0395 | 0.432 | · | · | |
llama- | bf16/f32 | 1.56× | 0.00515 | torch-compilequacktorch | 0.00803 0.0123 0.0467 | 0.498 | · | · |
quack- | bf16 | 1.05× | 0.00877 | quacktorch-compiletorchflaggems | 0.00925 0.0114 0.0191 0.0246 | 4.78 | · | · |
| f32 | 1.04× | 0.0155 | torch-compilequacktorchflaggems | 0.0161 0.0161 0.0187 0.0259 | 2.7 | · | · | |
quack- | bf16 | 1.02× | 0.0161 | quacktorch-compileflaggemstorch | 0.0164 0.0197 0.0292 0.0345 | 5.2 | · | · |
| f32 | 1.02× | 0.0297 | quacktorch-compileflaggemstorch | 0.0304 0.0314 0.0341 0.0353 | 2.83 | · | · | |
quack- | bf16 | 1.02× | 0.0303 | quacktorch-compileflaggemstorch | 0.0309 0.0366 0.0402 0.0676 | 5.54 | · | · |
| f32 | 1.01× | 0.0615 | flaggemsquacktorch-compiletorch | 0.0624 0.0625 0.0645 0.0680 | 2.73 | · | · | |
quack- | bf16 | 1.03× | 0.0614 | quackflaggemstorchtorch-compile | 0.0631 0.0851 0.1731 0.1952 | 5.47 | · | · |
| f32 | 1.05× | 0.1229 | flaggemsquacktorchtorch-compile | 0.1288 0.1358 0.1525 0.2150 | 2.73 | · | · | |
quack- | bf16 | 1.04× | 0.1221 | quackflaggemstorch-compiletorch | 0.1272 0.1829 0.3867 0.5449 | 5.5 | · | · |
| f32 | 1.03× | 0.2476 | flaggemsquacktorch-compiletorch | 0.2545 0.2784 0.3790 0.5362 | 2.71 | · | · | |
quack- | bf16 | 1.05× | 0.2475 | quackflaggemstorch-compiletorch | 0.2588 0.2796 0.6980 1.2940 | 5.42 | · | · |
| f32 | 1.04× | 0.4954 | flaggemsquacktorch-compiletorch | 0.5149 0.5569 0.6323 1.3816 | 2.71 | · | · | |
quack- | bf16 | 1.05× | 0.4959 | quackflaggemstorch-compiletorch | 0.5223 0.6036 1.2748 1.2948 | 5.41 | · | · |
| f32 | 1.03× | 0.9950 | flaggemsquacktorch-compiletorch | 1.0288 1.0470 1.2629 1.4598 | 2.7 | · | · | |
quack- | bf16 | 0.99× | 1.0624 | quackflaggemstorchtorch-compile | 1.0562 1.5541 2.3677 2.4300 | 5.05 | · | · |
| f32 | 1.04× | 2.0583 | quackflaggemstorch-compiletorch | 2.1422 2.2370 2.8954 3.2912 | 2.61 | · | · | |
quack- | bf16 | 1.04× | 2.1454 | quackflaggemstorchtorch-compile | 2.2328 3.4311 4.5683 5.0342 | 5 | · | · |
| f32 | 1.05× | 4.1965 | quackflaggemstorch-compiletorch | 4.4005 5.8544 6.0977 8.0235 | 2.56 | · | · | |
quack- | bf16 | 1.09× | 2.1033 | quackflaggemstorchtorch-compile | 2.2902 3.4087 4.8970 4.9937 | 5.11 | · | · |
| f32 | 1.17× | 4.1366 | quackflaggemstorch-compiletorch | 4.8248 6.0894 6.1395 8.0754 | 2.6 | · | · | |
quack- | bf16 | 1.11× | 2.2323 | quackflaggemstorchtorch-compile | 2.4881 3.4672 4.7424 5.0169 | 4.81 | · | · |
| f32 | 1.11× | 4.4384 | quackflaggemstorch-compiletorch | 4.9350 6.1977 6.2046 8.1007 | 2.42 | · | · | |
qwen3- | f32 | 1.38× | 0.00416 | quacktorch-compileflaggemstorch | 0.00576 0.0107 0.0461 0.0567 | 0.183 | · | · |
LogSoftmaxFwd¶
input: [*S]
dim=-1
attn-input: [32, 32, 4096]dtype=bf16, f32weights- 4k attn-input: [32, 32, 32768]dtype=bf16weights- 32k lm-input: [4, 102400]dtype=bf16, f32head llama-input: [4, 128256]dtype=bf16/f328b- lm- head
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
attn- | bf16 | 1.94× | 0.00682 | torch-compiletorchflaggems | 0.0132 0.0166 0.0193 | 3.08 | · | · |
| f32 | 1.42× | 0.00915 | torch-compiletorchflaggems | 0.0130 0.0167 0.0196 | 2.29 | · | · | |
attn- | bf16 | 1.82× | 0.0319 | torchtorch-compileflaggems | 0.0582 0.0650 0.2464 | 5.25 | · | · |
lm- | bf16 | 1.90× | 0.00438 | torch-compiletorchflaggems | 0.00832 0.0227 0.4285 | 0.467 | · | · |
| f32 | 2.48× | 0.00474 | torch-compiletorchflaggems | 0.0117 0.0352 0.4079 | 0.432 | · | · | |
llama- | bf16/f32 | 1.65× | 0.00515 | torch-compiletorch | 0.00851 0.0415 | 0.498 | · | · |
LogSumExpFwd¶
input: [*S]
attn-input: [32, 32, 4096]dim=-1dtype=bf16weights- 4k attn-input: [32, 32, 32768]dim=-1dtype=bf16weights- 32k lm-input: [4, 102400]dim=-1dtype=bf16head 3d-input: [4, 128, 4096]dim=[0,2]dtype=f16multidim llama-input: [4, 128256]dim=-1dtype=f328b- lm- head
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
attn- | bf16 | 1.47× | 0.0057 | torch-compiletorch | 0.00838 0.0486 | 2.95 | · | · |
attn- | bf16 | 1.48× | 0.0249 | torch-compiletorch | 0.0369 0.1952 | 5.39 | · | · |
lm- | bf16 | 2.53× | 0.00371 | torch-compiletorch | 0.00941 0.0468 | 0.441 | · | · |
3d- | f16 | 1.62× | 0.0055 | torch-compiletorch | 0.00893 0.0408 | 1.52 | · | · |
llama- | f32 | 1.64× | 0.00403 | torch-compiletorch | 0.00662 0.0596 | 0.509 | · | · |
VectorNormFwd¶
x: [*S]
l1-x: [2048, 4096]ord=1dim=-1dtype=bf16hidden- state l1-x: [64, 32768]ord=1dim=-1dtype=bf16long- seq l1-x: [4, 128, 4096]ord=1dim=[0,2]dtype=f163d- multidim l1-x: [2048, 11008]ord=1dim=-1dtype=f32mlp- intermediate l1-x: [2048, 4096]ord=1dim=-1dtype=bf16/f32hidden- state- fp32 l2-x: [2048, 4096]dim=-1dtype=bf16hidden- state l2-x: [64, 32768]dim=-1dtype=bf16long- seq l2-x: [4, 128, 4096]dim=[0,2]dtype=f163d- multidim l2-x: [2048, 11008]dim=-1dtype=f32mlp- intermediate l2-x: [2048, 4096]dim=-1dtype=bf16/f32hidden- state- fp32 inf-x: [2048, 4096]ord=infdim=-1dtype=bf16hidden- state inf-x: [64, 32768]ord=infdim=-1dtype=bf16long- seq inf-x: [4, 128, 4096]ord=infdim=[0,2]dtype=f163d- multidim inf-x: [2048, 11008]ord=infdim=-1dtype=f32mlp- intermediate inf-x: [2048, 4096]ord=infdim=-1dtype=bf16/f32hidden- state- fp32
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
l1- | bf16 | 1.34× | 0.00566 | torch-compileflaggemstorch | 0.00758 0.0143 0.0168 | 2.96 | · | · |
l1- | bf16 | 1.28× | 0.00294 | torch-compiletorchflaggems | 0.00378 0.00989 0.0369 | 1.42 | · | · |
l1- | f16 | 1.33× | 0.00282 | torch-compiletorchflaggems | 0.00374 0.0105 0.0241 | 1.49 | · | · |
l1- | f32 | 1.05× | 0.0211 | torch-compiletorchflaggems | 0.0221 0.0315 0.0356 | 2.14 | · | · |
l1- | bf16/f32 | 1.32× | 0.00566 | torch-compiletorch | 0.00749 0.0167 | 2.96 | · | · |
l2- | bf16 | 1.10× | 0.00576 | flaggemstorch-compiletorch | 0.00634 0.00787 0.0168 | 2.91 | · | · |
l2- | bf16 | 1.26× | 0.00301 | torch-compiletorchflaggems | 0.00378 0.00992 0.0129 | 1.39 | · | · |
l2- | f16 | 1.38× | 0.00285 | torch-compiletorchflaggems | 0.00394 0.0106 0.0132 | 1.47 | · | · |
l2- | f32 | 1.01× | 0.0212 | torch-compileflaggemstorch | 0.0214 0.0228 0.0315 | 2.13 | · | · |
l2- | bf16/f32 | 1.36× | 0.00576 | torch-compiletorch | 0.00784 0.0168 | 2.91 | · | · |
inf- | bf16 | 1.10× | 0.00579 | flaggemstorch-compiletorch | 0.0064 0.00733 0.0172 | 2.9 | · | · |
inf- | bf16 | 1.18× | 0.0031 | torch-compiletorchflaggems | 0.00365 0.0102 0.0131 | 1.35 | · | · |
inf- | f16 | 1.35× | 0.00282 | torch-compiletorchflaggems | 0.00381 0.0108 0.0124 | 1.49 | · | · |
inf- | f32 | 1.06× | 0.0212 | torch-compileflaggemstorch | 0.0224 0.0232 0.0328 | 2.13 | · | · |
inf- | bf16/f32 | 1.26× | 0.00579 | torch-compiletorch | 0.0073 0.0173 | 2.9 | · | · |
CumsumFwd¶
input: [*S]
dim=-1
hidden-input: [2048, 4096]dtype=bf16state hidden-input: [2048, 4096]dtype=bf16/f32state- f32 long-input: [64, 32768]dtype=bf16seq llama-input: [4096, 5120]dtype=f3213b- hidden few-input: [8, 65536]dtype=f32long- seq
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
hidden- | bf16 | 1.00× | 0.0088 | flaggemstorch-compiletorch | 0.00877 0.0236 0.1017 | 0.953 | · | · |
hidden- | bf16/f32 | 1.03× | 0.0130 | flaggemstorch-compiletorch | 0.0135 0.0245 0.1347 | 0.644 | · | · |
long- | bf16 | 1.29× | 0.00557 | flaggemstorch-compiletorch | 0.00717 0.0117 0.0642 | 0.377 | · | · |
llama- | f32 | 1.06× | 0.0393 | flaggemstorch-compiletorch | 0.0416 0.0588 0.1584 | 0.533 | · | · |
few- | f32 | 1.56× | 0.00365 | flaggemstorch-compiletorch | 0.0057 0.00755 0.1270 | 0.144 | · | · |
CumprodFwd¶
input: [*S]
dim=-1
hidden-input: [2048, 4096]dtype=bf16state hidden-input: [2048, 4096]dtype=bf16/f32state- f32 long-input: [64, 32768]dtype=bf16seq llama-input: [4096, 5120]dtype=f3213b- hidden few-input: [8, 65536]dtype=f32long- seq
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
hidden- | bf16 | 2.71× | 0.00874 | torch-compiletorch | 0.0237 0.1016 | 0.96 | · | · |
hidden- | bf16/f32 | 1.89× | 0.0130 | torch-compiletorch | 0.0246 0.1346 | 0.646 | · | · |
long- | bf16 | 2.12× | 0.00554 | torch-compiletorch | 0.0117 0.0642 | 0.379 | · | · |
llama- | f32 | 1.50× | 0.0393 | torch-compiletorch | 0.0589 0.1583 | 0.534 | · | · |
few- | f32 | 1.63× | 0.00461 | torch-compiletorch | 0.00752 0.1270 | 0.114 | · | · |
AllFwd¶
input: [*S]
mask-input: [32, 4096]dim=-1dtype=bool, bf16, f32validation- 4k mask-input: [32, 32768]dim=-1dtype=bool, i32, i64validation- 32k 3d-input: [4, 128, 4096]dim=[0,2]dtype=bool, c64, c128multidim mlp-input: [2048, 11008]dim=-1dtype=boolintermediate
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
mask- | bool | 1.15× | 0.00154 | torch-compileflaggemstorch | 0.00176 0.00186 0.0177 | 0.0853 | · | · |
| bf16 | 1.08× | 0.00157 | torch-compileflaggemstorch | 0.0017 0.0055 0.0157 | 0.167 | · | · | |
| f32 | 1.08× | 0.00166 | torch-compileflaggemstorch | 0.00179 0.00557 0.0160 | 0.158 | · | · | |
mask- | bool | 1.67× | 0.00186 | torch-compileflaggemstorch | 0.00311 0.00634 0.0102 | 0.565 | · | · |
| i32 | 1.35× | 0.00278 | torch-compileflaggemstorch | 0.00375 0.00915 0.0121 | 0.753 | · | · | |
| i64 | 1.19× | 0.00413 | torch-compileflaggemstorch | 0.00493 0.0095 0.0124 | 0.508 | · | · | |
3d- | bool | 1.83× | 0.00211 | torch-compiletorchflaggems | 0.00387 0.0102 0.0116 | 0.993 | · | · |
| c64 | 2.29× | 0.00544 | torch-compiletorchflaggems | 0.0125 0.0179 0.0197 | 0.771 | · | · | |
| c128 | 1.66× | 0.00893 | torch-compiletorchflaggems | 0.0148 0.0203 0.0221 | 0.47 | · | · | |
mlp- | bool | 1.50× | 0.0067 | flaggemstorch-compiletorch | 0.0101 0.0143 0.0274 | 3.36 | · | · |
AnyFwd¶
input: [*S]
mask-input: [32, 4096]dim=-1dtype=bool, bf16, f32validation- 4k mask-input: [32, 32768]dim=-1dtype=bool, i32, i64validation- 32k 3d-input: [4, 128, 4096]dim=[0,2]dtype=bool, c64, c128multidim mlp-input: [2048, 11008]dim=-1dtype=boolintermediate
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
mask- | bool | 1.09× | 0.00152 | torch-compileflaggemstorch | 0.00166 0.00189 0.0181 | 0.0862 | · | · |
| bf16 | 1.08× | 0.00157 | torch-compileflaggemstorch | 0.0017 0.00554 0.0162 | 0.167 | · | · | |
| f32 | 1.08× | 0.00163 | torch-compileflaggemstorch | 0.00176 0.00563 0.0164 | 0.161 | · | · | |
mask- | bool | 1.61× | 0.00182 | torch-compileflaggemstorch | 0.00295 0.00637 0.0105 | 0.575 | · | · |
| i32 | 1.38× | 0.00269 | torch-compileflaggemstorch | 0.00371 0.00925 0.0125 | 0.78 | · | · | |
| i64 | 1.34× | 0.00381 | torch-compileflaggemstorch | 0.00509 0.00957 0.0129 | 0.551 | · | · | |
3d- | bool | 1.62× | 0.00211 | torch-compileflaggemstorch | 0.00342 0.0116 0.0190 | 0.993 | · | · |
| c64 | 2.21× | 0.00544 | torch-compileflaggemstorch | 0.0120 0.0198 0.0225 | 0.771 | · | · | |
| c128 | 1.61× | 0.00893 | torch-compileflaggemstorch | 0.0143 0.0222 0.0248 | 0.47 | · | · | |
mlp- | bool | 1.55× | 0.00669 | flaggemstorch-compiletorch | 0.0104 0.0125 0.0296 | 3.37 | · | · |
CountNonzeroFwd¶
input: [*S]
sparsity-input: [2048, 4096]dim=-1dtype=bf16, f32hidden sparsity-input: [32, 32768]dim=-1dtype=f16, bool, i32, i64seq 3d-input: [4, 128, 4096]dim=[0,2]dtype=f16, c64, c128multidim sparsity-input: [2048, 11008]dim=-1dtype=f16mlp
| Workload | dtype | Ratio | Device time | Alternatives | Throughput | SOL | Bound | |
|---|---|---|---|---|---|---|---|---|
| alt / ours | ms | name | ms | TFLOP/s | of ceiling | by | ||
sparsity- | bf16 | 1.47× | 0.0056 | torch-compiletorch | 0.00826 0.0634 | 3 | · | · |
| f32 | 1.15× | 0.00902 | torch-compiletorch | 0.0104 0.0674 | 1.86 | · | · | |
sparsity- | f16 | 1.24× | 0.00272 | torch-compiletorch | 0.00336 0.0147 | 0.771 | · | · |
| bool | 1.46× | 0.00224 | torch-compiletorch | 0.00326 0.0129 | 0.936 | · | · | |
| i32 | 1.22× | 0.00322 | torch-compiletorch | 0.00394 0.0152 | 0.652 | · | · | |
| i64 | 1.14× | 0.00442 | torch-compiletorch | 0.00506 0.0165 | 0.475 | · | · | |
3d- | f16 | 1.37× | 0.00301 | torch-compiletorch | 0.00413 0.0209 | 1.39 | · | · |
| c64 | 1.74× | 0.0057 | torch-compiletorch | 0.00989 0.0242 | 0.736 | · | · | |
| c128 | 1.94× | 0.00915 | torch-compiletorch | 0.0177 0.0321 | 0.458 | · | · | |
sparsity- | f16 | 1.10× | 0.0120 | torch-compiletorch | 0.0132 0.1550 | 3.77 | · | · |