@@ -129,7 +129,7 @@ function LinearSolve.init_cacheval(
129129 maxiters:: Int , abstol, reltol,
130130 verbose:: Union{LinearVerbosity, Bool} , assumptions:: OperatorAssumptions ) where {T <: BLASELTYPES }
131131 if LinearSolve. is_cusparse (A)
132- ArrayInterface. lu_instance (A)
132+ LinearSolve . cudss_loaded (A) ? ArrayInterface. lu_instance (A) : nothing
133133 else
134134 SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {T, Int64} (
135135 zero (Int64), zero (Int64), [Int64 (1 )], Int64[], T[]))
@@ -141,7 +141,7 @@ function LinearSolve.init_cacheval(
141141 maxiters:: Int , abstol, reltol,
142142 verbose:: Union{LinearVerbosity, Bool} , assumptions:: OperatorAssumptions ) where {T <: BLASELTYPES }
143143 if LinearSolve. is_cusparse (A)
144- ArrayInterface. lu_instance (A)
144+ LinearSolve . cudss_loaded (A) ? ArrayInterface. lu_instance (A) : nothing
145145 else
146146 SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {T, Int32} (
147147 zero (Int32), zero (Int32), [Int32 (1 )], Int32[], T[]))
@@ -344,7 +344,13 @@ function LinearSolve.init_cacheval(alg::NormalCholeskyFactorization,
344344 Symmetric{T, <: AbstractSparseArray{T} }}, b, u, Pl, Pr,
345345 maxiters:: Int , abstol, reltol, verbose:: Union{LinearVerbosity, Bool} ,
346346 assumptions:: OperatorAssumptions ) where {T <: BLASELTYPES }
347- ArrayInterface. cholesky_instance (convert (AbstractMatrix, A))
347+ if LinearSolve. is_cusparse_csc (A)
348+ nothing
349+ elseif LinearSolve. is_cusparse_csr (A) && ! LinearSolve. cudss_loaded (A)
350+ nothing
351+ else
352+ ArrayInterface. cholesky_instance (convert (AbstractMatrix, A))
353+ end
348354end
349355
350356# Specialize QR for the non-square case
0 commit comments