Skip to content

Commit

Permalink
Update gpu.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison authored Nov 30, 2023
1 parent 0ccd647 commit 8917a13
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/gpu/gpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ function test_operator(FC, V, DM, SM)
mul!(y_gpu, opA_gpu, x_gpu)
@test collect(y_gpu) y_cpu
end
for j = 1:5
for j = 10:10:50
y_cpu = rand(FC, m)
x_cpu = rand(FC, n)
A_cpu2 = A_cpu + j*I
A_cpu2 = j*A_cpu
mul!(y_cpu, A_cpu2, x_cpu)
y_gpu = V(y_cpu)
x_gpu = V(x_cpu)
A_gpu2 = A_gpu + j*I
A_gpu2 = j*A_gpu
update_operator!(opA_gpu, A_gpu2)
mul!(y_gpu, opA_gpu, x_gpu)
@test collect(y_gpu) y_cpu
Expand All @@ -98,14 +98,14 @@ function test_operator(FC, V, DM, SM)
mul!(Y_gpu, opA_gpu, X_gpu)
@test collect(Y_gpu) Y_cpu
end
for j = 1:5
for j = 10:10:50
Y_cpu = rand(FC, m, nrhs)
X_cpu = rand(FC, n, nrhs)
A_cpu2 = A_cpu + j*I
A_cpu2 = j*A_cpu
mul!(Y_cpu, A_cpu2, X_cpu)
Y_gpu = DM(Y_cpu)
X_gpu = DM(X_cpu)
A_gpu2 = A_gpu + j*I
A_gpu2 = j*A_gpu
update_operator!(opA_gpu, A_gpu2)
mul!(Y_gpu, opA_gpu, X_gpu)
@test collect(Y_gpu) Y_cpu
Expand Down

0 comments on commit 8917a13

Please sign in to comment.