2 ms·
Even theoretically this is only possible if the dimensions and sparseness are known at compile time, which can be pretty heavy assumptions.
by duped 3y ago
Even theoretically this is only possible if the dimensions and sparseness are known at compile time, which can be pretty heavy assumptions.
- jcranmer 3y agoThe 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.