[OpenMP][NVPTX] Fixed missing variables for CUDA free compilation in NVPTX plugin
authorShilei Tian <tianshilei1992@gmail.com>
Sat, 28 Aug 2021 22:08:03 +0000 (18:08 -0400)
committerShilei Tian <tianshilei1992@gmail.com>
Sat, 28 Aug 2021 22:08:10 +0000 (18:08 -0400)
`CU_EVENT_DEFAULT` is defined in CUDA header. It should be added to
`openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h` for CUDA free build.

Reviewed By: ronlieb

Differential Revision: https://reviews.llvm.org/D108878

openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h

index c6aeafe..51a5948 100644 (file)
@@ -196,6 +196,13 @@ typedef enum CUcomputeMode_enum {
   CU_COMPUTEMODE_EXCLUSIVE_PROCESS = 3,
 } CUcompute_mode;
 
+typedef enum CUevent_flags_enum {
+  CU_EVENT_DEFAULT = 0x0,
+  CU_EVENT_BLOCKING_SYNC = 0x1,
+  CU_EVENT_DISABLE_TIMING = 0x2,
+  CU_EVENT_INTERPROCESS = 0x4
+} CUevent_flags;
+
 CUresult cuCtxGetDevice(CUdevice *);
 CUresult cuDeviceGet(CUdevice *, int);
 CUresult cuDeviceGetAttribute(int *, CUdevice_attribute, CUdevice);