Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't prefetch on multi-device systems #2626

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

vchuravy
Copy link
Member

Implements the idea in #2618

Copy link
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/src/compiler/execution.jl b/src/compiler/execution.jl
index 0b8ae289e..2500b2e99 100644
--- a/src/compiler/execution.jl
+++ b/src/compiler/execution.jl
@@ -151,8 +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
+        ## don't prefetch on multi device systems.
+        can_prefetch &= ndevices() == 1
 
     if can_prefetch
         # TODO: `view` on buffers?

@maleadt maleadt linked an issue Jan 20, 2025 that may be closed by this pull request
@maleadt maleadt enabled auto-merge (squash) January 20, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable or make automatic prefecthing of unified memory optional
2 participants