Skip to content

Instantly share code, notes, and snippets.

@HDCharles
Last active May 15, 2023 18:20
Show Gist options
  • Save HDCharles/952458c2012554244ae30c0a7b94dcb5 to your computer and use it in GitHub Desktop.
Save HDCharles/952458c2012554244ae30c0a7b94dcb5 to your computer and use it in GitHub Desktop.
benchmark_linear.py
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) 29.4059 474.733 293.763 0.061942 0.100101 112.424 138.208 0.813438
(512, 512) (512, 2048) 28.5993 461.46 290.286 0.0619758 0.0985211 111.883 139.265 0.80338
(512, 512) (512, 16384) 50.4579 781.971 292.295 0.0645266 0.172627 496.533 139.407 3.56174
(512, 2048) (2048, 512) 28.4453 472.304 294.685 0.0602266 0.0965278 145.547 138.449 1.05127
(512, 2048) (2048, 2048) 37.0158 476.439 293.468 0.0776926 0.126132 188.486 138.061 1.36524
(512, 2048) (2048, 16384) 184.05 1402.46 500.208 0.131234 0.367947 1102.43 370.81 2.97302
(512, 16384) (16384, 512) 61.5232 1579.62 342.221 0.0389481 0.179776 883.973 146.563 6.03134
(512, 16384) (16384, 2048) 195.982 1893.12 494.01 0.103523 0.396716 1196.22 319.283 3.7466
(512, 16384) (16384, 16384) 1143.18 7951.81 1432.92 0.143764 0.797799 7173.38 1242.9 5.77147
(2048, 512) (512, 512) 31.2884 470.816 293.73 0.0664557 0.106521 113.171 141.561 0.799446
(2048, 512) (512, 2048) 29.5524 532.72 299.295 0.0554745 0.0987398 245.347 140.869 1.74167
(2048, 512) (512, 16384) 174.753 2001.87 1125.73 0.0872949 0.155235 1569 982.964 1.5962
(2048, 2048) (2048, 512) 34.2346 667.216 309.257 0.0513096 0.110699 161.156 140.487 1.14713
(2048, 2048) (2048, 2048) 87.2535 961.908 380.485 0.0907087 0.229321 483.714 204.291 2.36777
(2048, 2048) (2048, 16384) 600.917 3795.3 1347.78 0.158332 0.445858 3169.03 1114.66 2.84305
(2048, 16384) (16384, 512) 170.546 2957.25 669.443 0.0576704 0.254758 899.164 250.17 3.59421
(2048, 16384) (16384, 2048) 595.638 4872.2 1038.69 0.122253 0.573451 2808.46 626.956 4.47952
(2048, 16384) (16384, 16384) 4317.46 20808 3669.44 0.207491 1.1766 18541.7 3244.42 5.71494
(16384, 512) (512, 512) 50.374 1160.4 487.555 0.0434109 0.10332 417.783 281.45 1.4844
(16384, 512) (512, 2048) 174.348 2356.11 755.647 0.0739983 0.230727 1499.56 489.848 3.06128
(16384, 512) (512, 16384) 1493.83 13662.1 7514.93 0.109341 0.198782 11692.9 6687.46 1.74849
(16384, 2048) (2048, 512) 179.109 2876.52 799.866 0.062266 0.223924 776.69 349.362 2.22316
(16384, 2048) (2048, 2048) 634.543 5089.18 1604 0.124685 0.395601 2873.26 1060.66 2.70893
(16384, 2048) (2048, 16384) 4647.16 26083.7 9129.69 0.178164 0.509016 22745.8 8055.5 2.82363
(16384, 16384) (16384, 512) 1187.73 18797.2 2939.39 0.0631866 0.404075 4168.51 1115.86 3.7357
(16384, 16384) (16384, 2048) 4318.39 30570.9 5033.91 0.141258 0.85786 15824.7 3246.31 4.87469
(16384, 16384) (16384, 16384) 36084.6 142042 24682.6 0.254042 1.46195 126176 22349.8 5.64552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment