Skip to content

Commit 61a6abb

Browse files
committed
try CUDA.synchonize
1 parent b4e65b3 commit 61a6abb

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/cuda.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ function Base.cconvert(::Type{MPIPtr}, buf::CUDA.CuArray{T}) where T
55
end
66

77
function Base.unsafe_convert(::Type{MPIPtr}, X::CUDA.CuArray{T}) where T
8+
CUDA.synchronize(CUDA.CuDefaultStream())
89
reinterpret(MPIPtr, Base.unsafe_convert(CUDA.CuPtr{T}, X))
910
end
1011

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ using Test, MPI
44
using DoubleFloats
55
if get(ENV,"JULIA_MPI_TEST_ARRAYTYPE","") == "CuArray"
66
import CUDA
7+
CUDA.version()
8+
CUDA.precompile_runtime()
79
ArrayType = CUDA.CuArray
810
else
911
ArrayType = Array

0 commit comments

Comments
 (0)