From 25c361a6725e5e78d4afdbc718fcb79ee626ebcd Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 22 Jun 2024 10:01:03 -0700 Subject: [PATCH] Test for has_gpu --- test/test_basic.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/test_basic.jl b/test/test_basic.jl index 57b6a65e5..3da013963 100644 --- a/test/test_basic.jl +++ b/test/test_basic.jl @@ -8,16 +8,22 @@ MPI.Init() @test MPI.has_cuda() isa Bool -if get(ENV,"JULIA_MPI_TEST_ARRAYTYPE","") == "CuArray" +if get(ENV, "JULIA_MPI_TEST_ARRAYTYPE", "") == "CuArray" @test MPI.has_cuda() end @test MPI.has_rocm() isa Bool -if get(ENV,"JULIA_MPI_TEST_ARRAYTYPE","") == "ROCArray" +if get(ENV, "JULIA_MPI_TEST_ARRAYTYPE", "") == "ROCArray" @test MPI.has_rocm() end +@test MPI.has_gpu() isa Bool + +if get(ENV, "JULIA_MPI_TEST_ARRAYTYPE", "") == "CuArray" || get(ENV, "JULIA_MPI_TEST_ARRAYTYPE", "") == "ROCArray" + @test MPI.has_gpu() +end + @test !MPI.Finalized() MPI.Finalize() @test MPI.Finalized()