Skip to content

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

@alyst

Description

@alyst

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions