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

What does mkl_sparse_optimize do in sparse BLAS?

balabi_b_
Beginner
666 Views

I notice there is a routine called mkl_sparse_optimize

Although, the name suggest it is doing optimization. But What kind of optimization? The documentation didn't say about this.

0 Kudos
3 Replies
Alexander_K_Intel2
666 Views

Hi,

mkl_sparse_optimize performs multiple optimizations according to matrix structure, for example(but not limited to) convertation to different internal storage formats, reordering of initial matrix for future gain in performance and scaling on execution phase, analysis of matrix structure for the best possible load balancing, preparation of work data. Some computations that depend on matrix only can also be preproccesed on optimize for faster execution phase.

Thanks,

Alex

0 Kudos
balabi_b_
Beginner
666 Views

Alexander Kalinkin (Intel) wrote:

Hi,

mkl_sparse_optimize performs multiple optimizations according to matrix structure, for example(but not limited to) convertation to different internal storage formats, reordering of initial matrix for future gain in performance and scaling on execution phase, analysis of matrix structure for the best possible load balancing, preparation of work data. Some computations that depend on matrix only can also be preproccesed on optimize for faster execution phase.

Thanks,

Alex

Thank you very much. I have a another question. Routines mkl_?coogemv says "it Computes matrix-vector product of a sparse general matrix stored in the coordinate format with one-based indexing". I am wondering whether mkl_?coogemv will do some optimizing internally, since we know multiply using coo storage is not efficient.

0 Kudos
Alexander_K_Intel2
666 Views

Hi,

Your are correct, it is hard to optimize matrix vector multiplication for general coo format. To achieve better performance it is better create matrix in coo format, convert it via mkl_sparse_convert_csr routine and use full set of optimization that implemented for csr format

Thanks,

Alex

0 Kudos
Reply