diff --git a/cuda_bindings/build_hooks.py b/cuda_bindings/build_hooks.py index a50133f9777..bb0d1b566b7 100644 --- a/cuda_bindings/build_hooks.py +++ b/cuda_bindings/build_hooks.py @@ -131,6 +131,7 @@ def _build_cuda_bindings(debug=False): that metadata queries do not require a CUDA toolkit installation. """ from Cython.Build import cythonize + from Cython.Compiler import Options as _CythonOptions global _extensions @@ -224,6 +225,7 @@ def get_static_libraries(f): ) # Cythonize + _CythonOptions.warning_errors = True cython_directives = {"language_level": 3, "embedsignature": True, "binding": True, "freethreading_compatible": True} if compile_for_coverage: cython_directives["linetrace"] = True diff --git a/cuda_bindings/cuda/bindings/_lib/windll.pxd b/cuda_bindings/cuda/bindings/_lib/windll.pxd index 294a1a9fd90..b5fd5c4db90 100644 --- a/cuda_bindings/cuda/bindings/_lib/windll.pxd +++ b/cuda_bindings/cuda/bindings/_lib/windll.pxd @@ -14,7 +14,7 @@ cdef extern from "windows.h" nogil: ctypedef const char *LPCSTR ctypedef int BOOL - cdef DWORD LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800 + const DWORD LOAD_LIBRARY_SEARCH_SYSTEM32 HMODULE _LoadLibraryExW "LoadLibraryExW"( LPCWSTR lpLibFileName, diff --git a/cuda_bindings/cuda/bindings/cudla.pxd b/cuda_bindings/cuda/bindings/cudla.pxd index cb58d685a24..46b920f3c91 100644 --- a/cuda_bindings/cuda/bindings/cudla.pxd +++ b/cuda_bindings/cuda/bindings/cudla.pxd @@ -3,7 +3,7 @@ # This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e64a78a1b3e010d167373d7c9635ff4637dfd1a6a38ffafb671dcde4e12aaaad +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b3303a34762cec1db0d9ab7662fe4a4a0f5b80350810cc0b646a04c9c6bb19c3 from libc.stdint cimport intptr_t from .cycudla cimport * @@ -44,10 +44,10 @@ cpdef intptr_t mem_register(intptr_t dev_handle, intptr_t ptr, size_t size, uint cpdef intptr_t module_load_from_memory(intptr_t dev_handle, p_module, size_t module_size, uint32_t flags) except * cpdef module_unload(intptr_t h_module, uint32_t flags) cpdef submit_task(intptr_t dev_handle, intptr_t ptr_to_tasks, uint32_t num_tasks, intptr_t stream, uint32_t flags) -cpdef object device_get_attribute(intptr_t dev_handle, int attrib) except * +cpdef object device_get_attribute(intptr_t dev_handle, int attrib) cpdef mem_unregister(intptr_t dev_handle, intptr_t dev_ptr) cpdef int get_last_error(intptr_t dev_handle) except? 0 cpdef destroy_device(intptr_t dev_handle) cpdef set_task_timeout_in_ms(intptr_t dev_handle, uint32_t timeout) -cpdef module_get_attributes(intptr_t h_module, int attr_type) except * +cpdef module_get_attributes(intptr_t h_module, int attr_type) diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index 6ef2cba32e9..af240a100c5 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b793aebd0586162e23d26c82e2bd54c21675584e3c23d6e443f3a83c61a8674c +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ee04e18498a1e4e597afcdead5590bfe22af25afb2d43cd85b19089bee10a721 # <<<< PREAMBLE CONTENT >>>> @@ -1776,7 +1776,7 @@ cpdef submit_task(intptr_t dev_handle, intptr_t ptr_to_tasks, uint32_t num_tasks check_status(__status__) -cpdef object device_get_attribute(intptr_t dev_handle, int attrib) except *: +cpdef object device_get_attribute(intptr_t dev_handle, int attrib): cdef DevAttribute p_attribute_py = DevAttribute() cdef cudlaDevAttribute *p_attribute = (p_attribute_py._get_ptr()) with nogil: @@ -1810,7 +1810,7 @@ cpdef set_task_timeout_in_ms(intptr_t dev_handle, uint32_t timeout): check_status(__status__) -cpdef module_get_attributes(intptr_t h_module, int attr_type) except *: +cpdef module_get_attributes(intptr_t h_module, int attr_type): """Query module attributes, interpreting the cudlaModuleAttribute union based on the requested attribute type.