Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

matrix version of ?spmv


Hi there,

I am wondering whether there is a matrix version of ?spmv, e.g. ?spmm. I am dealing with huge symmetric matrices (+50,000 row dimension) which I want to multiply with other matrices. Currently I store them in general format and call gemm. I am aware of calling ?spmv inside a loop but I am looking for a more elegant way. I found gemm_compute in the leatest manual, but it occurs to me that it is not doing what I want.

Any suggestions??


0 Kudos
2 Replies
yes, MKL contains many such routines for different formats please refer to this list ( MKL 2018 )

Hi Gennady,

thanks for the quick response.

However, you have pointed me to the sparse routines, but non of the matrices in my example is actually sparse.

My current understanding is:

  • the packed format used for the matrix in ?spmv is not equal to any sparse format because it lacks the integer index vectors.
  • a dense symmetric matrix does not need any index vectors at all because the full upper or lower triangular is stored as a vector
  • BLAS does not have a level 3 equivalent to ?spmv
  • a symmetric dense matrix which can be stored packed but is stored sparse will be less efficient in terms of RAM because it has an unnesseary overhead for the index vectors. In fact it will have no storage advantage at all compared to storing the full symmetric matrix. It will also be less efficient in terms of speed during multiplication from going through these index vectors.

Let me know what I am getting wrong.