CUDA extension

Loaded with using CUDA. It accepts the sparse matrices of cuSPARSE and routes the dense operations of large fronts to cuBLAS and cuSOLVER.

SparseDirectSolver.CSR — Method
CSR(A::CuSparseMatrixCSC)

Wrap A (m × n) without copying as the CSR of transpose(A) (n × m, transposed = true), sharing colPtr, rowVal and nzVal.

source
SparseDirectSolver.CSR — Method
CSR(A::CuSparseMatrixCSR)

Wrap A without copying: the CSR shares rowPtr, colVal and nzVal (one-based, transposed = false).

source
SparseDirectSolver.DirectSolver — Method
DirectSolver(A::CuSparseMatrixCSR, structure::String, view::Char; index = 'O')
DirectSolver(A::CuSparseMatrixCSC, structure::String, view::Char; index = 'O')

Solver on A's arrays, without copies (≅ CudssSolver(A, structure, view)). A CuSparseMatrixCSC is read as the CSR of its transpose with the view flipped (MadNLP's lower-triangle CSC becomes an upper-triangle CSR), see DirectSolver.

source
cuSPARSE.CuSparseMatrixCSR — Method
CuSparseMatrixCSR(A::CSR)

The stored CSR matrix of A (the transposed flag is not applied) as a CuSparseMatrixCSR. One-based arrays are shared; zero-based index arrays are copied and rebased. Batches (nbatch(A) > 1) are rejected.

source
LinearAlgebra.cholesky — Function
cholesky(A::CuSparseMatrixCSR, NoPivot(); view = 'F', check = false) -> DirectSolver
cholesky(Symmetric(A::CuSparseMatrixCSR)) / cholesky(Hermitian(A::CuSparseMatrixCSR))

LLᵀ/LLᴴ factorization of A on the GPU (≅ CUDSS.jl's cholesky); the wrappers pass their uplo as the view. See cholesky(::CSR).

source
LinearAlgebra.ldlt — Method
ldlt(A::CuSparseMatrixCSR; view = 'F', check = false) -> DirectSolver
ldlt(Symmetric(A::CuSparseMatrixCSR)) / ldlt(Hermitian(A::CuSparseMatrixCSR))

LDLᵀ/LDLᴴ factorization of A on the GPU (≅ CUDSS.jl's ldlt); the wrappers pass their uplo as the view. See ldlt(::CSR).

source
LinearAlgebra.lu — Method
lu(A::CuSparseMatrixCSR; check = false) -> DirectSolver

L D U factorization (structure "G") of A on the GPU (≅ CUDSS.jl's lu). See lu(::CSR).

source
SparseDirectSolver.max_local_bytes — Method
max_local_bytes(::CUDABackend) -> Int

48 KiB: @localmem is static shared memory, and ptxas rejects more than 48 KiB of static shared data per kernel on every CUDA device (larger amounts need dynamic shared memory with an opt-in attribute). The regime-A kernels therefore stop at the 48 KiB class on CUDA (issue #60).

source
SparseDirectSolver.update! — Method
update!(solver::DirectSolver, A::CuSparseMatrixCSR)
update!(solver::DirectSolver, A::CuSparseMatrixCSC)

Point solver at the arrays of A (≅ cudss_update(solver, A)), see update!.

source