hipSOLVER precision support#
This section provides an overview of the numerical precision types supported by the hipSOLVER library. hipSOLVER provides a consistent interface to linear algebra solvers that can run on AMD hardware.
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 hipSOLVER. For the precision-prefix naming convention and how precision appears in function signatures, see the sections that follow.
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 |
|---|---|
float32 |
✅ |
float64 |
✅ |
cfloat32 |
✅ |
cfloat64 |
✅ |
Supported precision types#
hipSOLVER supports four primary precision types across its functions:
Type prefix |
C++ type |
Description |
|---|---|---|
|
|
Single-precision real (32-bit) |
|
|
Double-precision real (64-bit) |
|
|
Single-precision complex (32-bit real, 32-bit imaginary) |
|
|
Double-precision complex (64-bit real, 64-bit imaginary) |
Function naming convention#
hipSOLVER follows the LAPACK naming convention where the first letter of the function name indicates the precision type:
Functions beginning with
hipsolverSoperate on single-precision real data.Functions beginning with
hipsolverDoperate on double-precision real data.Functions beginning with
hipsolverCoperate on single-precision complex data.Functions beginning with
hipsolverZoperate on double-precision complex data.
For example, the Cholesky factorization function potrf is implemented as:
hipsolverSpotrf- For single-precision real matriceshipsolverDpotrf- For double-precision real matriceshipsolverCpotrf- For single-precision complex matriceshipsolverZpotrf- For double-precision complex matrices
In the documentation, these are sometimes represented generically as hipsolver<T>potrf(), where <T>
is a placeholder for the precision type prefix.
Understanding precision in function signatures#
In the function signatures throughout the documentation, precision information is indicated directly in the parameter types. For example:
hipsolver_status hipsolverSpotrf(hipsolverHandle_t handle,
hipsolverFillMode_t uplo,
int n,
float *A,
int lda,
float *work,
int lwork,
int *devInfo)
The parameter types (float, double, hipFloatComplex, or hipDoubleComplex) correspond to the
function prefix and indicate the precision used by that specific function variant.
Real versus complex precision#
Some LAPACK-based functions in hipSOLVER have different behaviors or names when operating on real versus complex data:
Functions for symmetric matrices (prefix
sy) use the same name for both real precision types.Functions for Hermitian matrices (prefix
he) are used for complex precision types.Some auxiliary routines might be specific to real or complex precision types.
For example, hipsolverSsyevj and hipsolverDsyevj handle real symmetric matrices, while hipsolverCheevj
and hipsolverZheevj handle complex Hermitian matrices.