Skip to content

Commit 6e932ab

Browse files
committed
Support CUDA 5.1
1 parent 49a799b commit 6e932ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ext/RavenCUDAExt.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ Raven.Stream(::CUDABackend) = CuStream()
5050
Raven.synchronize(::CUDABackend, a) = synchronize(a)
5151
Raven.stream!(f::Function, ::CUDABackend, stream::CuStream) = stream!(f, stream)
5252

53-
Adapt.adapt_storage(::CUDA.Adaptor, ::MPI.Comm) = nothing
53+
if isdefined(CUDA, :Adaptor)
54+
# CUDA.Adaptor was removed in CUDA.jl v5.1
55+
Adapt.adapt_storage(::CUDA.Adaptor, ::MPI.Comm) = nothing
56+
else
57+
# CUDA.KernelAdaptor was introduced in CUDA.jl v5.1
58+
Adapt.adapt_storage(::CUDA.KernelAdaptor, ::MPI.Comm) = nothing
59+
end
5460

5561
end # module RavenCUDAExt

0 commit comments

Comments
 (0)