3 ms·
The core of their multiplication is in https://github.com/HazyResearch/blocking-tutorial/blob/master/matrix_kernel_vectorized.cpp#L64 https://github.com/HazyRe
by olliej 5y ago
The core of their multiplication is in
https://github.com/HazyResearch/blocking-tutorial/blob/master/matrix_kernel_vectorized.cpp#L64 https://github.com/HazyResearch/blocking-tutorial/blob/maste...
Where they implement the matrix inner product.
And their example implementations using that start at
https://github.com/HazyResearch/blocking-tutorial/blob/master/compare_blas.cpp#L90 https://github.com/HazyResearch/blocking-tutorial/blob/maste...
The inner multiply is all AVX2(w/FMA extension) so it's probably making some degree of LoC win from not needing to handle hardware capabilities or being portable, but still it is impressive.
It is also worth noting that the inner product is c++ templates - it could probably be turned into a horrific macro to make it pure C, but I'd say it isn't worth it. But then I prefer C++ to C :D