Skip to content

Commit

Permalink
Patch 11.8.3
Browse files Browse the repository at this point in the history
- Compatability with Cython 3
- New API cudart.getLocalRuntimeVersion()
- Modernize build config
  • Loading branch information
vzhurba01 committed Oct 23, 2023
1 parent 044d173 commit 53e8f44
Show file tree
Hide file tree
Showing 21 changed files with 2,944 additions and 2,802 deletions.
780 changes: 390 additions & 390 deletions cuda/_cuda/ccuda.pxd.in

Large diffs are not rendered by default.

782 changes: 391 additions & 391 deletions cuda/_cuda/ccuda.pyx.in

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions cuda/_cuda/cnvrtc.pxd.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,85 +9,85 @@ from cuda.cnvrtc cimport *

{{if 'nvrtcGetErrorString' in found_functions}}

cdef const char* _nvrtcGetErrorString(nvrtcResult result) nogil except ?NULL
cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil
{{endif}}

{{if 'nvrtcVersion' in found_functions}}

cdef nvrtcResult _nvrtcVersion(int* major, int* minor) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcGetNumSupportedArchs' in found_functions}}

cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcGetSupportedArchs' in found_functions}}

cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcCreateProgram' in found_functions}}

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
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
{{endif}}

{{if 'nvrtcDestroyProgram' in found_functions}}

cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcCompileProgram' in found_functions}}

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

{{if 'nvrtcGetPTXSize' in found_functions}}

cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcGetPTX' in found_functions}}

cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcGetCUBINSize' in found_functions}}

cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcGetCUBIN' in found_functions}}

cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcGetNVVMSize' in found_functions}}

cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcGetNVVM' in found_functions}}

cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcGetProgramLogSize' in found_functions}}

cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcGetProgramLog' in found_functions}}

cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcAddNameExpression' in found_functions}}

cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}

{{if 'nvrtcGetLoweredName' in found_functions}}

cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) nogil except ?NVRTC_ERROR_INVALID_INPUT
cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil
{{endif}}
36 changes: 18 additions & 18 deletions cuda/_cuda/cnvrtc.pyx.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cdef bint __cuPythonInit = False
{{if 'nvrtcAddNameExpression' in found_functions}}cdef void *__nvrtcAddNameExpression = NULL{{endif}}
{{if 'nvrtcGetLoweredName' in found_functions}}cdef void *__nvrtcGetLoweredName = NULL{{endif}}

cdef int cuPythonInit() nogil except -1:
cdef int cuPythonInit() except -1 nogil:
global __cuPythonInit
if __cuPythonInit:
return 0
Expand Down Expand Up @@ -263,7 +263,7 @@ cdef int cuPythonInit() nogil except -1:

{{if 'nvrtcGetErrorString' in found_functions}}

cdef const char* _nvrtcGetErrorString(nvrtcResult result) nogil except ?NULL:
cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil:
global __nvrtcGetErrorString
cuPythonInit()
if __nvrtcGetErrorString == NULL:
Expand All @@ -275,7 +275,7 @@ cdef const char* _nvrtcGetErrorString(nvrtcResult result) nogil except ?NULL:

{{if 'nvrtcVersion' in found_functions}}

cdef nvrtcResult _nvrtcVersion(int* major, int* minor) nogil except ?NVRTC_ERROR_INVALID_INPUT:
cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil:
global __nvrtcVersion
cuPythonInit()
if __nvrtcVersion == NULL:
Expand All @@ -287,7 +287,7 @@ cdef nvrtcResult _nvrtcVersion(int* major, int* minor) nogil except ?NVRTC_ERROR

{{if 'nvrtcGetNumSupportedArchs' in found_functions}}

cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) nogil except ?NVRTC_ERROR_INVALID_INPUT:
cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil:
global __nvrtcGetNumSupportedArchs
cuPythonInit()
if __nvrtcGetNumSupportedArchs == NULL:
Expand All @@ -299,7 +299,7 @@ cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) nogil except ?NVRTC_E

{{if 'nvrtcGetSupportedArchs' in found_functions}}

cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) nogil except ?NVRTC_ERROR_INVALID_INPUT:
cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil:
global __nvrtcGetSupportedArchs
cuPythonInit()
if __nvrtcGetSupportedArchs == NULL:
Expand All @@ -311,7 +311,7 @@ cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) nogil except ?NVRT

{{if 'nvrtcCreateProgram' in found_functions}}

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:
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:
global __nvrtcCreateProgram
cuPythonInit()
if __nvrtcCreateProgram == NULL:
Expand All @@ -323,7 +323,7 @@ cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const

{{if 'nvrtcDestroyProgram' in found_functions}}

cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) nogil except ?NVRTC_ERROR_INVALID_INPUT:
cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
global __nvrtcDestroyProgram
cuPythonInit()
if __nvrtcDestroyProgram == NULL:
Expand All @@ -335,7 +335,7 @@ cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) nogil except ?NVRTC_ER

{{if 'nvrtcCompileProgram' in found_functions}}

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

{{if 'nvrtcGetPTXSize' in found_functions}}

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

{{if 'nvrtcGetPTX' in found_functions}}

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

{{if 'nvrtcGetCUBINSize' in found_functions}}

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

{{if 'nvrtcGetCUBIN' in found_functions}}

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

{{if 'nvrtcGetNVVMSize' in found_functions}}

cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT:
cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
global __nvrtcGetNVVMSize
cuPythonInit()
if __nvrtcGetNVVMSize == NULL:
Expand All @@ -407,7 +407,7 @@ cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) nogil

{{if 'nvrtcGetNVVM' in found_functions}}

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

{{if 'nvrtcGetProgramLogSize' in found_functions}}

cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) nogil except ?NVRTC_ERROR_INVALID_INPUT:
cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
global __nvrtcGetProgramLogSize
cuPythonInit()
if __nvrtcGetProgramLogSize == NULL:
Expand All @@ -431,7 +431,7 @@ cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet)

{{if 'nvrtcGetProgramLog' in found_functions}}

cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) nogil except ?NVRTC_ERROR_INVALID_INPUT:
cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil:
global __nvrtcGetProgramLog
cuPythonInit()
if __nvrtcGetProgramLog == NULL:
Expand All @@ -443,7 +443,7 @@ cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) nogil except

{{if 'nvrtcAddNameExpression' in found_functions}}

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

{{if 'nvrtcGetLoweredName' in found_functions}}

cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) nogil except ?NVRTC_ERROR_INVALID_INPUT:
cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil:
global __nvrtcGetLoweredName
cuPythonInit()
if __nvrtcGetLoweredName == NULL:
Expand Down
Loading

0 comments on commit 53e8f44

Please sign in to comment.