From fbc1b4b397b7f48d0752a66629810f8b247f217a Mon Sep 17 00:00:00 2001 From: "Abdelrahman Fathy (Tee)" Date: Tue, 15 Oct 2024 20:11:58 +0200 Subject: [PATCH] minor fix --- docs/src/literate-tutorials/gpu_qp_heat_equation.jl | 4 ++-- test/GPU/test_kernellauncher.jl | 5 ++--- test/GPU/test_utils.jl | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/src/literate-tutorials/gpu_qp_heat_equation.jl b/docs/src/literate-tutorials/gpu_qp_heat_equation.jl index d1ec5ee74e..d6afb95cc9 100644 --- a/docs/src/literate-tutorials/gpu_qp_heat_equation.jl +++ b/docs/src/literate-tutorials/gpu_qp_heat_equation.jl @@ -143,8 +143,8 @@ K = allocate_matrix(SparseMatrixCSC{Float32, Int32},dh); # Allocate GPU matrix ## commented to pass the test -Kgpu = CUSPARSE.CuSparseMatrixCSC(K); -fgpu = CUDA.zeros(ndofs(dh)); +## Kgpu = CUSPARSE.CuSparseMatrixCSC(K); +## fgpu = CUDA.zeros(ndofs(dh)); n_cells = dh |> get_grid |> getncells diff --git a/test/GPU/test_kernellauncher.jl b/test/GPU/test_kernellauncher.jl index af7617ee67..575e508edc 100644 --- a/test/GPU/test_kernellauncher.jl +++ b/test/GPU/test_kernellauncher.jl @@ -20,16 +20,15 @@ end A = CUDA.fill(1.0f0, N) B = CUDA.fill(2.0f0, N) C = CUDA.fill(0.0f0, N) - + # Test with Int32 test_launch_kernel!(Int32(N), Int32(2), A, B, C, N) CUDA.synchronize() @test all(Array(C) .== 3.0f0) - + # Test with Int64 fill!(C, 0.0f0) # reset C array test_launch_kernel!(Int64(N), Int64(2), A, B, C, N) CUDA.synchronize() @test all(Array(C) .== 3.0f0) end - diff --git a/test/GPU/test_utils.jl b/test/GPU/test_utils.jl index beae702bcb..0bae2325d0 100644 --- a/test/GPU/test_utils.jl +++ b/test/GPU/test_utils.jl @@ -20,4 +20,4 @@ function generate_problem() close!(dh) return dh, cellvalues -end \ No newline at end of file +end