Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Question about mkl_?csrgemv

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

Heo__Jun-Yeong

Beginner

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

02-14-2018
12:41 AM

88 Views

Question about mkl_?csrgemv

Hi, when I read reference manual of mkl, the mkl_?csrgemv routine calculates y=Ax (or y=A'x) where A is m-by-m matrix in 3-array CSR format.

However, when I tested, I figured out that this routine also works well in m-by-k matrix (both k<m and k>m).

Also, proper results are obtained even when I set ja and a not in order.

ex) for 2-by-2 matrix, [(1, 2), (3, 4)], I set ja(1)=2, a(1)=2, ja(2)=1, a(2)=1, ...

Does this routine updated in recent version?

Link Copied

2 Replies

mecej4

Black Belt

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

02-14-2018
06:21 AM

88 Views

Some of the stated restrictions become understandable only if you consider that the routine in question can be asked to compute A^{T}x or A.x, depending on the value of the UPLO argument. Unlike in the dense case, obtaining the CSR representation of A^{T}, given A in the same representation, is not entirely trivial.

I sometimes feel that it would have been better to have separate routines for computing A.x and A^{T}x when A is a sparse matrix in CSR or CSC format. With COO, things are simpler since all that needs to be done is to interchange row and column indices of nonzero entries.

Spencer_P_Intel

Employee

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

02-21-2018
02:17 PM

88 Views

Also please note that these functions have been marked deprecated since mkl 2018 update 2 release. They have been replaced by the Sparse Blas Inspector Executor functions (https://software.intel.com/en-us/mkl-developer-reference-c-inspector-executor-sparse-blas-routines ) which provide much more opportunity to improve performance.

For instance the new function call would be using the function

mkl_sparse_?_mv(...) (https://software.intel.com/en-us/mkl-developer-reference-c-mkl-sparse-mv)

which can optionally be preceded by some optimization hints for even faster performance using

mkl_sparse_set_mv_hint(...) (https://software.intel.com/en-us/mkl-developer-reference-c-mkl-sparse-mv ) and then mkl_sparse_optimize(...) (https://software.intel.com/en-us/mkl-developer-reference-c-mkl-sparse-optimize ).

This setup will take in all sorts of size matrices and the hints provided allow the mkl_sparse_optimize(...) to make some decisions for internal data storage that will provide improved performance of the mv (or which ever operation hints were provided) operation.

- 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.