Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

gemv for sparse, rectangular matrices?

damienhocking
新分销商 I
2,265 次查看

Is there a recommended routine in the MKL that can do a GEMV with the transpose of a rectangular sparse matrix?  I know I can pad it to square but I'd prefer not to have to do that.  These sparse matrices could be large, 10 million+ nonzeroes and a million rows or columns. 

Damien

0 项奖励
1 解答
Zhen_Z_Intel
员工
2,265 次查看

Hi,

mkl_?<format>gemv is designed for square, but mkl_?<format>mv can be used for rectangular matrix (m * k). Or, you could use Inspector-execute sparse function mkl_sparse_?_mv, normally would provide a better performance. 

在原帖中查看解决方案

0 项奖励
4 回复数
Zhen_Z_Intel
员工
2,265 次查看

Hi,

You provided BLAS level 2 function for sparse matrix. For sparse matrix, we normally use compressed data structure that Intel MKL supports CSR, CSC, COO, diagonal and skyline. You could learn more from developer reference about usage with different matrix structure& data compression format:

https://software.intel.com/en-us/node/520802

0 项奖励
damienhocking
新分销商 I
2,265 次查看

Yes, but the docs are all for a square m x m matrix.  I have rectangular matrices.  

0 项奖励
Zhen_Z_Intel
员工
2,266 次查看

Hi,

mkl_?<format>gemv is designed for square, but mkl_?<format>mv can be used for rectangular matrix (m * k). Or, you could use Inspector-execute sparse function mkl_sparse_?_mv, normally would provide a better performance. 

0 项奖励
damienhocking
新分销商 I
2,265 次查看

Thank you Fiona, that's exactly what I wanted.

0 项奖励
回复