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

[oneMKL][spblas] Restrict features not supported by any backends #542

Merged
merged 8 commits into from
Sep 6, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ set_coo_matrix_data (Buffer version)
.. rubric:: Template parameters

dataType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the ``matrix_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``matrix_handle_t``.

indexType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the ``matrix_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``matrix_handle_t``.

.. container:: section

Expand Down Expand Up @@ -150,12 +150,12 @@ set_coo_matrix_data (USM version)
.. rubric:: Template parameters

dataType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the ``matrix_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``matrix_handle_t``.

indexType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the ``matrix_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``matrix_handle_t``.

.. container:: section

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ set_csr_matrix_data (Buffer version)
.. rubric:: Template parameters

dataType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the ``matrix_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``matrix_handle_t``.

indexType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the ``matrix_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``matrix_handle_t``.

.. container:: section

Expand Down Expand Up @@ -149,12 +149,12 @@ set_csr_matrix_data (USM version)
.. rubric:: Template parameters

dataType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the ``matrix_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``matrix_handle_t``.

indexType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the ``matrix_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``matrix_handle_t``.

.. container:: section

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ set_dense_matrix_data (Buffer version)
.. rubric:: Template parameters

dataType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the
``dense_matrix_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``dense_matrix_handle_t``.

.. container:: section

Expand Down Expand Up @@ -123,9 +122,8 @@ set_dense_matrix_data (USM version)
.. rubric:: Template parameters

dataType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the
``dense_matrix_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``dense_matrix_handle_t``.

.. container:: section

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ set_dense_vector_data (Buffer version)
.. rubric:: Template parameters

dataType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the
``dense_vector_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``dense_vector_handle_t``.

.. container:: section

Expand Down Expand Up @@ -105,9 +104,8 @@ set_dense_vector_data (USM version)
.. rubric:: Template parameters

dataType
See :ref:`supported template types<onemkl_sparse_supported_types>`. Can be
a different type than what was used when creating the
``dense_vector_handle_t``.
See :ref:`supported template types<onemkl_sparse_supported_types>`. Must
be the same type as was used when creating the ``dense_vector_handle_t``.

.. container:: section

Expand Down
9 changes: 2 additions & 7 deletions source/elements/oneMKL/source/domains/spblas/matrix_view.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ matrix_view
See :ref:`onemkl_sparse_matrix_descriptor`, :ref:`onemkl_enum_uplo` and
:ref:`onemkl_enum_diag` for a description of the members.

The ``uplo_view`` member is ignored if ``type_view`` is ``general`` or
``diagonal``.

The ``diag_view`` member is ignored if ``type_view`` is ``general``.
Each operation documents which combination of ``type_view``, ``uplo_view``
and ``diag_view`` are valid.

.. rubric:: Syntax

Expand Down Expand Up @@ -124,7 +122,4 @@ matrix_view
the other members are initialized to the same value as the default
constructor.

If the ``matrix_desc`` is ``diagonal``, ``diag_view`` is initialized to
``diag::unit``.

**Parent topic:** :ref:`onemkl_spblas`
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ spmm
- The data of the dense handles ``B_handle`` and ``C_handle`` and the scalars
``alpha`` and ``beta`` can be reset before each call to ``spmm``. Changing
the data of the sparse handle ``A_handle`` is undefined behavior.
- The data must be available on the device when calling ``spmm_optimize`` by
using event dependencies if needed.
- ``spmm_optimize`` and ``spmm`` are asynchronous.
- The algorithm defaults to ``spmm_alg::default_alg`` if a backend does not
support the provided algorithm.
Expand All @@ -302,7 +304,9 @@ spmm

A_view
Specifies which part of the handle should be read as described by
:ref:`onemkl_sparse_matrix_view`.
:ref:`onemkl_sparse_matrix_view`. The ``type_view`` field must be
``matrix_descr::general`` and the ``uplo_view`` and ``diag_view`` fields
are ignored.
Rbiessy marked this conversation as resolved.
Show resolved Hide resolved
gajanan-choudhary marked this conversation as resolved.
Show resolved Hide resolved

A_handle
Sparse matrix handle object representing :math:`A`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ spmv
- The data of the dense handles ``x_handle`` and ``y_handle`` and the scalars
``alpha`` and ``beta`` can be reset before each call to ``spmv``. Changing
the data of the sparse handle ``A_handle`` is undefined behavior.
- The data must be available on the device when calling ``spmv_optimize`` by
using event dependencies if needed.
- ``spmv_optimize`` and ``spmv`` are asynchronous.
- The algorithm defaults to ``spmv_alg::default_alg`` if a backend does not
support the provided algorithm.
Expand All @@ -292,7 +294,11 @@ spmv

A_view
Specifies which part of the handle should be read as described by
:ref:`onemkl_sparse_matrix_view`.
:ref:`onemkl_sparse_matrix_view`. The ``type_view`` field cannot be
``matrix_descr::diagonal``. The ``diag_view`` field can be ``diag::unit``
if and only if ``type_view`` is ``matrix_descr::triangular``. The
``type_view`` field cannot be ``matrix_descr::symmetric`` nor
``matrix_descr::hermitian`` if ``opA`` is ``transpose::conjtrans``.
gajanan-choudhary marked this conversation as resolved.
Show resolved Hide resolved

A_handle
Sparse matrix handle object representing :math:`A`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ spsv
- The data of the dense handle ``x_handle`` and scalar ``alpha`` can be reset
before each call to ``spsv``. Changing the data of the sparse handle
``A_handle`` is undefined behavior.
- The data must be available on the device when calling ``spsv_optimize`` by
using event dependencies if needed.
- ``spsv_optimize`` and ``spsv`` are asynchronous.
- The algorithm defaults to ``spsv_alg::default_alg`` if a backend does not
support the provided algorithm.
Expand All @@ -283,8 +285,8 @@ spsv

A_view
Specifies which part of the handle should be read as described by
:ref:`onemkl_sparse_matrix_view`. ``A_view.type_view`` must be
``matrix_descr::triangular`` or ``matrix_descr::diagonal``.
:ref:`onemkl_sparse_matrix_view`. The ``type_view`` field must be
``matrix_descr::triangular``.
gajanan-choudhary marked this conversation as resolved.
Show resolved Hide resolved

A_handle
Sparse matrix handle object representing :math:`A`.
Expand Down