[Openmp-commits] [openmp] [Libomptarget] Fix RPC-based malloc on NVPTX (PR #72440)

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 20 12:46: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:

I'm not 100% sure, but I think it's because the resource pools rarely ever delete the created streams. This lead to some problems. I tried making a single stream that was shared but this lead to weird errors as well. Hence, this being the easiest way to get it to stop deadlocking in the short term.

https://github.com/llvm/llvm-project/pull/72440


More information about the Openmp-commits mailing list