Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions projects/hipblaslt/docs/reference/api-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,24 @@ To use special data ordering for ``HIPBLASLT_ORDER_COL16_4R8`` and ``HIPBLASLT_O
| BF16 | BF16 | BF16 | BF16 | T | N | HIPBLASLT_ORDER_COL16_4R8 | HIPBLASLT_ORDER_COL | HIPBLASLT_ORDER_COL | HIPBLASLT_ORDER_COL |
+-------+-------+-------+-------+------+-------+-----------------------------+-----------------------------+---------------------+---------------------+

There are restrictions on the supported problem sizes for the ``HIP_R_4F_E2M1``, ``HIP_R_6F_E2M3``, ``HIP_R_6F_E3M2``,
Comment thread
amd-jnovotny marked this conversation as resolved.
Resolved
``HIP_R_8F_E4M3``, and ``HIP_R_8F_E5M2`` data types.
When ``HIPBLASLT_MATMUL_DESC_A_SCALE_MODE`` and ``HIPBLASLT_MATMUL_DESC_B_SCALE_MODE`` are both set
to ``HIPBLASLT_MATMUL_MATRIX_SCALE_VEC32_UE8M0``, the following restrictions apply:

* Atype and Btype can be any combination of: ``HIP_R_8F_E4M3``, ``HIP_R_8F_E5M2``, ``HIP_R_6F_E2M3``, ``HIP_R_6F_E3M2``, and ``HIP_R_4F_E2M1``.
* Ctype must be the same as Dtype.
* Dtype can be any of the following: ``HIP_R_32F``, ``HIP_R_16F``, or ``HIP_R_16BF``.
* ``m % 16`` must be equal to ``0``.
* ``n % 16`` must be equal to ``0``.
* ``K % 128`` must be equal to ``0``.
* ``B`` must be equal to ``1``.
* ``opA`` must be equal to ``T``.
* ``opB`` must be equal to ``N``.
* Epilogues are not supported.
* The scaling data pointed to by ``HIPBLASLT_MATMUL_DESC_A_SCALE_POINTER`` must be stored in the same order as ``A``.
* The scaling data pointed to by ``HIPBLASLT_MATMUL_DESC_B_SCALE_POINTER`` must be stored in the same order as ``B``.

hipblasLtMatrixTransformDescCreate()
------------------------------------------
.. doxygenfunction:: hipblasLtMatrixTransformDescCreate
Expand Down
36 changes: 31 additions & 5 deletions projects/hipblaslt/docs/reference/data-type-support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ The hipBLASLt input and output types are listed in the following table.
- ``hipblasLtInt32``
- 32-bit real signed integer.

*
- ``HIP_R_4F_E2M1``
- N/A
- 4-bit real float4 precision floating-point

*
- ``HIP_R_6F_E2M3``
- N/A
- 6-bit real float6 precision floating-point

*
- ``HIP_R_6F_E3M2``
- N/A
- 6-bit real bfloat6 precision floating-point

*
- ``HIP_R_8F_E4M3_FNUZ``
- ``hipblaslt_f8_fnuz``
Expand All @@ -45,6 +60,16 @@ The hipBLASLt input and output types are listed in the following table.
- ``hipblaslt_bf8_fnuz``
- 8-bit real bfloat8 precision floating-point

*
Comment thread
neon60 marked this conversation as resolved.
Resolved
- ``HIP_R_8F_E4M3``
- ``hipblaslt_f8``
- 8-bit real float8 precision floating-point

*
- ``HIP_R_8F_E5M2``
- ``hipblaslt_bf8``
- 8-bit real bfloat8 precision floating-point

*
- ``HIP_R_16F``
- ``hipblasLtHalf``
Expand All @@ -60,6 +85,12 @@ The hipBLASLt input and output types are listed in the following table.
- ``hipblasLtFloat``
- 32-bit real single precision floating-point

.. note::

The ``hipblaslt_f8_fnuz`` and ``hipblaslt_bf8_fnuz`` data types are only
supported on the gfx942 platform. The ``hipblaslt_f8`` and ``hipblaslt_bf8`` data types are only
supported on the gfx950 and gfx12 platforms.

The hipBLASLt compute modes are listed in the following table.

.. list-table::
Expand Down Expand Up @@ -107,11 +138,6 @@ hipBLASLt GEMM operation equation:
Where :math:`op( )` refers to in-place operations, such as transpose and
non-transpose, and :math:`alpha` and :math:`beta` are scalars.

.. note::

The ``hipblaslt_f8_fnuz`` and ``hipblaslt_bf8_fnuz`` data types are only
supported on the gfx94x platform.


.. list-table:: Supported data types
:header-rows: 1
Expand Down
5 changes: 5 additions & 0 deletions projects/hipblaslt/docs/reference/datatypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ hipblasLtMatmulPreferenceAttributes_t
-------------------------------------
.. doxygenenum:: hipblasLtMatmulPreferenceAttributes_t

hipblasLtMatmulMatrixScale_t
--------------------------------
.. doxygenenum:: hipblasLtMatmulMatrixScale_t

hipblasLtMatrixLayout_t
-----------------------
.. doxygentypedef:: hipblasLtMatrixLayout_t
Expand All @@ -59,3 +63,4 @@ hipblasLtMatrixLayoutAttribute_t
hipblasLtMatrixTransformDesc_t
--------------------------------
.. doxygentypedef:: hipblasLtMatrixTransformDesc_t

12 changes: 6 additions & 6 deletions projects/hipblaslt/library/include/hipblaslt/hipblaslt.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ typedef enum {
* \brief Block scale mode for A and B.
*/
typedef enum {
HIPBLASLT_MATMUL_MATRIX_SCALE_SCALAR_32F = 0, /** Scaling factors are single-precision scalars applied to the whole tensors (this mode is the default for fp8). */
HIPBLASLT_MATMUL_MATRIX_SCALE_VEC16_UE4M3 = 1, /** Not supported yet. Scaling factors are tensors that contain a dedicated scaling factor stored as an 8-bit HIP_R_8F_E4M3 value for each 16-element block in the innermost dimension of the corresponding data tensor. */
HIPBLASLT_MATMUL_MATRIX_SCALE_VEC32_UE8M0 = 2, /** Scaling factors are tensors that contain a dedicated scaling factor stored as an 8-bit R_8F_UE8M0 value for each 32-element block in the innermost dimension of the corresponding data tensor. */
HIPBLASLT_MATMUL_MATRIX_SCALE_OUTER_VEC_32F = 3, /** Scaling factors are single-precision vectors. This mode is only applicable to matrices A and B, in which case the vectors are expected to have M and N elements respectively, and each (i, j)-th element of product of A and B is multiplied by i-th element of A scale and j-th element of B scale. */
HIPBLASLT_MATMUL_MATRIX_SCALE_VEC128_32F = 4, /** Not supported yet. Scaling factors are tensors that contain a dedicated FP32 scaling factor for each 128-element block in the innermost dimension of the corresponding data tensor */
HIPBLASLT_MATMUL_MATRIX_SCALE_BLK128x128_32F = 5,/** Not supported yet. Scaling factors are tensors that contain a dedicated FP32 scaling factor for each 128x128-element block in the corresponding data tensor */
HIPBLASLT_MATMUL_MATRIX_SCALE_SCALAR_32F = 0, /**<Scaling factors are single-precision scalars applied to the whole tensors (this mode is the default for fp8). */
HIPBLASLT_MATMUL_MATRIX_SCALE_VEC16_UE4M3 = 1, /**<Not supported yet. Scaling factors are tensors that contain a dedicated scaling factor stored as an 8-bit HIP_R_8F_E4M3 value for each 16-element block in the innermost dimension of the corresponding data tensor. */
HIPBLASLT_MATMUL_MATRIX_SCALE_VEC32_UE8M0 = 2, /**<Scaling factors are tensors that contain a dedicated scaling factor stored as an 8-bit R_8F_UE8M0 value for each 32-element block in the innermost dimension of the corresponding data tensor. */
HIPBLASLT_MATMUL_MATRIX_SCALE_OUTER_VEC_32F = 3, /**<Scaling factors are single-precision vectors. This mode is only applicable to matrices A and B, in which case the vectors are expected to have M and N elements respectively, and each (i, j)-th element of product of A and B is multiplied by i-th element of A scale and j-th element of B scale. */
HIPBLASLT_MATMUL_MATRIX_SCALE_VEC128_32F = 4, /**<Not supported yet. Scaling factors are tensors that contain a dedicated FP32 scaling factor for each 128-element block in the innermost dimension of the corresponding data tensor */
HIPBLASLT_MATMUL_MATRIX_SCALE_BLK128x128_32F = 5, /**<Not supported yet. Scaling factors are tensors that contain a dedicated FP32 scaling factor for each 128x128-element block in the corresponding data tensor */
HIPBLASLT_MATMUL_MATRIX_SCALE_END
} hipblasLtMatmulMatrixScale_t;

Expand Down