@@ -63,12 +63,6 @@ def cast_to_3_tuple(label: str, cfg: int | tuple[int, ...]) -> tuple[int, int, i
6363 return cfg + (1 ,) * (3 - len (cfg))
6464
6565
66- cdef int HANDLE_RETURN(cydriver.CUresult err) except ?- 1 nogil:
67- if err != cydriver.CUresult.CUDA_SUCCESS:
68- return _check_driver_error(err)
69- return 0
70-
71-
7266cdef int _get_current_device_id() except ? - 1 :
7367 """ Return the current thread's bound CUdevice ordinal."""
7468 cdef cydriver.CUdevice dev
@@ -77,14 +71,6 @@ cdef int _get_current_device_id() except? -1:
7771 return < int > dev
7872
7973
80- cdef int HANDLE_RETURN_NVRTC(cynvrtc.nvrtcProgram prog, cynvrtc.nvrtcResult err) except ?- 1 nogil:
81- """ Handle NVRTC result codes, raising NVRTCError with program log on failure."""
82- if err == cynvrtc.nvrtcResult.NVRTC_SUCCESS:
83- return 0
84- with gil:
85- _raise_nvrtc_error(prog, err)
86-
87-
8874cdef int _raise_nvrtc_error(cynvrtc.nvrtcProgram prog, cynvrtc.nvrtcResult err) except - 1 :
8975 """ Build error message with program log and raise NVRTCError."""
9076 cdef const char * err_str = cynvrtc.nvrtcGetErrorString(err)
@@ -103,14 +89,6 @@ cdef int _raise_nvrtc_error(cynvrtc.nvrtcProgram prog, cynvrtc.nvrtcResult err)
10389 raise NVRTCError(err_msg)
10490
10591
106- cdef int HANDLE_RETURN_NVVM(cynvvm.nvvmProgram prog, cynvvm.nvvmResult err) except ?- 1 nogil:
107- """ Handle NVVM result codes, raising nvvmError with program log on failure."""
108- if err == cynvvm.nvvmResult.NVVM_SUCCESS:
109- return 0
110- with gil:
111- _raise_nvvm_error(prog, err)
112-
113-
11492cdef int _raise_nvvm_error(cynvvm.nvvmProgram prog, cynvvm.nvvmResult err) except - 1 :
11593 """ Raise nvvmError annotated with the program log."""
11694 cdef size_t logsize = 0
@@ -128,15 +106,6 @@ cdef int _raise_nvvm_error(cynvvm.nvvmProgram prog, cynvvm.nvvmResult err) excep
128106 raise exc
129107
130108
131- cdef int HANDLE_RETURN_NVJITLINK(
132- cynvjitlink.nvJitLinkHandle handle, cynvjitlink.nvJitLinkResult err) except ?- 1 nogil:
133- """ Handle nvJitLink result codes, raising nvJitLinkError with error log on failure."""
134- if err == cynvjitlink.nvJitLinkResult.NVJITLINK_SUCCESS:
135- return 0
136- with gil:
137- _raise_nvjitlink_error(handle, err)
138-
139-
140109cdef int _raise_nvjitlink_error(
141110 cynvjitlink.nvJitLinkHandle handle, cynvjitlink.nvJitLinkResult err) except - 1 :
142111 """ Raise nvJitLinkError annotated with the error log."""
0 commit comments