rocBLAS precision support#
This topic lists the data type support for the rocBLAS library on AMD GPUs for different levels of BLAS operations Level 1, 2, and 3.
The rocBLAS library functions are also available with ILP64 interfaces. With
these interfaces, all rocblas_int arguments are replaced by the type name
int64_t. For more information on these _64 functions, see the
ILP64 interface section.
This page lists the data types supported by the library itself and does not indicate hardware support. A type listed here is only usable if the GPU architecture also supports it; otherwise it is unsupported. For data type support across the other ROCm libraries and by GPU architecture, see the Data types and precision support page.
Supported data types overview#
The following table summarizes the input and output data types supported by rocBLAS. For per-function support details, see the operation-level tables in the following sections.
Icon |
Definition |
|---|---|
✅ |
Fully supported as both an input and output type. |
⚠️ |
Partially supported as an input or output type. |
Data types not listed in the table below are not supported.
Data type |
Support |
|---|---|
int8 |
⚠️ |
int32 |
⚠️ |
float16 |
⚠️ |
bfloat16 |
⚠️ |
float32 |
✅ |
float64 |
✅ |
cfloat32 |
✅ |
cfloat64 |
✅ |
Functions data type support#
The following sections list the per-function data type support for each level of BLAS operation. The icons representing different levels of support are explained in the following table.
Icon |
Definition |
|---|---|
NA |
Not applicable |
❌ |
Not supported |
⚠️ |
Partial support |
✅ |
Full support |
Level 1 functions - vector operations#
Level-1 functions perform scalar, vector, and vector-vector operations.
Function |
Description |
float16 |
bfloat16 |
float |
double |
|---|---|---|---|---|---|
Finds the first index of the element of minimum or maximum magnitude of a vector x or computes the sum of the magnitudes of elements of a real vector x. |
❌ |
❌ |
✅ |
✅ |
|
Scales a vector and adds it to another: \(y = \alpha x + y\) |
✅ |
❌ |
✅ |
✅ |
|
Copies vector x to y: \(y = x\) |
❌ |
❌ |
✅ |
✅ |
|
Computes the dot product: \(result = x^T y\) |
✅ |
✅ |
✅ |
✅ |
|
Computes the Euclidean norm of a vector. |
❌ |
❌ |
✅ |
✅ |
|
Applies and generates a Givens rotation matrix. |
❌ |
❌ |
✅ |
✅ |
|
Applies and generates a modified Givens rotation matrix. |
❌ |
❌ |
✅ |
✅ |
|
Scales a vector by a scalar: \(x = \alpha x\) |
❌ |
❌ |
✅ |
✅ |
|
Swaps corresponding elements of two vectors x and y: \(x_i \leftrightarrow y_i \quad \text{for} \quad i = 0, 1, 2, \ldots, n - 1\) |
❌ |
❌ |
✅ |
✅ |
Function |
Description |
complex |
double complex |
|---|---|---|---|
Finds the first index of the element of minimum or maximum magnitude of a vector x or computes the sum of the magnitudes of elements of a real vector x. |
✅ |
✅ |
|
Scales a vector and adds it to another: \(y = \alpha x + y\) |
✅ |
✅ |
|
Copies vector x to y: \(y = x\) |
✅ |
✅ |
|
Computes the dot product: \(result = x^T y\) |
✅ |
✅ |
|
Computes the Euclidean norm of a vector. |
✅ |
✅ |
|
Applies and generates a Givens rotation matrix. |
✅ |
✅ |
|
Applies and generates a modified Givens rotation matrix. |
❌ |
❌ |
|
Scales a vector by a scalar: \(x = \alpha x\) |
✅ |
✅ |
|
Swaps corresponding elements of two vectors x and y: \(x_i \leftrightarrow y_i \quad \text{for} \quad i = 0, 1, 2, \ldots, n - 1\) |
✅ |
✅ |
Level 2 functions - matrix-vector operations#
Level-2 functions perform matrix-vector operations.
Function |
Description |
float16 |
bfloat16 |
float |
double |
|---|---|---|---|---|---|
General band matrix-vector multiplication: \(y = \alpha A x + \beta y\) |
❌ |
❌ |
✅ |
✅ |
|
General matrix-vector multiplication: \(y = \alpha A x + \beta y\) |
⚠️ [1] |
⚠️ [1] |
✅ |
✅ |
|
Generalized rank-1 update: \(A = \alpha x y^T + A\) |
❌ |
❌ |
✅ |
✅ |
|
Generalized rank-1 update for unconjugated or conjugated complex numbers: \(A = \alpha x y^T + A\) |
❌ |
❌ |
❌ |
❌ |
|
Symmetric Band matrix-vector multiplication: \(y = \alpha A x + \beta y\) |
❌ |
❌ |
✅ |
✅ |
|
Symmetric packed rank-1 update. |
❌ |
❌ |
✅ |
✅ |
|
Symmetric packed rank-2 update. |
❌ |
❌ |
✅ |
✅ |
|
Symmetric matrix-vector multiplication: \(y = \alpha A x + \beta y\) |
❌ |
❌ |
✅ |
✅ |
|
Symmetric matrix rank-1 or rank-2 update. |
❌ |
❌ |
✅ |
✅ |
|
Triangular band matrix-vector multiplication, triangular band solve. |
❌ |
❌ |
✅ |
✅ |
|
Triangular packed matrix-vector multiplication, triangular packed solve. |
❌ |
❌ |
✅ |
✅ |
|
Triangular matrix-vector multiplication, triangular solve. |
❌ |
❌ |
✅ |
✅ |
|
Hermitian matrix-vector multiplication. |
NA |
NA |
NA |
NA |
|
Hermitian rank-1 and rank-2 update. |
NA |
NA |
NA |
NA |
|
Hermitian packed rank-1 and rank-2 update of packed. |
NA |
NA |
NA |
NA |
Function |
Description |
complex |
double complex |
|---|---|---|---|
General band matrix-vector multiplication: \(y = \alpha A x + \beta y\) |
✅ |
✅ |
|
General matrix-vector multiplication: \(y = \alpha A x + \beta y\) |
✅ |
✅ |
|
Generalized rank-1 update: \(A = \alpha x y^T + A\) |
❌ |
❌ |
|
Generalized rank-1 update for unconjugated or conjugated complex numbers: \(A = \alpha x y^T + A\) |
✅ |
✅ |
|
Symmetric Band matrix-vector multiplication: \(y = \alpha A x + \beta y\) |
❌ |
❌ |
|
Symmetric packed rank-1 update. |
✅ |
✅ |
|
Symmetric packed rank-2 update. |
❌ |
❌ |
|
Symmetric matrix-vector multiplication: \(y = \alpha A x + \beta y\) |
✅ |
✅ |
|
Symmetric matrix rank-1 or rank-2 update. |
✅ |
✅ |
|
Triangular band matrix-vector multiplication, triangular band solve. |
✅ |
✅ |
|
Triangular packed matrix-vector multiplication, triangular packed solve. |
✅ |
✅ |
|
Triangular matrix-vector multiplication, triangular solve. |
✅ |
✅ |
|
Hermitian matrix-vector multiplication. |
✅ |
✅ |
|
Hermitian rank-1 and rank-2 update. |
✅ |
✅ |
|
Hermitian packed rank-1 and rank-2 update. |
✅ |
✅ |
Level 3 functions - matrix-matrix operations#
Level-3 functions perform matrix-matrix operations. rocBLAS calls the AMD Tensile and hipBLASLt libraries for Level-3 GEMMs (matrix matrix multiplication).
Function |
Description |
float16 |
bfloat16 |
float |
double |
|---|---|---|---|---|---|
General matrix-matrix multiplication: \(C = \alpha A B + \beta C\) |
✅ |
❌ |
✅ |
✅ |
|
Symmetric matrix-matrix multiplication: \(C = \alpha A B + \beta C\) |
❌ |
❌ |
✅ |
✅ |
|
Update symmetric matrix with one matrix product or by using two matrices. |
❌ |
❌ |
✅ |
✅ |
|
SYRKX adds an extra matrix multiplication step before updating the symmetric matrix. |
❌ |
❌ |
✅ |
✅ |
|
Triangular matrix-matrix multiplication. |
❌ |
❌ |
✅ |
✅ |
|
Triangular solve with multiple right-hand sides. |
❌ |
❌ |
✅ |
✅ |
|
Hermitian matrix-matrix multiplication. |
NA |
NA |
NA |
NA |
|
Update Hermitian matrix with one matrix product or by using two matrices. |
NA |
NA |
NA |
NA |
|
HERKX adds an extra matrix multiplication step before updating the Hermitian matrix. |
NA |
NA |
NA |
NA |
|
Triangular matrix inversion. |
❌ |
❌ |
✅ |
✅ |
Function |
Description |
complex |
double complex |
|---|---|---|---|
General matrix-matrix multiplication: \(C = \alpha A B + \beta C\) |
✅ |
✅ |
|
Symmetric matrix-matrix multiplication: \(C = \alpha A B + \beta C\) |
✅ |
✅ |
|
Update symmetric matrix with one matrix product or by using two matrices. |
✅ |
✅ |
|
SYRKX adds an extra matrix multiplication step before updating the symmetric matrix. |
✅ |
✅ |
|
Triangular matrix-matrix multiplication. |
✅ |
✅ |
|
Triangular solve with multiple right-hand sides. |
✅ |
✅ |
|
Hermitian matrix-matrix multiplication. |
✅ |
✅ |
|
Update Hermitian matrix with one matrix product or by using two matrices. |
✅ |
✅ |
|
HERKX adds an extra matrix multiplication step before updating the Hermitian matrix. |
✅ |
✅ |
|
Triangular matrix inversion. |
❌ |
❌ |
Extensions#
The extension function data type support is listed for every function separately on the Extensions reference page.
Footnotes