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

After mkl_sparse_optimize, BSR data array cannot be updated correctly

Connor_Wong
Beginner
1,367 Views

For BSR storage format, we are passing rows_start, rows_end, col_index and values. I realized that without using mkl_sparse_optimize, I could update the values array (in-place update), and re-use the sparse matrix handler to produce correct results. If I use mkl_sparse_optimize on the handler, even if I update the values array in-place, the final spmv results is wrong.

Is this the correct way to update the values array? It seems to work correctly if mkl_sparse_optimize was not performed.

0 Kudos
2 Replies
Kirill_V_Intel
Employee
1,359 Views

Hi @Connor_Wong,

What you have observed is currently expected behavior. Sparse matrix handle in IE SpBLAS is sort of a black box and has some internal data structures (created during the optimize call) so changing the raw data you used for creating the handle does not work in most cases.

We have mkl_sparse_update_values  which is the API you could potentially use in case of with optimize call and without. Currently it works only for limited functionality but you would use this API, please submit a request for us to extend this functionality (and add more details - whether you need to update all values or part of them, and possibly which IE SpBLAS routines you are currently using with BSR format). 

I hope @Gennady_F_Intel can help you with submitting the request.

Best,
Kirill

 

0 Kudos
Gennady_F_Intel
Moderator
1,338 Views

Conor, yes currently it works only for limited functionality.

Our recommendation to submit the Feature Request to the Intel Online Service Center which is the official supporting channel.

The current thread is closing.

If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only. 


0 Kudos
Reply