[Openmp-commits] [openmp] [libomptarget] document ActionFunctions in the amdgpu plugin. (PR #66397)

Kevin Sala Penadés via Openmp-commits openmp-commits at lists.llvm.org
Thu Sep 14 10:02:31 PDT 2023


================
@@ -1067,7 +1067,17 @@ struct AMDGPUStreamTy {
     return Plugin::success();
   }
 
-  // Callback for releasing a memory buffer to a memory manager.
+  /// Releasing a memory buffer to a memory manager. This is a post completion
+  /// action. There are two kinds of memory buffers:
+  ///   1. For kernel arguments. This buffer can be freed after receiving the
+  ///   kernel completion signal.
+  ///   2. For H2D tranfers that need pinned memory space for staging. This
+  ///   buffer can be freed after receiving the transfer completion signal.
----------------
kevinsala wrote:

Just as a clarification: actions 1) and 2) can be done just after receiving the completion signal as specified by the comment. But for the moment, they are executed at AMDGPUStreamTy::complete() too. 

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


More information about the Openmp-commits mailing list