Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR implements the [3xTF32 trick](NVIDIA/cutlass#385) to make use of the TCs on F32 tensors without sacrificing accuracy. Benchmarks on A100 from `python/tutorials/03-matrix-multiplication.py` run on `float32` data using `use_tf32=False`: ``` M N K cuBLAS Triton This PR 0 256.0 256.0 256.0 1.927529 1.092267 0.799220 1 384.0 384.0 384.0 5.026909 3.567484 2.457600 2 512.0 512.0 512.0 8.192000 6.553600 5.698782 3 640.0 640.0 640.0 12.190476 10.448980 10.039216 4 768.0 768.0 768.0 13.405091 10.287628 13.405091 5 896.0 896.0 896.0 14.049280 13.380267 17.133269 6 1024.0 1024.0 1024.0 15.887515 12.264046 14.563555 7 1152.0 1152.0 1152.0 16.681475 15.633424 17.360372 8 1280.0 1280.0 1280.0 16.516129 15.340824 21.557894 9 1408.0 1408.0 1408.0 17.090206 14.774461 17.473642 10 1536.0 1536.0 1536.0 17.014154 15.624477 19.285798 11 1664.0 1664.0 1664.0 17.043394 15.073554 19.228444 12 1792.0 1792.0 1792.0 17.107190 16.171833 22.433981 13 1920.0 1920.0 1920.0 17.883570 15.762828 19.280335 14 2048.0 2048.0 2048.0 17.623127 17.032706 22.046277 15 2176.0 2176.0 2176.0 17.887688 16.686275 21.909252 16 2304.0 2304.0 2304.0 19.019006 17.933838 24.935148 17 2432.0 2432.0 2432.0 17.940270 17.288901 22.730149 18 2560.0 2560.0 2560.0 18.164080 17.075561 23.043601 19 2688.0 2688.0 2688.0 17.594183 16.703239 22.015703 20 2816.0 2816.0 2816.0 18.766871 18.089676 24.189799 21 2944.0 2944.0 2944.0 18.735350 17.855977 24.513541 22 3072.0 3072.0 3072.0 18.420008 17.766898 23.801221 23 3200.0 3200.0 3200.0 18.470418 17.704011 24.015009 24 3328.0 3328.0 3328.0 18.253370 17.710036 23.732089 25 3456.0 3456.0 3456.0 18.546485 17.793328 24.445594 26 3584.0 3584.0 3584.0 18.368824 17.833278 24.131882 27 3712.0 3712.0 3712.0 18.665424 17.938112 24.659923 28 3840.0 3840.0 3840.0 18.638578 18.076496 24.510639 29 3968.0 3968.0 3968.0 18.965486 18.190808 24.974199 30 4096.0 4096.0 4096.0 19.035276 18.365864 25.195745 ```
- Loading branch information