Skip to content

Commit

Permalink
Merge 6e9eba7 into 1bb2a3a
Browse files Browse the repository at this point in the history
  • Loading branch information
vpuri3 committed Apr 19, 2022
2 parents 1bb2a3a + 6e9eba7 commit 3978ab8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ function do_factorization(alg::GPUOffloadFactorization, A, b, u)
return fact
end

if VERSION <= v"1.7.2"

function LinearAlgebra.ldiv!(x::CUDA.CuArray,_qr::CUDA.CUSOLVER.CuQR,b::CUDA.CuArray)
_x = UpperTriangular(_qr.R) \ (_qr.Q' * reshape(b,length(b),1))
x .= vec(_x)
Expand All @@ -54,4 +56,6 @@ end
# make `\` work
LinearAlgebra.ldiv!(F::CUDA.CUSOLVER.CuQR, b::CUDA.CuArray) = (x = similar(b); ldiv!(x, F, b); x)

end

export GPUOffloadFactorization

0 comments on commit 3978ab8

Please sign in to comment.