Skip to main content

Module solver

Module solver 

Source
Expand description

SolverActor — wraps a [cudarc::cusolver::DnHandle] for dense linear algebra and a [cudarc::cusolver::SpHandle] for sparse solves (gated cusolver-sp).

Phase 1 cuSOLVER scope:

  • Dense: Qr, Lu (factorize / solve), Cholesky, Svd, Syevd for f32 and f64 (see dense).
  • Batched: getrfBatched (cuBLAS-side LU, lifted into this actor for symmetry), potrfBatched, gesvdjBatched (see batched).
  • Generalized symmetric eigenvalue: Sygvd / Hegvd (real variants today; complex Hermitian deferred — see generalized).
  • Sparse: cusolverSp Cholesky / QR solves over CSR matrices (gated cusolver-sp, see [sparse]).

Implementation notes:

  • cudarc 0.19’s safe layer exposes only handle management; per-op entry points live in cusolver::sys and are wired through crate::sys::cusolver::SolverScalar into a dtype-generic surface (see crate/src/sys/cusolver.rs).
  • Each op queries the cuSOLVER workspace size, grows our on-demand CudaSlice<u8> workspace, then dispatches the factorisation. The 1-element info buffer is read back to detect failures (singular matrix, illegal arg, etc.).
  • SolverMsg::Op(Box<dyn SolverDispatch>) is the canonical surface; the typed Qr / Lu / Cholesky / Svd / Syevd variants are kept as #[deprecated] aliases for backward compatibility with the f32-only Phase 0 layout.

Re-exports§

pub use batched::GesvdjBatchedRequest;
pub use batched::GetrfBatchedRequest;
pub use batched::PotrfBatchedRequest;
pub use dense::CholeskyRequest;
pub use dense::LuRequest;
pub use dense::LuSolveRequest;
pub use dense::QrRequest;
pub use dense::SvdRequest;
pub use dense::SyevdRequest;
pub use generalized::HegvdRequest;
pub use generalized::SygvdRequest;

Modules§

batched
Batched cuSOLVER ops.
dense
Dense cuSOLVER ops: QR, LU (factorize / solve), Cholesky, SVD, Syevd. Each request struct is generic over T: SolverSupported (f32, f64) and dispatches through crate::sys::cusolver::SolverScalar.
generalized
Generalized symmetric / Hermitian eigenvalue problems.

Structs§

SolverActor
SolverCells
Crate-private cells the dispatch traits operate against. Passed to SolverDispatch::dispatch as a single bundle so each op implementation only depends on what it actually uses.

Enums§

SolverMsg
Uplo
Storage triangle for symmetric / Hermitian / triangular factorisations.

Traits§

SolverDispatch
Trait implemented by every solver request. The actor turns the boxed trait object back into a typed launcher and forwards the runtime cells.