Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ext/LinearSolveCUDAExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ end
function LinearSolve.init_cacheval(alg::CudaOffloadLUFactorization, A::AbstractArray, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
# Check if CUDA is functional before creating CUDA arrays
if !CUDA.functional()
return nothing
end

T = eltype(A)
noUnitT = typeof(zero(T))
luT = LinearAlgebra.lutype(noUnitT)
Expand All @@ -76,6 +81,11 @@ end
function LinearSolve.init_cacheval(alg::CudaOffloadQRFactorization, A, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
# Check if CUDA is functional before creating CUDA arrays
if !CUDA.functional()
return nothing
end

qr(CUDA.CuArray(A))
end

Expand Down
Loading