[Openmp-commits] [openmp] [OpenMP][libomptarget][RFC] extend libomptarget with mechanism to execute fill memory on the target (PR #73801)
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Wed Nov 29 08:55:38 PST 2023
================
@@ -1387,6 +1391,14 @@ Error CUDADeviceTy::dataExchangeImpl(const void *SrcPtr,
return Plugin::check(Res, "Error in cuMemcpyDtoDAsync: %s");
}
+/// Fill memory on the target device (aka memset)
+Error CUDADeviceTy::fillMemoryImpl(void *Ptr, int32_t Val, uint64_t NumValues,
+ AsyncInfoWrapperTy &AsyncInfoWrapperTy) {
+ CUdeviceptr DevPtr = reinterpret_cast<CUdeviceptr>(Ptr);
+ CUresult Res = cuMemsetD32(DevPtr, Val, static_cast<size_t>(NumValues));
----------------
jdoerfert wrote:
why not the async version?
https://github.com/llvm/llvm-project/pull/73801
More information about the Openmp-commits
mailing list