diff --git a/_sources/building_the_project_with_dpcpp.rst b/_sources/building_the_project_with_dpcpp.rst
index 6076117f7..efe92f285 100644
--- a/_sources/building_the_project_with_dpcpp.rst
+++ b/_sources/building_the_project_with_dpcpp.rst
@@ -104,6 +104,9 @@ The most important supported build options are:
* - ENABLE_CURAND_BACKEND
- True, False
- False
+ * - ENABLE_CUSPARSE_BACKEND
+ - True, False
+ - False
* - ENABLE_NETLIB_BACKEND
- True, False
- False
@@ -183,8 +186,8 @@ Building for CUDA
^^^^^^^^^^^^^^^^^
The CUDA backends can be enabled with ``ENABLE_CUBLAS_BACKEND``,
-``ENABLE_CUFFT_BACKEND``, ``ENABLE_CURAND_BACKEND``, and
-``ENABLE_CUSOLVER_BACKEND``.
+``ENABLE_CUFFT_BACKEND``, ``ENABLE_CURAND_BACKEND``,
+``ENABLE_CUSOLVER_BACKEND``, and ``ENABLE_CUSPARSE_BACKEND``.
No additional parameters are required for using CUDA libraries. In most cases,
the CUDA libraries should be found automatically by CMake.
@@ -371,6 +374,7 @@ disabled using the Ninja build system:
-DENABLE_CUBLAS_BACKEND=True \
-DENABLE_CUSOLVER_BACKEND=True \
-DENABLE_CURAND_BACKEND=True \
+ -DENABLE_CUSPARSE_BACKEND=True \
-DBUILD_FUNCTIONAL_TESTS=False
``$ONEMKL_DIR`` points at the oneMKL source directly. The x86 CPU (``MKLCPU``)
diff --git a/_sources/domains/sparse_linear_algebra.rst b/_sources/domains/sparse_linear_algebra.rst
index eab5afd56..07d90359a 100644
--- a/_sources/domains/sparse_linear_algebra.rst
+++ b/_sources/domains/sparse_linear_algebra.rst
@@ -20,21 +20,150 @@ Currently known limitations:
- ``oneapi::mkl::sparse::set_csr_data`` and
``oneapi::mkl::sparse::set_coo_data`` functions cannot be used on a handle
that has already been used for an operation or its optimize function. Doing so
- will throw an ``oneapi::mkl::unimplemented`` exception.
+ will throw a ``oneapi::mkl::unimplemented`` exception.
- Using ``spsv`` with the ``oneapi::mkl::sparse::spsv_alg::no_optimize_alg`` and
a sparse matrix that does not have the
- ``oneapi::mkl::sparse::matrix_property::sorted`` property will throw an
+ ``oneapi::mkl::sparse::matrix_property::sorted`` property will throw a
``oneapi::mkl::unimplemented`` exception.
- Using ``spmm`` on Intel GPU with a sparse matrix that is
``oneapi::mkl::transpose::conjtrans`` and has the
- ``oneapi::mkl::sparse::matrix_property::symmetric`` property will throw an
+ ``oneapi::mkl::sparse::matrix_property::symmetric`` property will throw a
``oneapi::mkl::unimplemented`` exception.
- Using ``spmv`` with a sparse matrix that is
``oneapi::mkl::transpose::conjtrans`` with a ``type_view``
- ``matrix_descr::symmetric`` or ``matrix_descr::hermitian`` will throw an
+ ``matrix_descr::symmetric`` or ``matrix_descr::hermitian`` will throw a
``oneapi::mkl::unimplemented`` exception.
- Using ``spsv`` on Intel GPU with a sparse matrix that is
- ``oneapi::mkl::transpose::conjtrans`` and will throw an
+ ``oneapi::mkl::transpose::conjtrans`` and will throw a
``oneapi::mkl::unimplemented`` exception.
- Scalar parameters ``alpha`` and ``beta`` should be host pointers to prevent
synchronizations and copies to the host.
+
+
+cuSPARSE backend
+----------------
+
+Currently known limitations:
+
+- The COO format requires the indices to be sorted by row. See the `cuSPARSE
+ documentation
+ True, False False ENABLE_NETLIB_BACKEND ENABLE_CUSPARSE_BACKEND True, False False ENABLE_ROCBLAS_BACKEND ENABLE_NETLIB_BACKEND True, False False ENABLE_ROCFFT_BACKEND ENABLE_ROCBLAS_BACKEND True, False False ENABLE_ROCSOLVER_BACKEND ENABLE_ROCFFT_BACKEND True, False False ENABLE_ROCRAND_BACKEND ENABLE_ROCSOLVER_BACKEND True, False False ENABLE_MKLCPU_THREAD_TBB ENABLE_ROCRAND_BACKEND True, False False ENABLE_MKLCPU_THREAD_TBB True, False True ENABLE_PORTBLAS_BACKEND ENABLE_PORTBLAS_BACKEND True, False False ENABLE_PORTFFT_BACKEND ENABLE_PORTFFT_BACKEND True, False False BUILD_FUNCTIONAL_TESTS BUILD_FUNCTIONAL_TESTS True, False True BUILD_EXAMPLES BUILD_EXAMPLES True, False True TARGET_DOMAINS (list) TARGET_DOMAINS (list) blas, lapack, rng, dft, sparse_blas All domains The CUDA backends can be enabled with Contents
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
@@ -726,8 +730,8 @@ Backends
Building for CUDA#
ENABLE_CUBLAS_BACKEND
,
-ENABLE_CUFFT_BACKEND
, ENABLE_CURAND_BACKEND
, and
-ENABLE_CUSOLVER_BACKEND
.ENABLE_CUFFT_BACKEND
, ENABLE_CURAND_BACKEND
,
+ENABLE_CUSOLVER_BACKEND
, and ENABLE_CUSPARSE_BACKEND
.
No additional parameters are required for using CUDA libraries. In most cases, the CUDA libraries should be found automatically by CMake.
@@ -893,6 +897,7 @@oneapi::mkl::sparse::set_coo_data
functions cannot be used on a handle
that has already been used for an operation or its optimize function. Doing so
-will throw an oneapi::mkl::unimplemented
exception.
+will throw a oneapi::mkl::unimplemented
exception.
Using spsv
with the oneapi::mkl::sparse::spsv_alg::no_optimize_alg
and
a sparse matrix that does not have the
-oneapi::mkl::sparse::matrix_property::sorted
property will throw an
+oneapi::mkl::sparse::matrix_property::sorted
property will throw a
oneapi::mkl::unimplemented
exception.
Using spmm
on Intel GPU with a sparse matrix that is
oneapi::mkl::transpose::conjtrans
and has the
-oneapi::mkl::sparse::matrix_property::symmetric
property will throw an
+oneapi::mkl::sparse::matrix_property::symmetric
property will throw a
oneapi::mkl::unimplemented
exception.
Using spmv
with a sparse matrix that is
oneapi::mkl::transpose::conjtrans
with a type_view
-matrix_descr::symmetric
or matrix_descr::hermitian
will throw an
+matrix_descr::symmetric
or matrix_descr::hermitian
will throw a
oneapi::mkl::unimplemented
exception.
Using spsv
on Intel GPU with a sparse matrix that is
-oneapi::mkl::transpose::conjtrans
and will throw an
+oneapi::mkl::transpose::conjtrans
and will throw a
oneapi::mkl::unimplemented
exception.
Scalar parameters alpha
and beta
should be host pointers to prevent
synchronizations and copies to the host.
Currently known limitations:
+The COO format requires the indices to be sorted by row. See the cuSPARSE
+documentation. Sparse
+operations using matrices with the COO format without the property
+matrix_property::sorted_by_rows
or matrix_property::sorted
will throw
+a oneapi::mkl::unimplemented
exception.
Using spmm
with the algorithm spmm_alg::csr_alg3
and an opA
other
+than transpose::nontrans
or an opB
transpose::conjtrans
will throw
+a oneapi::mkl::unimplemented
exception.
Using spmm
with the algorithm spmm_alg::csr_alg3
,
+opB=transpose::trans
and real fp64 precision will throw a
+oneapi::mkl::unimplemented
exception. This configuration can fail as of
+CUDA 12.6.2, see the related issue
+`here<https://forums.developer.nvidia.com/t/cusparse-spmm-sample-failing-with-misaligned-address/311022>`_.
Using spmv
with a type_view
other than matrix_descr::general
will
+throw a oneapi::mkl::unimplemented
exception.
Using spsv
with the algorithm spsv_alg::no_optimize_alg
may still
+perform some mandatory preprocessing.
oneMKL Interface does not provide a way to use non-default algorithms without
+calling preprocess functions such as cusparseSpMM_preprocess
or
+cusparseSpMV_preprocess
. Feel free to create an issue if this is needed.
The following tables describe how a oneMKL SYCL Interface algorithm maps to the +backend’s algorithms. Refer to the backend’s documentation for a more detailed +explanation of the algorithms.
+Backends with no equivalent algorithms will fallback to the backend’s default +behavior.
+
|
+MKLCPU/MKLGPU |
+cuSPARSE |
+
---|---|---|
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+MKLCPU/MKLGPU |
+cuSPARSE |
+
---|---|---|
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+none |
+
|
+
|
+MKLCPU/MKLGPU |
+cuSPARSE |
+
---|---|---|
|
+none |
+
|
+
|
+none |
+
|
+