Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct support for linear algebra operations with *MKLSparseMatrix* #57

Open
alyst opened this issue Jan 20, 2025 · 0 comments
Open

Direct support for linear algebra operations with *MKLSparseMatrix* #57

alyst opened this issue Jan 20, 2025 · 0 comments

Comments

@alyst
Copy link
Contributor

alyst commented Jan 20, 2025

Currently MKLSparse.jl provides overloads for linalg operations with Julian sparse matrices (SparseMatrixCSC, although support for the other storage formats (COO, CSR, BSR) is also possible). That puts some limitations on the efficiency of certain operations, in particular sparse * sparse matrix multiplication (see #50):

  • Intel MKL does not support updating sparse matrices with sparsity structure allocated externally (by Julia)
  • Intel MKL may adjust internal sparse matrix representation (store hints) to make certain operations more efficient.

The internal MKLSparseMatrix type wraps the sparse_matrix_t handle that points to a SparseMKL representation of the matrix. Currently, linalg overloads create MKLSparseMatrix internally, call Intel MKL Sparse BLAS functions, update Julian object, destroy MKLSparseMatrix handle. For some operations (e.g. sparse * sparse) that imposes a considerable overhead, in particular if large sparse matrix operations are used within iterative numerical methods.

Instead, MKLSparse.jl can make MKLSparseMatrix public (as an AbstractSparseMatrix subtype?) and provide LinearAlgebra.jl overloads for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant