Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Yiming_W_
Beginner
51 Views

Dense matrix multiply tansposed Sparse Matrix?

Jump to solution

Hi,

I want to use MKL Sparse to compute a dense matrix multiply transposed sparse matrix. Particularly, if I have input A(dense, m-by-k), B(sparse, n-by-k), I want to compute:

C = A * B'

where C is a m-by-n dense matrix. Notice that the position of matrix is different from what mkl_?csrmm(https://software.intel.com/zh-cn/node/520832) defines. I am thinking about transpose the A and C and transpose them back after computation. But there is too much memory consumption when A and C are both big. Any thoughts on that?

Thanks!

0 Kudos

Accepted Solutions
Ying_H_Intel
Employee
51 Views

Hi Yiming, 

Thanks for letting us know. I may escalate the interface request to engineer team to consider in future version. You may use the  transpose + mkl_?csrmm + transpose for temp workaround. 

Best Regards,

Ying 

transpose, void mkl_simatcopy (const char ordering, const char trans, size_t rows, size_t cols,
const float alpha, float * AB, size_t lda, size_t ldb);

View solution in original post

3 Replies
Ying_H_Intel
Employee
51 Views

Hi Yiming,

Right, it seems there is no suitable function to do such operation besides that either B transpose, or A transpose. .

C= A(dense)*B'(sparse)  or  C'=B(sparse)*A'(dense) is for mkl_?csrmm.

What is the range of the m, k, n? 

Best Regards,
Ying

Yiming_W_
Beginner
51 Views

Hi Ying,

Thanks for replying. I think the M and N might be in the range of 1,000 to 50,000. Do you have any plan for providing any interface with sparse matrix on the right?

Thanks!

Yiming

Ying H. (Intel) wrote:

Hi Yiming,

Right, it seems there is no suitable function to do such operation besides that either B transpose, or A transpose. .

C= A(dense)*B'(sparse)  or  C'=B(sparse)*A'(dense) is for mkl_?csrmm.

What is the range of the m, k, n? 

Best Regards,
Ying

Ying_H_Intel
Employee
52 Views

Hi Yiming, 

Thanks for letting us know. I may escalate the interface request to engineer team to consider in future version. You may use the  transpose + mkl_?csrmm + transpose for temp workaround. 

Best Regards,

Ying 

transpose, void mkl_simatcopy (const char ordering, const char trans, size_t rows, size_t cols,
const float alpha, float * AB, size_t lda, size_t ldb);

View solution in original post