[Openmp-commits] [openmp] f7c9299 - [OpenMP] Fix CUDA plugin build after 3817ba13aea3.
via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jul 23 01:50:13 PDT 2021
Author: Abhinav Gaba
Date: 2021-07-23T16:50:00+08:00
New Revision: f7c92995c0e1f95ef5640a0df325e05d12de4658
URL: https://github.com/llvm/llvm-project/commit/f7c92995c0e1f95ef5640a0df325e05d12de4658
DIFF: https://github.com/llvm/llvm-project/commit/f7c92995c0e1f95ef5640a0df325e05d12de4658.diff
LOG: [OpenMP] Fix CUDA plugin build after 3817ba13aea3.
The build was broken on machines that don't have Cuda SDK installed.
See https://reviews.llvm.org/D106627 for the original discussion.
Added:
Modified:
openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp b/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
index c84b3814065e8..235efd2728ded 100644
--- a/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
+++ b/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
@@ -61,6 +61,9 @@ DLWRAP(cuDeviceCanAccessPeer, 3);
DLWRAP(cuCtxEnablePeerAccess, 2);
DLWRAP(cuMemcpyPeerAsync, 6);
+DLWRAP(cuCtxGetLimit, 2);
+DLWRAP(cuCtxSetLimit, 2);
+
DLWRAP_FINALIZE();
#ifndef DYNAMIC_CUDA_PATH
diff --git a/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h b/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
index 045c39cacc97e..17aa2a12ef6c3 100644
--- a/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
+++ b/openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
@@ -34,6 +34,17 @@ typedef enum CUstream_flags_enum {
CU_STREAM_NON_BLOCKING = 0x1,
} CUstream_flags;
+typedef enum CUlimit_enum {
+ CU_LIMIT_STACK_SIZE = 0x0,
+ CU_LIMIT_PRINTF_FIFO_SIZE = 0x1,
+ CU_LIMIT_MALLOC_HEAP_SIZE = 0x2,
+ CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = 0x3,
+ CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = 0x4,
+ CU_LIMIT_MAX_L2_FETCH_GRANULARITY = 0x5,
+ CU_LIMIT_PERSISTING_L2_CACHE_SIZE = 0x6,
+ CU_LIMIT_MAX
+} CUlimit;
+
typedef enum CUdevice_attribute_enum {
CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2,
CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = 5,
@@ -100,4 +111,7 @@ CUresult cuCtxEnablePeerAccess(CUcontext, unsigned);
CUresult cuMemcpyPeerAsync(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext,
size_t, CUstream);
+CUresult cuCtxGetLimit(size_t *, CUlimit);
+CUresult cuCtxSetLimit(CUlimit, size_t);
+
#endif
More information about the Openmp-commits
mailing list