Skip to content

Conversation

vchuravy
Copy link
Member

Implements the idea in #2618

Copy link
Contributor

github-actions bot commented Jan 20, 2025

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 ca690d31c..5103fc9dc 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
@maleadt maleadt disabled auto-merge February 4, 2025 10:37
@maleadt maleadt merged commit dd23441 into master Feb 4, 2025
2 of 3 checks passed
@maleadt maleadt deleted the vc/prefetch branch February 4, 2025 10:37
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