From 26b0e7905e15e13d627707b57f1655d0503badb6 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Mon, 16 Mar 2026 17:07:50 -0700 Subject: [PATCH 1/2] cybind update (no manual changes) --- .../cuda/bindings/_internal/_fast_enum.py | 2 +- .../cuda/bindings/_internal/cufile.pxd | 2 +- .../cuda/bindings/_internal/cufile_linux.pyx | 2 +- .../cuda/bindings/_internal/nvjitlink.pxd | 2 +- .../bindings/_internal/nvjitlink_linux.pyx | 2 +- .../bindings/_internal/nvjitlink_windows.pyx | 2 +- .../cuda/bindings/_internal/nvml.pxd | 2 +- .../cuda/bindings/_internal/nvml_linux.pyx | 2 +- .../cuda/bindings/_internal/nvml_windows.pyx | 2 +- .../cuda/bindings/_internal/nvvm.pxd | 3 +- .../cuda/bindings/_internal/nvvm_linux.pyx | 23 ++- .../cuda/bindings/_internal/nvvm_windows.pyx | 19 +- cuda_bindings/cuda/bindings/cufile.pxd | 2 +- cuda_bindings/cuda/bindings/cufile.pyx | 54 ++--- cuda_bindings/cuda/bindings/cycufile.pxd | 18 +- cuda_bindings/cuda/bindings/cycufile.pyx | 2 +- cuda_bindings/cuda/bindings/cynvjitlink.pxd | 2 +- cuda_bindings/cuda/bindings/cynvjitlink.pyx | 2 +- cuda_bindings/cuda/bindings/cynvml.pxd | 34 +-- cuda_bindings/cuda/bindings/cynvml.pyx | 2 +- cuda_bindings/cuda/bindings/cynvvm.pxd | 3 +- cuda_bindings/cuda/bindings/cynvvm.pyx | 6 +- cuda_bindings/cuda/bindings/nvjitlink.pxd | 2 +- cuda_bindings/cuda/bindings/nvjitlink.pyx | 2 +- cuda_bindings/cuda/bindings/nvml.pxd | 2 +- cuda_bindings/cuda/bindings/nvml.pyx | 194 +++++++++--------- cuda_bindings/cuda/bindings/nvvm.pxd | 3 +- cuda_bindings/cuda/bindings/nvvm.pyx | 24 ++- 28 files changed, 241 insertions(+), 174 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py index 9c8e42cc93..9d18d9e50b 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. """ diff --git a/cuda_bindings/cuda/bindings/_internal/cufile.pxd b/cuda_bindings/cuda/bindings/_internal/cufile.pxd index 1e0da8beb7..1a530f78c0 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cufile.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from ..cycufile cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx index 5231808058..9297e9b455 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd index 6fd75c8682..1fdc2a1af7 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from ..cynvjitlink cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx index d676aac372..f94b0d6aad 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx index 4ee6859bdb..15c536089b 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvml.pxd b/cuda_bindings/cuda/bindings/_internal/nvml.pxd index 40805378a8..697687c46b 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvml.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from ..cynvml cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx index 28f0919423..2eab899835 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx index afbd0a8860..cedae45ada 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd index 23427edd9b..0850fa7633 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from ..cynvvm cimport * @@ -24,3 +24,4 @@ cdef nvvmResult _nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeR cdef nvvmResult _nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil cdef nvvmResult _nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx index 8a84834a9a..8b851960bb 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t @@ -72,6 +72,7 @@ cdef void* __nvvmGetCompiledResultSize = NULL cdef void* __nvvmGetCompiledResult = NULL cdef void* __nvvmGetProgramLogSize = NULL cdef void* __nvvmGetProgramLog = NULL +cdef void* __nvvmLLVMVersion = NULL cdef void* load_library() except* with gil: @@ -181,6 +182,13 @@ cdef int _init_nvvm() except -1 nogil: handle = load_library() __nvvmGetProgramLog = dlsym(handle, 'nvvmGetProgramLog') + global __nvvmLLVMVersion + __nvvmLLVMVersion = dlsym(RTLD_DEFAULT, 'nvvmLLVMVersion') + if __nvvmLLVMVersion == NULL: + if handle == NULL: + handle = load_library() + __nvvmLLVMVersion = dlsym(handle, 'nvvmLLVMVersion') + __py_nvvm_init = True return 0 @@ -242,6 +250,9 @@ cpdef dict _inspect_function_pointers(): global __nvvmGetProgramLog data["__nvvmGetProgramLog"] = __nvvmGetProgramLog + global __nvvmLLVMVersion + data["__nvvmLLVMVersion"] = __nvvmLLVMVersion + func_ptrs = data return data @@ -385,3 +396,13 @@ cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMR raise FunctionNotFoundError("function nvvmGetProgramLog is not found") return (__nvvmGetProgramLog)( prog, buffer) + + +cdef nvvmResult _nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmLLVMVersion + _check_or_init_nvvm() + if __nvvmLLVMVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvvmLLVMVersion is not found") + return (__nvvmLLVMVersion)( + arch, major) diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx index e029521b2f..4cb39f55d4 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t @@ -90,6 +90,7 @@ cdef void* __nvvmGetCompiledResultSize = NULL cdef void* __nvvmGetCompiledResult = NULL cdef void* __nvvmGetProgramLogSize = NULL cdef void* __nvvmGetProgramLog = NULL +cdef void* __nvvmLLVMVersion = NULL cdef int _init_nvvm() except -1 nogil: @@ -143,6 +144,9 @@ cdef int _init_nvvm() except -1 nogil: global __nvvmGetProgramLog __nvvmGetProgramLog = GetProcAddress(handle, 'nvvmGetProgramLog') + global __nvvmLLVMVersion + __nvvmLLVMVersion = GetProcAddress(handle, 'nvvmLLVMVersion') + __py_nvvm_init = True return 0 @@ -204,6 +208,9 @@ cpdef dict _inspect_function_pointers(): global __nvvmGetProgramLog data["__nvvmGetProgramLog"] = __nvvmGetProgramLog + global __nvvmLLVMVersion + data["__nvvmLLVMVersion"] = __nvvmLLVMVersion + func_ptrs = data return data @@ -347,3 +354,13 @@ cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMR raise FunctionNotFoundError("function nvvmGetProgramLog is not found") return (__nvvmGetProgramLog)( prog, buffer) + + +cdef nvvmResult _nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmLLVMVersion + _check_or_init_nvvm() + if __nvvmLLVMVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvvmLLVMVersion is not found") + return (__nvvmLLVMVersion)( + arch, major) diff --git a/cuda_bindings/cuda/bindings/cufile.pxd b/cuda_bindings/cuda/bindings/cufile.pxd index 77475e1337..843685a22b 100644 --- a/cuda_bindings/cuda/bindings/cufile.pxd +++ b/cuda_bindings/cuda/bindings/cufile.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cufile.pyx b/cuda_bindings/cuda/bindings/cufile.pyx index f73ad21c0a..87f55ebac7 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. cimport cython # NOQA from libc cimport errno @@ -77,19 +77,19 @@ _py_anon_pod1_dtype = _numpy.dtype(( cdef class _py_anon_pod1: - """Empty-initialize an instance of `_anon_pod1`. + """Empty-initialize an instance of `cuda_bindings_cufile__anon_pod1`. - .. seealso:: `_anon_pod1` + .. seealso:: `cuda_bindings_cufile__anon_pod1` """ cdef: - _anon_pod1 *_ptr + cuda_bindings_cufile__anon_pod1 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod1 *>calloc(1, sizeof((NULL).handle)) + self._ptr = calloc(1, sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") self._owner = None @@ -97,7 +97,7 @@ cdef class _py_anon_pod1: self._readonly = False def __dealloc__(self): - cdef _anon_pod1 *ptr + cdef cuda_bindings_cufile__anon_pod1 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -132,7 +132,7 @@ cdef class _py_anon_pod1: def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod1 *>malloc(sizeof((NULL).handle)) + self._ptr = malloc(sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) @@ -191,14 +191,14 @@ cdef class _py_anon_pod1: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) if owner is None: - obj._ptr = <_anon_pod1 *>malloc(sizeof((NULL).handle)) + obj._ptr = malloc(sizeof((NULL).handle)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") memcpy((obj._ptr), ptr, sizeof((NULL).handle)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod1 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -206,7 +206,7 @@ cdef class _py_anon_pod1: cdef _get__py_anon_pod3_dtype_offsets(): - cdef _anon_pod3 pod = _anon_pod3() + cdef cuda_bindings_cufile__anon_pod3 pod = cuda_bindings_cufile__anon_pod3() return _numpy.dtype({ 'names': ['dev_ptr_base', 'file_offset', 'dev_ptr_offset', 'size_'], 'formats': [_numpy.intp, _numpy.int64, _numpy.int64, _numpy.uint64], @@ -222,19 +222,19 @@ cdef _get__py_anon_pod3_dtype_offsets(): _py_anon_pod3_dtype = _get__py_anon_pod3_dtype_offsets() cdef class _py_anon_pod3: - """Empty-initialize an instance of `_anon_pod3`. + """Empty-initialize an instance of `cuda_bindings_cufile__anon_pod3`. - .. seealso:: `_anon_pod3` + .. seealso:: `cuda_bindings_cufile__anon_pod3` """ cdef: - _anon_pod3 *_ptr + cuda_bindings_cufile__anon_pod3 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod3 *>calloc(1, sizeof((NULL).u.batch)) + self._ptr = calloc(1, sizeof((NULL).u.batch)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") self._owner = None @@ -242,7 +242,7 @@ cdef class _py_anon_pod3: self._readonly = False def __dealloc__(self): - cdef _anon_pod3 *ptr + cdef cuda_bindings_cufile__anon_pod3 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -277,7 +277,7 @@ cdef class _py_anon_pod3: def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod3 *>malloc(sizeof((NULL).u.batch)) + self._ptr = malloc(sizeof((NULL).u.batch)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u.batch)) @@ -358,14 +358,14 @@ cdef class _py_anon_pod3: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) if owner is None: - obj._ptr = <_anon_pod3 *>malloc(sizeof((NULL).u.batch)) + obj._ptr = malloc(sizeof((NULL).u.batch)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod3 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -1351,19 +1351,19 @@ _py_anon_pod2_dtype = _numpy.dtype(( cdef class _py_anon_pod2: - """Empty-initialize an instance of `_anon_pod2`. + """Empty-initialize an instance of `cuda_bindings_cufile__anon_pod2`. - .. seealso:: `_anon_pod2` + .. seealso:: `cuda_bindings_cufile__anon_pod2` """ cdef: - _anon_pod2 *_ptr + cuda_bindings_cufile__anon_pod2 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod2 *>calloc(1, sizeof((NULL).u)) + self._ptr = calloc(1, sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") self._owner = None @@ -1371,7 +1371,7 @@ cdef class _py_anon_pod2: self._readonly = False def __dealloc__(self): - cdef _anon_pod2 *ptr + cdef cuda_bindings_cufile__anon_pod2 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -1406,7 +1406,7 @@ cdef class _py_anon_pod2: def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod2 *>malloc(sizeof((NULL).u)) + self._ptr = malloc(sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) @@ -1426,7 +1426,7 @@ cdef class _py_anon_pod2: if self._readonly: raise ValueError("This _py_anon_pod2 instance is read-only") cdef _py_anon_pod3 val_ = val - memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(_anon_pod3) * 1) + memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(cuda_bindings_cufile__anon_pod3) * 1) @staticmethod def from_buffer(buffer): @@ -1455,14 +1455,14 @@ cdef class _py_anon_pod2: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) if owner is None: - obj._ptr = <_anon_pod2 *>malloc(sizeof((NULL).u)) + obj._ptr = malloc(sizeof((NULL).u)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") memcpy((obj._ptr), ptr, sizeof((NULL).u)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod2 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly diff --git a/cuda_bindings/cuda/bindings/cycufile.pxd b/cuda_bindings/cuda/bindings/cycufile.pxd index b18a301a97..21be588cff 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pxd +++ b/cuda_bindings/cuda/bindings/cycufile.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t from libc.time cimport time_t @@ -205,7 +205,7 @@ cdef extern from '': CUfileOpError err CUresult cu_err -cdef struct _anon_pod0 '_anon_pod0': +cdef struct cuda_bindings_cufile__anon_pod0: unsigned int major_version unsigned int minor_version size_t poll_thresh_size @@ -227,11 +227,11 @@ cdef extern from '': ssize_t (*read)(const void*, char*, size_t, loff_t, const cufileRDMAInfo_t*) ssize_t (*write)(const void*, const char*, size_t, loff_t, const cufileRDMAInfo_t*) -cdef union _anon_pod1 '_anon_pod1': +cdef union cuda_bindings_cufile__anon_pod1: int fd void* handle -cdef struct _anon_pod3 '_anon_pod3': +cdef struct cuda_bindings_cufile__anon_pod3: void* devPtr_base off_t file_offset off_t devPtr_offset @@ -283,7 +283,7 @@ cdef extern from '': cdef extern from '': ctypedef struct CUfileDrvProps_t 'CUfileDrvProps_t': - _anon_pod0 nvfs + cuda_bindings_cufile__anon_pod0 nvfs unsigned int fflags unsigned int max_device_cache_size unsigned int per_buffer_cache_size @@ -294,11 +294,11 @@ cdef extern from '': cdef extern from '': ctypedef struct CUfileDescr_t 'CUfileDescr_t': CUfileFileHandleType type - _anon_pod1 handle + cuda_bindings_cufile__anon_pod1 handle CUfileFSOps_t* fs_ops -cdef union _anon_pod2 '_anon_pod2': - _anon_pod3 batch +cdef union cuda_bindings_cufile__anon_pod2: + cuda_bindings_cufile__anon_pod3 batch cdef extern from '': ctypedef struct CUfileStatsLevel1_t 'CUfileStatsLevel1_t': @@ -349,7 +349,7 @@ cdef extern from '': cdef extern from '': ctypedef struct CUfileIOParams_t 'CUfileIOParams_t': CUfileBatchMode_t mode - _anon_pod2 u + cuda_bindings_cufile__anon_pod2 u CUfileHandle_t fh CUfileOpcode_t opcode void* cookie diff --git a/cuda_bindings/cuda/bindings/cycufile.pyx b/cuda_bindings/cuda/bindings/cycufile.pyx index 48a7b9eb3c..3e959b19d5 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pyx +++ b/cuda_bindings/cuda/bindings/cycufile.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from ._internal cimport cufile as _cufile diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pxd b/cuda_bindings/cuda/bindings/cynvjitlink.pxd index 50d817f13b..16bc50eeff 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pyx b/cuda_bindings/cuda/bindings/cynvjitlink.pyx index 53639e64a9..ae736eeb20 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from ._internal cimport nvjitlink as _nvjitlink diff --git a/cuda_bindings/cuda/bindings/cynvml.pxd b/cuda_bindings/cuda/bindings/cynvml.pxd index a1bb81ffb5..2a95fc96c8 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pxd +++ b/cuda_bindings/cuda/bindings/cynvml.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport int64_t @@ -1022,7 +1022,7 @@ ctypedef struct nvmlViolationTime_t 'nvmlViolationTime_t': unsigned long long referenceTime unsigned long long violationTime -ctypedef struct _anon_pod0 '_anon_pod0': +ctypedef struct cuda_bindings_nvml__anon_pod0: nvmlThermalController_t controller int defaultMinTemp int defaultMaxTemp @@ -1065,7 +1065,7 @@ ctypedef struct nvmlPlatformInfo_v1_t 'nvmlPlatformInfo_v1_t': unsigned char peerType unsigned char moduleId -ctypedef struct _anon_pod1 '_anon_pod1': +ctypedef struct cuda_bindings_nvml__anon_pod1: unsigned int bIsPresent unsigned int percentage unsigned int incThreshold @@ -1077,11 +1077,11 @@ ctypedef struct nvmlVgpuPlacementList_v1_t 'nvmlVgpuPlacementList_v1_t': unsigned int count unsigned int* placementIds -ctypedef struct _anon_pod2 '_anon_pod2': +ctypedef struct cuda_bindings_nvml__anon_pod2: unsigned int avgFactor unsigned int timeslice -ctypedef struct _anon_pod3 '_anon_pod3': +ctypedef struct cuda_bindings_nvml__anon_pod3: unsigned int timeslice ctypedef struct nvmlVgpuSchedulerLogEntry_t 'nvmlVgpuSchedulerLogEntry_t': @@ -1092,11 +1092,11 @@ ctypedef struct nvmlVgpuSchedulerLogEntry_t 'nvmlVgpuSchedulerLogEntry_t': unsigned long long targetTimeSlice unsigned long long cumulativePreemptionTime -ctypedef struct _anon_pod4 '_anon_pod4': +ctypedef struct cuda_bindings_nvml__anon_pod4: unsigned int avgFactor unsigned int frequency -ctypedef struct _anon_pod5 '_anon_pod5': +ctypedef struct cuda_bindings_nvml__anon_pod5: unsigned int timeslice ctypedef struct nvmlVgpuSchedulerCapabilities_t 'nvmlVgpuSchedulerCapabilities_t': @@ -1308,7 +1308,7 @@ ctypedef struct nvmlComputeInstanceProfileInfo_v3_t 'nvmlComputeInstanceProfileI char name[96] unsigned int capabilities -ctypedef struct _anon_pod6 '_anon_pod6': +ctypedef struct cuda_bindings_nvml__anon_pod6: char* shortName char* longName char* unit @@ -1347,7 +1347,7 @@ ctypedef struct nvmlNvlinkFirmwareVersion_t 'nvmlNvlinkFirmwareVersion_t': unsigned int minor unsigned int subMinor -ctypedef union _anon_pod7 '_anon_pod7': +ctypedef union cuda_bindings_nvml__anon_pod7: unsigned char inData[496] unsigned char outData[496] @@ -1579,7 +1579,7 @@ ctypedef struct nvmlPRMCounterValue_v1_t 'nvmlPRMCounterValue_v1_t': ctypedef struct nvmlGpuThermalSettings_t 'nvmlGpuThermalSettings_t': unsigned int count - _anon_pod0 sensor[3] + cuda_bindings_nvml__anon_pod0 sensor[3] ctypedef struct nvmlUUID_v1_t 'nvmlUUID_v1_t': unsigned int version @@ -1599,15 +1599,15 @@ ctypedef struct nvmlProcessesUtilizationInfo_v1_t 'nvmlProcessesUtilizationInfo_ ctypedef struct nvmlGpuDynamicPstatesInfo_t 'nvmlGpuDynamicPstatesInfo_t': unsigned int flags - _anon_pod1 utilization[8] + cuda_bindings_nvml__anon_pod1 utilization[8] ctypedef union nvmlVgpuSchedulerParams_t 'nvmlVgpuSchedulerParams_t': - _anon_pod2 vgpuSchedDataWithARR - _anon_pod3 vgpuSchedData + cuda_bindings_nvml__anon_pod2 vgpuSchedDataWithARR + cuda_bindings_nvml__anon_pod3 vgpuSchedData ctypedef union nvmlVgpuSchedulerSetParams_t 'nvmlVgpuSchedulerSetParams_t': - _anon_pod4 vgpuSchedDataWithARR - _anon_pod5 vgpuSchedData + cuda_bindings_nvml__anon_pod4 vgpuSchedDataWithARR + cuda_bindings_nvml__anon_pod5 vgpuSchedData ctypedef struct nvmlVgpuLicenseInfo_t 'nvmlVgpuLicenseInfo_t': unsigned char isLicensed @@ -1661,7 +1661,7 @@ ctypedef struct nvmlGpmMetric_t 'nvmlGpmMetric_t': unsigned int metricId nvmlReturn_t nvmlReturn double value - _anon_pod6 metricInfo + cuda_bindings_nvml__anon_pod6 metricInfo ctypedef struct nvmlWorkloadPowerProfileInfo_v1_t 'nvmlWorkloadPowerProfileInfo_v1_t': unsigned int version @@ -1695,7 +1695,7 @@ ctypedef struct nvmlNvlinkFirmwareInfo_t 'nvmlNvlinkFirmwareInfo_t': ctypedef struct nvmlPRMTLV_v1_t 'nvmlPRMTLV_v1_t': unsigned dataSize unsigned status - _anon_pod7 _anon_pod_member0 + cuda_bindings_nvml__anon_pod7 _anon_pod_member0 ctypedef struct nvmlVgpuSchedulerLogInfo_v2_t 'nvmlVgpuSchedulerLogInfo_v2_t': unsigned int engineId diff --git a/cuda_bindings/cuda/bindings/cynvml.pyx b/cuda_bindings/cuda/bindings/cynvml.pyx index 1200442977..0066265458 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pyx +++ b/cuda_bindings/cuda/bindings/cynvml.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from ._internal cimport nvml as _nvml diff --git a/cuda_bindings/cuda/bindings/cynvvm.pxd b/cuda_bindings/cuda/bindings/cynvvm.pxd index 300123115f..9b4348c841 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pxd +++ b/cuda_bindings/cuda/bindings/cynvvm.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. ############################################################################### @@ -46,3 +46,4 @@ cdef nvvmResult nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRe cdef nvvmResult nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/cuda_bindings/cuda/bindings/cynvvm.pyx b/cuda_bindings/cuda/bindings/cynvvm.pyx index 7fe22f0dbf..a779890ce2 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pyx +++ b/cuda_bindings/cuda/bindings/cynvvm.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from ._internal cimport nvvm as _nvvm @@ -61,3 +61,7 @@ cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) e cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: return _nvvm._nvvmGetProgramLog(prog, buffer) + + +cdef nvvmResult nvvmLLVMVersion(const char* arch, int* major) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmLLVMVersion(arch, major) diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pxd b/cuda_bindings/cuda/bindings/nvjitlink.pxd index e9090a6687..c1705420b2 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/nvjitlink.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pyx b/cuda_bindings/cuda/bindings/nvjitlink.pyx index 9466b41c9b..aa8ce232d4 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. cimport cython # NOQA diff --git a/cuda_bindings/cuda/bindings/nvml.pxd b/cuda_bindings/cuda/bindings/nvml.pxd index 3dc3f58e5d..f75b26edeb 100644 --- a/cuda_bindings/cuda/bindings/nvml.pxd +++ b/cuda_bindings/cuda/bindings/nvml.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index 0661379a68..6db9d89a06 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. cimport cython # NOQA @@ -4423,7 +4423,7 @@ cdef class Value: cdef _get__py_anon_pod0_dtype_offsets(): - cdef _anon_pod0 pod = _anon_pod0() + cdef cuda_bindings_nvml__anon_pod0 pod = cuda_bindings_nvml__anon_pod0() return _numpy.dtype({ 'names': ['controller', 'default_min_temp', 'default_max_temp', 'current_temp', 'target'], 'formats': [_numpy.int32, _numpy.int32, _numpy.int32, _numpy.int32, _numpy.int32], @@ -4434,25 +4434,25 @@ cdef _get__py_anon_pod0_dtype_offsets(): (&(pod.currentTemp)) - (&pod), (&(pod.target)) - (&pod), ], - 'itemsize': sizeof(_anon_pod0), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod0), }) _py_anon_pod0_dtype = _get__py_anon_pod0_dtype_offsets() cdef class _py_anon_pod0: - """Empty-initialize an instance of `_anon_pod0`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod0`. - .. seealso:: `_anon_pod0` + .. seealso:: `cuda_bindings_nvml__anon_pod0` """ cdef: - _anon_pod0 *_ptr + cuda_bindings_nvml__anon_pod0 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod0 *>calloc(1, sizeof(_anon_pod0)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod0)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") self._owner = None @@ -4460,7 +4460,7 @@ cdef class _py_anon_pod0: self._readonly = False def __dealloc__(self): - cdef _anon_pod0 *ptr + cdef cuda_bindings_nvml__anon_pod0 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -4485,20 +4485,20 @@ cdef class _py_anon_pod0: if not isinstance(other, _py_anon_pod0): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod0)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod0), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod0), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod0 *>malloc(sizeof(_anon_pod0)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod0)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod0)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4563,7 +4563,7 @@ cdef class _py_anon_pod0: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod0 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod0), _py_anon_pod0) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) @staticmethod def from_data(data): @@ -4587,14 +4587,14 @@ cdef class _py_anon_pod0: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod0 obj = _py_anon_pod0.__new__(_py_anon_pod0) if owner is None: - obj._ptr = <_anon_pod0 *>malloc(sizeof(_anon_pod0)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - memcpy((obj._ptr), ptr, sizeof(_anon_pod0)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod0 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -6280,7 +6280,7 @@ cdef class PlatformInfo_v2: cdef _get__py_anon_pod1_dtype_offsets(): - cdef _anon_pod1 pod = _anon_pod1() + cdef cuda_bindings_nvml__anon_pod1 pod = cuda_bindings_nvml__anon_pod1() return _numpy.dtype({ 'names': ['b_is_present', 'percentage', 'inc_threshold', 'dec_threshold'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -6290,25 +6290,25 @@ cdef _get__py_anon_pod1_dtype_offsets(): (&(pod.incThreshold)) - (&pod), (&(pod.decThreshold)) - (&pod), ], - 'itemsize': sizeof(_anon_pod1), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod1), }) _py_anon_pod1_dtype = _get__py_anon_pod1_dtype_offsets() cdef class _py_anon_pod1: - """Empty-initialize an instance of `_anon_pod1`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod1`. - .. seealso:: `_anon_pod1` + .. seealso:: `cuda_bindings_nvml__anon_pod1` """ cdef: - _anon_pod1 *_ptr + cuda_bindings_nvml__anon_pod1 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod1 *>calloc(1, sizeof(_anon_pod1)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod1)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") self._owner = None @@ -6316,7 +6316,7 @@ cdef class _py_anon_pod1: self._readonly = False def __dealloc__(self): - cdef _anon_pod1 *ptr + cdef cuda_bindings_nvml__anon_pod1 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -6341,20 +6341,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod1)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod1), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod1), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod1 *>malloc(sizeof(_anon_pod1)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod1)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod1)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6408,7 +6408,7 @@ cdef class _py_anon_pod1: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod1), _py_anon_pod1) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) @staticmethod def from_data(data): @@ -6432,14 +6432,14 @@ cdef class _py_anon_pod1: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) if owner is None: - obj._ptr = <_anon_pod1 *>malloc(sizeof(_anon_pod1)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy((obj._ptr), ptr, sizeof(_anon_pod1)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod1 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -7020,7 +7020,7 @@ cdef class VgpuProcessUtilizationInfo_v1: cdef _get__py_anon_pod2_dtype_offsets(): - cdef _anon_pod2 pod = _anon_pod2() + cdef cuda_bindings_nvml__anon_pod2 pod = cuda_bindings_nvml__anon_pod2() return _numpy.dtype({ 'names': ['avg_factor', 'timeslice'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -7028,25 +7028,25 @@ cdef _get__py_anon_pod2_dtype_offsets(): (&(pod.avgFactor)) - (&pod), (&(pod.timeslice)) - (&pod), ], - 'itemsize': sizeof(_anon_pod2), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod2), }) _py_anon_pod2_dtype = _get__py_anon_pod2_dtype_offsets() cdef class _py_anon_pod2: - """Empty-initialize an instance of `_anon_pod2`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod2`. - .. seealso:: `_anon_pod2` + .. seealso:: `cuda_bindings_nvml__anon_pod2` """ cdef: - _anon_pod2 *_ptr + cuda_bindings_nvml__anon_pod2 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod2 *>calloc(1, sizeof(_anon_pod2)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod2)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") self._owner = None @@ -7054,7 +7054,7 @@ cdef class _py_anon_pod2: self._readonly = False def __dealloc__(self): - cdef _anon_pod2 *ptr + cdef cuda_bindings_nvml__anon_pod2 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -7079,20 +7079,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod2)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod2), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod2), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod2 *>malloc(sizeof(_anon_pod2)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod2)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod2)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7124,7 +7124,7 @@ cdef class _py_anon_pod2: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod2), _py_anon_pod2) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) @staticmethod def from_data(data): @@ -7148,14 +7148,14 @@ cdef class _py_anon_pod2: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) if owner is None: - obj._ptr = <_anon_pod2 *>malloc(sizeof(_anon_pod2)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy((obj._ptr), ptr, sizeof(_anon_pod2)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod2 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -7163,32 +7163,32 @@ cdef class _py_anon_pod2: cdef _get__py_anon_pod3_dtype_offsets(): - cdef _anon_pod3 pod = _anon_pod3() + cdef cuda_bindings_nvml__anon_pod3 pod = cuda_bindings_nvml__anon_pod3() return _numpy.dtype({ 'names': ['timeslice'], 'formats': [_numpy.uint32], 'offsets': [ (&(pod.timeslice)) - (&pod), ], - 'itemsize': sizeof(_anon_pod3), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod3), }) _py_anon_pod3_dtype = _get__py_anon_pod3_dtype_offsets() cdef class _py_anon_pod3: - """Empty-initialize an instance of `_anon_pod3`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod3`. - .. seealso:: `_anon_pod3` + .. seealso:: `cuda_bindings_nvml__anon_pod3` """ cdef: - _anon_pod3 *_ptr + cuda_bindings_nvml__anon_pod3 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod3 *>calloc(1, sizeof(_anon_pod3)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod3)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") self._owner = None @@ -7196,7 +7196,7 @@ cdef class _py_anon_pod3: self._readonly = False def __dealloc__(self): - cdef _anon_pod3 *ptr + cdef cuda_bindings_nvml__anon_pod3 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -7221,20 +7221,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod3)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod3), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod3), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod3 *>malloc(sizeof(_anon_pod3)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod3)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod3)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7255,7 +7255,7 @@ cdef class _py_anon_pod3: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod3), _py_anon_pod3) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) @staticmethod def from_data(data): @@ -7279,14 +7279,14 @@ cdef class _py_anon_pod3: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) if owner is None: - obj._ptr = <_anon_pod3 *>malloc(sizeof(_anon_pod3)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - memcpy((obj._ptr), ptr, sizeof(_anon_pod3)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod3 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -7499,7 +7499,7 @@ cdef class VgpuSchedulerLogEntry: cdef _get__py_anon_pod4_dtype_offsets(): - cdef _anon_pod4 pod = _anon_pod4() + cdef cuda_bindings_nvml__anon_pod4 pod = cuda_bindings_nvml__anon_pod4() return _numpy.dtype({ 'names': ['avg_factor', 'frequency'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -7507,25 +7507,25 @@ cdef _get__py_anon_pod4_dtype_offsets(): (&(pod.avgFactor)) - (&pod), (&(pod.frequency)) - (&pod), ], - 'itemsize': sizeof(_anon_pod4), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod4), }) _py_anon_pod4_dtype = _get__py_anon_pod4_dtype_offsets() cdef class _py_anon_pod4: - """Empty-initialize an instance of `_anon_pod4`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod4`. - .. seealso:: `_anon_pod4` + .. seealso:: `cuda_bindings_nvml__anon_pod4` """ cdef: - _anon_pod4 *_ptr + cuda_bindings_nvml__anon_pod4 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod4 *>calloc(1, sizeof(_anon_pod4)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod4)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") self._owner = None @@ -7533,7 +7533,7 @@ cdef class _py_anon_pod4: self._readonly = False def __dealloc__(self): - cdef _anon_pod4 *ptr + cdef cuda_bindings_nvml__anon_pod4 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -7558,20 +7558,20 @@ cdef class _py_anon_pod4: if not isinstance(other, _py_anon_pod4): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod4)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod4), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod4), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod4 *>malloc(sizeof(_anon_pod4)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod4)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod4)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7603,7 +7603,7 @@ cdef class _py_anon_pod4: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod4 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod4), _py_anon_pod4) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) @staticmethod def from_data(data): @@ -7627,14 +7627,14 @@ cdef class _py_anon_pod4: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod4 obj = _py_anon_pod4.__new__(_py_anon_pod4) if owner is None: - obj._ptr = <_anon_pod4 *>malloc(sizeof(_anon_pod4)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - memcpy((obj._ptr), ptr, sizeof(_anon_pod4)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod4 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -7642,32 +7642,32 @@ cdef class _py_anon_pod4: cdef _get__py_anon_pod5_dtype_offsets(): - cdef _anon_pod5 pod = _anon_pod5() + cdef cuda_bindings_nvml__anon_pod5 pod = cuda_bindings_nvml__anon_pod5() return _numpy.dtype({ 'names': ['timeslice'], 'formats': [_numpy.uint32], 'offsets': [ (&(pod.timeslice)) - (&pod), ], - 'itemsize': sizeof(_anon_pod5), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod5), }) _py_anon_pod5_dtype = _get__py_anon_pod5_dtype_offsets() cdef class _py_anon_pod5: - """Empty-initialize an instance of `_anon_pod5`. + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod5`. - .. seealso:: `_anon_pod5` + .. seealso:: `cuda_bindings_nvml__anon_pod5` """ cdef: - _anon_pod5 *_ptr + cuda_bindings_nvml__anon_pod5 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod5 *>calloc(1, sizeof(_anon_pod5)) + self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod5)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") self._owner = None @@ -7675,7 +7675,7 @@ cdef class _py_anon_pod5: self._readonly = False def __dealloc__(self): - cdef _anon_pod5 *ptr + cdef cuda_bindings_nvml__anon_pod5 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL @@ -7700,20 +7700,20 @@ cdef class _py_anon_pod5: if not isinstance(other, _py_anon_pod5): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(_anon_pod5)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(_anon_pod5), self._readonly) + __getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod5), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = <_anon_pod5 *>malloc(sizeof(_anon_pod5)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - memcpy(self._ptr, val.ctypes.data, sizeof(_anon_pod5)) + memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod5)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7734,7 +7734,7 @@ cdef class _py_anon_pod5: @staticmethod def from_buffer(buffer): """Create an _py_anon_pod5 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(_anon_pod5), _py_anon_pod5) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) @staticmethod def from_data(data): @@ -7758,14 +7758,14 @@ cdef class _py_anon_pod5: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod5 obj = _py_anon_pod5.__new__(_py_anon_pod5) if owner is None: - obj._ptr = <_anon_pod5 *>malloc(sizeof(_anon_pod5)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - memcpy((obj._ptr), ptr, sizeof(_anon_pod5)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) obj._owner = None obj._owned = True else: - obj._ptr = <_anon_pod5 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -16973,7 +16973,7 @@ cdef class GpuThermalSettings: cdef _py_anon_pod0 val_ = val if len(val) != 3: raise ValueError(f"Expected length { 3 } for field sensor, got {len(val)}") - memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(_anon_pod0) * 3) + memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) @property def count(self): @@ -17433,7 +17433,7 @@ cdef class GpuDynamicPstatesInfo: cdef _py_anon_pod1 val_ = val if len(val) != 8: raise ValueError(f"Expected length { 8 } for field utilization, got {len(val)}") - memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(_anon_pod1) * 8) + memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) @property def flags_(self): @@ -17736,7 +17736,7 @@ cdef class VgpuSchedulerParams: if self._readonly: raise ValueError("This VgpuSchedulerParams instance is read-only") cdef _py_anon_pod2 val_ = val - memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(_anon_pod2) * 1) + memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) @property def vgpu_sched_data(self): @@ -17748,7 +17748,7 @@ cdef class VgpuSchedulerParams: if self._readonly: raise ValueError("This VgpuSchedulerParams instance is read-only") cdef _py_anon_pod3 val_ = val - memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(_anon_pod3) * 1) + memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) @staticmethod def from_buffer(buffer): @@ -17876,7 +17876,7 @@ cdef class VgpuSchedulerSetParams: if self._readonly: raise ValueError("This VgpuSchedulerSetParams instance is read-only") cdef _py_anon_pod4 val_ = val - memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(_anon_pod4) * 1) + memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) @property def vgpu_sched_data(self): @@ -17888,7 +17888,7 @@ cdef class VgpuSchedulerSetParams: if self._readonly: raise ValueError("This VgpuSchedulerSetParams instance is read-only") cdef _py_anon_pod5 val_ = val - memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(_anon_pod5) * 1) + memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) @staticmethod def from_buffer(buffer): diff --git a/cuda_bindings/cuda/bindings/nvvm.pxd b/cuda_bindings/cuda/bindings/nvvm.pxd index 0b17a143ca..87980f0f0f 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/nvvm.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. from libc.stdint cimport intptr_t @@ -39,3 +39,4 @@ cpdef size_t get_compiled_result_size(intptr_t prog) except? 0 cpdef get_compiled_result(intptr_t prog, buffer) cpdef size_t get_program_log_size(intptr_t prog) except? 0 cpdef get_program_log(intptr_t prog, buffer) +cpdef int llvm_version(arch) except? 0 diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index 0077d594e0..bcce619351 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1406+gd8426ea19.d20260316. Do not modify it directly. cimport cython # NOQA @@ -299,3 +299,25 @@ cpdef get_program_log(intptr_t prog, buffer): with nogil: __status__ = nvvmGetProgramLog(prog, _buffer_) check_status(__status__) + + +cpdef int llvm_version(arch) except? 0: + """Get the LLVM IR version guaranteed to be supported by NVVM. + + Args: + arch (str): Architecture string. + + Returns: + int: IR version number. + + .. seealso:: `nvvmLLVMVersion` + """ + if not isinstance(arch, str): + raise TypeError("arch must be a Python str") + cdef bytes _temp_arch_ = (arch).encode() + cdef char* _arch_ = _temp_arch_ + cdef int major + with nogil: + __status__ = nvvmLLVMVersion(_arch_, &major) + check_status(__status__) + return major From 916734f2fd769e54fcacdf92d1bdec83c96a71b0 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Mon, 16 Mar 2026 17:10:16 -0700 Subject: [PATCH 2/2] Add test for nvvm LLVM version query. Guard with FunctionNotFoundError because nvvmLLVMVersion is absent on pre-13.1.1 NVVM builds and the loader raises when the symbol is missing. Made-with: Cursor --- cuda_bindings/tests/test_nvvm.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cuda_bindings/tests/test_nvvm.py b/cuda_bindings/tests/test_nvvm.py index a3e4c81d4a..ec15bd5edf 100644 --- a/cuda_bindings/tests/test_nvvm.py +++ b/cuda_bindings/tests/test_nvvm.py @@ -8,6 +8,7 @@ import pytest from cuda.bindings import nvvm +from cuda.bindings._internal.utils import FunctionNotFoundError pytest_plugins = ("cuda_python_test_helpers.nvvm_bitcode",) @@ -62,6 +63,15 @@ def test_nvvm_ir_version(): assert ver >= (1, 0, 0, 0) +def test_nvvm_llvm_version(): + try: + ver = nvvm.llvm_version("compute_75") + except FunctionNotFoundError: + pytest.skip("nvvmLLVMVersion not available in this NVVM version") + assert isinstance(ver, int) + assert ver >= 0 + + def test_create_and_destroy(): with nvvm_program() as prog: assert isinstance(prog, int)