[Openmp-commits] [llvm] [openmp] [offload] Pool host and shared allocations (PR #214754)

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 10 18:08:36 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);
----------------
jdoerfert wrote:

Can we have a quick call about this PR?
The 4 of us, for example. I am confused by different things and I think talking might be easier to figure this out.

https://github.com/llvm/llvm-project/pull/214754


More information about the Openmp-commits mailing list