Skip to content

Commit 53e8f44

Browse files
committed
Patch 11.8.3
- Compatability with Cython 3 - New API cudart.getLocalRuntimeVersion() - Modernize build config
1 parent 044d173 commit 53e8f44

21 files changed

+2944
-2802
lines changed

cuda/_cuda/ccuda.pxd.in

Lines changed: 390 additions & 390 deletions
Large diffs are not rendered by default.

cuda/_cuda/ccuda.pyx.in

Lines changed: 391 additions & 391 deletions
Large diffs are not rendered by default.

cuda/_cuda/cnvrtc.pxd.in

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,85 +9,85 @@ from cuda.cnvrtc cimport *
99

1010
{{if 'nvrtcGetErrorString' in found_functions}}
1111

12-
cdef const char* _nvrtcGetErrorString(nvrtcResult result) nogil except ?NULL
12+
cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil
1313
{{endif}}
1414

1515
{{if 'nvrtcVersion' in found_functions}}
1616

17-
cdef nvrtcResult _nvrtcVersion(int* major, int* minor) nogil except ?NVRTC_ERROR_INVALID_INPUT
17+
cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil
1818
{{endif}}
1919

2020
{{if 'nvrtcGetNumSupportedArchs' in found_functions}}
2121

22-
cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) nogil except ?NVRTC_ERROR_INVALID_INPUT
22+
cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil
2323
{{endif}}
2424

2525
{{if 'nvrtcGetSupportedArchs' in found_functions}}
2626

27-
cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) nogil except ?NVRTC_ERROR_INVALID_INPUT
27+
cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil
2828
{{endif}}
2929

3030
{{if 'nvrtcCreateProgram' in found_functions}}
3131

32-
cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) nogil except ?NVRTC_ERROR_INVALID_INPUT
32+
cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil
3333
{{endif}}
3434

3535
{{if 'nvrtcDestroyProgram' in found_functions}}
3636

37-
cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) nogil except ?NVRTC_ERROR_INVALID_INPUT
37+
cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil
3838
{{endif}}
3939

4040
{{if 'nvrtcCompileProgram' in found_functions}}
4141

42-
cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) nogil except ?NVRTC_ERROR_INVALID_INPUT
42+
cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil
4343
{{endif}}
4444

4545
{{if 'nvrtcGetPTXSize' in found_functions}}
4646

47-
cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT
47+
cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
4848
{{endif}}
4949

5050
{{if 'nvrtcGetPTX' in found_functions}}
5151

52-
cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) nogil except ?NVRTC_ERROR_INVALID_INPUT
52+
cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil
5353
{{endif}}
5454

5555
{{if 'nvrtcGetCUBINSize' in found_functions}}
5656

57-
cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT
57+
cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
5858
{{endif}}
5959

6060
{{if 'nvrtcGetCUBIN' in found_functions}}
6161

62-
cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) nogil except ?NVRTC_ERROR_INVALID_INPUT
62+
cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil
6363
{{endif}}
6464

6565
{{if 'nvrtcGetNVVMSize' in found_functions}}
6666

67-
cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT
67+
cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
6868
{{endif}}
6969

7070
{{if 'nvrtcGetNVVM' in found_functions}}
7171

72-
cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) nogil except ?NVRTC_ERROR_INVALID_INPUT
72+
cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil
7373
{{endif}}
7474

7575
{{if 'nvrtcGetProgramLogSize' in found_functions}}
7676

77-
cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT
77+
cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
7878
{{endif}}
7979

8080
{{if 'nvrtcGetProgramLog' in found_functions}}
8181

82-
cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) nogil except ?NVRTC_ERROR_INVALID_INPUT
82+
cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil
8383
{{endif}}
8484

8585
{{if 'nvrtcAddNameExpression' in found_functions}}
8686

87-
cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) nogil except ?NVRTC_ERROR_INVALID_INPUT
87+
cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil
8888
{{endif}}
8989

9090
{{if 'nvrtcGetLoweredName' in found_functions}}
9191

92-
cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) nogil except ?NVRTC_ERROR_INVALID_INPUT
92+
cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil
9393
{{endif}}

cuda/_cuda/cnvrtc.pyx.in

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cdef bint __cuPythonInit = False
3232
{{if 'nvrtcAddNameExpression' in found_functions}}cdef void *__nvrtcAddNameExpression = NULL{{endif}}
3333
{{if 'nvrtcGetLoweredName' in found_functions}}cdef void *__nvrtcGetLoweredName = NULL{{endif}}
3434

35-
cdef int cuPythonInit() nogil except -1:
35+
cdef int cuPythonInit() except -1 nogil:
3636
global __cuPythonInit
3737
if __cuPythonInit:
3838
return 0
@@ -263,7 +263,7 @@ cdef int cuPythonInit() nogil except -1:
263263

264264
{{if 'nvrtcGetErrorString' in found_functions}}
265265

266-
cdef const char* _nvrtcGetErrorString(nvrtcResult result) nogil except ?NULL:
266+
cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil:
267267
global __nvrtcGetErrorString
268268
cuPythonInit()
269269
if __nvrtcGetErrorString == NULL:
@@ -275,7 +275,7 @@ cdef const char* _nvrtcGetErrorString(nvrtcResult result) nogil except ?NULL:
275275

276276
{{if 'nvrtcVersion' in found_functions}}
277277

278-
cdef nvrtcResult _nvrtcVersion(int* major, int* minor) nogil except ?NVRTC_ERROR_INVALID_INPUT:
278+
cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil:
279279
global __nvrtcVersion
280280
cuPythonInit()
281281
if __nvrtcVersion == NULL:
@@ -287,7 +287,7 @@ cdef nvrtcResult _nvrtcVersion(int* major, int* minor) nogil except ?NVRTC_ERROR
287287

288288
{{if 'nvrtcGetNumSupportedArchs' in found_functions}}
289289

290-
cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) nogil except ?NVRTC_ERROR_INVALID_INPUT:
290+
cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil:
291291
global __nvrtcGetNumSupportedArchs
292292
cuPythonInit()
293293
if __nvrtcGetNumSupportedArchs == NULL:
@@ -299,7 +299,7 @@ cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) nogil except ?NVRTC_E
299299

300300
{{if 'nvrtcGetSupportedArchs' in found_functions}}
301301

302-
cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) nogil except ?NVRTC_ERROR_INVALID_INPUT:
302+
cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil:
303303
global __nvrtcGetSupportedArchs
304304
cuPythonInit()
305305
if __nvrtcGetSupportedArchs == NULL:
@@ -311,7 +311,7 @@ cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) nogil except ?NVRT
311311

312312
{{if 'nvrtcCreateProgram' in found_functions}}
313313

314-
cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) nogil except ?NVRTC_ERROR_INVALID_INPUT:
314+
cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil:
315315
global __nvrtcCreateProgram
316316
cuPythonInit()
317317
if __nvrtcCreateProgram == NULL:
@@ -323,7 +323,7 @@ cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const
323323

324324
{{if 'nvrtcDestroyProgram' in found_functions}}
325325

326-
cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) nogil except ?NVRTC_ERROR_INVALID_INPUT:
326+
cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
327327
global __nvrtcDestroyProgram
328328
cuPythonInit()
329329
if __nvrtcDestroyProgram == NULL:
@@ -335,7 +335,7 @@ cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) nogil except ?NVRTC_ER
335335

336336
{{if 'nvrtcCompileProgram' in found_functions}}
337337

338-
cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) nogil except ?NVRTC_ERROR_INVALID_INPUT:
338+
cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil:
339339
global __nvrtcCompileProgram
340340
cuPythonInit()
341341
if __nvrtcCompileProgram == NULL:
@@ -347,7 +347,7 @@ cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const c
347347

348348
{{if 'nvrtcGetPTXSize' in found_functions}}
349349

350-
cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT:
350+
cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
351351
global __nvrtcGetPTXSize
352352
cuPythonInit()
353353
if __nvrtcGetPTXSize == NULL:
@@ -359,7 +359,7 @@ cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) nogil e
359359

360360
{{if 'nvrtcGetPTX' in found_functions}}
361361

362-
cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) nogil except ?NVRTC_ERROR_INVALID_INPUT:
362+
cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil:
363363
global __nvrtcGetPTX
364364
cuPythonInit()
365365
if __nvrtcGetPTX == NULL:
@@ -371,7 +371,7 @@ cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) nogil except ?NVRTC_
371371

372372
{{if 'nvrtcGetCUBINSize' in found_functions}}
373373

374-
cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT:
374+
cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
375375
global __nvrtcGetCUBINSize
376376
cuPythonInit()
377377
if __nvrtcGetCUBINSize == NULL:
@@ -383,7 +383,7 @@ cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) nog
383383

384384
{{if 'nvrtcGetCUBIN' in found_functions}}
385385

386-
cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) nogil except ?NVRTC_ERROR_INVALID_INPUT:
386+
cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil:
387387
global __nvrtcGetCUBIN
388388
cuPythonInit()
389389
if __nvrtcGetCUBIN == NULL:
@@ -395,7 +395,7 @@ cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) nogil except ?NV
395395

396396
{{if 'nvrtcGetNVVMSize' in found_functions}}
397397

398-
cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT:
398+
cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
399399
global __nvrtcGetNVVMSize
400400
cuPythonInit()
401401
if __nvrtcGetNVVMSize == NULL:
@@ -407,7 +407,7 @@ cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) nogil
407407

408408
{{if 'nvrtcGetNVVM' in found_functions}}
409409

410-
cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) nogil except ?NVRTC_ERROR_INVALID_INPUT:
410+
cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil:
411411
global __nvrtcGetNVVM
412412
cuPythonInit()
413413
if __nvrtcGetNVVM == NULL:
@@ -419,7 +419,7 @@ cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) nogil except ?NVRT
419419

420420
{{if 'nvrtcGetProgramLogSize' in found_functions}}
421421

422-
cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT:
422+
cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
423423
global __nvrtcGetProgramLogSize
424424
cuPythonInit()
425425
if __nvrtcGetProgramLogSize == NULL:
@@ -431,7 +431,7 @@ cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet)
431431

432432
{{if 'nvrtcGetProgramLog' in found_functions}}
433433

434-
cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) nogil except ?NVRTC_ERROR_INVALID_INPUT:
434+
cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil:
435435
global __nvrtcGetProgramLog
436436
cuPythonInit()
437437
if __nvrtcGetProgramLog == NULL:
@@ -443,7 +443,7 @@ cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) nogil except
443443

444444
{{if 'nvrtcAddNameExpression' in found_functions}}
445445

446-
cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) nogil except ?NVRTC_ERROR_INVALID_INPUT:
446+
cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil:
447447
global __nvrtcAddNameExpression
448448
cuPythonInit()
449449
if __nvrtcAddNameExpression == NULL:
@@ -455,7 +455,7 @@ cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_exp
455455

456456
{{if 'nvrtcGetLoweredName' in found_functions}}
457457

458-
cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) nogil except ?NVRTC_ERROR_INVALID_INPUT:
458+
cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil:
459459
global __nvrtcGetLoweredName
460460
cuPythonInit()
461461
if __nvrtcGetLoweredName == NULL:

0 commit comments

Comments
 (0)