From cc36d665d7db0bdbfcb0915a9f55e2c599d0c149 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Thu, 14 Mar 2024 21:20:00 +0100 Subject: [PATCH] Update the function cudss_generic --- test/test_cudss.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test_cudss.jl b/test/test_cudss.jl index e202067..50ea65c 100644 --- a/test/test_cudss.jl +++ b/test/test_cudss.jl @@ -246,7 +246,7 @@ function cudss_generic() end @testset "Symmetric -- Hermitian" begin - @testset "view = $view" for view in ('F',) + @testset "view = $view" for view in ('F', 'L', 'U') A_cpu = sprand(T, n, n, 0.01) + I A_cpu = A_cpu + A_cpu' B_cpu = rand(T, n, p) @@ -262,7 +262,7 @@ function cudss_generic() solver = ldlt(A_gpu; view) ldiv!(X_gpu, solver, B_gpu) - R_gpu = B_gpu - A_gpu * X_gpu + R_gpu = B_gpu - CuSparseMatrixCSR(A_cpu) * X_gpu @test norm(R_gpu) ≤ √eps(R) c = rand(R) @@ -279,7 +279,7 @@ function cudss_generic() @testset "\\" begin solver = ldlt(A_gpu; view) X_gpu = solver \ B_gpu - R_gpu = B_gpu - A_gpu * X_gpu + R_gpu = B_gpu - CuSparseMatrixCSR(A_cpu) * X_gpu @test norm(R_gpu) ≤ √eps(R) c = rand(R) @@ -295,7 +295,7 @@ function cudss_generic() end @testset "SPD -- HPD" begin - @testset "view = $view" for view in ('F',) + @testset "view = $view" for view in ('F', 'L', 'U') A_cpu = sprand(T, n, n, 0.01) A_cpu = A_cpu * A_cpu' + I B_cpu = rand(T, n, p) @@ -311,7 +311,7 @@ function cudss_generic() solver = cholesky(A_gpu; view) ldiv!(X_gpu, solver, B_gpu) - R_gpu = B_gpu - A_gpu * X_gpu + R_gpu = B_gpu - CuSparseMatrixCSR(A_cpu) * X_gpu @test norm(R_gpu) ≤ √eps(R) c = rand(R) @@ -328,7 +328,7 @@ function cudss_generic() @testset "\\" begin solver = cholesky(A_gpu; view) X_gpu = solver \ B_gpu - R_gpu = B_gpu - A_gpu * X_gpu + R_gpu = B_gpu - CuSparseMatrixCSR(A_cpu) * X_gpu @test norm(R_gpu) ≤ √eps(R) c = rand(R)