Introduction#
Library overview#
hipSOLVER is an open-source marshalling library for LAPACK routines on the GPU. It sits between the backend library and the user application, marshalling inputs to and outputs from the backend library. Currently, two backend libraries are supported by hipSOLVER: NVIDIA’s cuSOLVER library and AMD’s open-source rocSOLVER library.
Currently implemented functionality#
The hipSOLVER library remains in active development. New features are being continuously added, with new functionality documented at each release of the ROCm platform.
The following tables summarize the wrapper functions that are implemented for the different supported precisions in hipSOLVER’s latest release.
LAPACK auxiliary functions#
Function |
single |
double |
single complex |
double complex |
---|---|---|---|---|
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
Function |
single |
double |
single complex |
double complex |
---|---|---|---|---|
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
LAPACK main functions#
Function |
single |
double |
single complex |
double complex |
---|---|---|---|---|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
Function |
single |
double |
single complex |
double complex |
---|---|---|---|---|
x |
x |
x |
x |
|
x |
x |
x |
x |
Function |
single |
double |
single complex |
double complex |
---|---|---|---|---|
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
x |
x |
|
x |
x |
x |
x |
Function |
single |
double |
single complex |
double complex |
---|---|---|---|---|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
Function |
single |
double |
single complex |
double complex |
---|---|---|---|---|
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
Function |
single |
double |
single complex |
double complex |
---|---|---|---|---|
x |
x |
x |
x |
|
x |
x |
x |
x |
Differences with the cuSOLVER API#
While the API of hipSOLVER is similar to that of cuSOLVER, there are some notable differences. In particular:
hipsolverXgesvd_bufferSize requires jobu and jobv as arguments
hipsolverXgetrf requires lwork as an argument
hipsolverXgetrs requires work and lwork as arguments
hipsolverXpotrfBatched requires work and lwork as arguments
hipsolverXpotrs requires work and lwork as arguments, and
hipsolverXpotrsBatched requires work and lwork as arguments.
In order to support these changes, hipSOLVER adds the following functions as well:
Furthermore, due to differences in implementation and API design between rocSOLVER and cuSOLVER, not all arguments are handled identically between the two backends. When using the rocSOLVER backend, keep in mind the following differences:
While many cuSOLVER and hipSOLVER functions take a workspace pointer and size as arguments, rocSOLVER maintains its own internal device workspace by default. In order to take advantage of this feature, users may pass a null pointer for the work argument of any function when using the rocSOLVER backend, and the workspace will be automatically managed behind-the-scenes. It is recommended to use a consistent strategy for workspace management, as performance issues may arise if the internal workspace is made to flip-flop between user-provided and automatically allocated workspaces.
Additionally, unlike cuSOLVER, rocSOLVER does not provide information on invalid arguments in its info arguments, though it will provide info on singularities and algorithm convergence. As a result, the info argument of many functions will not be referenced or altered by the rocSOLVER backend, excepting those that provide info on singularities or convergence.
The niters argument of hipsolverXXgesv is not referenced by the rocSOLVER backend.