Skip to content

Commit

Permalink
Test for has_gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Jun 22, 2024
1 parent 98a5c10 commit 25c361a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/test_basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 25c361a

Please sign in to comment.