The nvmath. module is experimental and potentially subject to future changes.
cuSOLVERDx APIs (nvmath. device)#
Overview#
These APIs offer integration with the NVIDIA cuSOLVERDx library, providing device-level dense matrix factorization and linear solver functions that execute directly within CUDA kernels. Detailed documentation of cuSOLVERDx can be found in the cuSOLVERDx documentation.
Note
The solver device APIs support both the numba-cuda and the numba-cuda-mlir
compilers. See Supported Compilers for details.
Architecture#
The nvmath-python cuSOLVERDx API is organized into two layers:
Solver Class: 1:1 C++ Binding
The Solver class provides a direct 1:1 binding to the cuSOLVERDx
C++ API, offering complete control over all library features and parameters.
This interface allows users to access the flexibility of cuSOLVERDx with Python
syntax, maintaining compatibility with the underlying C++ library semantics.
Pythonic Adapters
The API provides several adapter classes to simplify common use cases:
CholeskySolver- Specialized for Cholesky factorization and solve operations on symmetric positive definite matricesLUSolver- Specialized for LU factorization without pivoting and solve operations on general matricesLUPivotSolver- Specialized for LU factorization with partial pivoting and solve operations on general matricesQRFactorize- Specialized for QR factorization of general matricesLQFactorize- Specialized for LQ factorization of general matricesQRMultiply- Specialized for multiplication by the unitary matrix Q from a QR factorizationLQMultiply- Specialized for multiplication by the unitary matrix Q from an LQ factorizationTriangularSolver- Specialized for solve operations on triangular matricesLeastSquaresSolver- Specialized for solving overdetermined or underdetermined least squares problems
Supported Functions#
The following table lists all supported cuSOLVERDx functions with their corresponding Python adapters:
Function |
Description |
Adapter Class |
|---|---|---|
Cholesky factorization |
||
Linear system solve after Cholesky factorization |
||
Fused Cholesky factorization with solve |
||
LU factorization without pivoting |
||
LU solve without pivoting |
||
Fused LU factorization (without pivoting) with solve |
||
LU factorization with partial pivoting |
||
LU solve with partial pivoting |
||
Fused LU factorization (with partial pivoting) with solve |
||
QR factorization |
||
Multiplication of Q from QR factorization |
||
ungqr [0.3.2] |
Unitary matrix Q generation from QR factorization |
|
LQ factorization |
||
Multiplication of Q from LQ factorization |
||
unglq [0.3.2] |
Unitary matrix Q generation from LQ factorization |
|
Triangular matrix-matrix solve |
||
Overdetermined or underdetermined least squares problems |
||
gtsv_no_pivot [0.3.2] |
General tridiagonal matrix solve without pivoting |
|
htev [0.3.2] |
Eigenvalue solver for Hermitian tridiagonal matrices |
|
heev [0.3.2] |
Eigenvalue solver for Hermitian dense matrices |
Version Support#
Note
All functionality up to cuSOLVERDx 0.2.1 is fully supported. Functionality from cuSOLVERDx 0.4.0 or later is partially supported.
Functions marked with [0.3.2] require libmathdx 0.3.2 or later and are
only accessible through the base Solver class.
API Reference#
|
A class that encapsulates a partial dense matrix factorization and solve device function. |
|
A class that encapsulates Cholesky factorization and solve device functions for Hermitian positive definite matrices. |
|
A class that encapsulates cuSOLVERDx LU factorization without pivoting and linear solver for general matrices. |
|
A class that encapsulates cuSOLVERDx LU factorization with partial pivoting and linear solver for general matrices. |
|
A class that encapsulates QR orthogonal factorization device function for general matrices using Householder reflections. |
|
A class that encapsulates LQ orthogonal factorization device function for general matrices using Householder reflections. |
|
A class that encapsulates the multiplication of a matrix C by the unitary matrix Q from a QR factorization (UNMQR operation). |
|
A class that encapsulates the multiplication of a matrix C by the unitary matrix Q from an LQ factorization (UNMLQ operation). |
|
A class that encapsulates triangular matrix-matrix solve device function ( |
|
A class that encapsulates least squares solver device function ( |