Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- Dense matrix multiply tansposed Sparse Matrix?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Yiming_W_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-14-2016
03:48 PM

51 Views

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!

Link Copied

Accepted Solutions

Ying_H_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-17-2016
12:49 AM

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);

3 Replies

Ying_H_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-14-2016
07:24 PM

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-15-2016
12:29 PM

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-17-2016
12:49 AM

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);

For more complete information about compiler optimizations, see our Optimization Notice.