Skip to content

Instantly share code, notes, and snippets.

@HDCharles
Last active May 15, 2023 18:17
Show Gist options
  • Save HDCharles/ad3fc0be203a52cd440ec70ae5e4925a to your computer and use it in GitHub Desktop.
Save HDCharles/ad3fc0be203a52cd440ec70ae5e4925a to your computer and use it in GitHub Desktop.
benchmark_linear with integer math, 32 bit scale/zp and 32 bit sums
shape_x shape_w lin_ms qlin_ms trit_qlin_ms qlin_speedup trit_qlin_speedup matmul_ms trit_matmul_ms trit_matmul_speedup
-------------- -------------- ---------- ---------- -------------- -------------- ------------------- ----------- ---------------- ---------------------
(512, 512) (512, 512) 21.9914 404.657 195.39 0.0543458 0.112551 81.2566 77.3025 1.05115
(512, 512) (512, 2048) 21.9638 390.717 195.653 0.0562142 0.112259 81.7465 77.3369 1.05702
(512, 512) (512, 16384) 50.5481 655.018 218.912 0.0771705 0.230906 391.546 123.41 3.17272
(512, 2048) (2048, 512) 22.2229 388.179 195.835 0.0572492 0.113478 137.091 77.5579 1.7676
(512, 2048) (2048, 2048) 37.0526 408.557 201.83 0.0906915 0.183584 174.373 77.7927 2.2415
(512, 2048) (2048, 16384) 184.46 1266.41 307.915 0.145656 0.59906 998.184 216.139 4.61825
(512, 16384) (16384, 512) 65.7208 1366.31 275.759 0.0481009 0.238327 879.603 146.505 6.00391
(512, 16384) (16384, 2048) 194.137 1669.72 377.665 0.116269 0.514046 1179.53 258.997 4.55422
(512, 16384) (16384, 16384) 1143.4 7352.98 1223.55 0.155502 0.934496 6825.01 1096.68 6.22333
(2048, 512) (512, 512) 23.5143 392.726 197.515 0.0598744 0.119051 82.098 77.714 1.05641
(2048, 512) (512, 2048) 29.5604 437.932 198.078 0.0675 0.149236 190.293 77.3976 2.45865
(2048, 512) (512, 16384) 174.604 1575.69 439.197 0.110811 0.397552 1179.31 340.595 3.4625
(2048, 2048) (2048, 512) 34.34 471.021 202.407 0.0729055 0.169659 146.09 77.7686 1.87852
(2048, 2048) (2048, 2048) 87.0209 746.855 231.328 0.116516 0.376181 422.231 117.707 3.58714
(2048, 2048) (2048, 16384) 600.331 3256.82 671.277 0.184331 0.894312 2781.28 566.806 4.90694
(2048, 16384) (16384, 512) 169.855 2193.88 581.994 0.0774224 0.29185 888.87 253.93 3.50045
(2048, 16384) (16384, 2048) 595.77 4068.42 873.332 0.146438 0.682181 2747.15 548.896 5.00487
(2048, 16384) (16384, 16384) 4340.9 19391.5 3046.36 0.223856 1.42495 17924.5 2772.23 6.46575
(16384, 512) (512, 512) 50.5243 843.524 261.983 0.0598966 0.192853 313.045 120.553 2.59675
(16384, 512) (512, 2048) 174.427 1768.25 477.507 0.0986441 0.365288 1114.81 335.324 3.32458
(16384, 512) (512, 16384) 1499.35 10369.1 2436.53 0.144597 0.615362 8577.97 2281.08 3.76049
(16384, 2048) (2048, 512) 179.918 2020.3 557.333 0.0890552 0.32282 673.375 214.005 3.14654
(16384, 2048) (2048, 2048) 633.482 3953.88 907.829 0.160218 0.697799 2487.74 569.276 4.37001
(16384, 2048) (2048, 16384) 4677.99 22233.9 4137.25 0.210399 1.1307 19645 3820.08 5.14256
(16384, 16384) (16384, 512) 1217.43 12889.3 2586.51 0.094453 0.470683 4063.73 1096.55 3.70592
(16384, 16384) (16384, 2048) 4361.05 24375.1 4187.8 0.178914 1.04137 15439.5 2761.63 5.59073
(16384, 16384) (16384, 16384) 36071.7 133129 19955.4 0.270953 1.80761 123074 18830.2 6.536
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment