]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
'include/cuda/cuda.h': Add parts necessary for nvptx-tools 'nvptx-run'
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 5 Jul 2022 06:46:17 +0000 (08:46 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 5 Jul 2022 06:46:17 +0000 (08:46 +0200)
include/
* cuda/cuda.h (enum CUjit_option): Add
'CU_JIT_GENERATE_DEBUG_INFO', 'CU_JIT_GENERATE_LINE_INFO'.
(enum CUlimit): Add 'CU_LIMIT_STACK_SIZE',
'CU_LIMIT_MALLOC_HEAP_SIZE'.
(cuCtxSetLimit, cuGetErrorName): Add.

(cherry picked from commit 86f64400a5692499856d41462461327b93f82b8d)

include/ChangeLog.omp
include/cuda/cuda.h

index d97509dfc31d197540c2804fecbcc14c6da77a9b..03d6574f0ea7400cdc872ba192ce1e0eb90d8a8f 100644 (file)
@@ -1,3 +1,14 @@
+2022-07-05  Tobias Burnus  <tobias@codesourcery.com>
+
+       Backport from mainline:
+       2022-05-18  Thomas Schwinge <thomas@codesourcery.com>
+
+       * cuda/cuda.h (enum CUjit_option): Add
+       'CU_JIT_GENERATE_DEBUG_INFO', 'CU_JIT_GENERATE_LINE_INFO'.
+       (enum CUlimit): Add 'CU_LIMIT_STACK_SIZE',
+       'CU_LIMIT_MALLOC_HEAP_SIZE'.
+       (cuCtxSetLimit, cuGetErrorName): Add.
+
 2022-07-05  Tobias Burnus  <tobias@codesourcery.com>
 
        Backport from mainline:
index 1c3271ae77a73f473a5fc43da8f19f61f4b2d7dc..8135e7c9247c10843aa9c2a41f297d8ce3fef82e 100644 (file)
@@ -107,7 +107,9 @@ typedef enum {
   CU_JIT_ERROR_LOG_BUFFER = 5,
   CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = 6,
   CU_JIT_OPTIMIZATION_LEVEL = 7,
-  CU_JIT_LOG_VERBOSE = 12
+  CU_JIT_GENERATE_DEBUG_INFO = 11,
+  CU_JIT_LOG_VERBOSE = 12,
+  CU_JIT_GENERATE_LINE_INFO = 13,
 } CUjit_option;
 
 typedef enum {
@@ -127,6 +129,11 @@ enum {
   CU_STREAM_NON_BLOCKING = 1
 };
 
+typedef enum {
+  CU_LIMIT_STACK_SIZE = 0x00,
+  CU_LIMIT_MALLOC_HEAP_SIZE = 0x02,
+} CUlimit;
+
 #define cuCtxCreate cuCtxCreate_v2
 CUresult cuCtxCreate (CUcontext *, unsigned, CUdevice);
 #define cuCtxDestroy cuCtxDestroy_v2
@@ -138,6 +145,7 @@ CUresult cuCtxPopCurrent (CUcontext *);
 #define cuCtxPushCurrent cuCtxPushCurrent_v2
 CUresult cuCtxPushCurrent (CUcontext);
 CUresult cuCtxSynchronize (void);
+CUresult cuCtxSetLimit (CUlimit, size_t);
 CUresult cuDeviceGet (CUdevice *, int);
 #define cuDeviceTotalMem cuDeviceTotalMem_v2
 CUresult cuDeviceTotalMem (size_t *, CUdevice);
@@ -153,6 +161,7 @@ CUresult cuEventRecord (CUevent, CUstream);
 CUresult cuEventSynchronize (CUevent);
 CUresult cuFuncGetAttribute (int *, CUfunction_attribute, CUfunction);
 CUresult cuGetErrorString (CUresult, const char **);
+CUresult cuGetErrorName (CUresult, const char **);
 CUresult cuInit (unsigned);
 CUresult cuDriverGetVersion (int *);
 CUresult cuLaunchKernel (CUfunction, unsigned, unsigned, unsigned, unsigned,