Visible to Intel only — GUID: GUID-DE2D3E9F-9539-4980-AB95-317D8C2E35B5
Visible to Intel only — GUID: GUID-DE2D3E9F-9539-4980-AB95-317D8C2E35B5
Sparse BLAS Routines
The Intel® oneAPI Math Kernel Library provides a C++ with SYCL interface to some of the Sparse BLAS routines. This section describes such Sparse BLAS routines included in the Intel® oneAPI Math Kernel Library (oneMKL).
The Sparse BLAS library provides basic operations on sparse matrices and vectors. The fundamental object that encompasses the sparse matrix and is which is used in the Sparse BLAS library is the sparse::matrix_handle_t. See Sparse BLAS Matrix Handle Contract between User and Library for a discussion of the way that library APIs will interact with the handle as well as the usage contract with regards to the matrix handle for both users and the library. The currently supported sparse matrix formats in the sparse::matrix_handle_t object can be found in Sparse Storage Formats.
The routines that enable these Sparse BLAS operations can be separated into 4 groups:
State management routines
Analysis routines (also called inspector stage or optimize stage routines)
Execution routines
Helper routines.
The state management routines include initialization, destruction and APIs for setting data, formats and properties in the different sparse objects like the sparse::matrix_handle_t or sparse::matmat_descr_t.
In an analysis routine, the library inspects the matrix properties including size, sparsity pattern and available parallelism and can create new data structures or copies of the user data which applies matrix format or structure changes to enable a more optimized algorithm for the desired operation. The user data is not changed by any such analysis or optimizations. The optimizations created in the analysis routines may be reused by multiple execution routines to improve performance. For a given matrix, an analysis routine would typically be called a single time for each operation whereas the corresponding execution routines may be called multiple times.
The execution routines are where the actual matrix-matrix, matrix-vector operations take place and may use the data, optimizations and properties stored in the handle to perform the desired operation.
The helper routines operate on the data in the matrix handle and may include things like data copy/transpose into other handles, sorting of data within a handle, or eventually, when supported, changes to the sparse matrix format within the handle.
State Management Routines |
Data Types |
Description |
---|---|---|
N/A |
Initialize a sparse::matrix_handle_t object |
|
N/A |
Release a sparse::matrix_handle_t object |
|
float, double |
Set internal representation of sparse::matrix_handle_t to compressed sparse row (CSR) format with user provided CSR data arrays. |
|
N/A |
Set special properties of user provided marix data in sparse::matrix_handle_t that can provide hints for optimizations. |
|
N/A |
Initialize a sparse::matmat_descr_t object. For use with sparse::matmat |
|
N/A |
Populate a sparse::matmat_descr_t object with desired operation description. For use with sparse::matmat |
|
N/A |
Query the operation description housed in a sparse::matmat_descr_t object. For use with sparse::matmat |
|
N/A |
Release a sparse::matmat_descr_t object. For use with sparse::matmat |
Analysis Routines |
Data Types |
Description |
---|---|---|
N/A |
Perform internal optimizations for the sparse::gemv operation. |
|
N/A |
Perform internal optimizations for the sparse::trmv operation. |
|
N/A |
Perform internal optimizations for the sparse::trsv operation. |
Execution Routines |
Data Types |
Description |
---|---|---|
float, double |
General sparse matrix-dense vector product |
|
float, double |
General sparse matrix-dense vector product with fused dot product |
|
float, double |
Symmetric sparse matrix-dense vector product |
|
float, double |
Triangular sparse matrix-dense vector product |
|
float, double |
Triangular solve of sparse matrix against a dense vector. |
|
float, double |
General sparse matrix-dense matrix product |
|
float, double |
General sparse matrix-sparse matrix product |
Helper Routines |
Data Types |
Description |
---|---|---|
float, double |
General sparse matrix out-of-place copy/transposition into a new matrix handle |
|
float, double |
General sparse matrix sort of matrix format in matrix handle |