Skip to content

Commit dd23441

Browse files
authored
Don't prefetch on multi-device systems (#2626)
1 parent 86b255e commit dd23441

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compiler/execution.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ function Adapt.adapt_storage(::KernelAdaptor, xs::DenseCuArray{T,N}) where {T,N}
151151
can_prefetch &= !__pinned(convert(Ptr{T}, mem), mem.ctx)
152152
## pageable memory needs to be accessible concurrently
153153
can_prefetch &= attribute(device(), DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS) == 1
154+
## don't prefetch on multi device systems.
155+
can_prefetch &= ndevices() == 1
154156

155157
if can_prefetch
156158
# TODO: `view` on buffers?

0 commit comments

Comments
 (0)