[Openmp-commits] [PATCH] D108878: [OpenMP][NVPTX] Fixed missing variables for CUDA free compilation in NVPTX plugin

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Aug 28 14:38:35 PDT 2021


tianshilei1992 created this revision.
tianshilei1992 added a reviewer: JonChesterfield.
Herald added subscribers: guansong, yaxunl.
tianshilei1992 requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

`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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108878

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


Index: openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
===================================================================
--- openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
+++ openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
@@ -196,6 +196,13 @@
   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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108878.369280.patch
Type: text/x-patch
Size: 652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210828/748788ae/attachment.bin>


More information about the Openmp-commits mailing list