3 ms·
The implementation of every BLAS implementation I'm aware of basically looks like this: if (dims in range A) gemm_implA else if (dims in range B) g
by jcranmer 3y ago
The implementation of every BLAS implementation I'm aware of basically looks like this:
if (dims in range A)
gemm_implA
else if (dims in range B)
gemm_implB
else if (dims in range C)
gemm_implC
// several more implementations...
The immediate call function is invariably a switch over several implementations, and by the time you reach that call, you have actual knowledge of dimensions.
- duped 3y agoThe branch there can be expensive for small matrices.