[HN Gopher] Fast Multidimensional Matrix Multiplication on CPU f...
___________________________________________________________________
Fast Multidimensional Matrix Multiplication on CPU from Scratch
Author : georgehill
Score : 30 points
Date : 2024-07-31 13:16 UTC (9 hours ago)
(HTM) web link (siboehm.com)
(TXT) w3m dump (siboehm.com)
| ap4 wrote:
| Related: I created a CUDA kernel typically much faster than
| kernels from cuBLAS when multiplying large square float32
| matrices. Tested mostly on a 4090 GPU so far.
|
| Source code: https://github.com/arekpaterek/Faster_SGEMM_CUDA
| size tflops_cublas tflops_my diff gpu 40962
| 50.8-50.9 61.8 +21% 4090 61442 55.3
| 59.8 +8% 4090 81922 56.3-56.5 67.1
| +19% 4090 122882 53.7 66.7 +24%
| 4090 163842 53.6 66.7 +24% 4090
| 40962 28.7-28.8 32.5 +13% 4070ts 40962
| 3.8-4.3 6.7 +56-76% T4
| hedgehog wrote:
| For those interested in going deeper I think the classic
| reference in this area is the GotoBLAS paper:
| https://www.cs.utexas.edu/~pingali/CS378/2008sp/papers/gotoP...
| Remnant44 wrote:
| I honestly didn't realize how performant the decades-old 2013
| Haswell architecture is on vector workloads.
|
| 250GFLOP/core is no joke - He also cross-compared to an M1 Pro,
| that when not using the secret matrix coprocessor achieves
| effectively the same vector throughput, a decade later...
___________________________________________________________________
(page generated 2024-07-31 23:00 UTC)