Skip to main content

Crate baracuda_cusolver

Crate baracuda_cusolver 

Source
Expand description

Safe Rust wrappers for NVIDIA cuSOLVER.

Covers the dense API (Dn) for all four BLAS scalar types:

  • LU factorization: getrf + getrs
  • QR factorization: geqrf
  • Cholesky: potrf + potrs
  • SVD: gesvd
  • Symmetric / Hermitian eigendecomposition: syevd / heevd

The generic 64-bit X… API (xgetrf, xgeqrf, xpotrf) gives type-erased data pointers and is exposed under xapi. The sparse API (cusolverSp*) is under sparse. The refactor API (cusolverRf*) is under refactor.

Modules§

mg
Multi-GPU dense solvers via libcusolverMg. Shares dimensions with the single-GPU API but takes arrays of device pointers (one per physical GPU after Handle::device_select).
refactor
cusolverRf* — fast re-factorization given a sparsity pattern, for solving many systems that differ only in numeric values.
sparse
cusolverSp* — solve sparse linear systems via Cholesky or QR.
xapi
The generic 64-bit cuSOLVER API (cusolverDnX*). Matrix dimensions are i64; element types are passed at call-time as cudaDataType. Workspace sizes are split between on-device and on-host buffers.

Structs§

DnHandle
Dense cuSOLVER handle.
GesvdjInfo
Jacobi-SVD tuning handle.
SyevjInfo
Jacobi-eigen tuning handle (tolerance + max sweeps).

Enums§

EigMode
Fill
Op
Transposition selector for solve-step calls.
Side
Side argument for ormqr.

Traits§

SolverScalar
Scalars supported by cuSOLVER’s Dn S/D/C/Z API.

Functions§

gels
Solve A * X = B in the least-squares sense (iterative-refinement). A is m × n, B is m × nrhs, X is n × nrhs. A and B may be overwritten. Returns iter: number of refinement iterations used (-1 = fallback to full precision).
geqrf
QR factorization: A = Q * R. Overwrites a (upper triangle = R, lower = Householder reflectors); tau receives reflector scalars.
gesvd
Full SVD: A = U * Σ * Vᵀ. jobu/jobvt are LAPACK-style single-byte selectors (b’A’ = all, b’S’ = economy, b’N’ = none, b’O’ = overwrite A).
gesvdj
Jacobi SVD: A = U * diag(s) * Vᴴ. econ selects thin-SVD when set.
gesvdj_batched
Batched Jacobi SVD: batch of m × n matrices with stride m×n.
getrf
In-place LU factorization of a column-major matrix. Overwrites a.
getrs
Solve op(A) * X = B using the LU factorization from getrf.
orgqr
Generate the orthogonal matrix Q from the factorization produced by geqrf. After this, a holds the first n columns of Q.
ormqr
Apply op(Q) to C: C = op(Q) * C (Left) or C = C * op(Q) (Right), where Q is packed in a+tau from geqrf.
potrf
Cholesky factorization: A = L * Lᵀ (or Uᵀ * U). Overwrites a.
potri
Compute A = (Lᵀ * L)⁻¹ or A = (U * Uᵀ)⁻¹ given the Cholesky factor already stored in the triangle selected by uplo. a must hold the output of potrf in-place.
potrs
Solve A * X = B using the Cholesky factorization from potrf.
sgetrf
Shortcut for getrf on f32.
sgetrs
Shortcut for getrs on f32.
syevd
Symmetric / Hermitian eigenvalue decomposition: A = Q * diag(w) * Qᵀ.
syevj
Jacobi symmetric/Hermitian eigendecomposition (smaller matrices than syevd, faster convergence on well-conditioned problems).
syevj_batched
Batched Jacobi symmetric/Hermitian eigendecomposition. Every matrix in the batch is n × n and stride n × n. w holds n * batch_size eigenvalues, strided by n.

Type Aliases§

Error
Error type for cuSOLVER operations.
GesvdjInfoRaw
Result
Result alias.
SyevjInfoRaw