Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- mkl_sparse_d_spmmd does not support CSC matrices?

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

Mazur__Luke

Beginner

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

06-24-2019
11:31 PM

186 Views

mkl_sparse_d_spmmd does not support CSC matrices?

Hello

So I created a handle for matrix A (MwqTHandle) in CSR form and a handle for matrix B in CSC form. I tried to multiply these two together using mkl_sparse_d_spmmd. Status was reported as success, but actually all it did is turn the resultant dense matrix to zeroes. Is this not supported? If I make B in CSR form it works however, but this seems inefficient to multiply a CSR matrix by a CSR matrix, surely CSC for the second form is more logical as the columns of the second matrix need to be accessed (or CSR by CSR if the second matrix is to be transposed, but there is no option to do this in spmmd!)

I tried doing this with mkl_sparse_spmm and storing the result as a sparse matrix instead, but the code said this was not supported. I tried doing it with mkl_sparse_sp2m and this also does not work with CSR + CSC combination. However it does work with CSR + CSR and allows me to transpose the second matrix, meaning that is essentially achieves the same goal. So I am happy to use that workaround if I want to store the result as sparse, but if I want to store the result as dense is there a workaround to this problem? Perhaps an sp2md that allows transposition of the second matrix?

I tried to upload my source code but not sure if that worked correctly. Please let me know if it hasn't uploaded correctly.

Regards, Luke Mazur

1 Solution

Gennady_F_Intel

Moderator

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

01-09-2020
12:09 AM

186 Views

Luke, could you check the latest MKL v.2020 and let us know if the problem is still there?

Link Copied

4 Replies

Gennady_F_Intel

Moderator

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

06-26-2019
08:49 PM

186 Views

Gennady_F_Intel

Moderator

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

01-09-2020
12:09 AM

187 Views

Luke, could you check the latest MKL v.2020 and let us know if the problem is still there?

Mazur__Luke

Beginner

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

01-16-2020
05:59 AM

186 Views

I reran the calls to spmmd, spmm and sp2m using CSC matrices as I originally wanted to and everything appeared to work correctly, so it appears in the 2020 version these problems have disappeared.

Gennady_F_Intel

Moderator

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

01-16-2020
06:28 AM

186 Views

Hi Luke,

Thanks for update. The issue was definitely fixed in v.2020.

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

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