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

Robert Imschweiler via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 21 23:37: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);
----------------
ro-i wrote:

So, the others had the (un)registration, but didn't do anything with it

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


More information about the Openmp-commits mailing list