MKLSparse.jl icon indicating copy to clipboard operation
MKLSparse.jl copied to clipboard

Refactorings & Matrix * Sparse-Matrix support

Open alyst opened this issue 1 year ago • 8 comments

This PR

  • simplifies a bit the wrapper generation logic
  • some unnecessary "type piracy" was removed (A*B calls mul!(C,A,B) already)
  • streamlines testing, so that all 4 numeric types are covered
  • @test_blas macro replaced by conventional @test macro in combination with @blas macro that allows more fine-grained checks of whether Sparse BLAS MKL methods are being called
  • last but not the least: the support for Matrix * SparseMatrixCSC multiplication via Sparse BLAS (currently it's being handled by the Base Julia). It uses the fact that ColMajorRes = ColMajorMtx*SparseMatrixCSC is the same as RowMajorRes = SparseMatrixCSR*RowMajorMtx. Unfortunately, the older Sparse BLAS API doesn't support the combination of one-based Sparse matrices and row-major storage, so I had to add some boilerplate code to leverage newer mkl_sparse_xxx API.

alyst avatar Aug 20 '22 08:08 alyst