[Openmp-commits] [openmp] e8fdacf - [OpenMP][NVPTX] Fixed missing variables for CUDA free compilation in NVPTX plugin

Shilei Tian via Openmp-commits openmp-commits at lists.llvm.org
Sat Aug 28 15:08:16 PDT 2021


Author: Shilei Tian
Date: 2021-08-28T18:08:10-04:00
New Revision: e8fdacfd8116c9df47fbb954c93871a7cd42f7d0

URL: https://github.com/llvm/llvm-project/commit/e8fdacfd8116c9df47fbb954c93871a7cd42f7d0
DIFF: https://github.com/llvm/llvm-project/commit/e8fdacfd8116c9df47fbb954c93871a7cd42f7d0.diff

LOG: [OpenMP][NVPTX] Fixed missing variables for CUDA free compilation in NVPTX plugin

`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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h b/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
index c6aeafef2df18..51a59480473ee 100644
--- a/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
+++ b/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
@@ -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);


        


More information about the Openmp-commits mailing list