[Openmp-commits] [PATCH] D141227: [OpenMP][libomptarget] Implement memory lock/unlock API in NextGen plugins
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sun Jan 8 13:07:45 PST 2023
jdoerfert 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);
}
----------------
It's not const. Change `isHostPinnedBuffer` to `getHostPinnedBuffer` and assign it in the conditional.
================
Comment at: openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp:517
+ // TODO: Register the buffer as CUDA host memory.
+ return HstPtr;
+ }
----------------
It looks like we need https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__MEMORY.html#group__CUDART__MEMORY_1ge8d5c17670f16ac4fc8fcb4181cb490c
And https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__MEMORY.html#group__CUDART__MEMORY_1gc00502b44e5f1bdc0b424487ebb08db0
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141227/new/
https://reviews.llvm.org/D141227
More information about the Openmp-commits
mailing list