diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 07d494f0463..5c45ed9fca8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -219,6 +219,8 @@ repos: rev: "35dbc940c2bd4499ebf39aba00ad717e05cec9b5" # frozen: v0.22.0 hooks: - id: cython-lint + # Cross-file rules need .pxd declarations and .pyx implementations in one process. + require_serial: true args: [--no-pycodestyle] exclude: ^cuda_bindings_(?:12|13)/ additional_dependencies: diff --git a/cuda_core/cuda/core/_stream.pyx b/cuda_core/cuda/core/_stream.pyx index 1876885e0cf..066a680e2d9 100644 --- a/cuda_core/cuda/core/_stream.pyx +++ b/cuda_core/cuda/core/_stream.pyx @@ -517,7 +517,7 @@ cpdef Stream default_stream(): else: return LEGACY_DEFAULT_STREAM -cdef inline bint Stream_handle_is_default_token(cydriver.CUstream s) noexcept nogil: +cdef bint Stream_handle_is_default_token(cydriver.CUstream s) noexcept nogil: """Return True for the raw CU_STREAM_LEGACY and CU_STREAM_PER_THREAD tokens. These tokens carry no context of their own; they refer to whatever context @@ -527,12 +527,12 @@ cdef inline bint Stream_handle_is_default_token(cydriver.CUstream s) noexcept no return h == cydriver.CU_STREAM_LEGACY or h == cydriver.CU_STREAM_PER_THREAD -cdef inline bint Stream_is_default_token(Stream self) noexcept nogil: +cdef bint Stream_is_default_token(Stream self) noexcept nogil: """Return True when this stream is CU_STREAM_LEGACY or CU_STREAM_PER_THREAD.""" return Stream_handle_is_default_token(as_cu(self._h_stream)) -cdef inline bint Stream_is_legacy_default_token(Stream self) noexcept nogil: +cdef bint Stream_is_legacy_default_token(Stream self) noexcept nogil: """Return True only for CU_STREAM_LEGACY. Unlike CU_STREAM_PER_THREAD, the legacy default stream token is rejected diff --git a/cuda_core/cuda/core/graph/_graph_node.pyx b/cuda_core/cuda/core/graph/_graph_node.pyx index 09a52f09884..c028be968bd 100644 --- a/cuda_core/cuda/core/graph/_graph_node.pyx +++ b/cuda_core/cuda/core/graph/_graph_node.pyx @@ -923,7 +923,7 @@ cdef inline OpaqueHandle _buffer_attachment_owner(Buffer buf, str label): return attachment_owner -cdef inline OpaqueHandle _resolve_memcpy_operand( +cdef OpaqueHandle _resolve_memcpy_operand( object operand, object owner, str side, cydriver.CUdeviceptr* out_ptr) except *: """Resolve an operand to a pointer and optional attachment owner.