Skip to content

Commit d559e8b

Browse files
Update ext/LinearSolveCUSOLVERRFExt.jl
1 parent 62bc9ae commit d559e8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/LinearSolveCUSOLVERRFExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ function SciMLBase.solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.CUSOL
6767
u_gpu = cache.u isa CUDA.CuArray ? cache.u : CUDA.CuArray(cache.u)
6868

6969
# Solve
70-
ldiv!(u_gpu, F, b_gpu)
70+
copyto!(u_gpu, b_gpu)
71+
ldiv!(F, u_gpu)
7172

7273
# Copy back to CPU if needed
7374
if !(cache.u isa CUDA.CuArray)

0 commit comments

Comments
 (0)