[Openmp-commits] [openmp] [amdgpu] Implement D2D memcpy as HSA call (PR #69955)

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Mon Oct 23 12:30:13 PDT 2023


================
@@ -3174,9 +3197,11 @@ void *AMDGPUDeviceTy::allocate(size_t Size, void *, TargetAllocTy Kind) {
     return nullptr;
   }
 
-  if (Alloc && (Kind == TARGET_ALLOC_HOST || Kind == TARGET_ALLOC_SHARED)) {
+  if (Alloc) {
     auto &KernelAgents = Plugin::get<AMDGPUPluginTy>().getKernelAgents();
 
+    // Inherently necessary for host or shared allocations
+    // Also enabled for device memory to allow device to device memcpy
----------------
jdoerfert wrote:

Is this costly if unsued?

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


More information about the Openmp-commits mailing list