From e8fdacfd8116c9df47fbb954c93871a7cd42f7d0 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Sat, 28 Aug 2021 18:08:03 -0400 Subject: [PATCH] [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 --- openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h b/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h index c6aeafe..51a5948 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); -- 2.7.4