[Openmp-commits] [PATCH] D141227: [OpenMP][libomptarget] Implement memory lock/unlock API in NextGen plugins

Kevin Sala Penad├ęs via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 10 11:10:55 PST 2023


kevinsala marked 3 inline comments as done.
kevinsala added a comment.

Still missing the pin/unpin calls in the CUDA plugin; it will be added in the following update of this patch.



================
Comment at: openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp:1846
       AMDGPUStreamTy &Stream = getStream(AsyncInfoWrapper);
-      return Stream.pushPinnedMemoryCopyAsync(HstPtr, TgtPtr, Size);
+      return Stream.pushPinnedMemoryCopyAsync(const_cast<void *>(PinnedPtr), TgtPtr, Size);
     }
----------------
ye-luo wrote:
> kevinsala wrote:
> > jdoerfert wrote:
> > > It's not const. Change `isHostPinnedBuffer` to `getHostPinnedBuffer` and assign it in the conditional.
> > Done, however, I renamed it to `getDevicePtrFromPinnedBuffer()` since it returns the device pointer.
> DevicePtr usually refers to the memory on the device. I would call it DeviceAccessiblePtr
Just renamed the function and related code documentation.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141227/new/

https://reviews.llvm.org/D141227



More information about the Openmp-commits mailing list