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.
SparseDirectSolver.CSR — Method
CSR(A::CuSparseMatrixCSR)Wrap A without copying: the CSR shares rowPtr, colVal and nzVal (one-based, transposed = false).
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.
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.
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).
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).
LinearAlgebra.lu — Method
lu(A::CuSparseMatrixCSR; check = false) -> DirectSolverL D U factorization (structure "G") of A on the GPU (≅ CUDSS.jl's lu). See lu(::CSR).
SparseDirectSolver.max_local_bytes — Method
max_local_bytes(::CUDABackend) -> Int48 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).
SparseDirectSolver.max_threads_per_multiprocessor — Method
max_threads_per_multiprocessor(::CUDABackend) -> IntCU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR of the current device.
SparseDirectSolver.to_backend — Method
to_backend(A::SparseMatrixCSC, ::CUDABackend; index = 'O') -> CSRCSR arrays of A built on the host, then uploaded as CuVectors.
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!.