Skip to content

Commit 0c8177c

Browse files
committed
cuda.core: drop spurious inline on cpdef functions declared in .pxd
cython-lint v0.22.0 reports that _check_driver_error and _check_runtime_error are declared in cuda_utils.pxd and implemented as `cpdef inline` in cuda_utils.pyx. For cpdef functions visible via a .pxd, callers in other modules always go through the Python-callable path; Cython silently ignores the inline keyword in that case. Remove it to match the .pxd declarations and eliminate the misleading hint. Signed-off-by: Ralf Juengling <[email protected]>
1 parent 7dbf540 commit 0c8177c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎cuda_core/cuda/core/_utils/cuda_utils.pyx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ cdef inline void _attach_detail(exc, str detail):
171171
exc.add_note(detail)
172172

173173

174-
cpdef inline int _check_driver_error(cydriver.CUresult error) except?-1 nogil:
174+
cpdef int _check_driver_error(cydriver.CUresult error) except?-1 nogil:
175175
if error == cydriver.CUresult.CUDA_SUCCESS:
176176
return 0
177177
cdef const char* name
@@ -197,7 +197,7 @@ cpdef inline int _check_driver_error(cydriver.CUresult error) except?-1 nogil:
197197
raise exc
198198

199199

200-
cpdef inline int _check_runtime_error(error) except?-1:
200+
cpdef int _check_runtime_error(error) except?-1:
201201
if error == _RUNTIME_SUCCESS:
202202
return 0
203203
# `_check_error()` reaches this path only for `runtime.cudaError_t` values.

0 commit comments

Comments
 (0)