Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Laasner__Raul
Beginner
209 Views

Which algorithm is implemented in DGEMM?

Interestingly, I've been unable to find an answer to this simple question. What is the algorithm that is used for matrix-matrix multiplications (e.g., DGEMM) in MKL? Is is classical (O(N^3)), Strassen (O(N^2.7)), or something else? Thanks.

0 Kudos
1 Reply
Zhen_Z_Intel
Employee
209 Views

Hi Raul,

I am afraid BLAS standard gemm uses classical O(N3), for algorithm design, you could follow Netlib gemm source code. Intel MKL optimized BLAS routines with SIMD instruction sets, do some work to fit data into the caches enabling contiguous, aligned accesses.

Here's another algorithm for matrix matrix multiplication, call 3M. It split a complex matrix into two matrices, performs 3 GEMM and 4 matrix additions. For other algorithm, like Winograd which implemented for NN convolution kernel in MKL-DNN.

Reply