Skip to content

Commit

Permalink
Don't prefetch on multi-device systems
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Jan 20, 2025
1 parent 7bee37c commit d19ccd6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ function Adapt.adapt_storage(::KernelAdaptor, xs::DenseCuArray{T,N}) where {T,N}
can_prefetch &= !__pinned(convert(Ptr{T}, mem), mem.ctx)
## pageable memory needs to be accessible concurrently
can_prefetch &= attribute(device(), DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS) == 1
## don't prefetch on multi device systems.
can_prefetch &= ndevices() == 1

if can_prefetch
# TODO: `view` on buffers?
Expand Down

0 comments on commit d19ccd6

Please sign in to comment.