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

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 10 18:10:41 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);
----------------
jhuber6 wrote:

The Wednesday meeting is too early for you, right?

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


More information about the Openmp-commits mailing list