[Openmp-commits] [llvm] [openmp] [offload] Pool host and shared allocations (PR #214754)
Kevin Sala Penades via Openmp-commits
openmp-commits at lists.llvm.org
Sun Aug 23 11:52:14 PDT 2026
================
@@ -4529,6 +4535,12 @@ Expected<void *> AMDGPUDeviceTy::allocate(size_t Size, void *,
// Enable all valid kernel agents to access the buffer.
if (auto Err = MemoryPool->enableAccess(Alloc, Size, Agents))
return std::move(Err);
+
+ // Register host / shared memory as pinned memory, so that transfers reading
+ // from it can take a device-accessible path.
+ if (Kind == TARGET_ALLOC_HOST || Kind == TARGET_ALLOC_SHARED)
+ if (auto Err = PinnedAllocs.registerHostBuffer(Alloc, Alloc, Size))
+ return std::move(Err);
----------------
kevinsala wrote:
Thanks for the clarification!
https://github.com/llvm/llvm-project/pull/214754
More information about the Openmp-commits
mailing list