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

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Jan 8 14:55:24 PST 2023


ye-luo added inline comments.


================
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);
     }
----------------
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


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

https://reviews.llvm.org/D141227



More information about the Openmp-commits mailing list