[Openmp-commits] [openmp] [Libomptarget] Fix RPC-based malloc on NVPTX (PR #72440)
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Tue Nov 21 08:20:14 PST 2023
================
@@ -486,6 +494,16 @@ struct CUDADeviceTy : public GenericDeviceTy {
Res = cuMemAllocManaged(&DevicePtr, Size, CU_MEM_ATTACH_GLOBAL);
MemAlloc = (void *)DevicePtr;
break;
+ case TARGET_ALLOC_DEVICE_NON_BLOCKING: {
+ CUstream Stream;
+ if (Res = cuStreamCreate(&Stream, CU_STREAM_NON_BLOCKING))
----------------
jhuber6 wrote:
Okay, so I think one problem is that the logic states that a waiting thread can check the RPC server. However, this logic isn't really prepared to handle when a thread handling the RPC server already comes in and waits. So we end up with some kind of infinite recursion. I'll need to think of some logic to prevent this.
https://github.com/llvm/llvm-project/pull/72440
More information about the Openmp-commits
mailing list