From 46827f0f79e5687a4a9d5820c9c3a98f4704f594 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Thu, 2 Jul 2026 02:12:47 -0400 Subject: [PATCH 01/22] Relicense CUDA Bindings and CUDA Python Signed-off-by: Keith Kraus --- .pre-commit-config.yaml | 7 + LICENSE-Apache2.txt => LICENSE | 0 LICENSE.md | 11 - README.md | 5 + cuda_bindings/DESCRIPTION.rst | 4 +- cuda_bindings/LICENSE | 226 ++++++++++++++---- cuda_bindings/MANIFEST.in | 4 +- cuda_bindings/build_hooks.py | 2 +- cuda_bindings/cuda/bindings/__init__.py | 4 +- .../cuda/bindings/_bindings/cyruntime.pxd.in | 2 +- .../cuda/bindings/_bindings/cyruntime.pyx.in | 2 +- .../bindings/_bindings/cyruntime_ptds.pxd.in | 2 +- .../bindings/_bindings/cyruntime_ptds.pyx.in | 2 +- .../bindings/_example_helpers/__init__.py | 2 +- .../cuda/bindings/_example_helpers/common.py | 2 +- .../bindings/_example_helpers/helper_cuda.py | 2 +- .../_example_helpers/helper_string.py | 2 +- .../cuda/bindings/_internal/_fast_enum.py | 2 +- .../cuda/bindings/_internal/cudla.pxd | 2 +- .../cuda/bindings/_internal/cudla_linux.pyx | 2 +- .../cuda/bindings/_internal/cudla_windows.pyx | 2 +- .../cuda/bindings/_internal/cufile.pxd | 2 +- .../cuda/bindings/_internal/cufile_linux.pyx | 2 +- .../cuda/bindings/_internal/driver.pxd | 2 +- .../cuda/bindings/_internal/driver_linux.pyx | 2 +- .../bindings/_internal/driver_windows.pyx | 2 +- .../cuda/bindings/_internal/nvfatbin.pxd | 2 +- .../bindings/_internal/nvfatbin_linux.pyx | 2 +- .../bindings/_internal/nvfatbin_windows.pyx | 2 +- .../cuda/bindings/_internal/nvjitlink.pxd | 2 +- .../bindings/_internal/nvjitlink_linux.pyx | 4 +- .../bindings/_internal/nvjitlink_windows.pyx | 4 +- .../cuda/bindings/_internal/nvml.pxd | 2 +- .../cuda/bindings/_internal/nvml_linux.pyx | 2 +- .../cuda/bindings/_internal/nvml_windows.pyx | 2 +- .../cuda/bindings/_internal/nvrtc.pxd | 2 +- .../cuda/bindings/_internal/nvrtc_linux.pyx | 2 +- .../cuda/bindings/_internal/nvrtc_windows.pyx | 2 +- .../cuda/bindings/_internal/nvvm.pxd | 2 +- .../cuda/bindings/_internal/nvvm_linux.pyx | 2 +- .../cuda/bindings/_internal/nvvm_windows.pyx | 2 +- .../cuda/bindings/_internal/utils.pxd | 4 +- .../cuda/bindings/_internal/utils.pyx | 2 +- .../bindings/_lib/cyruntime/cyruntime.pxd | 2 +- .../bindings/_lib/cyruntime/cyruntime.pxi | 2 +- cuda_bindings/cuda/bindings/_lib/dlfcn.pxd | 4 +- .../cuda/bindings/_lib/param_packer.h | 10 +- .../cuda/bindings/_lib/param_packer.pxd | 4 +- cuda_bindings/cuda/bindings/_lib/utils.pxd | 2 +- cuda_bindings/cuda/bindings/_lib/utils.pxi | 2 +- cuda_bindings/cuda/bindings/_lib/windll.pxd | 4 +- .../cuda/bindings/_test_helpers/__init__.py | 2 +- .../cuda/bindings/_test_helpers/arch_check.py | 2 +- .../cuda/bindings/_test_helpers/mempool.py | 2 +- .../cuda/bindings/_test_helpers/pep723.py | 2 +- cuda_bindings/cuda/bindings/cudla.pxd | 2 +- cuda_bindings/cuda/bindings/cudla.pyx | 2 +- cuda_bindings/cuda/bindings/cufile.pxd | 2 +- cuda_bindings/cuda/bindings/cufile.pyx | 2 +- cuda_bindings/cuda/bindings/cycudla.pxd | 2 +- cuda_bindings/cuda/bindings/cycudla.pyx | 2 +- cuda_bindings/cuda/bindings/cycufile.pxd | 2 +- cuda_bindings/cuda/bindings/cycufile.pyx | 2 +- cuda_bindings/cuda/bindings/cydriver.pxd | 2 +- cuda_bindings/cuda/bindings/cydriver.pyx | 2 +- cuda_bindings/cuda/bindings/cynvfatbin.pxd | 2 +- cuda_bindings/cuda/bindings/cynvfatbin.pyx | 2 +- cuda_bindings/cuda/bindings/cynvjitlink.pxd | 2 +- cuda_bindings/cuda/bindings/cynvjitlink.pyx | 2 +- cuda_bindings/cuda/bindings/cynvml.pxd | 2 +- cuda_bindings/cuda/bindings/cynvml.pyx | 2 +- cuda_bindings/cuda/bindings/cynvrtc.pxd | 2 +- cuda_bindings/cuda/bindings/cynvrtc.pyx | 2 +- cuda_bindings/cuda/bindings/cynvvm.pxd | 2 +- cuda_bindings/cuda/bindings/cynvvm.pyx | 2 +- cuda_bindings/cuda/bindings/cyruntime.pxd.in | 2 +- cuda_bindings/cuda/bindings/cyruntime.pyx.in | 2 +- .../cuda/bindings/cyruntime_functions.pxi.in | 2 +- .../cuda/bindings/cyruntime_types.pxi.in | 2 +- cuda_bindings/cuda/bindings/driver.pxd | 2 +- cuda_bindings/cuda/bindings/driver.pyx | 2 +- cuda_bindings/cuda/bindings/nvfatbin.pxd | 2 +- cuda_bindings/cuda/bindings/nvfatbin.pyx | 2 +- 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 | 2 +- cuda_bindings/cuda/bindings/nvrtc.pxd | 2 +- cuda_bindings/cuda/bindings/nvrtc.pyx | 2 +- cuda_bindings/cuda/bindings/nvvm.pxd | 2 +- cuda_bindings/cuda/bindings/nvvm.pyx | 2 +- cuda_bindings/cuda/bindings/runtime.pxd.in | 2 +- cuda_bindings/cuda/bindings/runtime.pyx.in | 2 +- cuda_bindings/cuda/bindings/utils/__init__.py | 2 +- .../cuda/bindings/utils/_nvvm_utils.py | 2 +- .../cuda/bindings/utils/_ptx_utils.py | 4 +- .../cuda/bindings/utils/_version_check.py | 4 +- cuda_bindings/docs/Makefile | 4 +- cuda_bindings/docs/build_docs.sh | 2 +- cuda_bindings/docs/make.bat | 4 +- cuda_bindings/docs/source/api.rst | 4 +- cuda_bindings/docs/source/conduct.rst | 2 +- cuda_bindings/docs/source/conf.py | 2 +- cuda_bindings/docs/source/contribute.rst | 13 +- .../docs/source/environment_variables.rst | 4 +- cuda_bindings/docs/source/examples.rst | 2 +- cuda_bindings/docs/source/index.rst | 4 +- cuda_bindings/docs/source/install.rst | 2 +- cuda_bindings/docs/source/license.rst | 8 +- cuda_bindings/docs/source/module/cudla.rst | 2 +- cuda_bindings/docs/source/module/cufile.rst | 4 +- cuda_bindings/docs/source/module/driver.rst | 2 +- cuda_bindings/docs/source/module/nvfatbin.rst | 2 +- .../docs/source/module/nvjitlink.rst | 4 +- cuda_bindings/docs/source/module/nvml.rst | 2 +- cuda_bindings/docs/source/module/nvrtc.rst | 2 +- cuda_bindings/docs/source/module/nvvm.rst | 4 +- cuda_bindings/docs/source/module/runtime.rst | 2 +- cuda_bindings/docs/source/module/utils.rst | 4 +- cuda_bindings/docs/source/motivation.rst | 2 +- cuda_bindings/docs/source/overview.rst | 2 +- cuda_bindings/docs/source/release.rst | 4 +- .../docs/source/release/11.4.0-notes.rst | 4 +- .../docs/source/release/11.5.0-notes.rst | 4 +- .../docs/source/release/11.6.0-notes.rst | 4 +- .../docs/source/release/11.6.1-notes.rst | 4 +- .../docs/source/release/11.7.0-notes.rst | 4 +- .../docs/source/release/11.7.1-notes.rst | 2 +- .../docs/source/release/11.8.0-notes.rst | 2 +- .../docs/source/release/11.8.1-notes.rst | 4 +- .../docs/source/release/11.8.2-notes.rst | 4 +- .../docs/source/release/11.8.3-notes.rst | 4 +- .../docs/source/release/11.8.4-notes.rst | 4 +- .../docs/source/release/11.8.5-notes.rst | 4 +- .../docs/source/release/11.8.6-notes.rst | 4 +- .../docs/source/release/11.8.7-notes.rst | 4 +- .../docs/source/release/12.0.0-notes.rst | 4 +- .../docs/source/release/12.1.0-notes.rst | 4 +- .../docs/source/release/12.2.0-notes.rst | 4 +- .../docs/source/release/12.2.1-notes.rst | 4 +- .../docs/source/release/12.3.0-notes.rst | 4 +- .../docs/source/release/12.4.0-notes.rst | 4 +- .../docs/source/release/12.5.0-notes.rst | 4 +- .../docs/source/release/12.6.0-notes.rst | 4 +- .../docs/source/release/12.6.1-notes.rst | 4 +- .../docs/source/release/12.6.2-notes.rst | 4 +- .../docs/source/release/12.8.0-notes.rst | 4 +- .../docs/source/release/12.9.0-notes.rst | 4 +- .../docs/source/release/12.9.1-notes.rst | 4 +- .../docs/source/release/12.9.2-notes.rst | 4 +- .../docs/source/release/12.9.3-notes.rst | 4 +- .../docs/source/release/12.9.4-notes.rst | 4 +- .../docs/source/release/12.9.5-notes.rst | 4 +- .../docs/source/release/12.9.6-notes.rst | 2 +- .../docs/source/release/12.9.7-notes.rst | 2 +- .../docs/source/release/13.0.0-notes.rst | 4 +- .../docs/source/release/13.0.1-notes.rst | 4 +- .../docs/source/release/13.0.2-notes.rst | 4 +- .../docs/source/release/13.0.3-notes.rst | 4 +- .../docs/source/release/13.1.0-notes.rst | 4 +- .../docs/source/release/13.1.1-notes.rst | 2 +- .../docs/source/release/13.2.0-notes.rst | 2 +- .../docs/source/release/13.3.0-notes.rst | 2 +- .../docs/source/release/13.3.1-notes.rst | 2 +- cuda_bindings/docs/source/support.rst | 2 +- cuda_bindings/docs/source/tips_and_tricks.rst | 4 +- .../examples/0_Introduction/clock_nvrtc.py | 2 +- .../0_Introduction/simple_cubemap_texture.py | 2 +- .../examples/0_Introduction/simple_p2p.py | 2 +- .../0_Introduction/simple_zero_copy.py | 2 +- .../0_Introduction/system_wide_atomics.py | 2 +- .../examples/0_Introduction/vector_add_drv.py | 2 +- .../0_Introduction/vector_add_mmap.py | 2 +- .../stream_ordered_allocation.py | 2 +- .../global_to_shmem_async_copy.py | 2 +- .../3_CUDA_Features/simple_cuda_graphs.py | 2 +- .../conjugate_gradient_multi_block_cg.py | 2 +- .../examples/4_CUDA_Libraries/nvidia_smi.py | 2 +- .../examples/extra/iso_fd_modelling.py | 2 +- cuda_bindings/examples/extra/jit_program.py | 2 +- cuda_bindings/pixi.toml | 2 +- cuda_bindings/pyproject.toml | 5 +- cuda_bindings/setup.py | 2 +- cuda_bindings/tests/conftest.py | 4 +- cuda_bindings/tests/cudla/conftest.py | 2 +- .../tests/cudla/test_cudla_bindings.py | 2 +- cuda_bindings/tests/cython/build_tests.bat | 4 +- cuda_bindings/tests/cython/build_tests.py | 2 +- cuda_bindings/tests/cython/build_tests.sh | 4 +- cuda_bindings/tests/cython/test_ccuda.pyx | 4 +- cuda_bindings/tests/cython/test_ccudart.pyx | 4 +- cuda_bindings/tests/cython/test_cython.py | 4 +- .../cython/test_interoperability_cython.pyx | 4 +- cuda_bindings/tests/nvml/__init__.py | 2 +- cuda_bindings/tests/nvml/conftest.py | 2 +- cuda_bindings/tests/nvml/test_compute_mode.py | 2 +- cuda_bindings/tests/nvml/test_cuda.py | 2 +- cuda_bindings/tests/nvml/test_device.py | 2 +- cuda_bindings/tests/nvml/test_gpu.py | 2 +- cuda_bindings/tests/nvml/test_init.py | 2 +- cuda_bindings/tests/nvml/test_nvlink.py | 2 +- .../tests/nvml/test_page_retirement.py | 2 +- cuda_bindings/tests/nvml/test_pci.py | 2 +- cuda_bindings/tests/nvml/test_pynvml.py | 2 +- cuda_bindings/tests/nvml/test_unit.py | 2 +- cuda_bindings/tests/nvml/util.py | 2 +- cuda_bindings/tests/test_basics.py | 2 +- cuda_bindings/tests/test_cuda.py | 2 +- cuda_bindings/tests/test_cudart.py | 2 +- cuda_bindings/tests/test_cufile.py | 2 +- cuda_bindings/tests/test_examples.py | 2 +- cuda_bindings/tests/test_graphics_apis.py | 4 +- cuda_bindings/tests/test_interoperability.py | 4 +- cuda_bindings/tests/test_kernelParams.py | 4 +- cuda_bindings/tests/test_nvfatbin.py | 2 +- cuda_bindings/tests/test_nvjitlink.py | 4 +- cuda_bindings/tests/test_nvrtc.py | 4 +- cuda_bindings/tests/test_nvvm.py | 4 +- cuda_bindings/tests/test_utils.py | 2 +- cuda_bindings/tests/test_version_check.py | 4 +- .../tests/utils/check_cyclical_import.py | 4 +- cuda_pathfinder/LICENSE | 2 +- cuda_python/DESCRIPTION.rst | 4 +- cuda_python/LICENSE | 226 ++++++++++++++---- cuda_python/docs/Makefile | 4 +- cuda_python/docs/build_all_docs.sh | 4 +- cuda_python/docs/build_docs.sh | 2 +- cuda_python/docs/environment-docs.yml | 4 +- cuda_python/docs/exts/enum_documenter.py | 2 +- cuda_python/docs/exts/release_date.py | 2 +- cuda_python/docs/exts/release_toc.py | 4 +- cuda_python/docs/source/conf.py | 2 +- cuda_python/docs/source/index.rst | 4 +- cuda_python/docs/source/release.rst | 4 +- .../docs/source/release/11.8.6-notes.rst | 4 +- .../docs/source/release/11.8.7-notes.rst | 4 +- .../docs/source/release/12.6.1-notes.rst | 4 +- .../docs/source/release/12.6.2-notes.rst | 4 +- .../docs/source/release/12.8.0-notes.rst | 4 +- .../docs/source/release/12.9.0-notes.rst | 4 +- .../docs/source/release/12.9.1-notes.rst | 4 +- .../docs/source/release/12.9.2-notes.rst | 4 +- .../docs/source/release/12.9.3-notes.rst | 4 +- .../docs/source/release/12.9.4-notes.rst | 4 +- .../docs/source/release/12.9.5-notes.rst | 2 +- .../docs/source/release/12.9.6-notes.rst | 2 +- .../docs/source/release/12.9.7-notes.rst | 2 +- .../docs/source/release/13.0.0-notes.rst | 4 +- .../docs/source/release/13.0.1-notes.rst | 4 +- .../docs/source/release/13.0.2-notes.rst | 4 +- .../docs/source/release/13.0.3-notes.rst | 4 +- .../docs/source/release/13.1.0-notes.rst | 4 +- .../docs/source/release/13.1.1-notes.rst | 4 +- .../docs/source/release/13.2.0-notes.rst | 2 +- .../docs/source/release/13.3.0-notes.rst | 2 +- .../docs/source/release/13.3.1-notes.rst | 2 +- cuda_python/pyproject.toml | 5 +- cuda_python/setup.py | 4 +- toolshed/check_spdx.py | 10 +- toolshed/sync_licenses.py | 46 ++++ 260 files changed, 781 insertions(+), 475 deletions(-) rename LICENSE-Apache2.txt => LICENSE (100%) delete mode 100644 LICENSE.md create mode 100644 toolshed/sync_licenses.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f8d2a2731ed..1cd20a031e0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,6 +35,13 @@ repos: exclude: '(.*pixi\.lock)|(\.git_archival\.txt)|(.*\.patch$)|(^cuda_core/cuda/core/_vendored/)' args: ["--fix"] + - id: check-license-copies + name: Check Package License Copies + entry: python ./toolshed/sync_licenses.py + language: system + pass_filenames: false + always_run: true + - id: no-markdown-in-docs-source name: Prevent markdown files in docs/source directories entry: bash -c diff --git a/LICENSE-Apache2.txt b/LICENSE similarity index 100% rename from LICENSE-Apache2.txt rename to LICENSE diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 5c71bf12164..00000000000 --- a/LICENSE.md +++ /dev/null @@ -1,11 +0,0 @@ -This repository contains components under different licenses. The -component-specific license files listed below govern each component. A -repository-level copy of the Apache 2.0 license is available in -[`LICENSE-Apache2.txt`](./LICENSE-Apache2.txt) for Apache-licensed content. - - - [`cuda.python`](./cuda_python/LICENSE): NVIDIA Software License - - [`cuda.bindings`](./cuda_bindings/LICENSE): NVIDIA Software License - - [`cuda.core`](./cuda_core/LICENSE): Apache 2.0; third-party attributions - are in [`cuda_core/NOTICE`](./cuda_core/NOTICE) - - [`cuda.pathfinder`](./cuda_pathfinder/LICENSE): Apache 2.0 - - Repo metadata, CI tools, GitHub workflows: Apache 2.0 diff --git a/README.md b/README.md index 393fce97637..243669b69ee 100644 --- a/README.md +++ b/README.md @@ -48,3 +48,8 @@ The list of available interfaces is: * nvFatbin * cuFile * NVML + +## License + +CUDA Python is licensed under the [Apache License 2.0](./LICENSE). Third-party +attributions for `cuda.core` are listed in [`cuda_core/NOTICE`](./cuda_core/NOTICE). diff --git a/cuda_bindings/DESCRIPTION.rst b/cuda_bindings/DESCRIPTION.rst index f61b10f2e72..3129c9ca471 100644 --- a/cuda_bindings/DESCRIPTION.rst +++ b/cuda_bindings/DESCRIPTION.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 **************************************** cuda-bindings: Low-level CUDA interfaces diff --git a/cuda_bindings/LICENSE b/cuda_bindings/LICENSE index a5a65097cdc..d6f74778be8 100644 --- a/cuda_bindings/LICENSE +++ b/cuda_bindings/LICENSE @@ -1,48 +1,178 @@ -NVIDIA SOFTWARE LICENSE - -This license is a legal agreement between you and NVIDIA Corporation ("NVIDIA") and governs your use of the NVIDIA CUDA Python software and materials provided hereunder ("SOFTWARE"). - -This license can be accepted only by an adult of legal age of majority in the country in which the SOFTWARE is used. If you are under the legal age of majority, you must ask your parent or legal guardian to consent to this license. By taking delivery of the SOFTWARE, you affirm that you have reached the legal age of majority, you accept the terms of this license, and you take legal and financial responsibility for the actions of your permitted users. - -You agree to use the SOFTWARE only for purposes that are permitted by (a) this license, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions. - -1. LICENSE. Subject to the terms of this license, NVIDIA grants you a non-exclusive limited license to: (a) install and use the SOFTWARE, and (b) distribute the SOFTWARE subject to the distribution requirements described in this license. NVIDIA reserves all rights, title and interest in and to the SOFTWARE not expressly granted to you under this license. - -2. DISTRIBUTION REQUIREMENTS. These are the distribution requirements for you to exercise the distribution grant: -a. The terms under which you distribute the SOFTWARE must be consistent with the terms of this license, including (without limitation) terms relating to the license grant and license restrictions and protection of NVIDIA's intellectual property rights. -b. You agree to notify NVIDIA in writing of any known or suspected distribution or use of the SOFTWARE not in compliance with the requirements of this license, and to enforce the terms of your agreements with respect to distributed SOFTWARE. - -3. LIMITATIONS. Your license to use the SOFTWARE is restricted as follows: -a. The SOFTWARE is licensed for you to develop applications only for use in systems with NVIDIA GPUs. -b. You may not reverse engineer, decompile or disassemble, or remove copyright or other proprietary notices from any portion of the SOFTWARE or copies of the SOFTWARE. -c. You may not modify or create derivative works of any portion of the SOFTWARE. -d. You may not bypass, disable, or circumvent any technical measure, encryption, security, digital rights management or authentication mechanism in the SOFTWARE. -e. You may not use the SOFTWARE in any manner that would cause it to become subject to an open source software license. As examples, licenses that require as a condition of use, modification, and/or distribution that the SOFTWARE be (i) disclosed or distributed in source code form; (ii) licensed for the purpose of making derivative works; or (iii) redistributable at no charge. -f. Unless you have an agreement with NVIDIA for this purpose, you may not use the SOFTWARE with any system or application where the use or failure of the system or application can reasonably be expected to threaten or result in personal injury, death, or catastrophic loss. Examples include use in avionics, navigation, military, medical, life support or other life critical applications. NVIDIA does not design, test or manufacture the SOFTWARE for these critical uses and NVIDIA shall not be liable to you or any third party, in whole or in part, for any claims or damages arising from such uses. -g. You agree to defend, indemnify and hold harmless NVIDIA and its affiliates, and their respective employees, contractors, agents, officers and directors, from and against any and all claims, damages, obligations, losses, liabilities, costs or debt, fines, restitutions and expenses (including but not limited to attorney's fees and costs incident to establishing the right of indemnification) arising out of or related to use of the SOFTWARE outside of the scope of this Agreement, or not in compliance with its terms. - -4. PRE-RELEASE. SOFTWARE versions identified as alpha, beta, preview, early access or otherwise as pre-release may not be fully functional, may contain errors or design flaws, and may have reduced or different security, privacy, availability, and reliability standards relative to commercial versions of NVIDIA software and materials. You may use a pre-release SOFTWARE version at your own risk, understanding that these versions are not intended for use in production or business-critical systems. - -5. OWNERSHIP. The SOFTWARE and the related intellectual property rights therein are and will remain the sole and exclusive property of NVIDIA or its licensors. The SOFTWARE is copyrighted and protected by the laws of the United States and other countries, and international treaty provisions. NVIDIA may make changes to the SOFTWARE, at any time without notice, but is not obligated to support or update the SOFTWARE. - -6. COMPONENTS UNDER OTHER LICENSES. The SOFTWARE may include NVIDIA or third-party components with separate legal notices or terms as may be described in proprietary notices accompanying the SOFTWARE. If and to the extent there is a conflict between the terms in this license and the license terms associated with a component, the license terms associated with the components control only to the extent necessary to resolve the conflict. - -7. FEEDBACK. You may, but don't have to, provide to NVIDIA any Feedback. "Feedback" means any suggestions, bug fixes, enhancements, modifications, feature requests or other feedback regarding the SOFTWARE. For any Feedback that you voluntarily provide, you hereby grant NVIDIA and its affiliates a perpetual, non-exclusive, worldwide, irrevocable license to use, reproduce, modify, license, sublicense (through multiple tiers of sublicensees), and distribute (through multiple tiers of distributors) the Feedback without the payment of any royalties or fees to you. NVIDIA will use Feedback at its choice. - -8. NO WARRANTIES. THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. NVIDIA DOES NOT WARRANT THAT THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION THEREOF WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ALL ERRORS WILL BE CORRECTED. - -9. LIMITATIONS OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY LAW, NVIDIA AND ITS AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR ANY LOST PROFITS, PROJECT DELAYS, LOSS OF USE, LOSS OF DATA OR LOSS OF GOODWILL, OR THE COSTS OF PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION WITH THIS LICENSE OR THE USE OR PERFORMANCE OF THE SOFTWARE, WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASED UPON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF LIABILITY, EVEN IF NVIDIA HAS PREVIOUSLY BEEN ADVISED OF, OR COULD REASONABLY HAVE FORESEEN, THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL NVIDIA'S AND ITS AFFILIATES TOTAL CUMULATIVE LIABILITY UNDER OR ARISING OUT OF THIS LICENSE EXCEED US$10.00. THE NATURE OF THE LIABILITY OR THE NUMBER OF CLAIMS OR SUITS SHALL NOT ENLARGE OR EXTEND THIS LIMIT. - -10. TERMINATION. Your rights under this license will terminate automatically without notice from NVIDIA if you fail to comply with any term and condition of this license or if you commence or participate in any legal proceeding against NVIDIA with respect to the SOFTWARE. NVIDIA may terminate this license with advance written notice to you if NVIDIA decides to no longer provide the SOFTWARE in a country or, in NVIDIA's sole discretion, the continued use of it is no longer commercially viable. Upon any termination of this license, you agree to promptly discontinue use of the SOFTWARE and destroy all copies in your possession or control. Your prior distributions in accordance with this license are not affected by the termination of this license. All provisions of this license will survive termination, except for the license granted to you. - -11. APPLICABLE LAW. This license will be governed in all respects by the laws of the United States and of the State of Delaware as those laws are applied to contracts entered into and performed entirely within Delaware by Delaware residents, without regard to the conflicts of laws principles. The United Nations Convention on Contracts for the International Sale of Goods is specifically disclaimed. You agree to all terms of this Agreement in the English language. The state or federal courts residing in Santa Clara County, California shall have exclusive jurisdiction over any dispute or claim arising out of this license. Notwithstanding this, you agree that NVIDIA shall still be allowed to apply for injunctive remedies or an equivalent type of urgent legal relief in any jurisdiction. - -12. NO ASSIGNMENT. This license and your rights and obligations thereunder may not be assigned by you by any means or operation of law without NVIDIA's permission. Any attempted assignment not approved by NVIDIA in writing shall be void and of no effect. - -13. EXPORT. The SOFTWARE is subject to United States export laws and regulations. You agree that you will not ship, transfer or export the SOFTWARE into any country, or use the SOFTWARE in any manner, prohibited by the United States Bureau of Industry and Security or economic sanctions regulations administered by the U.S. Department of Treasury's Office of Foreign Assets Control (OFAC), or any applicable export laws, restrictions or regulations. These laws include restrictions on destinations, end users and end use. By accepting this license, you confirm that you are not a resident or citizen of any country currently embargoed by the U.S. and that you are not otherwise prohibited from receiving the SOFTWARE. - -14. GOVERNMENT USE. The SOFTWARE has been developed entirely at private expense and is "commercial items" consisting of "commercial computer software" and "commercial computer software documentation" provided with RESTRICTED RIGHTS. Use, duplication or disclosure by the U.S. Government or a U.S. Government subcontractor is subject to the restrictions in this license pursuant to DFARS 227.7202-3(a) or as set forth in subparagraphs (b)(1) and (2) of the Commercial Computer Software - Restricted Rights clause at FAR 52.227-19, as applicable. Contractor/manufacturer is NVIDIA, 2788 San Tomas Expressway, Santa Clara, CA 95051. - -15. ENTIRE AGREEMENT. This license is the final, complete and exclusive agreement between the parties relating to the subject matter of this license and supersedes all prior or contemporaneous understandings and agreements relating to this subject matter, whether oral or written. If any court of competent jurisdiction determines that any provision of this license is illegal, invalid or unenforceable, the remaining provisions will remain in full force and effect. This license may only be modified in a writing signed by an authorized representative of each party. - -(v. May 12, 2021) +Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/cuda_bindings/MANIFEST.in b/cuda_bindings/MANIFEST.in index 39073c42fdf..4394e5d9fe3 100644 --- a/cuda_bindings/MANIFEST.in +++ b/cuda_bindings/MANIFEST.in @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 recursive-include cuda/ *.pyx *.pxd *.pxi *.pyx.in *.pxd.in *.pxi.in *.h # at least with setuptools 75.0.0 this folder was added erroneously diff --git a/cuda_bindings/build_hooks.py b/cuda_bindings/build_hooks.py index a04fa3a3c89..a23d0949258 100644 --- a/cuda_bindings/build_hooks.py +++ b/cuda_bindings/build_hooks.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This module implements basic PEP 517 backend support to defer CUDA-dependent # logic (header parsing, code generation, cythonization) to build time. See: diff --git a/cuda_bindings/cuda/bindings/__init__.py b/cuda_bindings/cuda/bindings/__init__.py index 38d71fcfde4..ea1daae3e0b 100644 --- a/cuda_bindings/cuda/bindings/__init__.py +++ b/cuda_bindings/cuda/bindings/__init__.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 from cuda.bindings import utils from cuda.bindings._version import __version__ diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in index 981ed513768..f3e7ad72c3f 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. include "../cyruntime_types.pxi" diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in index 5e43fc655e5..565e158cf45 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. include "../cyruntime_functions.pxi" diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in index 259248f22ac..f44b806d829 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "": diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in index 6321378cf1d..ceb7e0ac3c4 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "": diff --git a/cuda_bindings/cuda/bindings/_example_helpers/__init__.py b/cuda_bindings/cuda/bindings/_example_helpers/__init__.py index fa061cc3461..119d7e97689 100644 --- a/cuda_bindings/cuda/bindings/_example_helpers/__init__.py +++ b/cuda_bindings/cuda/bindings/_example_helpers/__init__.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from .common import KernelHelper, check_compute_capability_too_low, requirement_not_met from .helper_cuda import check_cuda_errors, find_cuda_device, find_cuda_device_drv diff --git a/cuda_bindings/cuda/bindings/_example_helpers/common.py b/cuda_bindings/cuda/bindings/_example_helpers/common.py index 15317ace29c..8970944a31a 100644 --- a/cuda_bindings/cuda/bindings/_example_helpers/common.py +++ b/cuda_bindings/cuda/bindings/_example_helpers/common.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import os diff --git a/cuda_bindings/cuda/bindings/_example_helpers/helper_cuda.py b/cuda_bindings/cuda/bindings/_example_helpers/helper_cuda.py index 0e56fa8fd10..18fbecf59b9 100644 --- a/cuda_bindings/cuda/bindings/_example_helpers/helper_cuda.py +++ b/cuda_bindings/cuda/bindings/_example_helpers/helper_cuda.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from cuda.bindings import driver as cuda from cuda.bindings import nvrtc diff --git a/cuda_bindings/cuda/bindings/_example_helpers/helper_string.py b/cuda_bindings/cuda/bindings/_example_helpers/helper_string.py index 1540db447a9..ad15cecc9ca 100644 --- a/cuda_bindings/cuda/bindings/_example_helpers/helper_string.py +++ b/cuda_bindings/cuda/bindings/_example_helpers/helper_string.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import sys diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py index cd0a8e5610e..c69c822588c 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/cudla.pxd b/cuda_bindings/cuda/bindings/_internal/cudla.pxd index 384692eb696..00bf3adc074 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cudla.pxd @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx index e8903e0ce29..229681244ad 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/cudla_windows.pyx b/cuda_bindings/cuda/bindings/_internal/cudla_windows.pyx index 0aeaba2ddea..7dad671bb67 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cudla_windows.pyx @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/cufile.pxd b/cuda_bindings/cuda/bindings/_internal/cufile.pxd index e642486af16..7d0ace32466 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cufile.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx index a49ba1890f4..7d92fc8ec46 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/driver.pxd b/cuda_bindings/cuda/bindings/_internal/driver.pxd index 1a537e4792a..f94dc3efb13 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver.pxd +++ b/cuda_bindings/cuda/bindings/_internal/driver.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx index 0f92ba8bb33..a44cb651767 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1738+g1060a290f. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx index 68f8862b36f..6dd21f0d6df 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd index 2358e1220c9..958e06e18af 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx index 448e51240ef..99a50ff9e82 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx index 4a6b6148fd8..0a20389e291 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd index ba7a589b8d6..a6488994777 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx index 34ad6b5f0c5..0a399b244c7 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx index 8dcfd8b3e4d..ba6f1c8d2df 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvml.pxd b/cuda_bindings/cuda/bindings/_internal/nvml.pxd index 1664d4cc01e..84a90694c0c 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvml.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx index 825931d7565..c61a2d7e22f 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx index 301f14e7471..7697b60af9d 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd index d14598af043..95a8f5c560e 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx index 18b839038bd..c5b283f1ebb 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx index 558adc8dfe0..13cfbed4725 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd index 4d9ff45e701..f265943dda4 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx index 2a1d1558626..f82a058cfb7 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx index 61701575450..27d31f96257 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/_internal/utils.pxd b/cuda_bindings/cuda/bindings/_internal/utils.pxd index 50484727b7a..f4a76de327e 100644 --- a/cuda_bindings/cuda/bindings/_internal/utils.pxd +++ b/cuda_bindings/cuda/bindings/_internal/utils.pxd @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from libc.stdint cimport int32_t, int64_t, intptr_t from libcpp.vector cimport vector diff --git a/cuda_bindings/cuda/bindings/_internal/utils.pyx b/cuda_bindings/cuda/bindings/_internal/utils.pyx index 879a10e6217..a5931f1f080 100644 --- a/cuda_bindings/cuda/bindings/_internal/utils.pyx +++ b/cuda_bindings/cuda/bindings/_internal/utils.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 cimport cpython from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd index e84c2e8b255..482f91ca595 100644 --- a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd +++ b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 cimport cuda.bindings.cyruntime as cyruntime cimport cuda.bindings._internal.driver as _cydriver diff --git a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxi b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxi index ad186557ce8..5a7e5e42bd4 100644 --- a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxi +++ b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxi @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # These graphics API are the reimplemented version of what's supported by CUDA Runtime. # Issue https://github.com/NVIDIA/cuda-python/issues/488 will remove them by letting us diff --git a/cuda_bindings/cuda/bindings/_lib/dlfcn.pxd b/cuda_bindings/cuda/bindings/_lib/dlfcn.pxd index 2ae95814396..23fbe256484 100644 --- a/cuda_bindings/cuda/bindings/_lib/dlfcn.pxd +++ b/cuda_bindings/cuda/bindings/_lib/dlfcn.pxd @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 cdef extern from "" nogil: void *dlopen(const char *, int) diff --git a/cuda_bindings/cuda/bindings/_lib/param_packer.h b/cuda_bindings/cuda/bindings/_lib/param_packer.h index 96c56b4fe4e..160ef5f7c92 100644 --- a/cuda_bindings/cuda/bindings/_lib/param_packer.h +++ b/cuda_bindings/cuda/bindings/_lib/param_packer.h @@ -1,11 +1,5 @@ -// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE - -// Please refer to the NVIDIA end user license agreement (EULA) associated -// with this source code for terms and conditions that govern your use of -// this software. Any use, reproduction, disclosure, or distribution of -// this software and related documentation outside the terms of the EULA -// is strictly prohibited. +// SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 #include diff --git a/cuda_bindings/cuda/bindings/_lib/param_packer.pxd b/cuda_bindings/cuda/bindings/_lib/param_packer.pxd index ad7fd95668f..1c0ad690be4 100644 --- a/cuda_bindings/cuda/bindings/_lib/param_packer.pxd +++ b/cuda_bindings/cuda/bindings/_lib/param_packer.pxd @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 # Include "param_packer.h" so its contents get compiled into every # Cython extension module that depends on param_packer.pxd. diff --git a/cuda_bindings/cuda/bindings/_lib/utils.pxd b/cuda_bindings/cuda/bindings/_lib/utils.pxd index 6a67ead9997..24b0ae8de93 100644 --- a/cuda_bindings/cuda/bindings/_lib/utils.pxd +++ b/cuda_bindings/cuda/bindings/_lib/utils.pxd @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 cimport cuda.bindings.driver as driver cimport cuda.bindings.cydriver as cydriver diff --git a/cuda_bindings/cuda/bindings/_lib/utils.pxi b/cuda_bindings/cuda/bindings/_lib/utils.pxi index 5c3cd40cbe1..2dd4d5c1a27 100644 --- a/cuda_bindings/cuda/bindings/_lib/utils.pxi +++ b/cuda_bindings/cuda/bindings/_lib/utils.pxi @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS from libc.stdlib cimport calloc, free diff --git a/cuda_bindings/cuda/bindings/_lib/windll.pxd b/cuda_bindings/cuda/bindings/_lib/windll.pxd index 7b190f35959..294a1a9fd90 100644 --- a/cuda_bindings/cuda/bindings/_lib/windll.pxd +++ b/cuda_bindings/cuda/bindings/_lib/windll.pxd @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 from libc.stddef cimport wchar_t from libc.stdint cimport uintptr_t diff --git a/cuda_bindings/cuda/bindings/_test_helpers/__init__.py b/cuda_bindings/cuda/bindings/_test_helpers/__init__.py index c6b171f9cd3..2cfab242d2a 100644 --- a/cuda_bindings/cuda/bindings/_test_helpers/__init__.py +++ b/cuda_bindings/cuda/bindings/_test_helpers/__init__.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This package contains test helper utilities that may also be useful for other libraries outside of `cuda.bindings`, diff --git a/cuda_bindings/cuda/bindings/_test_helpers/arch_check.py b/cuda_bindings/cuda/bindings/_test_helpers/arch_check.py index 65f5140b394..3ab48be6e02 100644 --- a/cuda_bindings/cuda/bindings/_test_helpers/arch_check.py +++ b/cuda_bindings/cuda/bindings/_test_helpers/arch_check.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from contextlib import contextmanager diff --git a/cuda_bindings/cuda/bindings/_test_helpers/mempool.py b/cuda_bindings/cuda/bindings/_test_helpers/mempool.py index 3113113d251..e2a61e48c53 100644 --- a/cuda_bindings/cuda/bindings/_test_helpers/mempool.py +++ b/cuda_bindings/cuda/bindings/_test_helpers/mempool.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import sys diff --git a/cuda_bindings/cuda/bindings/_test_helpers/pep723.py b/cuda_bindings/cuda/bindings/_test_helpers/pep723.py index e1f6f920b7c..5ae21e622d3 100644 --- a/cuda_bindings/cuda/bindings/_test_helpers/pep723.py +++ b/cuda_bindings/cuda/bindings/_test_helpers/pep723.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import importlib.metadata diff --git a/cuda_bindings/cuda/bindings/cudla.pxd b/cuda_bindings/cuda/bindings/cudla.pxd index 37861dd0cdc..6126d868893 100644 --- a/cuda_bindings/cuda/bindings/cudla.pxd +++ b/cuda_bindings/cuda/bindings/cudla.pxd @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index 1348bd236a2..c301a9e38e4 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cufile.pxd b/cuda_bindings/cuda/bindings/cufile.pxd index 7a4a83cd796..1803837a4ce 100644 --- a/cuda_bindings/cuda/bindings/cufile.pxd +++ b/cuda_bindings/cuda/bindings/cufile.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1568+g289771de9.d20260413. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cufile.pyx b/cuda_bindings/cuda/bindings/cufile.pyx index 1d2aa5c5a7b..7ed935e5791 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cycudla.pxd b/cuda_bindings/cuda/bindings/cycudla.pxd index e21b2061b2a..8a90dd964a7 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pxd +++ b/cuda_bindings/cuda/bindings/cycudla.pxd @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. # This layer exposes the C header to Cython as-is. diff --git a/cuda_bindings/cuda/bindings/cycudla.pyx b/cuda_bindings/cuda/bindings/cycudla.pyx index 78b2dee35c7..198ffb308a7 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pyx +++ b/cuda_bindings/cuda/bindings/cycudla.pyx @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cycufile.pxd b/cuda_bindings/cuda/bindings/cycufile.pxd index 50a7d76e2de..96c93f1a54e 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pxd +++ b/cuda_bindings/cuda/bindings/cycufile.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cycufile.pyx b/cuda_bindings/cuda/bindings/cycufile.pyx index 4b6e267ada5..32b0614be24 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pyx +++ b/cuda_bindings/cuda/bindings/cycufile.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd b/cuda_bindings/cuda/bindings/cydriver.pxd index 1d26517b0b2..722c1189c17 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd +++ b/cuda_bindings/cuda/bindings/cydriver.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1738+g1060a290f. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx b/cuda_bindings/cuda/bindings/cydriver.pyx index 93372ecd3fc..8f212d96337 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx +++ b/cuda_bindings/cuda/bindings/cydriver.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pxd b/cuda_bindings/cuda/bindings/cynvfatbin.pxd index 5aab8de073e..f810e5e0077 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pyx b/cuda_bindings/cuda/bindings/cynvfatbin.pyx index d1fca6e8025..bac18e05a70 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pxd b/cuda_bindings/cuda/bindings/cynvjitlink.pxd index e36d7c32dda..8f8a249acb3 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pyx b/cuda_bindings/cuda/bindings/cynvjitlink.pyx index 0d051b2fd1e..a44fedf196e 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cynvml.pxd b/cuda_bindings/cuda/bindings/cynvml.pxd index 2bd67517e41..21c2ca0c180 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pxd +++ b/cuda_bindings/cuda/bindings/cynvml.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cynvml.pyx b/cuda_bindings/cuda/bindings/cynvml.pyx index 2ba3a2a21e1..09ee2601a5b 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pyx +++ b/cuda_bindings/cuda/bindings/cynvml.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pxd b/cuda_bindings/cuda/bindings/cynvrtc.pxd index a366803548d..f3066f12130 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pxd +++ b/cuda_bindings/cuda/bindings/cynvrtc.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pyx b/cuda_bindings/cuda/bindings/cynvrtc.pyx index 226a8b4fb7e..936e4eff18a 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pyx +++ b/cuda_bindings/cuda/bindings/cynvrtc.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cynvvm.pxd b/cuda_bindings/cuda/bindings/cynvvm.pxd index d9d5baf229f..e1f89be12cf 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pxd +++ b/cuda_bindings/cuda/bindings/cynvvm.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cynvvm.pyx b/cuda_bindings/cuda/bindings/cynvvm.pyx index ef20c3f122e..4e4b4fe5a74 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pyx +++ b/cuda_bindings/cuda/bindings/cynvvm.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/cyruntime.pxd.in index 4587a77371f..b714d32bb00 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pxd.in @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/cyruntime.pyx.in index 3adb478064b..9b8324f1139 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx.in @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cimport cuda.bindings._bindings.cyruntime as cyruntime diff --git a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in index fe4bbf86a1e..81e54abed07 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "cuda_runtime_api.h": diff --git a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in index 34ea2c20e99..d6ae085f5d4 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/driver.pxd b/cuda_bindings/cuda/bindings/driver.pxd index 56fdc2bad7b..e22a9007115 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd +++ b/cuda_bindings/cuda/bindings/driver.pxd @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. cimport cuda.bindings.cydriver as cydriver diff --git a/cuda_bindings/cuda/bindings/driver.pyx b/cuda_bindings/cuda/bindings/driver.pyx index 40dd67bcd96..e427814ac55 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx +++ b/cuda_bindings/cuda/bindings/driver.pyx @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. from typing import Any, Optional diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pxd b/cuda_bindings/cuda/bindings/nvfatbin.pxd index 2a080b09869..dbfb587b7f2 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/nvfatbin.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index eccab75bf94..3638a506676 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pxd b/cuda_bindings/cuda/bindings/nvjitlink.pxd index 12cd86151d9..8c568cbc1b6 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/nvjitlink.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pyx b/cuda_bindings/cuda/bindings/nvjitlink.pyx index 8ac6372dd88..8e73e021ba8 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/nvml.pxd b/cuda_bindings/cuda/bindings/nvml.pxd index 45f1d1ac084..9c0dd62d8d5 100644 --- a/cuda_bindings/cuda/bindings/nvml.pxd +++ b/cuda_bindings/cuda/bindings/nvml.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index 61debcdd4c8..c631d7a4c75 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1779+ga8cc71818.d20260626. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/nvrtc.pxd b/cuda_bindings/cuda/bindings/nvrtc.pxd index d6e66a0de54..c2e410d1aa2 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/nvrtc.pxd @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. cimport cuda.bindings.cynvrtc as cynvrtc diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx b/cuda_bindings/cuda/bindings/nvrtc.pyx index 91f46e6bc47..94808e0deda 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. from typing import Any, Optional diff --git a/cuda_bindings/cuda/bindings/nvvm.pxd b/cuda_bindings/cuda/bindings/nvvm.pxd index 4cf37a3464a..ee2a3b8da3b 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/nvvm.pxd @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index 3cf42545619..411db62dc00 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. diff --git a/cuda_bindings/cuda/bindings/runtime.pxd.in b/cuda_bindings/cuda/bindings/runtime.pxd.in index 2b74c88ceaf..5d9a9fe9fea 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd.in +++ b/cuda_bindings/cuda/bindings/runtime.pxd.in @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cimport cuda.bindings.cyruntime as cyruntime diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index 2b3bb33d60c..fb6d32ae2ca 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. from typing import Any, Optional diff --git a/cuda_bindings/cuda/bindings/utils/__init__.py b/cuda_bindings/cuda/bindings/utils/__init__.py index 3fe75ca13f0..0bfff4b78be 100644 --- a/cuda_bindings/cuda/bindings/utils/__init__.py +++ b/cuda_bindings/cuda/bindings/utils/__init__.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from typing import Any, Callable from ._nvvm_utils import check_nvvm_compiler_options diff --git a/cuda_bindings/cuda/bindings/utils/_nvvm_utils.py b/cuda_bindings/cuda/bindings/utils/_nvvm_utils.py index de7b111e7bf..9ac37c3a236 100644 --- a/cuda_bindings/cuda/bindings/utils/_nvvm_utils.py +++ b/cuda_bindings/cuda/bindings/utils/_nvvm_utils.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from typing import Sequence diff --git a/cuda_bindings/cuda/bindings/utils/_ptx_utils.py b/cuda_bindings/cuda/bindings/utils/_ptx_utils.py index 5ba21c398c2..1395fdfd469 100644 --- a/cuda_bindings/cuda/bindings/utils/_ptx_utils.py +++ b/cuda_bindings/cuda/bindings/utils/_ptx_utils.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 import re diff --git a/cuda_bindings/cuda/bindings/utils/_version_check.py b/cuda_bindings/cuda/bindings/utils/_version_check.py index 1ebd7f3d924..5c68b50152e 100644 --- a/cuda_bindings/cuda/bindings/utils/_version_check.py +++ b/cuda_bindings/cuda/bindings/utils/_version_check.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 import os import threading diff --git a/cuda_bindings/docs/Makefile b/cuda_bindings/docs/Makefile index 4ceed350782..5d861d28088 100644 --- a/cuda_bindings/docs/Makefile +++ b/cuda_bindings/docs/Makefile @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 # Minimal makefile for Sphinx documentation # diff --git a/cuda_bindings/docs/build_docs.sh b/cuda_bindings/docs/build_docs.sh index 2ab1f086018..199ababce60 100755 --- a/cuda_bindings/docs/build_docs.sh +++ b/cuda_bindings/docs/build_docs.sh @@ -1,7 +1,7 @@ #!/bin/bash # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 set -ex diff --git a/cuda_bindings/docs/make.bat b/cuda_bindings/docs/make.bat index b3c642f84f2..85f34efee44 100644 --- a/cuda_bindings/docs/make.bat +++ b/cuda_bindings/docs/make.bat @@ -1,7 +1,7 @@ @ECHO OFF -REM SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -REM SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +REM SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +REM SPDX-License-Identifier: Apache-2.0 pushd %~dp0 diff --git a/cuda_bindings/docs/source/api.rst b/cuda_bindings/docs/source/api.rst index 07eef44252f..c3de98f24d9 100644 --- a/cuda_bindings/docs/source/api.rst +++ b/cuda_bindings/docs/source/api.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 ------------------------- CUDA Python API Reference diff --git a/cuda_bindings/docs/source/conduct.rst b/cuda_bindings/docs/source/conduct.rst index 26d3f1e59f9..8983e183956 100644 --- a/cuda_bindings/docs/source/conduct.rst +++ b/cuda_bindings/docs/source/conduct.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 Code of Conduct =============== diff --git a/cuda_bindings/docs/source/conf.py b/cuda_bindings/docs/source/conf.py index 64f28ace24d..b37dc2be03f 100644 --- a/cuda_bindings/docs/source/conf.py +++ b/cuda_bindings/docs/source/conf.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2012-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # Configuration file for the Sphinx documentation builder. # diff --git a/cuda_bindings/docs/source/contribute.rst b/cuda_bindings/docs/source/contribute.rst index a41ce007fe9..f2a4fc9c53d 100644 --- a/cuda_bindings/docs/source/contribute.rst +++ b/cuda_bindings/docs/source/contribute.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 Contributing ============ @@ -17,4 +17,11 @@ type of contribution, it will fall into two categories: 2. You want to implement a feature, improvement, or bug fix. - At this time we do not accept code contributions. + Before starting work on an existing issue, comment on the issue to express + your interest and wait to be assigned by a maintainer. This helps avoid + redundant effort. + + Follow the repository `contribution guide + `_, including + signing off each commit under the Developer Certificate of Origin (DCO) and + cryptographically signing commits. diff --git a/cuda_bindings/docs/source/environment_variables.rst b/cuda_bindings/docs/source/environment_variables.rst index f38916549a3..4eba9e93047 100644 --- a/cuda_bindings/docs/source/environment_variables.rst +++ b/cuda_bindings/docs/source/environment_variables.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 Environment Variables ===================== diff --git a/cuda_bindings/docs/source/examples.rst b/cuda_bindings/docs/source/examples.rst index a9a588a8502..911c27a099a 100644 --- a/cuda_bindings/docs/source/examples.rst +++ b/cuda_bindings/docs/source/examples.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 Examples ======== diff --git a/cuda_bindings/docs/source/index.rst b/cuda_bindings/docs/source/index.rst index 0cf2cb9cd61..20642f2cdc5 100644 --- a/cuda_bindings/docs/source/index.rst +++ b/cuda_bindings/docs/source/index.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 ``cuda.bindings``: Low-level Python Bindings for CUDA ===================================================== diff --git a/cuda_bindings/docs/source/install.rst b/cuda_bindings/docs/source/install.rst index 4b90f68ef52..7f890365ea3 100644 --- a/cuda_bindings/docs/source/install.rst +++ b/cuda_bindings/docs/source/install.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 Installation ============ diff --git a/cuda_bindings/docs/source/license.rst b/cuda_bindings/docs/source/license.rst index bd19c19722e..f5de9869980 100644 --- a/cuda_bindings/docs/source/license.rst +++ b/cuda_bindings/docs/source/license.rst @@ -1,8 +1,8 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 -Software License Agreement -************************** +Apache License 2.0 +****************** .. literalinclude:: ../../LICENSE :language: text diff --git a/cuda_bindings/docs/source/module/cudla.rst b/cuda_bindings/docs/source/module/cudla.rst index 78e8fa6d430..5a77fd45c56 100644 --- a/cuda_bindings/docs/source/module/cudla.rst +++ b/cuda_bindings/docs/source/module/cudla.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 .. default-role:: cpp:any diff --git a/cuda_bindings/docs/source/module/cufile.rst b/cuda_bindings/docs/source/module/cufile.rst index 86d54f6c2d2..bd51ff26a40 100644 --- a/cuda_bindings/docs/source/module/cufile.rst +++ b/cuda_bindings/docs/source/module/cufile.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. default-role:: cpp:any .. module:: cuda.bindings.cufile diff --git a/cuda_bindings/docs/source/module/driver.rst b/cuda_bindings/docs/source/module/driver.rst index 49c633aa074..62493663fe2 100644 --- a/cuda_bindings/docs/source/module/driver.rst +++ b/cuda_bindings/docs/source/module/driver.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 ------ driver diff --git a/cuda_bindings/docs/source/module/nvfatbin.rst b/cuda_bindings/docs/source/module/nvfatbin.rst index 297d4baa853..1455cf6ba50 100644 --- a/cuda_bindings/docs/source/module/nvfatbin.rst +++ b/cuda_bindings/docs/source/module/nvfatbin.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 .. default-role:: cpp:any diff --git a/cuda_bindings/docs/source/module/nvjitlink.rst b/cuda_bindings/docs/source/module/nvjitlink.rst index ff9bb1ea521..271fc4424bc 100644 --- a/cuda_bindings/docs/source/module/nvjitlink.rst +++ b/cuda_bindings/docs/source/module/nvjitlink.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. default-role:: cpp:any diff --git a/cuda_bindings/docs/source/module/nvml.rst b/cuda_bindings/docs/source/module/nvml.rst index c6389b0a7a4..c5d47ad1670 100644 --- a/cuda_bindings/docs/source/module/nvml.rst +++ b/cuda_bindings/docs/source/module/nvml.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 .. default-role:: cpp:any .. module:: cuda.bindings.nvml diff --git a/cuda_bindings/docs/source/module/nvrtc.rst b/cuda_bindings/docs/source/module/nvrtc.rst index 9ec3186bf6f..0432493d47f 100644 --- a/cuda_bindings/docs/source/module/nvrtc.rst +++ b/cuda_bindings/docs/source/module/nvrtc.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 ----- nvrtc diff --git a/cuda_bindings/docs/source/module/nvvm.rst b/cuda_bindings/docs/source/module/nvvm.rst index de5de88335a..9c0f00abdd3 100644 --- a/cuda_bindings/docs/source/module/nvvm.rst +++ b/cuda_bindings/docs/source/module/nvvm.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. default-role:: cpp:any diff --git a/cuda_bindings/docs/source/module/runtime.rst b/cuda_bindings/docs/source/module/runtime.rst index ce6d98d0f09..09240fba282 100644 --- a/cuda_bindings/docs/source/module/runtime.rst +++ b/cuda_bindings/docs/source/module/runtime.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 ------- runtime diff --git a/cuda_bindings/docs/source/module/utils.rst b/cuda_bindings/docs/source/module/utils.rst index e720b0979cc..7673b742b59 100644 --- a/cuda_bindings/docs/source/module/utils.rst +++ b/cuda_bindings/docs/source/module/utils.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings.utils diff --git a/cuda_bindings/docs/source/motivation.rst b/cuda_bindings/docs/source/motivation.rst index 16bfd9745af..0236299bf7d 100644 --- a/cuda_bindings/docs/source/motivation.rst +++ b/cuda_bindings/docs/source/motivation.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 Motivation ========== diff --git a/cuda_bindings/docs/source/overview.rst b/cuda_bindings/docs/source/overview.rst index 8ada38bfd22..14c068c2af5 100644 --- a/cuda_bindings/docs/source/overview.rst +++ b/cuda_bindings/docs/source/overview.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 Overview ======== diff --git a/cuda_bindings/docs/source/release.rst b/cuda_bindings/docs/source/release.rst index f9a24a36b3c..f844bfc251d 100644 --- a/cuda_bindings/docs/source/release.rst +++ b/cuda_bindings/docs/source/release.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 Release Notes ============= diff --git a/cuda_bindings/docs/source/release/11.4.0-notes.rst b/cuda_bindings/docs/source/release/11.4.0-notes.rst index c019aedd95a..afb723b33a2 100644 --- a/cuda_bindings/docs/source/release/11.4.0-notes.rst +++ b/cuda_bindings/docs/source/release/11.4.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.4.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.5.0-notes.rst b/cuda_bindings/docs/source/release/11.5.0-notes.rst index 17cb02e0ca2..172c3d94e20 100644 --- a/cuda_bindings/docs/source/release/11.5.0-notes.rst +++ b/cuda_bindings/docs/source/release/11.5.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.5.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.6.0-notes.rst b/cuda_bindings/docs/source/release/11.6.0-notes.rst index bcc8944e1f6..ec7fbfdc4fa 100644 --- a/cuda_bindings/docs/source/release/11.6.0-notes.rst +++ b/cuda_bindings/docs/source/release/11.6.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.6.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.6.1-notes.rst b/cuda_bindings/docs/source/release/11.6.1-notes.rst index f136c942244..b30ad115b93 100644 --- a/cuda_bindings/docs/source/release/11.6.1-notes.rst +++ b/cuda_bindings/docs/source/release/11.6.1-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.6.1 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.7.0-notes.rst b/cuda_bindings/docs/source/release/11.7.0-notes.rst index 1f850c4283b..6a85be2e051 100644 --- a/cuda_bindings/docs/source/release/11.7.0-notes.rst +++ b/cuda_bindings/docs/source/release/11.7.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.7.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.7.1-notes.rst b/cuda_bindings/docs/source/release/11.7.1-notes.rst index 385cfb6e233..f381ef19c5f 100644 --- a/cuda_bindings/docs/source/release/11.7.1-notes.rst +++ b/cuda_bindings/docs/source/release/11.7.1-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.7.1 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.8.0-notes.rst b/cuda_bindings/docs/source/release/11.8.0-notes.rst index 68e40bc325d..c3837f18a68 100644 --- a/cuda_bindings/docs/source/release/11.8.0-notes.rst +++ b/cuda_bindings/docs/source/release/11.8.0-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.8.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.8.1-notes.rst b/cuda_bindings/docs/source/release/11.8.1-notes.rst index 0df23c92997..0c6b7351ef0 100644 --- a/cuda_bindings/docs/source/release/11.8.1-notes.rst +++ b/cuda_bindings/docs/source/release/11.8.1-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.8.1 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.8.2-notes.rst b/cuda_bindings/docs/source/release/11.8.2-notes.rst index ec9f0324e5a..b5d5e768657 100644 --- a/cuda_bindings/docs/source/release/11.8.2-notes.rst +++ b/cuda_bindings/docs/source/release/11.8.2-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.8.2 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.8.3-notes.rst b/cuda_bindings/docs/source/release/11.8.3-notes.rst index 806f5eb1b3b..cb642daadb8 100644 --- a/cuda_bindings/docs/source/release/11.8.3-notes.rst +++ b/cuda_bindings/docs/source/release/11.8.3-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.8.3 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.8.4-notes.rst b/cuda_bindings/docs/source/release/11.8.4-notes.rst index 6bafd0b63cb..a0360bc1e93 100644 --- a/cuda_bindings/docs/source/release/11.8.4-notes.rst +++ b/cuda_bindings/docs/source/release/11.8.4-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.8.4 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.8.5-notes.rst b/cuda_bindings/docs/source/release/11.8.5-notes.rst index 7580d468b49..54a4de15906 100644 --- a/cuda_bindings/docs/source/release/11.8.5-notes.rst +++ b/cuda_bindings/docs/source/release/11.8.5-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.8.5 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/11.8.6-notes.rst b/cuda_bindings/docs/source/release/11.8.6-notes.rst index 350595f68d2..9d3acc4122f 100644 --- a/cuda_bindings/docs/source/release/11.8.6-notes.rst +++ b/cuda_bindings/docs/source/release/11.8.6-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 ``cuda-bindings`` 11.8.6 Release notes ========================================== diff --git a/cuda_bindings/docs/source/release/11.8.7-notes.rst b/cuda_bindings/docs/source/release/11.8.7-notes.rst index 69e5f38438d..ab38253ceeb 100644 --- a/cuda_bindings/docs/source/release/11.8.7-notes.rst +++ b/cuda_bindings/docs/source/release/11.8.7-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 ``cuda-bindings`` 11.8.7 Release notes ====================================== diff --git a/cuda_bindings/docs/source/release/12.0.0-notes.rst b/cuda_bindings/docs/source/release/12.0.0-notes.rst index b61741a24ca..75ac832083b 100644 --- a/cuda_bindings/docs/source/release/12.0.0-notes.rst +++ b/cuda_bindings/docs/source/release/12.0.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.0.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/12.1.0-notes.rst b/cuda_bindings/docs/source/release/12.1.0-notes.rst index 161b4596cba..371d943b3fd 100644 --- a/cuda_bindings/docs/source/release/12.1.0-notes.rst +++ b/cuda_bindings/docs/source/release/12.1.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.1.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/12.2.0-notes.rst b/cuda_bindings/docs/source/release/12.2.0-notes.rst index 796aaa1e520..e39bdb3402c 100644 --- a/cuda_bindings/docs/source/release/12.2.0-notes.rst +++ b/cuda_bindings/docs/source/release/12.2.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.2.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/12.2.1-notes.rst b/cuda_bindings/docs/source/release/12.2.1-notes.rst index 3ccacdd30e5..6a004d93445 100644 --- a/cuda_bindings/docs/source/release/12.2.1-notes.rst +++ b/cuda_bindings/docs/source/release/12.2.1-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.2.1 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/12.3.0-notes.rst b/cuda_bindings/docs/source/release/12.3.0-notes.rst index 0a14aea9e6c..b917965a90b 100644 --- a/cuda_bindings/docs/source/release/12.3.0-notes.rst +++ b/cuda_bindings/docs/source/release/12.3.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.3.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/12.4.0-notes.rst b/cuda_bindings/docs/source/release/12.4.0-notes.rst index b71a4ce7d42..8c9d91c60f3 100644 --- a/cuda_bindings/docs/source/release/12.4.0-notes.rst +++ b/cuda_bindings/docs/source/release/12.4.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.4.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/12.5.0-notes.rst b/cuda_bindings/docs/source/release/12.5.0-notes.rst index 0ac6a25ee0f..8259af1ebe7 100644 --- a/cuda_bindings/docs/source/release/12.5.0-notes.rst +++ b/cuda_bindings/docs/source/release/12.5.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.5.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/12.6.0-notes.rst b/cuda_bindings/docs/source/release/12.6.0-notes.rst index 9cd5bbff599..10e336aae46 100644 --- a/cuda_bindings/docs/source/release/12.6.0-notes.rst +++ b/cuda_bindings/docs/source/release/12.6.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.6.0 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/12.6.1-notes.rst b/cuda_bindings/docs/source/release/12.6.1-notes.rst index 25716334454..8ca01b605f9 100644 --- a/cuda_bindings/docs/source/release/12.6.1-notes.rst +++ b/cuda_bindings/docs/source/release/12.6.1-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.6.1 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/12.6.2-notes.rst b/cuda_bindings/docs/source/release/12.6.2-notes.rst index 4ce87dd8b45..8dc9aebcf03 100644 --- a/cuda_bindings/docs/source/release/12.6.2-notes.rst +++ b/cuda_bindings/docs/source/release/12.6.2-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.6.2 Release notes ================================ diff --git a/cuda_bindings/docs/source/release/12.8.0-notes.rst b/cuda_bindings/docs/source/release/12.8.0-notes.rst index 544664a53de..41c2cb930ea 100644 --- a/cuda_bindings/docs/source/release/12.8.0-notes.rst +++ b/cuda_bindings/docs/source/release/12.8.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 ``cuda-bindings`` 12.8.0 Release notes ========================================== diff --git a/cuda_bindings/docs/source/release/12.9.0-notes.rst b/cuda_bindings/docs/source/release/12.9.0-notes.rst index 1ffb28cc7b4..40b6c0ac853 100644 --- a/cuda_bindings/docs/source/release/12.9.0-notes.rst +++ b/cuda_bindings/docs/source/release/12.9.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 ``cuda-bindings`` 12.9.0 Release notes ====================================== diff --git a/cuda_bindings/docs/source/release/12.9.1-notes.rst b/cuda_bindings/docs/source/release/12.9.1-notes.rst index 49531c9de22..bb536b8a135 100644 --- a/cuda_bindings/docs/source/release/12.9.1-notes.rst +++ b/cuda_bindings/docs/source/release/12.9.1-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/12.9.2-notes.rst b/cuda_bindings/docs/source/release/12.9.2-notes.rst index b22bdb39413..11d3bf0af31 100644 --- a/cuda_bindings/docs/source/release/12.9.2-notes.rst +++ b/cuda_bindings/docs/source/release/12.9.2-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/12.9.3-notes.rst b/cuda_bindings/docs/source/release/12.9.3-notes.rst index 07b8d4072f1..66876a7f3eb 100644 --- a/cuda_bindings/docs/source/release/12.9.3-notes.rst +++ b/cuda_bindings/docs/source/release/12.9.3-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/12.9.4-notes.rst b/cuda_bindings/docs/source/release/12.9.4-notes.rst index cf834c8c97c..79abcd35dba 100644 --- a/cuda_bindings/docs/source/release/12.9.4-notes.rst +++ b/cuda_bindings/docs/source/release/12.9.4-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/12.9.5-notes.rst b/cuda_bindings/docs/source/release/12.9.5-notes.rst index 9d1939fd814..13c49394a29 100644 --- a/cuda_bindings/docs/source/release/12.9.5-notes.rst +++ b/cuda_bindings/docs/source/release/12.9.5-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/12.9.6-notes.rst b/cuda_bindings/docs/source/release/12.9.6-notes.rst index d24671700bf..1589796ed9a 100644 --- a/cuda_bindings/docs/source/release/12.9.6-notes.rst +++ b/cuda_bindings/docs/source/release/12.9.6-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/12.9.7-notes.rst b/cuda_bindings/docs/source/release/12.9.7-notes.rst index 7670290acf5..842f1f3923e 100644 --- a/cuda_bindings/docs/source/release/12.9.7-notes.rst +++ b/cuda_bindings/docs/source/release/12.9.7-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/13.0.0-notes.rst b/cuda_bindings/docs/source/release/13.0.0-notes.rst index 138ff6091b3..7f0ea720a6e 100644 --- a/cuda_bindings/docs/source/release/13.0.0-notes.rst +++ b/cuda_bindings/docs/source/release/13.0.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/13.0.1-notes.rst b/cuda_bindings/docs/source/release/13.0.1-notes.rst index 1280de46078..545d72642ac 100644 --- a/cuda_bindings/docs/source/release/13.0.1-notes.rst +++ b/cuda_bindings/docs/source/release/13.0.1-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/13.0.2-notes.rst b/cuda_bindings/docs/source/release/13.0.2-notes.rst index 5148b95a277..0e34f0bef8d 100644 --- a/cuda_bindings/docs/source/release/13.0.2-notes.rst +++ b/cuda_bindings/docs/source/release/13.0.2-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/13.0.3-notes.rst b/cuda_bindings/docs/source/release/13.0.3-notes.rst index 1c48d7e3f2e..244289067ac 100644 --- a/cuda_bindings/docs/source/release/13.0.3-notes.rst +++ b/cuda_bindings/docs/source/release/13.0.3-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/13.1.0-notes.rst b/cuda_bindings/docs/source/release/13.1.0-notes.rst index 5da7659ba34..741830842c6 100644 --- a/cuda_bindings/docs/source/release/13.1.0-notes.rst +++ b/cuda_bindings/docs/source/release/13.1.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/13.1.1-notes.rst b/cuda_bindings/docs/source/release/13.1.1-notes.rst index 4725fe570c6..97139642d06 100644 --- a/cuda_bindings/docs/source/release/13.1.1-notes.rst +++ b/cuda_bindings/docs/source/release/13.1.1-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/13.2.0-notes.rst b/cuda_bindings/docs/source/release/13.2.0-notes.rst index 71d2e13e562..7f807d372a3 100644 --- a/cuda_bindings/docs/source/release/13.2.0-notes.rst +++ b/cuda_bindings/docs/source/release/13.2.0-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/13.3.0-notes.rst b/cuda_bindings/docs/source/release/13.3.0-notes.rst index 409e2a5a411..88a7ea1c332 100644 --- a/cuda_bindings/docs/source/release/13.3.0-notes.rst +++ b/cuda_bindings/docs/source/release/13.3.0-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/release/13.3.1-notes.rst b/cuda_bindings/docs/source/release/13.3.1-notes.rst index c5a629f4436..5dbceb43fbc 100644 --- a/cuda_bindings/docs/source/release/13.3.1-notes.rst +++ b/cuda_bindings/docs/source/release/13.3.1-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 .. module:: cuda.bindings diff --git a/cuda_bindings/docs/source/support.rst b/cuda_bindings/docs/source/support.rst index 0ed4d023efa..5c292eb5cb5 100644 --- a/cuda_bindings/docs/source/support.rst +++ b/cuda_bindings/docs/source/support.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 .. _support: diff --git a/cuda_bindings/docs/source/tips_and_tricks.rst b/cuda_bindings/docs/source/tips_and_tricks.rst index 1a77eb53fd5..adedb14eeb4 100644 --- a/cuda_bindings/docs/source/tips_and_tricks.rst +++ b/cuda_bindings/docs/source/tips_and_tricks.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 Tips and Tricks --------------- diff --git a/cuda_bindings/examples/0_Introduction/clock_nvrtc.py b/cuda_bindings/examples/0_Introduction/clock_nvrtc.py index 26f02eba30e..dcaef40be66 100644 --- a/cuda_bindings/examples/0_Introduction/clock_nvrtc.py +++ b/cuda_bindings/examples/0_Introduction/clock_nvrtc.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/0_Introduction/simple_cubemap_texture.py b/cuda_bindings/examples/0_Introduction/simple_cubemap_texture.py index da8227a6c3c..33c0fe01de1 100644 --- a/cuda_bindings/examples/0_Introduction/simple_cubemap_texture.py +++ b/cuda_bindings/examples/0_Introduction/simple_cubemap_texture.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/0_Introduction/simple_p2p.py b/cuda_bindings/examples/0_Introduction/simple_p2p.py index f1548adc259..b1dc60a305c 100644 --- a/cuda_bindings/examples/0_Introduction/simple_p2p.py +++ b/cuda_bindings/examples/0_Introduction/simple_p2p.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/0_Introduction/simple_zero_copy.py b/cuda_bindings/examples/0_Introduction/simple_zero_copy.py index ff47696cb6c..36660fe5e62 100644 --- a/cuda_bindings/examples/0_Introduction/simple_zero_copy.py +++ b/cuda_bindings/examples/0_Introduction/simple_zero_copy.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/0_Introduction/system_wide_atomics.py b/cuda_bindings/examples/0_Introduction/system_wide_atomics.py index 0d7a6341a54..1ccfaedae29 100644 --- a/cuda_bindings/examples/0_Introduction/system_wide_atomics.py +++ b/cuda_bindings/examples/0_Introduction/system_wide_atomics.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/0_Introduction/vector_add_drv.py b/cuda_bindings/examples/0_Introduction/vector_add_drv.py index a6f65b9c815..e87ac53890a 100644 --- a/cuda_bindings/examples/0_Introduction/vector_add_drv.py +++ b/cuda_bindings/examples/0_Introduction/vector_add_drv.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/0_Introduction/vector_add_mmap.py b/cuda_bindings/examples/0_Introduction/vector_add_mmap.py index f1e9617166b..43bf647b983 100644 --- a/cuda_bindings/examples/0_Introduction/vector_add_mmap.py +++ b/cuda_bindings/examples/0_Introduction/vector_add_mmap.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/2_Concepts_and_Techniques/stream_ordered_allocation.py b/cuda_bindings/examples/2_Concepts_and_Techniques/stream_ordered_allocation.py index d84fa648b75..c302ed3ba75 100644 --- a/cuda_bindings/examples/2_Concepts_and_Techniques/stream_ordered_allocation.py +++ b/cuda_bindings/examples/2_Concepts_and_Techniques/stream_ordered_allocation.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/3_CUDA_Features/global_to_shmem_async_copy.py b/cuda_bindings/examples/3_CUDA_Features/global_to_shmem_async_copy.py index d3ab1c53f19..1ccff40d97e 100644 --- a/cuda_bindings/examples/3_CUDA_Features/global_to_shmem_async_copy.py +++ b/cuda_bindings/examples/3_CUDA_Features/global_to_shmem_async_copy.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/3_CUDA_Features/simple_cuda_graphs.py b/cuda_bindings/examples/3_CUDA_Features/simple_cuda_graphs.py index bb749065f27..3c635cb4e8c 100644 --- a/cuda_bindings/examples/3_CUDA_Features/simple_cuda_graphs.py +++ b/cuda_bindings/examples/3_CUDA_Features/simple_cuda_graphs.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/4_CUDA_Libraries/conjugate_gradient_multi_block_cg.py b/cuda_bindings/examples/4_CUDA_Libraries/conjugate_gradient_multi_block_cg.py index 94c9519100f..91bb9ede6b1 100644 --- a/cuda_bindings/examples/4_CUDA_Libraries/conjugate_gradient_multi_block_cg.py +++ b/cuda_bindings/examples/4_CUDA_Libraries/conjugate_gradient_multi_block_cg.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/4_CUDA_Libraries/nvidia_smi.py b/cuda_bindings/examples/4_CUDA_Libraries/nvidia_smi.py index ca229e52681..459022784b3 100644 --- a/cuda_bindings/examples/4_CUDA_Libraries/nvidia_smi.py +++ b/cuda_bindings/examples/4_CUDA_Libraries/nvidia_smi.py @@ -1,5 +1,5 @@ # Copyright 2026 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/extra/iso_fd_modelling.py b/cuda_bindings/examples/extra/iso_fd_modelling.py index 2bb4768a3c2..13afcdffb33 100644 --- a/cuda_bindings/examples/extra/iso_fd_modelling.py +++ b/cuda_bindings/examples/extra/iso_fd_modelling.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/examples/extra/jit_program.py b/cuda_bindings/examples/extra/jit_program.py index ec471ef9b32..434c6142215 100644 --- a/cuda_bindings/examples/extra/jit_program.py +++ b/cuda_bindings/examples/extra/jit_program.py @@ -1,5 +1,5 @@ # Copyright 2021-2025 NVIDIA Corporation. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # ################################################################################ # diff --git a/cuda_bindings/pixi.toml b/cuda_bindings/pixi.toml index dd0b55f23f5..58722da7d2f 100644 --- a/cuda_bindings/pixi.toml +++ b/cuda_bindings/pixi.toml @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 [workspace] channels = ["conda-forge"] diff --git a/cuda_bindings/pyproject.toml b/cuda_bindings/pyproject.toml index f9efeeb5df8..22de742f724 100644 --- a/cuda_bindings/pyproject.toml +++ b/cuda_bindings/pyproject.toml @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 [build-system] requires = [ "setuptools>=80.0.0", @@ -17,7 +17,8 @@ description = "Python bindings for CUDA" authors = [ { name = "NVIDIA Corporation", email = "cuda-python-conduct@nvidia.com" }, ] -license = "LicenseRef-NVIDIA-SOFTWARE-LICENSE" +license = "Apache-2.0" +license-files = ["LICENSE"] requires-python = ">=3.10" classifiers = [ "Intended Audience :: Developers", diff --git a/cuda_bindings/setup.py b/cuda_bindings/setup.py index 2f6069c7383..4cfffcf6e1a 100644 --- a/cuda_bindings/setup.py +++ b/cuda_bindings/setup.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import functools import os diff --git a/cuda_bindings/tests/conftest.py b/cuda_bindings/tests/conftest.py index f30500c1342..9791fc8be02 100644 --- a/cuda_bindings/tests/conftest.py +++ b/cuda_bindings/tests/conftest.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 import pathlib import sys diff --git a/cuda_bindings/tests/cudla/conftest.py b/cuda_bindings/tests/cudla/conftest.py index c22097fce97..aa277bf9a9d 100644 --- a/cuda_bindings/tests/cudla/conftest.py +++ b/cuda_bindings/tests/cudla/conftest.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/cuda_bindings/tests/cudla/test_cudla_bindings.py b/cuda_bindings/tests/cudla/test_cudla_bindings.py index c70b3f692d3..b95283fac84 100644 --- a/cuda_bindings/tests/cudla/test_cudla_bindings.py +++ b/cuda_bindings/tests/cudla/test_cudla_bindings.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/cuda_bindings/tests/cython/build_tests.bat b/cuda_bindings/tests/cython/build_tests.bat index e1bf73af170..a59bcf53d05 100644 --- a/cuda_bindings/tests/cython/build_tests.bat +++ b/cuda_bindings/tests/cython/build_tests.bat @@ -1,7 +1,7 @@ @echo off -REM SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -REM SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +REM SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +REM SPDX-License-Identifier: Apache-2.0 setlocal set CL=%CL% /I"%CUDA_HOME%\include" diff --git a/cuda_bindings/tests/cython/build_tests.py b/cuda_bindings/tests/cython/build_tests.py index 19bc8dbe415..ac22e1fd962 100644 --- a/cuda_bindings/tests/cython/build_tests.py +++ b/cuda_bindings/tests/cython/build_tests.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 """Build cuda_bindings Cython test extensions in-place. pixi-build's editable install exposes the `cuda` namespace package via a diff --git a/cuda_bindings/tests/cython/build_tests.sh b/cuda_bindings/tests/cython/build_tests.sh index 12cf46f7ffa..0ca0745d2b4 100755 --- a/cuda_bindings/tests/cython/build_tests.sh +++ b/cuda_bindings/tests/cython/build_tests.sh @@ -1,8 +1,8 @@ #!/bin/bash set -eo pipefail -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 UNAME=$(uname) if [ "$UNAME" == "Linux" ] ; then diff --git a/cuda_bindings/tests/cython/test_ccuda.pyx b/cuda_bindings/tests/cython/test_ccuda.pyx index 2d47bed4dea..4af8a84ba75 100644 --- a/cuda_bindings/tests/cython/test_ccuda.pyx +++ b/cuda_bindings/tests/cython/test_ccuda.pyx @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 # distutils: language=c++ from libc.string cimport ( diff --git a/cuda_bindings/tests/cython/test_ccudart.pyx b/cuda_bindings/tests/cython/test_ccudart.pyx index 7f80c8f569f..4460ceb618a 100644 --- a/cuda_bindings/tests/cython/test_ccudart.pyx +++ b/cuda_bindings/tests/cython/test_ccudart.pyx @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 # distutils: language=c++ from libc.string cimport ( diff --git a/cuda_bindings/tests/cython/test_cython.py b/cuda_bindings/tests/cython/test_cython.py index 3e14b48e0ff..a6f8133909e 100644 --- a/cuda_bindings/tests/cython/test_cython.py +++ b/cuda_bindings/tests/cython/test_cython.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 import functools import importlib diff --git a/cuda_bindings/tests/cython/test_interoperability_cython.pyx b/cuda_bindings/tests/cython/test_interoperability_cython.pyx index 0531ae5876d..5278a10e38a 100644 --- a/cuda_bindings/tests/cython/test_interoperability_cython.pyx +++ b/cuda_bindings/tests/cython/test_interoperability_cython.pyx @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 # distutils: language=c++ from libc.stdlib cimport calloc, free diff --git a/cuda_bindings/tests/nvml/__init__.py b/cuda_bindings/tests/nvml/__init__.py index 854f640766e..c746f897d2d 100644 --- a/cuda_bindings/tests/nvml/__init__.py +++ b/cuda_bindings/tests/nvml/__init__.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/cuda_bindings/tests/nvml/conftest.py b/cuda_bindings/tests/nvml/conftest.py index ed6a7d24641..9897420e38d 100644 --- a/cuda_bindings/tests/nvml/conftest.py +++ b/cuda_bindings/tests/nvml/conftest.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from collections import namedtuple diff --git a/cuda_bindings/tests/nvml/test_compute_mode.py b/cuda_bindings/tests/nvml/test_compute_mode.py index e9b020d32a9..83c7827f53a 100644 --- a/cuda_bindings/tests/nvml/test_compute_mode.py +++ b/cuda_bindings/tests/nvml/test_compute_mode.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import sys diff --git a/cuda_bindings/tests/nvml/test_cuda.py b/cuda_bindings/tests/nvml/test_cuda.py index f4d9405615f..7a782e7403c 100644 --- a/cuda_bindings/tests/nvml/test_cuda.py +++ b/cuda_bindings/tests/nvml/test_cuda.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import os diff --git a/cuda_bindings/tests/nvml/test_device.py b/cuda_bindings/tests/nvml/test_device.py index e571de67a76..301bfca59d3 100644 --- a/cuda_bindings/tests/nvml/test_device.py +++ b/cuda_bindings/tests/nvml/test_device.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from functools import cache diff --git a/cuda_bindings/tests/nvml/test_gpu.py b/cuda_bindings/tests/nvml/test_gpu.py index 6119a5f7a93..6757e4760f1 100644 --- a/cuda_bindings/tests/nvml/test_gpu.py +++ b/cuda_bindings/tests/nvml/test_gpu.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import numpy as np import pytest diff --git a/cuda_bindings/tests/nvml/test_init.py b/cuda_bindings/tests/nvml/test_init.py index 19e573c9cc6..a47af24dc6a 100644 --- a/cuda_bindings/tests/nvml/test_init.py +++ b/cuda_bindings/tests/nvml/test_init.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import sys import warnings diff --git a/cuda_bindings/tests/nvml/test_nvlink.py b/cuda_bindings/tests/nvml/test_nvlink.py index 912c90d7c17..04bc8eaae4c 100644 --- a/cuda_bindings/tests/nvml/test_nvlink.py +++ b/cuda_bindings/tests/nvml/test_nvlink.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from cuda.bindings import nvml diff --git a/cuda_bindings/tests/nvml/test_page_retirement.py b/cuda_bindings/tests/nvml/test_page_retirement.py index cded0841731..34c6cf78625 100644 --- a/cuda_bindings/tests/nvml/test_page_retirement.py +++ b/cuda_bindings/tests/nvml/test_page_retirement.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/cuda_bindings/tests/nvml/test_pci.py b/cuda_bindings/tests/nvml/test_pci.py index 90605783d8c..74c7a65a655 100644 --- a/cuda_bindings/tests/nvml/test_pci.py +++ b/cuda_bindings/tests/nvml/test_pci.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import contextlib diff --git a/cuda_bindings/tests/nvml/test_pynvml.py b/cuda_bindings/tests/nvml/test_pynvml.py index 6e5813af1bb..2d1029e9d9b 100644 --- a/cuda_bindings/tests/nvml/test_pynvml.py +++ b/cuda_bindings/tests/nvml/test_pynvml.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # A set of tests ported from https://github.com/gpuopenanalytics/pynvml/blob/11.5.3/pynvml/tests/test_nvml.py diff --git a/cuda_bindings/tests/nvml/test_unit.py b/cuda_bindings/tests/nvml/test_unit.py index cb5b783bed8..fb8c2552839 100644 --- a/cuda_bindings/tests/nvml/test_unit.py +++ b/cuda_bindings/tests/nvml/test_unit.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/cuda_bindings/tests/nvml/util.py b/cuda_bindings/tests/nvml/util.py index 545826a2eb8..038fe58d8be 100644 --- a/cuda_bindings/tests/nvml/util.py +++ b/cuda_bindings/tests/nvml/util.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import functools diff --git a/cuda_bindings/tests/test_basics.py b/cuda_bindings/tests/test_basics.py index cb3732f534b..bbb11fddbb7 100644 --- a/cuda_bindings/tests/test_basics.py +++ b/cuda_bindings/tests/test_basics.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import enum import sys diff --git a/cuda_bindings/tests/test_cuda.py b/cuda_bindings/tests/test_cuda.py index 2485150338e..192ad0f72fe 100644 --- a/cuda_bindings/tests/test_cuda.py +++ b/cuda_bindings/tests/test_cuda.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import ctypes import os.path diff --git a/cuda_bindings/tests/test_cudart.py b/cuda_bindings/tests/test_cudart.py index 91f7797fd43..ddb4448499b 100644 --- a/cuda_bindings/tests/test_cudart.py +++ b/cuda_bindings/tests/test_cudart.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import ctypes import math diff --git a/cuda_bindings/tests/test_cufile.py b/cuda_bindings/tests/test_cufile.py index 3a4d9b1c0e3..46bd8429a62 100644 --- a/cuda_bindings/tests/test_cufile.py +++ b/cuda_bindings/tests/test_cufile.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import ctypes import logging diff --git a/cuda_bindings/tests/test_examples.py b/cuda_bindings/tests/test_examples.py index 0c3efe72811..63a56c78fb7 100644 --- a/cuda_bindings/tests/test_examples.py +++ b/cuda_bindings/tests/test_examples.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import glob import os diff --git a/cuda_bindings/tests/test_graphics_apis.py b/cuda_bindings/tests/test_graphics_apis.py index ecfeba96fd1..8b74d8d2a1d 100644 --- a/cuda_bindings/tests/test_graphics_apis.py +++ b/cuda_bindings/tests/test_graphics_apis.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 import contextlib import ctypes diff --git a/cuda_bindings/tests/test_interoperability.py b/cuda_bindings/tests/test_interoperability.py index 96270e208c3..18a37ec6b4e 100644 --- a/cuda_bindings/tests/test_interoperability.py +++ b/cuda_bindings/tests/test_interoperability.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 import numpy as np import pytest diff --git a/cuda_bindings/tests/test_kernelParams.py b/cuda_bindings/tests/test_kernelParams.py index f64444da066..555d6a7284c 100644 --- a/cuda_bindings/tests/test_kernelParams.py +++ b/cuda_bindings/tests/test_kernelParams.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 import ctypes diff --git a/cuda_bindings/tests/test_nvfatbin.py b/cuda_bindings/tests/test_nvfatbin.py index ec2f17ef95d..32b981d93da 100644 --- a/cuda_bindings/tests/test_nvfatbin.py +++ b/cuda_bindings/tests/test_nvfatbin.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import base64 diff --git a/cuda_bindings/tests/test_nvjitlink.py b/cuda_bindings/tests/test_nvjitlink.py index e221dd72efb..a2020f042e4 100644 --- a/cuda_bindings/tests/test_nvjitlink.py +++ b/cuda_bindings/tests/test_nvjitlink.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 from contextlib import contextmanager diff --git a/cuda_bindings/tests/test_nvrtc.py b/cuda_bindings/tests/test_nvrtc.py index 51202e64d9a..90ff6766d41 100644 --- a/cuda_bindings/tests/test_nvrtc.py +++ b/cuda_bindings/tests/test_nvrtc.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 import pytest diff --git a/cuda_bindings/tests/test_nvvm.py b/cuda_bindings/tests/test_nvvm.py index b7497776f5d..91b7d705d34 100644 --- a/cuda_bindings/tests/test_nvvm.py +++ b/cuda_bindings/tests/test_nvvm.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import re from contextlib import contextmanager diff --git a/cuda_bindings/tests/test_utils.py b/cuda_bindings/tests/test_utils.py index 01e30269291..c767996bced 100644 --- a/cuda_bindings/tests/test_utils.py +++ b/cuda_bindings/tests/test_utils.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import importlib import random diff --git a/cuda_bindings/tests/test_version_check.py b/cuda_bindings/tests/test_version_check.py index 21a70137687..03c3d7d3c2c 100644 --- a/cuda_bindings/tests/test_version_check.py +++ b/cuda_bindings/tests/test_version_check.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 import os import warnings diff --git a/cuda_bindings/tests/utils/check_cyclical_import.py b/cuda_bindings/tests/utils/check_cyclical_import.py index e40f8001108..5c2106612e3 100644 --- a/cuda_bindings/tests/utils/check_cyclical_import.py +++ b/cuda_bindings/tests/utils/check_cyclical_import.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 """ Tests whether importing a specific module leads to cyclical imports. diff --git a/cuda_pathfinder/LICENSE b/cuda_pathfinder/LICENSE index a4baaa2d3fa..d6f74778be8 100644 --- a/cuda_pathfinder/LICENSE +++ b/cuda_pathfinder/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. Apache License Version 2.0, January 2004 diff --git a/cuda_python/DESCRIPTION.rst b/cuda_python/DESCRIPTION.rst index 06217fd5d99..d50092616ad 100644 --- a/cuda_python/DESCRIPTION.rst +++ b/cuda_python/DESCRIPTION.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 ************************************************************** cuda-python: Metapackage collection of CUDA Python subpackages diff --git a/cuda_python/LICENSE b/cuda_python/LICENSE index a5a65097cdc..d6f74778be8 100644 --- a/cuda_python/LICENSE +++ b/cuda_python/LICENSE @@ -1,48 +1,178 @@ -NVIDIA SOFTWARE LICENSE - -This license is a legal agreement between you and NVIDIA Corporation ("NVIDIA") and governs your use of the NVIDIA CUDA Python software and materials provided hereunder ("SOFTWARE"). - -This license can be accepted only by an adult of legal age of majority in the country in which the SOFTWARE is used. If you are under the legal age of majority, you must ask your parent or legal guardian to consent to this license. By taking delivery of the SOFTWARE, you affirm that you have reached the legal age of majority, you accept the terms of this license, and you take legal and financial responsibility for the actions of your permitted users. - -You agree to use the SOFTWARE only for purposes that are permitted by (a) this license, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions. - -1. LICENSE. Subject to the terms of this license, NVIDIA grants you a non-exclusive limited license to: (a) install and use the SOFTWARE, and (b) distribute the SOFTWARE subject to the distribution requirements described in this license. NVIDIA reserves all rights, title and interest in and to the SOFTWARE not expressly granted to you under this license. - -2. DISTRIBUTION REQUIREMENTS. These are the distribution requirements for you to exercise the distribution grant: -a. The terms under which you distribute the SOFTWARE must be consistent with the terms of this license, including (without limitation) terms relating to the license grant and license restrictions and protection of NVIDIA's intellectual property rights. -b. You agree to notify NVIDIA in writing of any known or suspected distribution or use of the SOFTWARE not in compliance with the requirements of this license, and to enforce the terms of your agreements with respect to distributed SOFTWARE. - -3. LIMITATIONS. Your license to use the SOFTWARE is restricted as follows: -a. The SOFTWARE is licensed for you to develop applications only for use in systems with NVIDIA GPUs. -b. You may not reverse engineer, decompile or disassemble, or remove copyright or other proprietary notices from any portion of the SOFTWARE or copies of the SOFTWARE. -c. You may not modify or create derivative works of any portion of the SOFTWARE. -d. You may not bypass, disable, or circumvent any technical measure, encryption, security, digital rights management or authentication mechanism in the SOFTWARE. -e. You may not use the SOFTWARE in any manner that would cause it to become subject to an open source software license. As examples, licenses that require as a condition of use, modification, and/or distribution that the SOFTWARE be (i) disclosed or distributed in source code form; (ii) licensed for the purpose of making derivative works; or (iii) redistributable at no charge. -f. Unless you have an agreement with NVIDIA for this purpose, you may not use the SOFTWARE with any system or application where the use or failure of the system or application can reasonably be expected to threaten or result in personal injury, death, or catastrophic loss. Examples include use in avionics, navigation, military, medical, life support or other life critical applications. NVIDIA does not design, test or manufacture the SOFTWARE for these critical uses and NVIDIA shall not be liable to you or any third party, in whole or in part, for any claims or damages arising from such uses. -g. You agree to defend, indemnify and hold harmless NVIDIA and its affiliates, and their respective employees, contractors, agents, officers and directors, from and against any and all claims, damages, obligations, losses, liabilities, costs or debt, fines, restitutions and expenses (including but not limited to attorney's fees and costs incident to establishing the right of indemnification) arising out of or related to use of the SOFTWARE outside of the scope of this Agreement, or not in compliance with its terms. - -4. PRE-RELEASE. SOFTWARE versions identified as alpha, beta, preview, early access or otherwise as pre-release may not be fully functional, may contain errors or design flaws, and may have reduced or different security, privacy, availability, and reliability standards relative to commercial versions of NVIDIA software and materials. You may use a pre-release SOFTWARE version at your own risk, understanding that these versions are not intended for use in production or business-critical systems. - -5. OWNERSHIP. The SOFTWARE and the related intellectual property rights therein are and will remain the sole and exclusive property of NVIDIA or its licensors. The SOFTWARE is copyrighted and protected by the laws of the United States and other countries, and international treaty provisions. NVIDIA may make changes to the SOFTWARE, at any time without notice, but is not obligated to support or update the SOFTWARE. - -6. COMPONENTS UNDER OTHER LICENSES. The SOFTWARE may include NVIDIA or third-party components with separate legal notices or terms as may be described in proprietary notices accompanying the SOFTWARE. If and to the extent there is a conflict between the terms in this license and the license terms associated with a component, the license terms associated with the components control only to the extent necessary to resolve the conflict. - -7. FEEDBACK. You may, but don't have to, provide to NVIDIA any Feedback. "Feedback" means any suggestions, bug fixes, enhancements, modifications, feature requests or other feedback regarding the SOFTWARE. For any Feedback that you voluntarily provide, you hereby grant NVIDIA and its affiliates a perpetual, non-exclusive, worldwide, irrevocable license to use, reproduce, modify, license, sublicense (through multiple tiers of sublicensees), and distribute (through multiple tiers of distributors) the Feedback without the payment of any royalties or fees to you. NVIDIA will use Feedback at its choice. - -8. NO WARRANTIES. THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. NVIDIA DOES NOT WARRANT THAT THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION THEREOF WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ALL ERRORS WILL BE CORRECTED. - -9. LIMITATIONS OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY LAW, NVIDIA AND ITS AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR ANY LOST PROFITS, PROJECT DELAYS, LOSS OF USE, LOSS OF DATA OR LOSS OF GOODWILL, OR THE COSTS OF PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION WITH THIS LICENSE OR THE USE OR PERFORMANCE OF THE SOFTWARE, WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASED UPON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF LIABILITY, EVEN IF NVIDIA HAS PREVIOUSLY BEEN ADVISED OF, OR COULD REASONABLY HAVE FORESEEN, THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL NVIDIA'S AND ITS AFFILIATES TOTAL CUMULATIVE LIABILITY UNDER OR ARISING OUT OF THIS LICENSE EXCEED US$10.00. THE NATURE OF THE LIABILITY OR THE NUMBER OF CLAIMS OR SUITS SHALL NOT ENLARGE OR EXTEND THIS LIMIT. - -10. TERMINATION. Your rights under this license will terminate automatically without notice from NVIDIA if you fail to comply with any term and condition of this license or if you commence or participate in any legal proceeding against NVIDIA with respect to the SOFTWARE. NVIDIA may terminate this license with advance written notice to you if NVIDIA decides to no longer provide the SOFTWARE in a country or, in NVIDIA's sole discretion, the continued use of it is no longer commercially viable. Upon any termination of this license, you agree to promptly discontinue use of the SOFTWARE and destroy all copies in your possession or control. Your prior distributions in accordance with this license are not affected by the termination of this license. All provisions of this license will survive termination, except for the license granted to you. - -11. APPLICABLE LAW. This license will be governed in all respects by the laws of the United States and of the State of Delaware as those laws are applied to contracts entered into and performed entirely within Delaware by Delaware residents, without regard to the conflicts of laws principles. The United Nations Convention on Contracts for the International Sale of Goods is specifically disclaimed. You agree to all terms of this Agreement in the English language. The state or federal courts residing in Santa Clara County, California shall have exclusive jurisdiction over any dispute or claim arising out of this license. Notwithstanding this, you agree that NVIDIA shall still be allowed to apply for injunctive remedies or an equivalent type of urgent legal relief in any jurisdiction. - -12. NO ASSIGNMENT. This license and your rights and obligations thereunder may not be assigned by you by any means or operation of law without NVIDIA's permission. Any attempted assignment not approved by NVIDIA in writing shall be void and of no effect. - -13. EXPORT. The SOFTWARE is subject to United States export laws and regulations. You agree that you will not ship, transfer or export the SOFTWARE into any country, or use the SOFTWARE in any manner, prohibited by the United States Bureau of Industry and Security or economic sanctions regulations administered by the U.S. Department of Treasury's Office of Foreign Assets Control (OFAC), or any applicable export laws, restrictions or regulations. These laws include restrictions on destinations, end users and end use. By accepting this license, you confirm that you are not a resident or citizen of any country currently embargoed by the U.S. and that you are not otherwise prohibited from receiving the SOFTWARE. - -14. GOVERNMENT USE. The SOFTWARE has been developed entirely at private expense and is "commercial items" consisting of "commercial computer software" and "commercial computer software documentation" provided with RESTRICTED RIGHTS. Use, duplication or disclosure by the U.S. Government or a U.S. Government subcontractor is subject to the restrictions in this license pursuant to DFARS 227.7202-3(a) or as set forth in subparagraphs (b)(1) and (2) of the Commercial Computer Software - Restricted Rights clause at FAR 52.227-19, as applicable. Contractor/manufacturer is NVIDIA, 2788 San Tomas Expressway, Santa Clara, CA 95051. - -15. ENTIRE AGREEMENT. This license is the final, complete and exclusive agreement between the parties relating to the subject matter of this license and supersedes all prior or contemporaneous understandings and agreements relating to this subject matter, whether oral or written. If any court of competent jurisdiction determines that any provision of this license is illegal, invalid or unenforceable, the remaining provisions will remain in full force and effect. This license may only be modified in a writing signed by an authorized representative of each party. - -(v. May 12, 2021) +Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/cuda_python/docs/Makefile b/cuda_python/docs/Makefile index 554138cb8aa..7fe2bbe1a9d 100644 --- a/cuda_python/docs/Makefile +++ b/cuda_python/docs/Makefile @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 # Minimal makefile for Sphinx documentation # diff --git a/cuda_python/docs/build_all_docs.sh b/cuda_python/docs/build_all_docs.sh index 5c2765b9899..77e990e1530 100755 --- a/cuda_python/docs/build_all_docs.sh +++ b/cuda_python/docs/build_all_docs.sh @@ -1,7 +1,7 @@ #!/bin/bash -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 set -ex diff --git a/cuda_python/docs/build_docs.sh b/cuda_python/docs/build_docs.sh index 528b1c15c3a..0b2067ed60c 100755 --- a/cuda_python/docs/build_docs.sh +++ b/cuda_python/docs/build_docs.sh @@ -1,7 +1,7 @@ #!/bin/bash # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 set -ex diff --git a/cuda_python/docs/environment-docs.yml b/cuda_python/docs/environment-docs.yml index f48579843fe..d6c5dde6c9b 100644 --- a/cuda_python/docs/environment-docs.yml +++ b/cuda_python/docs/environment-docs.yml @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 name: cuda-python-docs channels: diff --git a/cuda_python/docs/exts/enum_documenter.py b/cuda_python/docs/exts/enum_documenter.py index 3ddb43745e3..9ecd64686a9 100644 --- a/cuda_python/docs/exts/enum_documenter.py +++ b/cuda_python/docs/exts/enum_documenter.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 from sphinx.ext.autodoc import ClassDocumenter diff --git a/cuda_python/docs/exts/release_date.py b/cuda_python/docs/exts/release_date.py index 5e89b2e648c..40e61bbc917 100644 --- a/cuda_python/docs/exts/release_date.py +++ b/cuda_python/docs/exts/release_date.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 """Sphinx extension to auto-inject release dates from git tags. diff --git a/cuda_python/docs/exts/release_toc.py b/cuda_python/docs/exts/release_toc.py index 1677935c748..78345da8974 100644 --- a/cuda_python/docs/exts/release_toc.py +++ b/cuda_python/docs/exts/release_toc.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 from pathlib import Path diff --git a/cuda_python/docs/source/conf.py b/cuda_python/docs/source/conf.py index 1b1932be711..2a0baf0e1d7 100644 --- a/cuda_python/docs/source/conf.py +++ b/cuda_python/docs/source/conf.py @@ -1,5 +1,5 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 # Configuration file for the Sphinx documentation builder. # diff --git a/cuda_python/docs/source/index.rst b/cuda_python/docs/source/index.rst index 95d90dec1f0..55ef45255ad 100644 --- a/cuda_python/docs/source/index.rst +++ b/cuda_python/docs/source/index.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python =========== diff --git a/cuda_python/docs/source/release.rst b/cuda_python/docs/source/release.rst index f9a24a36b3c..f844bfc251d 100644 --- a/cuda_python/docs/source/release.rst +++ b/cuda_python/docs/source/release.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 Release Notes ============= diff --git a/cuda_python/docs/source/release/11.8.6-notes.rst b/cuda_python/docs/source/release/11.8.6-notes.rst index 9d726c5b077..6e4bd01e0d2 100644 --- a/cuda_python/docs/source/release/11.8.6-notes.rst +++ b/cuda_python/docs/source/release/11.8.6-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.8.6 Release notes ================================ diff --git a/cuda_python/docs/source/release/11.8.7-notes.rst b/cuda_python/docs/source/release/11.8.7-notes.rst index 2e8b879b564..12509398fa4 100644 --- a/cuda_python/docs/source/release/11.8.7-notes.rst +++ b/cuda_python/docs/source/release/11.8.7-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 11.8.7 Release notes ================================ diff --git a/cuda_python/docs/source/release/12.6.1-notes.rst b/cuda_python/docs/source/release/12.6.1-notes.rst index a882ffea631..43d730c1454 100644 --- a/cuda_python/docs/source/release/12.6.1-notes.rst +++ b/cuda_python/docs/source/release/12.6.1-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python Release notes ========================= diff --git a/cuda_python/docs/source/release/12.6.2-notes.rst b/cuda_python/docs/source/release/12.6.2-notes.rst index b091fe1de34..5449e81d492 100644 --- a/cuda_python/docs/source/release/12.6.2-notes.rst +++ b/cuda_python/docs/source/release/12.6.2-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python Release notes ========================= diff --git a/cuda_python/docs/source/release/12.8.0-notes.rst b/cuda_python/docs/source/release/12.8.0-notes.rst index 6634c4ea648..94f64138bac 100644 --- a/cuda_python/docs/source/release/12.8.0-notes.rst +++ b/cuda_python/docs/source/release/12.8.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.8.0 Release notes ================================ diff --git a/cuda_python/docs/source/release/12.9.0-notes.rst b/cuda_python/docs/source/release/12.9.0-notes.rst index 0c61f3302c8..5fc75221637 100644 --- a/cuda_python/docs/source/release/12.9.0-notes.rst +++ b/cuda_python/docs/source/release/12.9.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.9.0 Release notes ================================ diff --git a/cuda_python/docs/source/release/12.9.1-notes.rst b/cuda_python/docs/source/release/12.9.1-notes.rst index 444b7c9caca..22cbc081496 100644 --- a/cuda_python/docs/source/release/12.9.1-notes.rst +++ b/cuda_python/docs/source/release/12.9.1-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.9.1 Release notes ================================ diff --git a/cuda_python/docs/source/release/12.9.2-notes.rst b/cuda_python/docs/source/release/12.9.2-notes.rst index b013200d35b..37cc04a256e 100644 --- a/cuda_python/docs/source/release/12.9.2-notes.rst +++ b/cuda_python/docs/source/release/12.9.2-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.9.2 Release notes ================================ diff --git a/cuda_python/docs/source/release/12.9.3-notes.rst b/cuda_python/docs/source/release/12.9.3-notes.rst index 6ec22ae6e77..89329d4c908 100644 --- a/cuda_python/docs/source/release/12.9.3-notes.rst +++ b/cuda_python/docs/source/release/12.9.3-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.9.3 Release notes ================================ diff --git a/cuda_python/docs/source/release/12.9.4-notes.rst b/cuda_python/docs/source/release/12.9.4-notes.rst index 3ca7d7acdfd..ea335297a43 100644 --- a/cuda_python/docs/source/release/12.9.4-notes.rst +++ b/cuda_python/docs/source/release/12.9.4-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.9.4 Release notes ================================ diff --git a/cuda_python/docs/source/release/12.9.5-notes.rst b/cuda_python/docs/source/release/12.9.5-notes.rst index aac1dfa7929..adf561bd767 100644 --- a/cuda_python/docs/source/release/12.9.5-notes.rst +++ b/cuda_python/docs/source/release/12.9.5-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.9.5 Release notes ================================ diff --git a/cuda_python/docs/source/release/12.9.6-notes.rst b/cuda_python/docs/source/release/12.9.6-notes.rst index b66e1e9ad50..5344adaf053 100644 --- a/cuda_python/docs/source/release/12.9.6-notes.rst +++ b/cuda_python/docs/source/release/12.9.6-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.9.6 Release notes ================================ diff --git a/cuda_python/docs/source/release/12.9.7-notes.rst b/cuda_python/docs/source/release/12.9.7-notes.rst index 71e0d2630ef..91a0e15cabb 100644 --- a/cuda_python/docs/source/release/12.9.7-notes.rst +++ b/cuda_python/docs/source/release/12.9.7-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 12.9.7 Release notes ================================ diff --git a/cuda_python/docs/source/release/13.0.0-notes.rst b/cuda_python/docs/source/release/13.0.0-notes.rst index e89534bc939..2b9ffcd3deb 100644 --- a/cuda_python/docs/source/release/13.0.0-notes.rst +++ b/cuda_python/docs/source/release/13.0.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 13.0.0 Release notes ================================ diff --git a/cuda_python/docs/source/release/13.0.1-notes.rst b/cuda_python/docs/source/release/13.0.1-notes.rst index bda13e9c6d2..b1a448c80a5 100644 --- a/cuda_python/docs/source/release/13.0.1-notes.rst +++ b/cuda_python/docs/source/release/13.0.1-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 13.0.1 Release notes ================================ diff --git a/cuda_python/docs/source/release/13.0.2-notes.rst b/cuda_python/docs/source/release/13.0.2-notes.rst index d70726fd3e6..b241dc44d41 100644 --- a/cuda_python/docs/source/release/13.0.2-notes.rst +++ b/cuda_python/docs/source/release/13.0.2-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 13.0.2 Release notes ================================ diff --git a/cuda_python/docs/source/release/13.0.3-notes.rst b/cuda_python/docs/source/release/13.0.3-notes.rst index 3be94d5b130..4a468419941 100644 --- a/cuda_python/docs/source/release/13.0.3-notes.rst +++ b/cuda_python/docs/source/release/13.0.3-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 13.0.3 Release notes ================================ diff --git a/cuda_python/docs/source/release/13.1.0-notes.rst b/cuda_python/docs/source/release/13.1.0-notes.rst index beacd818e2a..33786bc5651 100644 --- a/cuda_python/docs/source/release/13.1.0-notes.rst +++ b/cuda_python/docs/source/release/13.1.0-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 13.1.0 Release notes ================================ diff --git a/cuda_python/docs/source/release/13.1.1-notes.rst b/cuda_python/docs/source/release/13.1.1-notes.rst index 9c0fdebaadb..47c2d5e6af5 100644 --- a/cuda_python/docs/source/release/13.1.1-notes.rst +++ b/cuda_python/docs/source/release/13.1.1-notes.rst @@ -1,5 +1,5 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 13.1.1 Release notes ================================ diff --git a/cuda_python/docs/source/release/13.2.0-notes.rst b/cuda_python/docs/source/release/13.2.0-notes.rst index a0bb3193ab0..13864351176 100644 --- a/cuda_python/docs/source/release/13.2.0-notes.rst +++ b/cuda_python/docs/source/release/13.2.0-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 13.2.0 Release notes ================================ diff --git a/cuda_python/docs/source/release/13.3.0-notes.rst b/cuda_python/docs/source/release/13.3.0-notes.rst index 38d35283b8a..4512bac7c2e 100644 --- a/cuda_python/docs/source/release/13.3.0-notes.rst +++ b/cuda_python/docs/source/release/13.3.0-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 13.3.0 Release notes ================================ diff --git a/cuda_python/docs/source/release/13.3.1-notes.rst b/cuda_python/docs/source/release/13.3.1-notes.rst index 789ae0ad0f7..77cd927df4d 100644 --- a/cuda_python/docs/source/release/13.3.1-notes.rst +++ b/cuda_python/docs/source/release/13.3.1-notes.rst @@ -1,5 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. SPDX-License-Identifier: Apache-2.0 CUDA Python 13.3.1 Release notes ================================ diff --git a/cuda_python/pyproject.toml b/cuda_python/pyproject.toml index 90bba866eec..a14e68a1a1a 100644 --- a/cuda_python/pyproject.toml +++ b/cuda_python/pyproject.toml @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 [build-system] requires = ["setuptools>=80.0.0", "setuptools-scm[simple]>=8,!=10.1"] @@ -11,7 +11,8 @@ name = "cuda-python" description = "CUDA Python: Performance meets Productivity" readme = {file = "DESCRIPTION.rst", content-type = "text/x-rst"} authors = [{name = "NVIDIA Corporation", email = "cuda-python-conduct@nvidia.com"},] -license = "LicenseRef-NVIDIA-SOFTWARE-LICENSE" +license = "Apache-2.0" +license-files = ["LICENSE"] classifiers = [ "Operating System :: POSIX :: Linux", "Operating System :: Microsoft :: Windows", diff --git a/cuda_python/setup.py b/cuda_python/setup.py index fe02ec64991..dad8a596c95 100644 --- a/cuda_python/setup.py +++ b/cuda_python/setup.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 import ast diff --git a/toolshed/check_spdx.py b/toolshed/check_spdx.py index e119eaa4795..7086b25240d 100644 --- a/toolshed/check_spdx.py +++ b/toolshed/check_spdx.py @@ -26,21 +26,17 @@ ".github": "Apache-2.0", "benchmarks": "Apache-2.0", "ci": "Apache-2.0", - "cuda_bindings": "LicenseRef-NVIDIA-SOFTWARE-LICENSE", + "cuda_bindings": "Apache-2.0", "cuda_core": "Apache-2.0", "cuda_pathfinder": "Apache-2.0", - "cuda_python": "LicenseRef-NVIDIA-SOFTWARE-LICENSE", + "cuda_python": "Apache-2.0", "cuda_python_test_helpers": "Apache-2.0", "qa": "LicenseRef-NVIDIA-SOFTWARE-LICENSE", "scripts": "Apache-2.0", "toolshed": "Apache-2.0", } -SPECIAL_CASE_LICENSE_IDENTIFIERS = { - # key: repo-relative path or glob, value: expected SPDX license identifier - "cuda_bindings/benchmarks/*": "Apache-2.0", - "cuda_bindings/benchmarks/pytest-legacy/*": "LicenseRef-NVIDIA-SOFTWARE-LICENSE", -} +SPECIAL_CASE_LICENSE_IDENTIFIERS = {} SPDX_IGNORE_FILENAME = ".spdx-ignore" diff --git a/toolshed/sync_licenses.py b/toolshed/sync_licenses.py new file mode 100644 index 00000000000..8234c85f886 --- /dev/null +++ b/toolshed/sync_licenses.py @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import argparse +import sys +from pathlib import Path + +PACKAGE_LICENSES = ( + Path("cuda_bindings/LICENSE"), + Path("cuda_core/LICENSE"), + Path("cuda_pathfinder/LICENSE"), + Path("cuda_python/LICENSE"), +) + + +def sync_licenses(root: Path, fix: bool) -> int: + canonical_path = root / "LICENSE" + canonical = canonical_path.read_bytes() + mismatches = [relative for relative in PACKAGE_LICENSES if (root / relative).read_bytes() != canonical] + + if not mismatches: + return 0 + + if fix: + for relative in mismatches: + (root / relative).write_bytes(canonical) + print(f"Updated {relative} from LICENSE") + return 0 + + for relative in mismatches: + print(f"Package license differs from LICENSE: {relative}", file=sys.stderr) + print("Run toolshed/sync_licenses.py --fix to update package copies.", file=sys.stderr) + return 1 + + +def main() -> int: + parser = argparse.ArgumentParser(description="Check package license files against the canonical root LICENSE.") + parser.add_argument("--fix", action="store_true", help="replace mismatched package copies") + args = parser.parse_args() + + root = Path(__file__).resolve().parents[1] + return sync_licenses(root, args.fix) + + +if __name__ == "__main__": + raise SystemExit(main()) From 5b0c0eedd4b534a0d39ea5e4664e33fa447f7e61 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Thu, 2 Jul 2026 09:27:08 -0400 Subject: [PATCH 02/22] Address relicensing review feedback Signed-off-by: Keith Kraus --- .pre-commit-config.yaml | 7 ------ toolshed/check_spdx.py | 11 ---------- toolshed/sync_licenses.py | 46 --------------------------------------- 3 files changed, 64 deletions(-) delete mode 100644 toolshed/sync_licenses.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1cd20a031e0..f8d2a2731ed 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,13 +35,6 @@ repos: exclude: '(.*pixi\.lock)|(\.git_archival\.txt)|(.*\.patch$)|(^cuda_core/cuda/core/_vendored/)' args: ["--fix"] - - id: check-license-copies - name: Check Package License Copies - entry: python ./toolshed/sync_licenses.py - language: system - pass_filenames: false - always_run: true - - id: no-markdown-in-docs-source name: Prevent markdown files in docs/source directories entry: bash -c diff --git a/toolshed/check_spdx.py b/toolshed/check_spdx.py index 7086b25240d..a2d0c041546 100644 --- a/toolshed/check_spdx.py +++ b/toolshed/check_spdx.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 import datetime -import fnmatch import os import re import subprocess @@ -36,8 +35,6 @@ "toolshed": "Apache-2.0", } -SPECIAL_CASE_LICENSE_IDENTIFIERS = {} - SPDX_IGNORE_FILENAME = ".spdx-ignore" @@ -85,14 +82,6 @@ def get_top_level_directory(normalized_path): def get_expected_license_identifier(filepath): normalized_path = normalize_repo_path(filepath) - matching_special_cases = [ - (prefix, license_identifier) - for prefix, license_identifier in SPECIAL_CASE_LICENSE_IDENTIFIERS.items() - if fnmatch.fnmatchcase(normalized_path, prefix) - ] - if matching_special_cases: - return max(matching_special_cases, key=lambda item: len(item[0]))[1], None - top_level_directory = get_top_level_directory(normalized_path) if top_level_directory is None: return TOP_LEVEL_FILE_LICENSE_IDENTIFIER, None diff --git a/toolshed/sync_licenses.py b/toolshed/sync_licenses.py deleted file mode 100644 index 8234c85f886..00000000000 --- a/toolshed/sync_licenses.py +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -import argparse -import sys -from pathlib import Path - -PACKAGE_LICENSES = ( - Path("cuda_bindings/LICENSE"), - Path("cuda_core/LICENSE"), - Path("cuda_pathfinder/LICENSE"), - Path("cuda_python/LICENSE"), -) - - -def sync_licenses(root: Path, fix: bool) -> int: - canonical_path = root / "LICENSE" - canonical = canonical_path.read_bytes() - mismatches = [relative for relative in PACKAGE_LICENSES if (root / relative).read_bytes() != canonical] - - if not mismatches: - return 0 - - if fix: - for relative in mismatches: - (root / relative).write_bytes(canonical) - print(f"Updated {relative} from LICENSE") - return 0 - - for relative in mismatches: - print(f"Package license differs from LICENSE: {relative}", file=sys.stderr) - print("Run toolshed/sync_licenses.py --fix to update package copies.", file=sys.stderr) - return 1 - - -def main() -> int: - parser = argparse.ArgumentParser(description="Check package license files against the canonical root LICENSE.") - parser.add_argument("--fix", action="store_true", help="replace mismatched package copies") - args = parser.parse_args() - - root = Path(__file__).resolve().parents[1] - return sync_licenses(root, args.fix) - - -if __name__ == "__main__": - raise SystemExit(main()) From 8836421fea62f64b1cbfc572f6001bda8e6075e5 Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Thu, 2 Jul 2026 13:51:49 -0400 Subject: [PATCH 03/22] Address copyright and lockfile review feedback Signed-off-by: Keith Kraus --- benchmarks/cuda_bindings/pixi.lock | 2 +- cuda_bindings/docs/source/conf.py | 2 +- cuda_bindings/examples/0_Introduction/clock_nvrtc.py | 2 +- .../0_Introduction/simple_cubemap_texture.py | 2 +- cuda_bindings/examples/0_Introduction/simple_p2p.py | 2 +- .../examples/0_Introduction/simple_zero_copy.py | 2 +- .../examples/0_Introduction/system_wide_atomics.py | 2 +- .../examples/0_Introduction/vector_add_drv.py | 2 +- .../examples/0_Introduction/vector_add_mmap.py | 2 +- .../stream_ordered_allocation.py | 2 +- .../3_CUDA_Features/global_to_shmem_async_copy.py | 2 +- .../examples/3_CUDA_Features/simple_cuda_graphs.py | 2 +- .../conjugate_gradient_multi_block_cg.py | 2 +- cuda_bindings/examples/extra/iso_fd_modelling.py | 2 +- cuda_bindings/examples/extra/jit_program.py | 2 +- cuda_bindings/pixi.lock | 12 ++++++------ cuda_core/pixi.lock | 6 +++--- cuda_pathfinder/LICENSE | 2 +- cuda_python/docs/source/conf.py | 2 +- 19 files changed, 26 insertions(+), 26 deletions(-) diff --git a/benchmarks/cuda_bindings/pixi.lock b/benchmarks/cuda_bindings/pixi.lock index c571d4756cf..8f754621bd2 100644 --- a/benchmarks/cuda_bindings/pixi.lock +++ b/benchmarks/cuda_bindings/pixi.lock @@ -428,7 +428,7 @@ packages: - libgcc >=15 - libstdcxx >=15 - python_abi 3.14.* *_cp314 - license: LicenseRef-NVIDIA-SOFTWARE-LICENSE + license: Apache-2.0 sources: cuda-pathfinder: path: ../cuda_pathfinder diff --git a/cuda_bindings/docs/source/conf.py b/cuda_bindings/docs/source/conf.py index b37dc2be03f..8a7e15d1be0 100644 --- a/cuda_bindings/docs/source/conf.py +++ b/cuda_bindings/docs/source/conf.py @@ -19,7 +19,7 @@ # -- Project information ----------------------------------------------------- project = "cuda.bindings" -copyright = "2021-2025, NVIDIA" +copyright = "2021-2026, NVIDIA" author = "NVIDIA" # The full version, including alpha/beta/rc tags diff --git a/cuda_bindings/examples/0_Introduction/clock_nvrtc.py b/cuda_bindings/examples/0_Introduction/clock_nvrtc.py index dcaef40be66..14572469e79 100644 --- a/cuda_bindings/examples/0_Introduction/clock_nvrtc.py +++ b/cuda_bindings/examples/0_Introduction/clock_nvrtc.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/0_Introduction/simple_cubemap_texture.py b/cuda_bindings/examples/0_Introduction/simple_cubemap_texture.py index 33c0fe01de1..cad35990e91 100644 --- a/cuda_bindings/examples/0_Introduction/simple_cubemap_texture.py +++ b/cuda_bindings/examples/0_Introduction/simple_cubemap_texture.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/0_Introduction/simple_p2p.py b/cuda_bindings/examples/0_Introduction/simple_p2p.py index b1dc60a305c..0c6700bc8df 100644 --- a/cuda_bindings/examples/0_Introduction/simple_p2p.py +++ b/cuda_bindings/examples/0_Introduction/simple_p2p.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/0_Introduction/simple_zero_copy.py b/cuda_bindings/examples/0_Introduction/simple_zero_copy.py index 36660fe5e62..72c5fe8b701 100644 --- a/cuda_bindings/examples/0_Introduction/simple_zero_copy.py +++ b/cuda_bindings/examples/0_Introduction/simple_zero_copy.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/0_Introduction/system_wide_atomics.py b/cuda_bindings/examples/0_Introduction/system_wide_atomics.py index 1ccfaedae29..fde3e67ad8f 100644 --- a/cuda_bindings/examples/0_Introduction/system_wide_atomics.py +++ b/cuda_bindings/examples/0_Introduction/system_wide_atomics.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/0_Introduction/vector_add_drv.py b/cuda_bindings/examples/0_Introduction/vector_add_drv.py index e87ac53890a..d2356c0d3a1 100644 --- a/cuda_bindings/examples/0_Introduction/vector_add_drv.py +++ b/cuda_bindings/examples/0_Introduction/vector_add_drv.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/0_Introduction/vector_add_mmap.py b/cuda_bindings/examples/0_Introduction/vector_add_mmap.py index 43bf647b983..9faa45bedb8 100644 --- a/cuda_bindings/examples/0_Introduction/vector_add_mmap.py +++ b/cuda_bindings/examples/0_Introduction/vector_add_mmap.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/2_Concepts_and_Techniques/stream_ordered_allocation.py b/cuda_bindings/examples/2_Concepts_and_Techniques/stream_ordered_allocation.py index c302ed3ba75..b45f11f317b 100644 --- a/cuda_bindings/examples/2_Concepts_and_Techniques/stream_ordered_allocation.py +++ b/cuda_bindings/examples/2_Concepts_and_Techniques/stream_ordered_allocation.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/3_CUDA_Features/global_to_shmem_async_copy.py b/cuda_bindings/examples/3_CUDA_Features/global_to_shmem_async_copy.py index 1ccff40d97e..9a2ec3dec3b 100644 --- a/cuda_bindings/examples/3_CUDA_Features/global_to_shmem_async_copy.py +++ b/cuda_bindings/examples/3_CUDA_Features/global_to_shmem_async_copy.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/3_CUDA_Features/simple_cuda_graphs.py b/cuda_bindings/examples/3_CUDA_Features/simple_cuda_graphs.py index 3c635cb4e8c..317a774d5df 100644 --- a/cuda_bindings/examples/3_CUDA_Features/simple_cuda_graphs.py +++ b/cuda_bindings/examples/3_CUDA_Features/simple_cuda_graphs.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/4_CUDA_Libraries/conjugate_gradient_multi_block_cg.py b/cuda_bindings/examples/4_CUDA_Libraries/conjugate_gradient_multi_block_cg.py index 91bb9ede6b1..83d359b1e93 100644 --- a/cuda_bindings/examples/4_CUDA_Libraries/conjugate_gradient_multi_block_cg.py +++ b/cuda_bindings/examples/4_CUDA_Libraries/conjugate_gradient_multi_block_cg.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/extra/iso_fd_modelling.py b/cuda_bindings/examples/extra/iso_fd_modelling.py index 13afcdffb33..9fe9432862c 100644 --- a/cuda_bindings/examples/extra/iso_fd_modelling.py +++ b/cuda_bindings/examples/extra/iso_fd_modelling.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/examples/extra/jit_program.py b/cuda_bindings/examples/extra/jit_program.py index 434c6142215..7f55b2243ed 100644 --- a/cuda_bindings/examples/extra/jit_program.py +++ b/cuda_bindings/examples/extra/jit_program.py @@ -1,4 +1,4 @@ -# Copyright 2021-2025 NVIDIA Corporation. All rights reserved. +# Copyright 2021-2026 NVIDIA Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # ################################################################################ diff --git a/cuda_bindings/pixi.lock b/cuda_bindings/pixi.lock index 172e4d52203..b3493db3209 100644 --- a/cuda_bindings/pixi.lock +++ b/cuda_bindings/pixi.lock @@ -3032,7 +3032,7 @@ packages: - libgcc >=15 - libstdcxx >=15 - python_abi 3.14.* *_cp314 - license: LicenseRef-NVIDIA-SOFTWARE-LICENSE + license: Apache-2.0 sources: cuda-pathfinder: path: ../cuda_pathfinder @@ -3060,7 +3060,7 @@ packages: - vc14_runtime >=14.44.35208 - ucrt >=10.0.20348.0 - python_abi 3.14.* *_cp314 - license: LicenseRef-NVIDIA-SOFTWARE-LICENSE + license: Apache-2.0 sources: cuda-pathfinder: path: ../cuda_pathfinder @@ -3088,7 +3088,7 @@ packages: - libgcc >=15 - libstdcxx >=15 - python_abi 3.14.* *_cp314 - license: LicenseRef-NVIDIA-SOFTWARE-LICENSE + license: Apache-2.0 sources: cuda-pathfinder: path: ../cuda_pathfinder @@ -3116,7 +3116,7 @@ packages: - libgcc >=15 - libstdcxx >=15 - python_abi 3.14.* *_cp314 - license: LicenseRef-NVIDIA-SOFTWARE-LICENSE + license: Apache-2.0 sources: cuda-pathfinder: path: ../cuda_pathfinder @@ -3144,7 +3144,7 @@ packages: - vc14_runtime >=14.44.35208 - ucrt >=10.0.20348.0 - python_abi 3.14.* *_cp314 - license: LicenseRef-NVIDIA-SOFTWARE-LICENSE + license: Apache-2.0 sources: cuda-pathfinder: path: ../cuda_pathfinder @@ -3172,7 +3172,7 @@ packages: - libgcc >=15 - libstdcxx >=15 - python_abi 3.14.* *_cp314 - license: LicenseRef-NVIDIA-SOFTWARE-LICENSE + license: Apache-2.0 sources: cuda-pathfinder: path: ../cuda_pathfinder diff --git a/cuda_core/pixi.lock b/cuda_core/pixi.lock index a04cdde0b6d..5df65d0d2a6 100644 --- a/cuda_core/pixi.lock +++ b/cuda_core/pixi.lock @@ -4494,7 +4494,7 @@ packages: - libgcc >=15 - libstdcxx >=15 - python_abi 3.14.* *_cp314 - license: LicenseRef-NVIDIA-SOFTWARE-LICENSE + license: Apache-2.0 sources: cuda-pathfinder: path: ../cuda_pathfinder @@ -4522,7 +4522,7 @@ packages: - libgcc >=15 - libstdcxx >=15 - python_abi 3.14.* *_cp314 - license: LicenseRef-NVIDIA-SOFTWARE-LICENSE + license: Apache-2.0 sources: cuda-pathfinder: path: ../cuda_pathfinder @@ -4550,7 +4550,7 @@ packages: - vc14_runtime >=14.44.35208 - ucrt >=10.0.20348.0 - python_abi 3.14.* *_cp314 - license: LicenseRef-NVIDIA-SOFTWARE-LICENSE + license: Apache-2.0 sources: cuda-pathfinder: path: ../cuda_pathfinder diff --git a/cuda_pathfinder/LICENSE b/cuda_pathfinder/LICENSE index d6f74778be8..a4baaa2d3fa 100644 --- a/cuda_pathfinder/LICENSE +++ b/cuda_pathfinder/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. Apache License Version 2.0, January 2004 diff --git a/cuda_python/docs/source/conf.py b/cuda_python/docs/source/conf.py index 2a0baf0e1d7..f7b447f9dac 100644 --- a/cuda_python/docs/source/conf.py +++ b/cuda_python/docs/source/conf.py @@ -19,7 +19,7 @@ # -- Project information ----------------------------------------------------- project = "CUDA Python" -copyright = "2021-2024, NVIDIA" +copyright = "2021-2026, NVIDIA" author = "NVIDIA" # The full version, including alpha/beta/rc tags From 3a641e5786cb360d7a25d368aea234fe312d989d Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 2 Jul 2026 16:57:32 -0700 Subject: [PATCH 04/22] run_cybind_cython_gen 13.3.0 ../cuda-python --- .../cuda/bindings/_internal/driver.pxd | 5 +- .../cuda/bindings/_internal/driver_linux.pyx | 53 +++- .../bindings/_internal/driver_windows.pyx | 53 +++- cuda_bindings/cuda/bindings/cydriver.pxd | 15 +- cuda_bindings/cuda/bindings/cydriver.pyx | 14 +- cuda_bindings/cuda/bindings/runtime.pyx.in | 5 +- cuda_bindings/docs/source/module/driver.rst | 286 +++++++++++++----- cuda_bindings/docs/source/module/runtime.rst | 240 +++++++++------ 8 files changed, 481 insertions(+), 190 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_internal/driver.pxd b/cuda_bindings/cuda/bindings/_internal/driver.pxd index f94dc3efb13..dd221d2598d 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver.pxd +++ b/cuda_bindings/cuda/bindings/_internal/driver.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from ..cydriver cimport * @@ -36,6 +36,8 @@ cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil @@ -224,6 +226,7 @@ cdef CUresult _cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, con cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil diff --git a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx index a44cb651767..26d88842946 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1738+g1060a290f. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t @@ -85,6 +85,8 @@ cdef void* __cuDevicePrimaryCtxRelease_v2 = NULL cdef void* __cuDevicePrimaryCtxSetFlags_v2 = NULL cdef void* __cuDevicePrimaryCtxGetState = NULL cdef void* __cuDevicePrimaryCtxReset_v2 = NULL +cdef void* __cuCtxCreate_v2 = NULL +cdef void* __cuCtxCreate_v3 = NULL cdef void* __cuCtxCreate_v4 = NULL cdef void* __cuCtxDestroy_v2 = NULL cdef void* __cuCtxPushCurrent_v2 = NULL @@ -273,6 +275,7 @@ cdef void* __cuStreamBeginCaptureToGraph = NULL cdef void* __cuThreadExchangeStreamCaptureMode = NULL cdef void* __cuStreamEndCapture = NULL cdef void* __cuStreamIsCapturing = NULL +cdef void* __cuStreamGetCaptureInfo_v2 = NULL cdef void* __cuStreamGetCaptureInfo_v3 = NULL cdef void* __cuStreamUpdateCaptureDependencies_v2 = NULL cdef void* __cuStreamAttachMemAsync = NULL @@ -689,6 +692,12 @@ cdef int _init_driver() except -1 nogil: global __cuDevicePrimaryCtxReset_v2 _F_cuGetProcAddress_v2('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, ptds_mode, NULL) + global __cuCtxCreate_v2 + _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v2, 3020, ptds_mode, NULL) + + global __cuCtxCreate_v3 + _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v3, 11040, ptds_mode, NULL) + global __cuCtxCreate_v4 _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v4, 12050, ptds_mode, NULL) @@ -1253,6 +1262,9 @@ cdef int _init_driver() except -1 nogil: global __cuStreamIsCapturing _F_cuGetProcAddress_v2('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, ptds_mode, NULL) + global __cuStreamGetCaptureInfo_v2 + _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, ptds_mode, NULL) + global __cuStreamGetCaptureInfo_v3 _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, ptds_mode, NULL) @@ -2252,6 +2264,12 @@ cpdef dict _inspect_function_pointers(): global __cuDevicePrimaryCtxReset_v2 data["__cuDevicePrimaryCtxReset_v2"] = __cuDevicePrimaryCtxReset_v2 + global __cuCtxCreate_v2 + data["__cuCtxCreate_v2"] = __cuCtxCreate_v2 + + global __cuCtxCreate_v3 + data["__cuCtxCreate_v3"] = __cuCtxCreate_v3 + global __cuCtxCreate_v4 data["__cuCtxCreate_v4"] = __cuCtxCreate_v4 @@ -2816,6 +2834,9 @@ cpdef dict _inspect_function_pointers(): global __cuStreamIsCapturing data["__cuStreamIsCapturing"] = __cuStreamIsCapturing + global __cuStreamGetCaptureInfo_v2 + data["__cuStreamGetCaptureInfo_v2"] = __cuStreamGetCaptureInfo_v2 + global __cuStreamGetCaptureInfo_v3 data["__cuStreamGetCaptureInfo_v3"] = __cuStreamGetCaptureInfo_v3 @@ -3984,6 +4005,26 @@ cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_F dev) +cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxCreate_v2 + _check_or_init_driver() + if __cuCtxCreate_v2 == NULL: + with gil: + raise FunctionNotFoundError("function cuCtxCreate_v2 is not found") + return (__cuCtxCreate_v2)( + pctx, flags, dev) + + +cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxCreate_v3 + _check_or_init_driver() + if __cuCtxCreate_v3 == NULL: + with gil: + raise FunctionNotFoundError("function cuCtxCreate_v3 is not found") + return (__cuCtxCreate_v3)( + pctx, paramsArray, numParams, flags, dev) + + cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxCreate_v4 _check_or_init_driver() @@ -5864,6 +5905,16 @@ cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* capt hStream, captureStatus) +cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetCaptureInfo_v2 + _check_or_init_driver() + if __cuStreamGetCaptureInfo_v2 == NULL: + with gil: + raise FunctionNotFoundError("function cuStreamGetCaptureInfo_v2 is not found") + return (__cuStreamGetCaptureInfo_v2)( + hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + + cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetCaptureInfo_v3 _check_or_init_driver() diff --git a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx index 6dd21f0d6df..e199aa78ffb 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from libc.stdint cimport intptr_t @@ -103,6 +103,8 @@ cdef void* __cuDevicePrimaryCtxRelease_v2 = NULL cdef void* __cuDevicePrimaryCtxSetFlags_v2 = NULL cdef void* __cuDevicePrimaryCtxGetState = NULL cdef void* __cuDevicePrimaryCtxReset_v2 = NULL +cdef void* __cuCtxCreate_v2 = NULL +cdef void* __cuCtxCreate_v3 = NULL cdef void* __cuCtxCreate_v4 = NULL cdef void* __cuCtxDestroy_v2 = NULL cdef void* __cuCtxPushCurrent_v2 = NULL @@ -291,6 +293,7 @@ cdef void* __cuStreamBeginCaptureToGraph = NULL cdef void* __cuThreadExchangeStreamCaptureMode = NULL cdef void* __cuStreamEndCapture = NULL cdef void* __cuStreamIsCapturing = NULL +cdef void* __cuStreamGetCaptureInfo_v2 = NULL cdef void* __cuStreamGetCaptureInfo_v3 = NULL cdef void* __cuStreamUpdateCaptureDependencies_v2 = NULL cdef void* __cuStreamAttachMemAsync = NULL @@ -707,6 +710,12 @@ cdef int _init_driver() except -1 nogil: global __cuDevicePrimaryCtxReset_v2 _F_cuGetProcAddress_v2('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, ptds_mode, NULL) + global __cuCtxCreate_v2 + _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v2, 3020, ptds_mode, NULL) + + global __cuCtxCreate_v3 + _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v3, 11040, ptds_mode, NULL) + global __cuCtxCreate_v4 _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v4, 12050, ptds_mode, NULL) @@ -1271,6 +1280,9 @@ cdef int _init_driver() except -1 nogil: global __cuStreamIsCapturing _F_cuGetProcAddress_v2('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, ptds_mode, NULL) + global __cuStreamGetCaptureInfo_v2 + _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, ptds_mode, NULL) + global __cuStreamGetCaptureInfo_v3 _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, ptds_mode, NULL) @@ -2270,6 +2282,12 @@ cpdef dict _inspect_function_pointers(): global __cuDevicePrimaryCtxReset_v2 data["__cuDevicePrimaryCtxReset_v2"] = __cuDevicePrimaryCtxReset_v2 + global __cuCtxCreate_v2 + data["__cuCtxCreate_v2"] = __cuCtxCreate_v2 + + global __cuCtxCreate_v3 + data["__cuCtxCreate_v3"] = __cuCtxCreate_v3 + global __cuCtxCreate_v4 data["__cuCtxCreate_v4"] = __cuCtxCreate_v4 @@ -2834,6 +2852,9 @@ cpdef dict _inspect_function_pointers(): global __cuStreamIsCapturing data["__cuStreamIsCapturing"] = __cuStreamIsCapturing + global __cuStreamGetCaptureInfo_v2 + data["__cuStreamGetCaptureInfo_v2"] = __cuStreamGetCaptureInfo_v2 + global __cuStreamGetCaptureInfo_v3 data["__cuStreamGetCaptureInfo_v3"] = __cuStreamGetCaptureInfo_v3 @@ -4002,6 +4023,26 @@ cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_F dev) +cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxCreate_v2 + _check_or_init_driver() + if __cuCtxCreate_v2 == NULL: + with gil: + raise FunctionNotFoundError("function cuCtxCreate_v2 is not found") + return (__cuCtxCreate_v2)( + pctx, flags, dev) + + +cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxCreate_v3 + _check_or_init_driver() + if __cuCtxCreate_v3 == NULL: + with gil: + raise FunctionNotFoundError("function cuCtxCreate_v3 is not found") + return (__cuCtxCreate_v3)( + pctx, paramsArray, numParams, flags, dev) + + cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuCtxCreate_v4 _check_or_init_driver() @@ -5882,6 +5923,16 @@ cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* capt hStream, captureStatus) +cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetCaptureInfo_v2 + _check_or_init_driver() + if __cuStreamGetCaptureInfo_v2 == NULL: + with gil: + raise FunctionNotFoundError("function cuStreamGetCaptureInfo_v2 is not found") + return (__cuStreamGetCaptureInfo_v2)( + hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + + cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: global __cuStreamGetCaptureInfo_v3 _check_or_init_driver() diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd b/cuda_bindings/cuda/bindings/cydriver.pxd index 722c1189c17..29819407112 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd +++ b/cuda_bindings/cuda/bindings/cydriver.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1738+g1060a290f. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t @@ -1595,6 +1595,7 @@ cdef extern from 'cuda.h': CU_GRAPH_RECAPTURE_ERROR ctypedef CUgraphRecaptureStatus_enum CUgraphRecaptureStatus cdef enum: _CURESULT_INTERNAL_LOADING_ERROR = CUresult.CUDA_ERROR_NOT_FOUND +cdef enum: CUDA_VERSION = 13030 # TYPES @@ -3138,6 +3139,8 @@ cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) except ?CUDA_ERROR_NOT_FOU cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuCtxCreate(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuCtxDestroy(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuCtxPushCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil @@ -3326,6 +3329,7 @@ cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, cons cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil @@ -3629,13 +3633,8 @@ cdef CUresult cuLogicalEndpointQuery(CUlogicalEndpointId leId, cuuint32_t count, cdef CUresult cuStreamBeginRecaptureToGraph(CUstream hStream, CUstreamCaptureMode mode, CUgraph hGraph, CUgraphRecaptureCallback callbackFunc, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil -# cdef extern from "cuda.h": -# ctypedef CUdevSmResourceSplit_flags CUdevSmResourceSplitByCount_flags - # TODO: Extract these defines somehow? -cdef enum: CUDA_VERSION = 13020 - cdef enum: CU_IPC_HANDLE_SIZE = 64 cdef enum: CU_STREAM_LEGACY = 1 @@ -3777,3 +3776,7 @@ cdef enum: CU_DEVICE_INVALID = -2 cdef enum: MAX_PLANES = 3 cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 + +cdef enum: RESOURCE_ABI_VERSION = 1 + +cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 42 diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx b/cuda_bindings/cuda/bindings/cydriver.pyx index 8f212d96337..b558e3afd7f 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx +++ b/cuda_bindings/cuda/bindings/cydriver.pyx @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from ._internal cimport driver as _driver @@ -106,6 +106,14 @@ cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND return _driver._cuDevicePrimaryCtxReset_v2(dev) +cdef CUresult cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return _driver._cuCtxCreate_v2(pctx, flags, dev) + + +cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return _driver._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev) + + cdef CUresult cuCtxCreate(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: return _driver._cuCtxCreate_v4(pctx, ctxCreateParams, flags, dev) @@ -858,6 +866,10 @@ cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captu return _driver._cuStreamIsCapturing(hStream, captureStatus) +cdef CUresult cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return _driver._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + + cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: return _driver._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index fb6d32ae2ca..8654e52fea4 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from typing import Any, Optional import cython import ctypes @@ -137,7 +137,6 @@ cudaDeviceScheduleYield = cyruntime.cudaDeviceScheduleYield cudaDeviceScheduleBlockingSync = cyruntime.cudaDeviceScheduleBlockingSync #: Device flag - Use blocking synchronization -#: #: [Deprecated] cudaDeviceBlockingSync = cyruntime.cudaDeviceBlockingSync @@ -3883,7 +3882,7 @@ class cudaFuncCache(_FastEnum): class cudaSharedMemConfig(_FastEnum): """ - CUDA shared memory configuration [Deprecated] + CUDA shared memory configuration [Deprecated] """ {{if 'cudaSharedMemBankSizeDefault' in found_values}} cudaSharedMemBankSizeDefault = cyruntime.cudaSharedMemConfig.cudaSharedMemBankSizeDefault{{endif}} diff --git a/cuda_bindings/docs/source/module/driver.rst b/cuda_bindings/docs/source/module/driver.rst index 62493663fe2..4f3df8fbf38 100644 --- a/cuda_bindings/docs/source/module/driver.rst +++ b/cuda_bindings/docs/source/module/driver.rst @@ -146,7 +146,9 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUctx_flags.CU_CTX_BLOCKING_SYNC - Set blocking synchronization as default scheduling [Deprecated] + Set blocking synchronization as default scheduling + + [Deprecated] .. autoattribute:: cuda.bindings.driver.CUctx_flags.CU_CTX_SCHED_MASK @@ -406,25 +408,25 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUstreamWaitValue_flags.CU_STREAM_WAIT_VALUE_GEQ - Wait until (int32_t)(*addr - value) >= 0 (or int64_t for 64 bit values). Note this is a cyclic comparison which ignores wraparound. (Default behavior.) + Wait until (int32_t)(\*addr - value) >= 0 (or int64_t for 64 bit values). Note this is a cyclic comparison which ignores wraparound. (Default behavior.) .. autoattribute:: cuda.bindings.driver.CUstreamWaitValue_flags.CU_STREAM_WAIT_VALUE_EQ - Wait until *addr == value. + Wait until \*addr == value. .. autoattribute:: cuda.bindings.driver.CUstreamWaitValue_flags.CU_STREAM_WAIT_VALUE_AND - Wait until (*addr & value) != 0. + Wait until (\*addr & value) != 0. .. autoattribute:: cuda.bindings.driver.CUstreamWaitValue_flags.CU_STREAM_WAIT_VALUE_NOR - Wait until ~(*addr | value) != 0. Support for this operation can be queried with :py:obj:`~.cuDeviceGetAttribute()` and :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR`. + Wait until ~(\*addr | value) != 0. Support for this operation can be queried with :py:obj:`~.cuDeviceGetAttribute()` and :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR`. .. autoattribute:: cuda.bindings.driver.CUstreamWaitValue_flags.CU_STREAM_WAIT_VALUE_FLUSH @@ -506,19 +508,19 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUstreamAtomicReductionOpType.CU_STREAM_ATOMIC_REDUCTION_OP_OR - Performs an atomic OR: *(address) = *(address) | value + Performs an atomic OR: \*(address) = \*(address) | value .. autoattribute:: cuda.bindings.driver.CUstreamAtomicReductionOpType.CU_STREAM_ATOMIC_REDUCTION_OP_AND - Performs an atomic AND: *(address) = *(address) & value + Performs an atomic AND: \*(address) = \*(address) & value .. autoattribute:: cuda.bindings.driver.CUstreamAtomicReductionOpType.CU_STREAM_ATOMIC_REDUCTION_OP_ADD - Performs an atomic ADD: *(address) = *(address) + value + Performs an atomic ADD: \*(address) = \*(address) + value .. autoclass:: cuda.bindings.driver.CUstreamAtomicReductionDataType @@ -2081,7 +2083,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUpointer_attribute.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE - Returns in `*data` a boolean that indicates whether the pointer points to memory that is capable to be used for hardware accelerated decompression. + Returns in ``*data`` a boolean that indicates whether the pointer points to memory that is capable to be used for hardware accelerated decompression. .. autoclass:: cuda.bindings.driver.CUfunction_attribute @@ -2118,13 +2120,13 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_PTX_VERSION - The PTX virtual architecture version for which the function was compiled. This value is the major PTX version * 10 + the minor PTX version, so a PTX version 1.3 function would return the value 13. Note that this may return the undefined value of 0 for cubins compiled prior to CUDA 3.0. + The PTX virtual architecture version for which the function was compiled. This value is the major PTX version \* 10 + the minor PTX version, so a PTX version 1.3 function would return the value 13. Note that this may return the undefined value of 0 for cubins compiled prior to CUDA 3.0. .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_BINARY_VERSION - The binary architecture version for which the function was compiled. This value is the major binary version * 10 + the minor binary version, so a binary version 1.3 function would return the value 13. Note that this will return a value of 10 for legacy cubins that do not have a properly-encoded binary architecture version. + The binary architecture version for which the function was compiled. This value is the major binary version \* 10 + the minor binary version, so a binary version 1.3 function would return the value 13. Note that this will return a value of 10 for legacy cubins that do not have a properly-encoded binary architecture version. .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_CACHE_MODE_CA @@ -2206,7 +2208,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE - The block scheduling policy of a function. The value type is CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy. See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + The block scheduling policy of a function. The value type is :py:obj:`~.CUclusterSchedulingPolicy` / cudaClusterSchedulingPolicy. See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_DEVICE_NODE_UPDATE_SUPPORTED @@ -2451,7 +2453,7 @@ Data types used by CUDA driver Pointer to a buffer in which to print any log messages that are informational in nature (the buffer size is specified via option :py:obj:`~.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES`) - Option type: char * + Option type: char \* Applies to: compiler and linker @@ -2473,7 +2475,7 @@ Data types used by CUDA driver Pointer to a buffer in which to print any log messages that reflect errors (the buffer size is specified via option :py:obj:`~.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES`) - Option type: char * + Option type: char \* Applies to: compiler and linker @@ -2523,7 +2525,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUjit_option.CU_JIT_FALLBACK_STRATEGY - Specifies choice of fallback strategy if matching cubin is not found. Choice is based on supplied :py:obj:`~.CUjit_fallback`. This option cannot be used with cuLink* APIs as the linker requires exact matches. + Specifies choice of fallback strategy if matching cubin is not found. Choice is based on supplied :py:obj:`~.CUjit_fallback`. This option cannot be used with cuLink\* APIs as the linker requires exact matches. Option type: unsigned int for enumerated type :py:obj:`~.CUjit_fallback` @@ -2597,7 +2599,7 @@ Data types used by CUDA driver It is illegal to register the same device symbol at multiple addresses. - Option type: const char ** + Option type: const char \*\* Applies to: dynamic linker only @@ -2609,7 +2611,7 @@ Data types used by CUDA driver Must contain :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_COUNT` entries. - Option type: void ** + Option type: void \*\* Applies to: dynamic linker only @@ -3240,7 +3242,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUgraphConditionalNodeType.CU_GRAPH_COND_TYPE_IF - Conditional 'if/else' Node. Body[0] executed if condition is non-zero. If `size` == 2, an optional ELSE graph is created and this is executed if the condition is zero. + Conditional 'if/else' Node. Body[0] executed if condition is non-zero. If ``size`` == 2, an optional ELSE graph is created and this is executed if the condition is zero. .. autoattribute:: cuda.bindings.driver.CUgraphConditionalNodeType.CU_GRAPH_COND_TYPE_WHILE @@ -3384,7 +3386,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUgraphDependencyType.CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC - This dependency type allows the downstream node to use `cudaGridDependencySynchronize()`. It may only be used between kernel nodes, and must be used with either the :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC` or :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER` outgoing port. + This dependency type allows the downstream node to use ``cudaGridDependencySynchronize()``. It may only be used between kernel nodes, and must be used with either the :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC` or :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER` outgoing port. .. autoclass:: cuda.bindings.driver.CUgraphInstantiateResult @@ -3583,7 +3585,7 @@ Data types used by CUDA driver Each type of cluster will have its enumeration / coordinate setup as if the grid consists solely of its type of cluster. For example, if the preferred substitute cluster dimensions double the regular cluster dimensions, there might be simultaneously a regular cluster indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and (3,0,0) and groups their blocks. - This attribute will only take effect when a regular cluster dimension has been specified. The preferred substitute cluster dimension must be an integer multiple greater than zero of the regular cluster dimension and must divide the grid. It must also be no more than `maxBlocksPerCluster`, if it is set in the kernel's `__launch_bounds__`. Otherwise it must be less than the maximum value the driver can support. Otherwise, setting this attribute to a value physically unable to fit on any particular device is permitted. + This attribute will only take effect when a regular cluster dimension has been specified. The preferred substitute cluster dimension must be an integer multiple greater than zero of the regular cluster dimension and must divide the grid. It must also be no more than ``maxBlocksPerCluster``, if it is set in the kernel's ``__launch_bounds__``. Otherwise it must be less than the maximum value the driver can support. Otherwise, setting this attribute to a value physically unable to fit on any particular device is permitted. .. autoattribute:: cuda.bindings.driver.CUlaunchAttributeID.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT @@ -3593,7 +3595,7 @@ Data types used by CUDA driver Nominally, the event is triggered once all blocks of the kernel have begun execution. Currently this is a best effort. If a kernel B has a launch completion dependency on a kernel A, B may wait until A is complete. Alternatively, blocks of B may begin before all blocks of A have begun, for example if B can claim execution resources unavailable to A (e.g. they run on different GPUs) or if B is a higher priority than A. Exercise caution if such an ordering inversion could lead to deadlock. - A launch completion event is nominally similar to a programmatic event with `triggerAtBlockStart` set except that it is not visible to `cudaGridDependencySynchronize()` and can be used with compute capability less than 9.0. + A launch completion event is nominally similar to a programmatic event with ``triggerAtBlockStart`` set except that it is not visible to ``cudaGridDependencySynchronize()`` and can be used with compute capability less than 9.0. The event supplied must not be an interprocess or interop event. The event must disable timing (i.e. must be created with the :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). @@ -3746,7 +3748,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUlibraryOption.CU_LIBRARY_BINARY_IS_PRESERVED - Specifes that the argument `code` passed to :py:obj:`~.cuLibraryLoadData()` will be preserved. Specifying this option will let the driver know that `code` can be accessed at any point until :py:obj:`~.cuLibraryUnload()`. The default behavior is for the driver to allocate and maintain its own copy of `code`. Note that this is only a memory usage optimization hint and the driver can choose to ignore it if required. Specifying this option with :py:obj:`~.cuLibraryLoadFromFile()` is invalid and will return :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + Specifes that the argument ``code`` passed to :py:obj:`~.cuLibraryLoadData()` will be preserved. Specifying this option will let the driver know that ``code`` can be accessed at any point until :py:obj:`~.cuLibraryUnload()`. The default behavior is for the driver to allocate and maintain its own copy of ``code``. Note that this is only a memory usage optimization hint and the driver can choose to ignore it if required. Specifying this option with :py:obj:`~.cuLibraryLoadFromFile()` is invalid and will return :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. .. autoattribute:: cuda.bindings.driver.CUlibraryOption.CU_LIBRARY_NUM_OPTIONS @@ -3858,7 +3860,9 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_CONTEXT_ALREADY_CURRENT - This indicated that the context being supplied as a parameter to the API call was already the active context. [Deprecated] + This indicated that the context being supplied as a parameter to the API call was already the active context. + + [Deprecated] .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_MAP_FAILED @@ -4890,7 +4894,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUmemAllocationHandleType.CU_MEM_HANDLE_TYPE_FABRIC - Allows a fabric handle to be used for exporting. (CUmemFabricHandle) + Allows a fabric handle to be used for exporting. (:py:obj:`~.CUmemFabricHandle`) .. autoattribute:: cuda.bindings.driver.CUmemAllocationHandleType.CU_MEM_HANDLE_TYPE_MAX @@ -5128,43 +5132,43 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD - (value type = cuuint64_t) Amount of reserved memory in bytes to hold onto before trying to release memory back to the OS. When more than the release threshold bytes of memory are held by the memory pool, the allocator will try to release memory back to the OS on the next call to stream, event or context synchronize. (default 0) + (value type = :py:obj:`~.cuuint64_t`) Amount of reserved memory in bytes to hold onto before trying to release memory back to the OS. When more than the release threshold bytes of memory are held by the memory pool, the allocator will try to release memory back to the OS on the next call to stream, event or context synchronize. (default 0) .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT - (value type = cuuint64_t) Amount of backing memory currently allocated for the mempool. + (value type = :py:obj:`~.cuuint64_t`) Amount of backing memory currently allocated for the mempool. .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH - (value type = cuuint64_t) High watermark of backing memory allocated for the mempool since the last time it was reset. High watermark can only be reset to zero. + (value type = :py:obj:`~.cuuint64_t`) High watermark of backing memory allocated for the mempool since the last time it was reset. High watermark can only be reset to zero. .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_USED_MEM_CURRENT - (value type = cuuint64_t) Amount of memory from the pool that is currently in use by the application. + (value type = :py:obj:`~.cuuint64_t`) Amount of memory from the pool that is currently in use by the application. .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_USED_MEM_HIGH - (value type = cuuint64_t) High watermark of the amount of memory from the pool that was in use by the application since the last time it was reset. High watermark can only be reset to zero. + (value type = :py:obj:`~.cuuint64_t`) High watermark of the amount of memory from the pool that was in use by the application since the last time it was reset. High watermark can only be reset to zero. .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_ALLOCATION_TYPE - (value type = CUmemAllocationType) The allocation type of the mempool + (value type = :py:obj:`~.CUmemAllocationType`) The allocation type of the mempool .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_EXPORT_HANDLE_TYPES - (value type = CUmemAllocationHandleType) Available export handle types for the mempool. For imported pools this value is always CU_MEM_HANDLE_TYPE_NONE as an imported pool cannot be re-exported + (value type = :py:obj:`~.CUmemAllocationHandleType`) Available export handle types for the mempool. For imported pools this value is always CU_MEM_HANDLE_TYPE_NONE as an imported pool cannot be re-exported .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_LOCATION_ID @@ -5176,13 +5180,13 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_LOCATION_TYPE - (value type = CUmemLocationType) The location type for the mempool. For imported memory pools where the device is not directly visible to the importing process or pools imported via fabric handles across nodes this will be CU_MEM_LOCATION_TYPE_INVISIBLE. + (value type = :py:obj:`~.CUmemLocationType`) The location type for the mempool. For imported memory pools where the device is not directly visible to the importing process or pools imported via fabric handles across nodes this will be CU_MEM_LOCATION_TYPE_INVISIBLE. .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_MAX_POOL_SIZE - (value type = cuuint64_t) Maximum size of the pool in bytes, this value may be higher than what was initially passed to cuMemPoolCreate due to alignment requirements. A value of 0 indicates no maximum size. For CU_MEM_ALLOCATION_TYPE_MANAGED and IPC imported pools this value will be system dependent. + (value type = :py:obj:`~.cuuint64_t`) Maximum size of the pool in bytes, this value may be higher than what was initially passed to cuMemPoolCreate due to alignment requirements. A value of 0 indicates no maximum size. For CU_MEM_ALLOCATION_TYPE_MANAGED and IPC imported pools this value will be system dependent. .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_HW_DECOMPRESS_ENABLED @@ -5239,7 +5243,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUmemcpy3DOperandType.CU_MEMCPY_OPERAND_TYPE_ARRAY - Memcpy operand is a CUarray. + Memcpy operand is a :py:obj:`~.CUarray`. .. autoattribute:: cuda.bindings.driver.CUmemcpy3DOperandType.CU_MEMCPY_OPERAND_TYPE_MAX @@ -5249,25 +5253,25 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUgraphMem_attribute.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT - (value type = cuuint64_t) Amount of memory, in bytes, currently associated with graphs + (value type = :py:obj:`~.cuuint64_t`) Amount of memory, in bytes, currently associated with graphs .. autoattribute:: cuda.bindings.driver.CUgraphMem_attribute.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH - (value type = cuuint64_t) High watermark of memory, in bytes, associated with graphs since the last time it was reset. High watermark can only be reset to zero. + (value type = :py:obj:`~.cuuint64_t`) High watermark of memory, in bytes, associated with graphs since the last time it was reset. High watermark can only be reset to zero. .. autoattribute:: cuda.bindings.driver.CUgraphMem_attribute.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT - (value type = cuuint64_t) Amount of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator. + (value type = :py:obj:`~.cuuint64_t`) Amount of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator. .. autoattribute:: cuda.bindings.driver.CUgraphMem_attribute.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH - (value type = cuuint64_t) High watermark of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator. + (value type = :py:obj:`~.cuuint64_t`) High watermark of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator. .. autoclass:: cuda.bindings.driver.CUgraphChildGraphNodeOwnership @@ -5361,49 +5365,49 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUgraphDebugDot_flags.CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS - Adds CUDA_KERNEL_NODE_PARAMS values to output + Adds :py:obj:`~.CUDA_KERNEL_NODE_PARAMS` values to output .. autoattribute:: cuda.bindings.driver.CUgraphDebugDot_flags.CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS - Adds CUDA_MEMCPY3D values to output + Adds :py:obj:`~.CUDA_MEMCPY3D` values to output .. autoattribute:: cuda.bindings.driver.CUgraphDebugDot_flags.CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS - Adds CUDA_MEMSET_NODE_PARAMS values to output + Adds :py:obj:`~.CUDA_MEMSET_NODE_PARAMS` values to output .. autoattribute:: cuda.bindings.driver.CUgraphDebugDot_flags.CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS - Adds CUDA_HOST_NODE_PARAMS values to output + Adds :py:obj:`~.CUDA_HOST_NODE_PARAMS` values to output .. autoattribute:: cuda.bindings.driver.CUgraphDebugDot_flags.CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS - Adds CUevent handle from record and wait nodes to output + Adds :py:obj:`~.CUevent` handle from record and wait nodes to output .. autoattribute:: cuda.bindings.driver.CUgraphDebugDot_flags.CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS - Adds CUDA_EXT_SEM_SIGNAL_NODE_PARAMS values to output + Adds :py:obj:`~.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS` values to output .. autoattribute:: cuda.bindings.driver.CUgraphDebugDot_flags.CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS - Adds CUDA_EXT_SEM_WAIT_NODE_PARAMS values to output + Adds :py:obj:`~.CUDA_EXT_SEM_WAIT_NODE_PARAMS` values to output .. autoattribute:: cuda.bindings.driver.CUgraphDebugDot_flags.CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES - Adds CUkernelNodeAttrValue values to output + Adds :py:obj:`~.CUkernelNodeAttrValue` values to output .. autoattribute:: cuda.bindings.driver.CUgraphDebugDot_flags.CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES @@ -5466,7 +5470,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUgraphInstantiate_flags.CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD - Automatically upload the graph after instantiation. Only supported by :py:obj:`~.cuGraphInstantiateWithParams`. The upload will be performed using the stream provided in `instantiateParams`. + Automatically upload the graph after instantiation. Only supported by :py:obj:`~.cuGraphInstantiateWithParams`. The upload will be performed using the stream provided in ``instantiateParams``. .. autoattribute:: cuda.bindings.driver.CUgraphInstantiate_flags.CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH @@ -6441,7 +6445,7 @@ Data types used by CUDA driver - Stream handle that can be passed as a CUstream to use an implicit stream with legacy synchronization behavior. + Stream handle that can be passed as a :py:obj:`~.CUstream` to use an implicit stream with legacy synchronization behavior. @@ -6453,7 +6457,7 @@ Data types used by CUDA driver - Stream handle that can be passed as a CUstream to use an implicit stream with per-thread synchronization behavior. + Stream handle that can be passed as a :py:obj:`~.CUstream` to use an implicit stream with per-thread synchronization behavior. @@ -6535,19 +6539,19 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC - When the `flags` parameter of :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS` contains this flag, it indicates that signaling an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects. + When the ``flags`` parameter of :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS` contains this flag, it indicates that signaling an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects. .. autoattribute:: cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC - When the `flags` parameter of :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS` contains this flag, it indicates that waiting on an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects. + When the ``flags`` parameter of :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS` contains this flag, it indicates that waiting on an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects. .. autoattribute:: cuda.bindings.driver.CUDA_NVSCISYNC_ATTR_SIGNAL - When `flags` of :py:obj:`~.cuDeviceGetNvSciSyncAttributes` is set to this, it indicates that application needs signaler specific NvSciSyncAttr to be filled by :py:obj:`~.cuDeviceGetNvSciSyncAttributes`. + When ``flags`` of :py:obj:`~.cuDeviceGetNvSciSyncAttributes` is set to this, it indicates that application needs signaler specific NvSciSyncAttr to be filled by :py:obj:`~.cuDeviceGetNvSciSyncAttributes`. .. autoattribute:: cuda.bindings.driver.CUDA_NVSCISYNC_ATTR_WAIT - When `flags` of :py:obj:`~.cuDeviceGetNvSciSyncAttributes` is set to this, it indicates that application needs waiter specific NvSciSyncAttr to be filled by :py:obj:`~.cuDeviceGetNvSciSyncAttributes`. + When ``flags`` of :py:obj:`~.cuDeviceGetNvSciSyncAttributes` is set to this, it indicates that application needs waiter specific NvSciSyncAttr to be filled by :py:obj:`~.cuDeviceGetNvSciSyncAttributes`. .. autoattribute:: cuda.bindings.driver.CU_MEM_CREATE_USAGE_TILE_POOL @@ -6571,7 +6575,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUDA_ARRAY3D_LAYERED - If set, the CUDA array is a collection of layers, where each layer is either a 1D or a 2D array and the Depth member of CUDA_ARRAY3D_DESCRIPTOR specifies the number of layers, not the depth of a 3D array. + If set, the CUDA array is a collection of layers, where each layer is either a 1D or a 2D array and the Depth member of :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` specifies the number of layers, not the depth of a 3D array. .. autoattribute:: cuda.bindings.driver.CUDA_ARRAY3D_2DARRAY @@ -6643,7 +6647,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CU_LAUNCH_PARAM_END - End of array terminator for the `extra` parameter to :py:obj:`~.cuLaunchKernel` + End of array terminator for the ``extra`` parameter to :py:obj:`~.cuLaunchKernel` .. autoattribute:: cuda.bindings.driver.CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT @@ -6651,7 +6655,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CU_LAUNCH_PARAM_BUFFER_POINTER - Indicator that the next value in the `extra` parameter to :py:obj:`~.cuLaunchKernel` will be a pointer to a buffer containing all kernel parameters used for launching kernel `f`. This buffer needs to honor all alignment/padding requirements of the individual parameters. If :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE` is not also specified in the `extra` array, then :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER` will have no effect. + Indicator that the next value in the ``extra`` parameter to :py:obj:`~.cuLaunchKernel` will be a pointer to a buffer containing all kernel parameters used for launching kernel ``f``. This buffer needs to honor all alignment/padding requirements of the individual parameters. If :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE` is not also specified in the ``extra`` array, then :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER` will have no effect. .. autoattribute:: cuda.bindings.driver.CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT @@ -6659,7 +6663,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CU_LAUNCH_PARAM_BUFFER_SIZE - Indicator that the next value in the `extra` parameter to :py:obj:`~.cuLaunchKernel` will be a pointer to a size_t which contains the size of the buffer specified with :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`. It is required that :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER` also be specified in the `extra` array if the value associated with :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE` is not zero. + Indicator that the next value in the ``extra`` parameter to :py:obj:`~.cuLaunchKernel` will be a pointer to a size_t which contains the size of the buffer specified with :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`. It is required that :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER` also be specified in the ``extra`` array if the value associated with :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE` is not zero. .. autoattribute:: cuda.bindings.driver.CU_PARAM_TR_DEFAULT @@ -6685,6 +6689,10 @@ Data types used by CUDA driver Error Handling -------------- +MANBRIEF error handling functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the error handling functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuGetErrorString @@ -6693,6 +6701,10 @@ This section describes the error handling functions of the low-level CUDA driver Initialization -------------- +MANBRIEF initialization functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the initialization functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuInit @@ -6700,6 +6712,10 @@ This section describes the initialization functions of the low-level CUDA driver Version Management ------------------ +MANBRIEF version management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the version management functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuDriverGetVersion @@ -6707,6 +6723,10 @@ This section describes the version management functions of the low-level CUDA dr Device Management ----------------- +MANBRIEF device management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the device management functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuDeviceGet @@ -6728,6 +6748,10 @@ This section describes the device management functions of the low-level CUDA dri Primary Context Management -------------------------- +MANBRIEF primary context management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the primary context management functions of the low-level CUDA driver application programming interface. @@ -6743,6 +6767,10 @@ The primary context is unique per device and shared with the CUDA runtime API. T Context Management ------------------ +MANBRIEF context management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the context management functions of the low-level CUDA driver application programming interface. @@ -6776,6 +6804,10 @@ Please note that some functions are described in Primary Context Management sect Module Management ----------------- +MANBRIEF module management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the module management functions of the low-level CUDA driver application programming interface. .. autoclass:: cuda.bindings.driver.CUmoduleLoadingMode @@ -6810,6 +6842,10 @@ This section describes the module management functions of the low-level CUDA dri Library Management ------------------ +MANBRIEF library management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the library management functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuLibraryLoadData @@ -6834,6 +6870,10 @@ This section describes the library management functions of the low-level CUDA dr Memory Management ----------------- +MANBRIEF memory management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the memory management functions of the low-level CUDA driver application programming interface. .. autoclass:: cuda.bindings.driver.CUmemDecompressParams_st @@ -6944,6 +6984,10 @@ This section describes the memory management functions of the low-level CUDA dri Virtual Memory Management ------------------------- +MANBRIEF virtual memory management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the virtual memory management functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuMemAddressReserve @@ -6964,16 +7008,18 @@ This section describes the virtual memory management functions of the low-level Stream Ordered Memory Allocator ------------------------------- -This section describes the stream ordered memory allocator exposed by the low-level CUDA driver application programming interface. +MANBRIEF Functions for performing allocation and free operations in stream order. Functions for controlling the behavior of the underlying allocator. (CURRENT_FILE) ENDMANBRIEF +This section describes the stream ordered memory allocator exposed by the low-level CUDA driver application programming interface. -**overview** +**overview** + The asynchronous allocator allows the user to allocate and free in stream order. All asynchronous accesses of the allocation must happen between the stream executions of the allocation and the free. If the memory is accessed outside of the promised stream order, a use before allocation / use after free error will cause undefined behavior. The allocator is free to reallocate the memory as long as it can guarantee that compliant memory accesses will not overlap temporally. The allocator may refer to internal stream ordering as well as inter-stream dependencies (such as CUDA events and null stream dependencies) when establishing the temporal guarantee. The allocator may also insert inter-stream dependencies to establish the temporal guarantee. @@ -6984,8 +7030,6 @@ The allocator is free to reallocate the memory as long as it can guarantee that **Supported Platforms** - - Whether or not a device supports the integrated stream ordered memory allocator may be queried by calling cuDeviceGetAttribute() with the device attribute CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED .. autofunction:: cuda.bindings.driver.cuMemFreeAsync @@ -7009,15 +7053,17 @@ Whether or not a device supports the integrated stream ordered memory allocator Multicast Object Management --------------------------- -This section describes the CUDA multicast object operations exposed by the low-level CUDA driver application programming interface. +MANBRIEF Functions for creating multicast objects, adding devices to them and binding/unbinding memory (CURRENT_FILE) ENDMANBRIEF + +This section describes the CUDA multicast object operations exposed by the low-level CUDA driver application programming interface. -**overview** +**overview** A multicast object created via cuMulticastCreate enables certain memory operations to be broadcast to a team of devices. Devices can be added to a multicast object via cuMulticastAddDevice. Memory can be bound on each participating device via cuMulticastBindMem, cuMulticastBindMem_v2, cuMulticastBindAddr, or cuMulticastBindAddr_v2. Multicast objects can be mapped into a device's virtual address space using the virtual memmory management APIs (see cuMemMap and cuMemSetAccess). @@ -7027,8 +7073,6 @@ A multicast object created via cuMulticastCreate enables certain memory operatio **Supported Platforms** - - Support for multicast on a specific device can be queried using the device attribute CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED .. autofunction:: cuda.bindings.driver.cuMulticastCreate @@ -7043,6 +7087,10 @@ Support for multicast on a specific device can be queried using the device attri Logical Endpoint ---------------- +MANBRIEF logical endpoint functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the logical endpoint functions of the low-level CUDA driver application programming interface. .. autoclass:: cuda.bindings.driver.CUlogicalEndpointFabricHandle_st @@ -7096,15 +7144,17 @@ This section describes the logical endpoint functions of the low-level CUDA driv Unified Addressing ------------------ -This section describes the unified addressing functions of the low-level CUDA driver application programming interface. +MANBRIEF unified addressing functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + +This section describes the unified addressing functions of the low-level CUDA driver application programming interface. -**Overview** +**Overview** CUDA devices can share a unified address space with the host. For these devices there is no distinction between a device pointer and a host pointer -- the same pointer value may be used to access memory from the host program and from a kernel running on the device (with exceptions enumerated below). @@ -7114,8 +7164,6 @@ CUDA devices can share a unified address space with the host. For these devices **Supported Platforms** - - Whether or not a device supports unified addressing may be queried by calling cuDeviceGetAttribute() with the device attribute CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING. Unified addressing is automatically enabled in 64-bit processes @@ -7126,8 +7174,6 @@ Unified addressing is automatically enabled in 64-bit processes **Looking Up Information from Pointer Values** - - It is possible to look up information about the memory which backs a pointer value. For instance, one may want to know if a pointer points to host or device memory. As another example, in the case of device memory, one may want to know on which CUDA device the memory resides. These properties may be queried using the function cuPointerGetAttribute() Since pointers are unique, it is not necessary to specify information about the pointers specified to the various copy functions in the CUDA API. The function cuMemcpy() may be used to perform a copy between two pointers, ignoring whether they point to host or device memory (making cuMemcpyHtoD(), cuMemcpyDtoD(), and cuMemcpyDtoH() unnecessary for devices supporting unified addressing). For multidimensional copies, the memory type CU_MEMORYTYPE_UNIFIED may be used to specify that the CUDA driver should infer the location of the pointer from its value. @@ -7138,8 +7184,6 @@ Since pointers are unique, it is not necessary to specify information about the **Automatic Mapping of Host Allocated Host Memory** - - All host memory allocated in all contexts using cuMemAllocHost() and cuMemHostAlloc() is always directly accessible from all contexts on all devices that support unified addressing. This is the case regardless of whether or not the flags CU_MEMHOSTALLOC_PORTABLE and CU_MEMHOSTALLOC_DEVICEMAP are specified. The pointer value through which allocated host memory may be accessed in kernels on all devices that support unified addressing is the same as the pointer value through which that memory is accessed on the host, so it is not necessary to call cuMemHostGetDevicePointer() to get the device pointer for these allocations. @@ -7152,8 +7196,6 @@ Note that this is not the case for memory allocated using the flag CU_MEMHOSTALL **Automatic Registration of Peer Memory** - - Upon enabling direct access from a context that supports unified addressing to another peer context that supports unified addressing using cuCtxEnablePeerAccess() all memory allocated in the peer context using cuMemAlloc() and cuMemAllocPitch() will immediately be accessible by the current context. The device pointer value through which any peer memory may be accessed in the current context is the same pointer value through which that memory may be accessed in the peer context. @@ -7162,8 +7204,6 @@ Upon enabling direct access from a context that supports unified addressing to a **Exceptions, Disjoint Addressing** - - Not all memory may be accessed on devices through the same pointer value through which they are accessed on the host. These exceptions are host memory registered using cuMemHostRegister() and host memory allocated using the flag CU_MEMHOSTALLOC_WRITECOMBINED. For these exceptions, there exists a distinct host and device address for the memory. The device address is guaranteed to not overlap any valid host pointer range and is guaranteed to have the same value across all contexts that support unified addressing. This device address may be queried using cuMemHostGetDevicePointer() when a context using unified addressing is current. Either the host or the unified device pointer value may be used to refer to this memory through cuMemcpy() and similar functions using the CU_MEMORYTYPE_UNIFIED memory type. @@ -7182,6 +7222,10 @@ This device address may be queried using cuMemHostGetDevicePointer() when a cont Stream Management ----------------- +MANBRIEF stream management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the stream management functions of the low-level CUDA driver application programming interface. .. autoclass:: cuda.bindings.driver.CUgraphRecaptureStatus @@ -7235,6 +7279,10 @@ This section describes the stream management functions of the low-level CUDA dri Event Management ---------------- +MANBRIEF event management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the event management functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuEventCreate @@ -7248,6 +7296,10 @@ This section describes the event management functions of the low-level CUDA driv External Resource Interoperability ---------------------------------- +MANBRIEF External resource interoperability functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the external resource interoperability functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuImportExternalMemory @@ -7262,6 +7314,10 @@ This section describes the external resource interoperability functions of the l Stream Memory Operations ------------------------ +MANBRIEF Stream memory operations of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the stream memory operations of the low-level CUDA driver application programming interface. @@ -7297,6 +7353,10 @@ Warning: Improper use of these APIs may deadlock the application. Synchronizatio Execution Control ----------------- +MANBRIEF execution control functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the execution control functions of the low-level CUDA driver application programming interface. .. autoclass:: cuda.bindings.driver.CUfunctionLoadingState @@ -7327,6 +7387,10 @@ This section describes the execution control functions of the low-level CUDA dri Graph Management ---------------- +MANBRIEF graph management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the graph management functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuGraphCreate @@ -7421,6 +7485,10 @@ This section describes the graph management functions of the low-level CUDA driv Occupancy --------- +MANBRIEF occupancy calculation functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the occupancy calculation functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuOccupancyMaxActiveBlocksPerMultiprocessor @@ -7434,6 +7502,10 @@ This section describes the occupancy calculation functions of the low-level CUDA Texture Object Management ------------------------- +MANBRIEF texture object management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the texture object management functions of the low-level CUDA driver application programming interface. The texture object API is only supported on devices of compute capability 3.0 or higher. .. autofunction:: cuda.bindings.driver.cuTexObjectCreate @@ -7445,6 +7517,10 @@ This section describes the texture object management functions of the low-level Surface Object Management ------------------------- +MANBRIEF surface object management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the surface object management functions of the low-level CUDA driver application programming interface. The surface object API is only supported on devices of compute capability 3.0 or higher. .. autofunction:: cuda.bindings.driver.cuSurfObjectCreate @@ -7454,6 +7530,10 @@ This section describes the surface object management functions of the low-level Tensor Map Object Managment --------------------------- +MANBRIEF tensor map object management functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the tensor map object management functions of the low-level CUDA driver application programming interface. The tensor core API is only supported on devices of compute capability 9.0 or higher. .. autofunction:: cuda.bindings.driver.cuTensorMapEncodeTiled @@ -7464,6 +7544,10 @@ This section describes the tensor map object management functions of the low-lev Peer Context Memory Access -------------------------- +MANBRIEF direct peer context memory access functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the direct peer context memory access functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuDeviceCanAccessPeer @@ -7475,6 +7559,10 @@ This section describes the direct peer context memory access functions of the lo Graphics Interoperability ------------------------- +MANBRIEF graphics interoperability functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the graphics interoperability functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuGraphicsUnregisterResource @@ -7488,6 +7576,10 @@ This section describes the graphics interoperability functions of the low-level Driver Entry Point Access ------------------------- +MANBRIEF driver entry point access functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the driver entry point access functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuGetProcAddress @@ -7495,6 +7587,10 @@ This section describes the driver entry point access functions of the low-level Coredump Attributes Control API ------------------------------- +MANBRIEF coredump attribute control functions for the low-level CUDA API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the coredump attribute control functions of the low-level CUDA driver application programming interface. .. autoclass:: cuda.bindings.driver.CUcoredumpSettings @@ -7573,6 +7669,10 @@ This section describes the coredump attribute control functions of the low-level Green Contexts -------------- +MANBRIEF Driver level API for creation and manipulation of green contexts (CURRENT_FILE) ENDMANBRIEF + + + This section describes the APIs for creation and manipulation of green contexts in the CUDA driver. Green contexts are a lightweight alternative to traditional contexts, that can be used to select a subset of device resources. This allows the developer to, for example, select SMs from distinct spatial partitions of the GPU and target them via CUDA stream operations, kernel launches, etc. @@ -7693,9 +7793,9 @@ Workqueues -For ``CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG``\ , the resource specifies the expected maximum number of concurrent stream-ordered workloads via the ``wqConcurrencyLimit``\ field. The ``sharingScope``\ field determines how workqueue resources are shared: +For ``CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG``, the resource specifies the expected maximum number of concurrent stream-ordered workloads via the ``wqConcurrencyLimit`` field. The ``sharingScope`` field determines how workqueue resources are shared: -- ``CU_WORKQUEUE_SCOPE_DEVICE_CTX:``\ Use all shared workqueue resources across all contexts (default driver behavior). +- ``CU_WORKQUEUE_SCOPE_DEVICE_CTX:`` Use all shared workqueue resources across all contexts (default driver behavior). @@ -7703,7 +7803,7 @@ For ``CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG``\ , the resource specifies the expe -- ``CU_WORKQUEUE_SCOPE_GREEN_CTX_BALANCED:``\ When possible, use non-overlapping workqueue resources with other balanced green contexts. +- ``CU_WORKQUEUE_SCOPE_GREEN_CTX_BALANCED:`` When possible, use non-overlapping workqueue resources with other balanced green contexts. @@ -7719,7 +7819,7 @@ The maximum concurrency limit depends on ::CUDA_DEVICE_MAX_CONNECTIONS and can b -For ``CU_DEV_RESOURCE_TYPE_WORKQUEUE``\ , the resource represents a pre-existing workqueue that can be retrieved from existing contexts or green contexts. This allows reusing workqueue resources across different green contexts. +For ``CU_DEV_RESOURCE_TYPE_WORKQUEUE``, the resource represents a pre-existing workqueue that can be retrieved from existing contexts or green contexts. This allows reusing workqueue resources across different green contexts. @@ -7737,7 +7837,7 @@ Even if the green contexts have disjoint SM partitions, it is not guaranteed tha Additionally, there are two known scenarios, where its possible for the workload to run on more SMs than was provisioned (but never less). -- On Volta+ MPS: When ``CUDA_MPS_ACTIVE_THREAD_PERCENTAGE``\ is used, the set of SMs that are used for running kernels can be scaled up to the value of SMs used for the MPS client. +- On Volta+ MPS: When ``CUDA_MPS_ACTIVE_THREAD_PERCENTAGE`` is used, the set of SMs that are used for running kernels can be scaled up to the value of SMs used for the MPS client. @@ -7845,6 +7945,10 @@ Additionally, there are two known scenarios, where its possible for the workload Error Log Management Functions ------------------------------ +MANBRIEF error log management functions for the low-level CUDA API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the error log management functions of the low-level CUDA driver application programming interface. .. autoclass:: cuda.bindings.driver.CUlogLevel @@ -7870,7 +7974,7 @@ CUDA API versioning support - +MANBRIEF CUDA checkpoint and restore functionality of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF @@ -7894,6 +7998,10 @@ Checkpoint and restore capabilities are currently restricted to Linux. Profiler Control ---------------- +MANBRIEF profiler control functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the profiler control functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuProfilerStart @@ -7902,6 +8010,10 @@ This section describes the profiler control functions of the low-level CUDA driv EGL Interoperability -------------------- +MANBRIEF EGL interoperability functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the EGL interoperability functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuGraphicsEGLRegisterImage @@ -7920,6 +8032,10 @@ This section describes the EGL interoperability functions of the low-level CUDA OpenGL Interoperability ----------------------- +MANBRIEF OpenGL interoperability functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the OpenGL interoperability functions of the low-level CUDA driver application programming interface. Note that mapping of OpenGL resources is performed with the graphics API agnostic, resource mapping interface described in Graphics Interoperability. .. autoclass:: cuda.bindings.driver.CUGLDeviceList @@ -7948,6 +8064,10 @@ This section describes the OpenGL interoperability functions of the low-level CU VDPAU Interoperability ---------------------- +MANBRIEF VDPAU interoperability functions of the low-level CUDA driver API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the VDPAU interoperability functions of the low-level CUDA driver application programming interface. .. autofunction:: cuda.bindings.driver.cuVDPAUGetDevice diff --git a/cuda_bindings/docs/source/module/runtime.rst b/cuda_bindings/docs/source/module/runtime.rst index 09240fba282..3e86a79e267 100644 --- a/cuda_bindings/docs/source/module/runtime.rst +++ b/cuda_bindings/docs/source/module/runtime.rst @@ -161,13 +161,17 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidHostPointer - This indicates that at least one host pointer passed to the API call is not a valid host pointer. [Deprecated] + This indicates that at least one host pointer passed to the API call is not a valid host pointer. + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidDevicePointer - This indicates that at least one device pointer passed to the API call is not a valid device pointer. [Deprecated] + This indicates that at least one device pointer passed to the API call is not a valid device pointer. + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidTexture @@ -197,25 +201,33 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorAddressOfConstant - This indicated that the user has taken the address of a constant variable, which was forbidden up until the CUDA 3.1 release. [Deprecated] + This indicated that the user has taken the address of a constant variable, which was forbidden up until the CUDA 3.1 release. + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTextureFetchFailed - This indicated that a texture fetch was not able to be performed. This was previously used for device emulation of texture operations. [Deprecated] + This indicated that a texture fetch was not able to be performed. This was previously used for device emulation of texture operations. + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTextureNotBound - This indicated that a texture was not bound for access. This was previously used for device emulation of texture operations. [Deprecated] + This indicated that a texture was not bound for access. This was previously used for device emulation of texture operations. + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSynchronizationError - This indicated that a synchronization operation had failed. This was previously used for some device emulation functions. [Deprecated] + This indicated that a synchronization operation had failed. This was previously used for some device emulation functions. + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidFilterSetting @@ -233,19 +245,25 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMixedDeviceExecution - Mixing of device and device emulation code was not allowed. [Deprecated] + Mixing of device and device emulation code was not allowed. + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotYetImplemented - This indicates that the API call is not yet implemented. Production releases of CUDA will never return this error. [Deprecated] + This indicates that the API call is not yet implemented. Production releases of CUDA will never return this error. + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMemoryValueTooLarge - This indicated that an emulated device pointer exceeded the 32-bit address range. [Deprecated] + This indicated that an emulated device pointer exceeded the 32-bit address range. + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStubLibrary @@ -299,7 +317,7 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorIncompatibleDriverContext - This indicates that the current context is not compatible with this the CUDA Runtime. This can only occur if you are using CUDA Runtime/Driver interoperability and have created an existing Driver context using the driver API. The Driver context may be incompatible either because the Driver context was created using an older version of the API, because the Runtime API call expects a primary driver context and the Driver context is not primary, or because the Driver context has been destroyed. Please see `Interactions with the CUDA Driver API`_ for more information. + This indicates that the current context is not compatible with this the CUDA Runtime. This can only occur if you are using CUDA Runtime/Driver interoperability and have created an existing Driver context using the driver API. The Driver context may be incompatible either because the Driver context was created using an older version of the API, because the Runtime API call expects a primary driver context and the Driver context is not primary, or because the Driver context has been destroyed. Please see :py:obj:`~.Interactions with the CUDA Driver API` for more information. .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMissingConfiguration @@ -311,7 +329,9 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorPriorLaunchFailure - This indicated that a previous kernel launch failed. This was previously used for device emulation of kernel launches. [Deprecated] + This indicated that a previous kernel launch failed. This was previously used for device emulation of kernel launches. + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchMaxDepthExceeded @@ -2870,13 +2890,13 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrAllocationType - (value type = cudaMemAllocationType) The allocation type of the mempool + (value type = :py:obj:`~.cudaMemAllocationType`) The allocation type of the mempool .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrExportHandleTypes - (value type = cudaMemAllocationHandleType) Available export handle types for the mempool. For imported pools this value is always cudaMemHandleTypeNone as an imported pool cannot be re-exported + (value type = :py:obj:`~.cudaMemAllocationHandleType`) Available export handle types for the mempool. For imported pools this value is always cudaMemHandleTypeNone as an imported pool cannot be re-exported .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrLocationId @@ -2888,7 +2908,7 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrLocationType - (value type = cudaMemLocationType) The location type for the mempool. For imported memory pools where the device is not directly visible to the importing process or pools imported via fabric handles across nodes this will be cudaMemLocationTypeInvisible + (value type = :py:obj:`~.cudaMemLocationType`) The location type for the mempool. For imported memory pools where the device is not directly visible to the importing process or pools imported via fabric handles across nodes this will be cudaMemLocationTypeInvisible .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrMaxPoolSize @@ -3009,7 +3029,7 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypeFabric - Allows a fabric handle to be used for exporting. (cudaMemFabricHandle_t) + Allows a fabric handle to be used for exporting. (:py:obj:`~.cudaMemFabricHandle_t`) .. autoclass:: cuda.bindings.runtime.cudaGraphMemAttributeType @@ -3384,7 +3404,7 @@ Data types used by CUDA Runtime Pointer to a buffer in which to print any log messages that are informational in nature (the buffer size is specified via option :py:obj:`~.cudaJitInfoLogBufferSizeBytes`) - Option type: char * + Option type: char \* Applies to: compiler and linker @@ -3406,7 +3426,7 @@ Data types used by CUDA Runtime Pointer to a buffer in which to print any log messages that reflect errors (the buffer size is specified via option :py:obj:`~.cudaJitErrorLogBufferSizeBytes`) - Option type: char * + Option type: char \* Applies to: compiler and linker @@ -3524,7 +3544,7 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaLibraryOption.cudaLibraryBinaryIsPreserved - Specifes that the argument `code` passed to :py:obj:`~.cudaLibraryLoadData()` will be preserved. Specifying this option will let the driver know that `code` can be accessed at any point until :py:obj:`~.cudaLibraryUnload()`. The default behavior is for the driver to allocate and maintain its own copy of `code`. Note that this is only a memory usage optimization hint and the driver can choose to ignore it if required. Specifying this option with :py:obj:`~.cudaLibraryLoadFromFile()` is invalid and will return :py:obj:`~.cudaErrorInvalidValue`. + Specifes that the argument ``code`` passed to :py:obj:`~.cudaLibraryLoadData()` will be preserved. Specifying this option will let the driver know that ``code`` can be accessed at any point until :py:obj:`~.cudaLibraryUnload()`. The default behavior is for the driver to allocate and maintain its own copy of ``code``. Note that this is only a memory usage optimization hint and the driver can choose to ignore it if required. Specifying this option with :py:obj:`~.cudaLibraryLoadFromFile()` is invalid and will return :py:obj:`~.cudaErrorInvalidValue`. .. autoclass:: cuda.bindings.runtime.cudaJit_CacheMode @@ -3594,13 +3614,13 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaKernelFunctionType.cudaKernelFunctionTypeKernel - Function handle is a cudaKernel_t + Function handle is a :py:obj:`~.cudaKernel_t` .. autoattribute:: cuda.bindings.runtime.cudaKernelFunctionType.cudaKernelFunctionTypeFunction - Function handle is a cudaFunction_t + Function handle is a :py:obj:`~.cudaFunction_t` .. autoclass:: cuda.bindings.runtime.cudaGraphConditionalHandleFlags @@ -3614,7 +3634,7 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeIf - Conditional 'if/else' Node. Body[0] executed if condition is non-zero. If `size` == 2, an optional ELSE graph is created and this is executed if the condition is zero. + Conditional 'if/else' Node. Body[0] executed if condition is non-zero. If ``size`` == 2, an optional ELSE graph is created and this is executed if the condition is zero. .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeWhile @@ -3778,7 +3798,7 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaGraphDependencyType.cudaGraphDependencyTypeProgrammatic - This dependency type allows the downstream node to use `cudaGridDependencySynchronize()`. It may only be used between kernel nodes, and must be used with either the :py:obj:`~.cudaGraphKernelNodePortProgrammatic` or :py:obj:`~.cudaGraphKernelNodePortLaunchCompletion` outgoing port. + This dependency type allows the downstream node to use ``cudaGridDependencySynchronize()``. It may only be used between kernel nodes, and must be used with either the :py:obj:`~.cudaGraphKernelNodePortProgrammatic` or :py:obj:`~.cudaGraphKernelNodePortLaunchCompletion` outgoing port. .. autoclass:: cuda.bindings.runtime.cudaGraphExecUpdateResult @@ -3970,7 +3990,7 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsEventNodeParams - Adds cudaEvent_t handle from record and wait nodes to output + Adds :py:obj:`~.cudaEvent_t` handle from record and wait nodes to output .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasSignalNodeParams @@ -4017,7 +4037,7 @@ Data types used by CUDA Runtime :py:obj:`~.cudaGraphInstantiateWithParams`. The upload will be performed using the - stream provided in `instantiateParams`. + stream provided in ``instantiateParams``. .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagDeviceLaunch @@ -4144,7 +4164,7 @@ Data types used by CUDA Runtime Each type of cluster will have its enumeration / coordinate setup as if the grid consists solely of its type of cluster. For example, if the preferred substitute cluster dimensions double the regular cluster dimensions, there might be simultaneously a regular cluster indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and (3,0,0) and groups their blocks. - This attribute will only take effect when a regular cluster dimension has been specified. The preferred substitute cluster dimension must be an integer multiple greater than zero of the regular cluster dimension and must divide the grid. It must also be no more than `maxBlocksPerCluster`, if it is set in the kernel's `__launch_bounds__`. Otherwise it must be less than the maximum value the driver can support. Otherwise, setting this attribute to a value physically unable to fit on any particular device is permitted. + This attribute will only take effect when a regular cluster dimension has been specified. The preferred substitute cluster dimension must be an integer multiple greater than zero of the regular cluster dimension and must divide the grid. It must also be no more than ``maxBlocksPerCluster``, if it is set in the kernel's ``__launch_bounds__``. Otherwise it must be less than the maximum value the driver can support. Otherwise, setting this attribute to a value physically unable to fit on any particular device is permitted. .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent @@ -4154,7 +4174,7 @@ Data types used by CUDA Runtime Nominally, the event is triggered once all blocks of the kernel have begun execution. Currently this is a best effort. If a kernel B has a launch completion dependency on a kernel A, B may wait until A is complete. Alternatively, blocks of B may begin before all blocks of A have begun, for example if B can claim execution resources unavailable to A (e.g. they run on different GPUs) or if B is a higher priority than A. Exercise caution if such an ordering inversion could lead to deadlock. - A launch completion event is nominally similar to a programmatic event with `triggerAtBlockStart` set except that it is not visible to `cudaGridDependencySynchronize()` and can be used with compute capability less than 9.0. + A launch completion event is nominally similar to a programmatic event with ``triggerAtBlockStart`` set except that it is not visible to ``cudaGridDependencySynchronize()`` and can be used with compute capability less than 9.0. The event supplied must not be an interprocess or interop event. The event must disable timing (i.e. must be created with the :py:obj:`~.cudaEventDisableTiming` flag set). @@ -5136,7 +5156,7 @@ Data types used by CUDA Runtime - Stream handle that can be passed as a cudaStream_t to use an implicit stream with legacy synchronization behavior. + Stream handle that can be passed as a :py:obj:`~.cudaStream_t` to use an implicit stream with legacy synchronization behavior. @@ -5148,7 +5168,7 @@ Data types used by CUDA Runtime - Stream handle that can be passed as a cudaStream_t to use an implicit stream with per-thread synchronization behavior. + Stream handle that can be passed as a :py:obj:`~.cudaStream_t` to use an implicit stream with per-thread synchronization behavior. @@ -5204,7 +5224,9 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaDeviceBlockingSync - Device flag - Use blocking synchronization [Deprecated] + Device flag - Use blocking synchronization + + [Deprecated] .. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleMask @@ -5389,7 +5411,7 @@ impl_private - +MANBRIEF device management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF @@ -5433,6 +5455,10 @@ This section describes the device management functions of the CUDA runtime appli Error Handling -------------- +MANBRIEF error handling functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the error handling functions of the CUDA runtime application programming interface. .. autofunction:: cuda.bindings.runtime.cudaGetLastError @@ -5443,6 +5469,10 @@ This section describes the error handling functions of the CUDA runtime applicat Stream Management ----------------- +MANBRIEF stream management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the stream management functions of the CUDA runtime application programming interface. .. autoclass:: cuda.bindings.runtime.cudaGraphRecaptureCallbackData @@ -5477,6 +5507,10 @@ This section describes the stream management functions of the CUDA runtime appli Event Management ---------------- +MANBRIEF event management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the event management functions of the CUDA runtime application programming interface. .. autofunction:: cuda.bindings.runtime.cudaEventCreate @@ -5491,6 +5525,10 @@ This section describes the event management functions of the CUDA runtime applic External Resource Interoperability ---------------------------------- +MANBRIEF External resource interoperability functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the external resource interoperability functions of the CUDA runtime application programming interface. .. autofunction:: cuda.bindings.runtime.cudaImportExternalMemory @@ -5505,6 +5543,10 @@ This section describes the external resource interoperability functions of the C Execution Control ----------------- +MANBRIEF execution control functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the execution control functions of the CUDA runtime application programming interface. @@ -5521,6 +5563,10 @@ Some functions have overloaded C++ API template versions documented separately i Occupancy --------- +MANBRIEF occupancy calculation functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the occupancy calculation functions of the CUDA runtime application programming interface. @@ -5538,6 +5584,10 @@ See cudaOccupancyMaxPotentialBlockSize (C++ API), cudaOccupancyMaxPotentialBlock Memory Management ----------------- +MANBRIEF memory management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the memory management functions of the CUDA runtime application programming interface. @@ -5608,9 +5658,13 @@ Some functions have overloaded C++ API template versions documented separately i Stream Ordered Memory Allocator ------------------------------- -**overview** +MANBRIEF Functions for performing allocation and free operations in stream order. Functions for controlling the behavior of the underlying allocator. (CURRENT_FILE) ENDMANBRIEF + + + +**overview** The asynchronous allocator allows the user to allocate and free in stream order. All asynchronous accesses of the allocation must happen between the stream executions of the allocation and the free. If the memory is accessed outside of the promised stream order, a use before allocation / use after free error will cause undefined behavior. @@ -5622,8 +5676,6 @@ The allocator is free to reallocate the memory as long as it can guarantee that **Supported Platforms** - - Whether or not a device supports the integrated stream ordered memory allocator may be queried by calling cudaDeviceGetAttribute() with the device attribute cudaDevAttrMemoryPoolsSupported. .. autofunction:: cuda.bindings.runtime.cudaMallocAsync @@ -5647,16 +5699,18 @@ Whether or not a device supports the integrated stream ordered memory allocator Unified Addressing ------------------ -This section describes the unified addressing functions of the CUDA runtime application programming interface. +MANBRIEF unified addressing functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF +This section describes the unified addressing functions of the CUDA runtime application programming interface. -**Overview** +**Overview** + CUDA devices can share a unified address space with the host. For these devices there is no distinction between a device pointer and a host pointer -- the same pointer value may be used to access memory from the host program and from a kernel running on the device (with exceptions enumerated below). @@ -5667,8 +5721,6 @@ CUDA devices can share a unified address space with the host. **Supported Platforms** - - Whether or not a device supports unified addressing may be queried by calling cudaGetDeviceProperties() with the device property cudaDeviceProp::unifiedAddressing. Unified addressing is automatically enabled in 64-bit processes . @@ -5679,8 +5731,6 @@ Unified addressing is automatically enabled in 64-bit processes . **Looking Up Information from Pointer Values** - - It is possible to look up information about the memory which backs a pointer value. For instance, one may want to know if a pointer points to host or device memory. As another example, in the case of device memory, one may want to know on which CUDA device the memory resides. These properties may be queried using the function cudaPointerGetAttributes() Since pointers are unique, it is not necessary to specify information about the pointers specified to cudaMemcpy() and other copy functions. @@ -5693,8 +5743,6 @@ Since pointers are unique, it is not necessary to specify information about the **Automatic Mapping of Host Allocated Host Memory** - - All host memory allocated through all devices using cudaMallocHost() and cudaHostAlloc() is always directly accessible from all devices that support unified addressing. This is the case regardless of whether or not the flags cudaHostAllocPortable and cudaHostAllocMapped are specified. The pointer value through which allocated host memory may be accessed in kernels on all devices that support unified addressing is the same as the pointer value through which that memory is accessed on the host. It is not necessary to call cudaHostGetDevicePointer() to get the device pointer for these allocations. @@ -5709,8 +5757,6 @@ Note that this is not the case for memory allocated using the flag cudaHostAlloc **Direct Access of Peer Memory** - - Upon enabling direct access from a device that supports unified addressing to another peer device that supports unified addressing using cudaDeviceEnablePeerAccess() all memory allocated in the peer device using cudaMalloc() and cudaMallocPitch() will immediately be accessible by the current device. The device pointer value through which any peer's memory may be accessed in the current device is the same pointer value through which that memory may be accessed from the peer device. @@ -5719,8 +5765,6 @@ Upon enabling direct access from a device that supports unified addressing to an **Exceptions, Disjoint Addressing** - - Not all memory may be accessed on devices through the same pointer value through which they are accessed on the host. These exceptions are host memory registered using cudaHostRegister() and host memory allocated using the flag cudaHostAllocWriteCombined. For these exceptions, there exists a distinct host and device address for the memory. The device address is guaranteed to not overlap any valid host pointer range and is guaranteed to have the same value across all devices that support unified addressing. @@ -5732,6 +5776,10 @@ This device address may be queried using cudaHostGetDevicePointer() when a devic Peer Device Memory Access ------------------------- +MANBRIEF peer device memory access functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the peer device memory access functions of the CUDA runtime application programming interface. .. autofunction:: cuda.bindings.runtime.cudaDeviceCanAccessPeer @@ -5741,7 +5789,7 @@ This section describes the peer device memory access functions of the CUDA runti OpenGL Interoperability ----------------------- -impl_private +impl_private @@ -5819,6 +5867,10 @@ This section describes the EGL interoperability functions of the CUDA runtime ap Graphics Interoperability ------------------------- +MANBRIEF graphics interoperability functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the graphics interoperability functions of the CUDA runtime application programming interface. .. autofunction:: cuda.bindings.runtime.cudaGraphicsUnregisterResource @@ -5832,6 +5884,10 @@ This section describes the graphics interoperability functions of the CUDA runti Texture Object Management ------------------------- +MANBRIEF texture object management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the low level texture object management functions of the CUDA runtime application programming interface. The texture object API is only supported on devices of compute capability 3.0 or higher. .. autofunction:: cuda.bindings.runtime.cudaGetChannelDesc @@ -5845,6 +5901,10 @@ This section describes the low level texture object management functions of the Surface Object Management ------------------------- +MANBRIEF surface object management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the low level texture object management functions of the CUDA runtime application programming interface. The surface object API is only supported on devices of compute capability 3.0 or higher. .. autofunction:: cuda.bindings.runtime.cudaCreateSurfaceObject @@ -5863,6 +5923,10 @@ Version Management Error Log Management Functions ------------------------------ +MANBRIEF error log management interface for the CUDA Runtime and Driver (CURRENT_FILE) ENDMANBRIEF + + + This section describes the error log management functions of the CUDA runtime application programming interface. The Error Log Management interface will operate on both the CUDA Driver and CUDA Runtime. .. autoclass:: cuda.bindings.runtime.cudaLogsCallback_t @@ -5875,6 +5939,10 @@ This section describes the error log management functions of the CUDA runtime ap Graph Management ---------------- +MANBRIEF graph management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the graph management functions of CUDA runtime application programming interface. .. autofunction:: cuda.bindings.runtime.cudaGraphCreate @@ -5970,6 +6038,10 @@ This section describes the graph management functions of CUDA runtime applicatio Driver Entry Point Access ------------------------- +MANBRIEF driver entry point access functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the driver entry point access functions of CUDA runtime application programming interface. .. autofunction:: cuda.bindings.runtime.cudaGetDriverEntryPoint @@ -5978,6 +6050,10 @@ This section describes the driver entry point access functions of CUDA runtime a Library Management ------------------ +MANBRIEF library management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the library management functions of the CUDA runtime application programming interface. .. autofunction:: cuda.bindings.runtime.cudaLibraryLoadData @@ -5994,16 +6070,18 @@ This section describes the library management functions of the CUDA runtime appl Execution Context Management ---------------------------- -This section describes the execution context management functions of the CUDA runtime application programming interface. +MANBRIEF execution context management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF +This section describes the execution context management functions of the CUDA runtime application programming interface. -**Overview** +**Overview** + A CUDA execution context cudaExecutionContext_t serves as an abstraction for the contexts exposed by the CUDA Runtime, specifically green contexts and the primary context, and provides a unified programming model and API interface for contexts in the Runtime. There are two primary ways today to obtain an execution context: @@ -6052,7 +6130,7 @@ Once you have an execution context at hand, you can perform context-level operat -- Performing context-level graph node operations via cudaGraphAddNode by specifying the context in ``nodeParams``\ . Note that individual node creation APIs, such as cudaGraphAddKernelNode, do not support specifying an execution context. +- Performing context-level graph node operations via cudaGraphAddNode by specifying the context in ``nodeParams``. Note that individual node creation APIs, such as cudaGraphAddKernelNode, do not support specifying an execution context. @@ -6072,8 +6150,6 @@ Note: Developers should treat cudaExecutionContext_t as an opaque handle and avo **Lifetime of CUDA Resources** - - The lifetime of CUDA resources (memory, streams, events, modules, etc) is not tied to the lifetime of the execution context. Their lifetime is tied to the device against which they were created. As such, usage of cudaDeviceReset() should be avoided to persist the lifetime of these resources. @@ -6082,16 +6158,12 @@ The lifetime of CUDA resources (memory, streams, events, modules, etc) is not ti **APIs Operating on Current Context** - - The CUDA runtime does not provide a way to set an execution context as current. Since, the majority of the runtime APIs operate on the current context, we document below how the developer can work with these APIs. **APIs Operating on Device Resources** - - To work with these APIs (for example, cudaMalloc, cudaEventCreate, etc), developers are expected to call cudaSetDevice() prior to invoking them. Doing so does not impact functional correctness as these APIs operate on resources that are device-wide. If users have a context handle at hand, they can get the device handle from the context handle using cudaExecutionCtxGetDevice(). @@ -6100,8 +6172,6 @@ To work with these APIs (for example, cudaMalloc, cudaEventCreate, etc), develop **APIs Operating on Context Resources** - - These APIs (for example, cudaLaunchKernel, cudaMemcpyAsync, cudaMemsetAsync, etc) take in a stream and resources are inferred from the context bound to the stream at creation. See cudaExecutionCtxStreamCreate for more details. Developers are expected to use the stream-based APIs for context awareness and always pass an explicit stream handle to ensure context-awareness, and avoid reliance on the default NULL stream, which implicitly binds to the current context. @@ -6112,8 +6182,6 @@ These APIs (for example, cudaLaunchKernel, cudaMemcpyAsync, cudaMemsetAsync, etc **Green Contexts** - - Green contexts are a lightweight alternative to traditional contexts, that can be used to select a subset of device resources. This allows the developer to, for example, select SMs from distinct spatial partitions of the GPU and target them via CUDA stream operations, kernel launches, etc. Here are the broad initial steps to follow to get started: @@ -6216,9 +6284,9 @@ There are two possible partition operations - with cudaDevSmResourceSplitByCount Workqueues -For ``cudaDevResourceTypeWorkqueueConfig``\ , the resource specifies the expected maximum number of concurrent stream-ordered workloads via the ``wqConcurrencyLimit``\ field. The ``sharingScope``\ field determines how workqueue resources are shared: +For ``cudaDevResourceTypeWorkqueueConfig``, the resource specifies the expected maximum number of concurrent stream-ordered workloads via the ``wqConcurrencyLimit`` field. The ``sharingScope`` field determines how workqueue resources are shared: -- ``cudaDevWorkqueueConfigScopeDeviceCtx:``\ Use all shared workqueue resources across all contexts (default driver behavior). +- ``cudaDevWorkqueueConfigScopeDeviceCtx:`` Use all shared workqueue resources across all contexts (default driver behavior). @@ -6226,7 +6294,7 @@ For ``cudaDevResourceTypeWorkqueueConfig``\ , the resource specifies the expecte -- ``cudaDevWorkqueueConfigScopeGreenCtxBalanced:``\ When possible, use non-overlapping workqueue resources with other balanced green contexts. +- ``cudaDevWorkqueueConfigScopeGreenCtxBalanced:`` When possible, use non-overlapping workqueue resources with other balanced green contexts. @@ -6238,17 +6306,17 @@ For ``cudaDevResourceTypeWorkqueueConfig``\ , the resource specifies the expecte The maximum concurrency limit depends on ::CUDA_DEVICE_MAX_CONNECTIONS and can be queried from the device via cudaDeviceGetDevResource. Configurations may exceed this concurrency limit, but the driver will not guarantee that work submission remains non-overlapping. -For ``cudaDevResourceTypeWorkqueue``\ , the resource represents a pre-existing workqueue that can be retrieved from existing execution contexts. This allows reusing workqueue resources across different execution contexts. +For ``cudaDevResourceTypeWorkqueue``, the resource represents a pre-existing workqueue that can be retrieved from existing execution contexts. This allows reusing workqueue resources across different execution contexts. On Concurrency -Even if the green contexts have disjoint SM partitions, it is not guaranteed that the kernels launched in them will run concurrently or have forward progress guarantees. This is due to other resources that could cause a dependency. Using a combination of disjoint SMs and ``cudaDevWorkqueueConfigScopeGreenCtxBalanced``\ workqueue configurations can provide the best chance of avoiding interference. More resources will be added in the future to provide stronger guarantees. +Even if the green contexts have disjoint SM partitions, it is not guaranteed that the kernels launched in them will run concurrently or have forward progress guarantees. This is due to other resources that could cause a dependency. Using a combination of disjoint SMs and ``cudaDevWorkqueueConfigScopeGreenCtxBalanced`` workqueue configurations can provide the best chance of avoiding interference. More resources will be added in the future to provide stronger guarantees. Additionally, there are two known scenarios, where its possible for the workload to run on more SMs than was provisioned (but never less). -- On Volta+ MPS: When ``CUDA_MPS_ACTIVE_THREAD_PERCENTAGE``\ is used, the set of SMs that are used for running kernels can be scaled up to the value of SMs used for the MPS client. +- On Volta+ MPS: When ``CUDA_MPS_ACTIVE_THREAD_PERCENTAGE`` is used, the set of SMs that are used for running kernels can be scaled up to the value of SMs used for the MPS client. @@ -6281,26 +6349,28 @@ impl_private +MANBRIEF C++ high level API functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - -This section describes the C++ high level API functions of the CUDA runtime application programming interface. To use these functions, your application needs to be compiled with the ``nvcc``\ compiler. +This section describes the C++ high level API functions of the CUDA runtime application programming interface. To use these functions, your application needs to be compiled with the ``nvcc`` compiler. Interactions with the CUDA Driver API ------------------------------------- -This section describes the interactions between the CUDA Driver API and the CUDA Runtime API +MANBRIEF interactions between CUDA Driver API and CUDA Runtime API (CURRENT_FILE) ENDMANBRIEF +This section describes the interactions between the CUDA Driver API and the CUDA Runtime API -**Execution Contexts** +**Execution Contexts** + The CUDA Runtime provides cudaExecutionContext_t as an abstraction over driver-level contexts—specifically, green contexts and the primary context. There are two primary ways to obtain an execution context: @@ -6331,8 +6401,6 @@ Note: Developers should treat cudaExecutionContext_t as an opaque handle and avo **Primary Context (aka Device Execution Context)** - - The primary context is the default execution context associated with a device in the Runtime. It can be obtained via a call to cudaDeviceGetExecutionCtx(). There is a one-to-one mapping between CUDA devices in the runtime and their primary contexts within a process. From the CUDA Runtime’s perspective, a device and its primary context are functionally synonymous. @@ -6345,8 +6413,6 @@ Unless explicitly overridden, either by making a different context current via t **Initialization and Tear-Down** - - Unless an explicit execution context is specified (see “Execution Context Management” for APIs), CUDA Runtime API calls operate on the CUDA Driver ::CUcontext which is current to the calling host thread. If no ::CUcontext is current to the calling thread when a CUDA Runtime API call which requires an active context is made, then the primary context (device execution context) for a device will be selected, made current to the calling thread, and initialized. The context will be initialized using the parameters specified by the CUDA Runtime API functions cudaSetDeviceFlags(), ::cudaD3D9SetDirect3DDevice(), ::cudaD3D10SetDirect3DDevice(), ::cudaD3D11SetDirect3DDevice(), cudaGLSetGLDevice(), and cudaVDPAUSetVDPAUDevice(). Note that these functions will fail with cudaErrorSetOnActiveProcess if they are called when the primary context for the specified device has already been initialized, except for cudaSetDeviceFlags() which will simply overwrite the previous settings. The function cudaInitDevice() ensures that the primary context is initialized for the requested device but does not make it current to the calling thread. @@ -6363,8 +6429,6 @@ Note that primary contexts are shared resources. It is recommended that the prim **CUcontext Interoperability** - - Note that the use of multiple ::CUcontext s per device within a single process will substantially degrade performance and is strongly discouraged. Instead, it is highly recommended to either use execution contexts cudaExecutionContext_t or the implicit one-to-one device-to-primary context mapping for the process provided by the CUDA Runtime API. If a non-primary ::CUcontext created by the CUDA Driver API is current to a thread then the CUDA Runtime API calls to that thread will operate on that ::CUcontext, with some exceptions listed below. Interoperability between data types is discussed in the following sections. @@ -6381,8 +6445,6 @@ Please note that attaching to legacy CUcontext (those with a version of 3010 as **Interactions between CUstream and cudaStream_t** - - The types ::CUstream and cudaStream_t are identical and may be used interchangeably. @@ -6391,8 +6453,6 @@ The types ::CUstream and cudaStream_t are identical and may be used interchangea **Interactions between CUevent and cudaEvent_t** - - The types ::CUevent and cudaEvent_t are identical and may be used interchangeably. @@ -6401,13 +6461,11 @@ The types ::CUevent and cudaEvent_t are identical and may be used interchangeabl **Interactions between CUarray and cudaArray_t** +The types ::CUarray and struct ::cudaArray \* represent the same data type and may be used interchangeably by casting the two types between each other. +In order to use a ::CUarray in a CUDA Runtime API function which takes a struct ::cudaArray \*, it is necessary to explicitly cast the ::CUarray to a struct ::cudaArray \*. -The types ::CUarray and struct ::cudaArray * represent the same data type and may be used interchangeably by casting the two types between each other. - -In order to use a ::CUarray in a CUDA Runtime API function which takes a struct ::cudaArray *, it is necessary to explicitly cast the ::CUarray to a struct ::cudaArray *. - -In order to use a struct ::cudaArray * in a CUDA Driver API function which takes a ::CUarray, it is necessary to explicitly cast the struct ::cudaArray * to a ::CUarray . +In order to use a struct ::cudaArray \* in a CUDA Driver API function which takes a ::CUarray, it is necessary to explicitly cast the struct ::cudaArray \* to a ::CUarray . @@ -6415,8 +6473,6 @@ In order to use a struct ::cudaArray * in a CUDA Driver API function which takes **Interactions between CUgraphicsResource and cudaGraphicsResource_t** - - The types ::CUgraphicsResource and cudaGraphicsResource_t represent the same data type and may be used interchangeably by casting the two types between each other. In order to use a ::CUgraphicsResource in a CUDA Runtime API function which takes a cudaGraphicsResource_t, it is necessary to explicitly cast the ::CUgraphicsResource to a cudaGraphicsResource_t. @@ -6429,8 +6485,6 @@ In order to use a cudaGraphicsResource_t in a CUDA Driver API function which tak **Interactions between CUtexObject and cudaTextureObject_t** - - The types ::CUtexObject and cudaTextureObject_t represent the same data type and may be used interchangeably by casting the two types between each other. In order to use a ::CUtexObject in a CUDA Runtime API function which takes a cudaTextureObject_t, it is necessary to explicitly cast the ::CUtexObject to a cudaTextureObject_t. @@ -6443,8 +6497,6 @@ In order to use a cudaTextureObject_t in a CUDA Driver API function which takes **Interactions between CUsurfObject and cudaSurfaceObject_t** - - The types ::CUsurfObject and cudaSurfaceObject_t represent the same data type and may be used interchangeably by casting the two types between each other. In order to use a ::CUsurfObject in a CUDA Runtime API function which takes a cudaSurfaceObject_t, it is necessary to explicitly cast the ::CUsurfObject to a cudaSurfaceObject_t. @@ -6457,8 +6509,6 @@ In order to use a cudaSurfaceObject_t in a CUDA Driver API function which takes **Interactions between CUfunction and cudaFunction_t** - - The types ::CUfunction and cudaFunction_t represent the same data type and may be used interchangeably by casting the two types between each other. In order to use a cudaFunction_t in a CUDA Driver API function which takes a ::CUfunction, it is necessary to explicitly cast the cudaFunction_t to a ::CUfunction. @@ -6469,8 +6519,6 @@ In order to use a cudaFunction_t in a CUDA Driver API function which takes a ::C **Interactions between CUkernel and cudaKernel_t** - - The types ::CUkernel and cudaKernel_t represent the same data type and may be used interchangeably by casting the two types between each other. In order to use a cudaKernel_t in a CUDA Driver API function which takes a ::CUkernel, it is necessary to explicitly cast the cudaKernel_t to a ::CUkernel. @@ -6480,6 +6528,10 @@ In order to use a cudaKernel_t in a CUDA Driver API function which takes a ::CUk Profiler Control ---------------- +MANBRIEF profiler control functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF + + + This section describes the profiler control functions of the CUDA runtime application programming interface. .. autofunction:: cuda.bindings.runtime.cudaProfilerStart From 86561aa17876b6fd95f84eadcf997aba91bf4c2c Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 2 Jul 2026 16:59:29 -0700 Subject: [PATCH 05/22] run_cybind_native 13.3.0 ../cuda-python --- cuda_bindings/cuda/bindings/cudla.pyx | 331 +-- cuda_bindings/cuda/bindings/cufile.pyx | 372 +-- cuda_bindings/cuda/bindings/nvfatbin.pyx | 13 +- cuda_bindings/cuda/bindings/nvjitlink.pyx | 15 +- cuda_bindings/cuda/bindings/nvml.pyx | 2605 +++++++++++---------- cuda_bindings/cuda/bindings/nvvm.pyx | 14 +- 6 files changed, 1701 insertions(+), 1649 deletions(-) diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index c301a9e38e4..1b62676a0e3 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -1,25 +1,50 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. - -cimport cython # NOQA -from libc.stdint cimport intptr_t, uintptr_t - -from ._internal.utils cimport get_buffer_pointer - -from enum import IntEnum as _IntEnum - -from libc.stdlib cimport calloc, free, malloc -from cython cimport view -cimport cpython.buffer -cimport cpython.memoryview -cimport cpython -from libc.string cimport memcmp, memcpy +# <<<< PREAMBLE CONTENT >>>> + +cimport cpython as _cyb_cpython +cimport cpython.buffer as _cyb_cpython_buffer +from cython cimport view as _cyb_view +from libc.stdlib cimport ( + calloc as _cyb_calloc, + free as _cyb_free, + malloc as _cyb_malloc, +) +from libc.string cimport ( + memcmp as _cyb_memcmp, + memcpy as _cyb_memcpy, +) +from enum import IntEnum as _cyb_IntEnum import numpy as _numpy +cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL + +cdef _cyb_from_buffer(buffer, size, lowpp_type): + cdef _cyb_cpython.Py_buffer view + if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + _cyb_cpython.PyBuffer_Release(&view) -cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): +cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -31,33 +56,16 @@ cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) +# <<<< END OF PREAMBLE CONTENT >>>> -cdef __from_buffer(buffer, size, lowpp_type): - cdef Py_buffer view - if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - cpython.PyBuffer_Release(&view) +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. -cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +cimport cython # NOQA +from libc.stdint cimport intptr_t, uintptr_t +from libc.stdlib cimport malloc, free + +from ._internal.utils cimport get_buffer_pointer @@ -93,7 +101,7 @@ cdef class ExternalMemoryHandleDesc: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = _cyb_calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") self._owner = None @@ -105,7 +113,7 @@ cdef class ExternalMemoryHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ExternalMemoryHandleDesc object at {hex(id(self))}>" @@ -126,20 +134,20 @@ cdef class ExternalMemoryHandleDesc: if not isinstance(other, ExternalMemoryHandleDesc): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -171,7 +179,7 @@ cdef class ExternalMemoryHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalMemoryHandleDesc instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) + return _cyb_from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) @staticmethod def from_data(data): @@ -180,7 +188,7 @@ cdef class ExternalMemoryHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_memory_handle_desc_dtype` holding the data. """ - return __from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) + return _cyb_from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -195,10 +203,10 @@ cdef class ExternalMemoryHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalMemoryHandleDesc obj = ExternalMemoryHandleDesc.__new__(ExternalMemoryHandleDesc) if owner is None: - obj._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + obj._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -235,7 +243,7 @@ cdef class ExternalSemaphoreHandleDesc: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = _cyb_calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") self._owner = None @@ -247,7 +255,7 @@ cdef class ExternalSemaphoreHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ExternalSemaphoreHandleDesc object at {hex(id(self))}>" @@ -268,20 +276,20 @@ cdef class ExternalSemaphoreHandleDesc: if not isinstance(other, ExternalSemaphoreHandleDesc): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -302,7 +310,7 @@ cdef class ExternalSemaphoreHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalSemaphoreHandleDesc instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) + return _cyb_from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) @staticmethod def from_data(data): @@ -311,7 +319,7 @@ cdef class ExternalSemaphoreHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_semaphore_handle_desc_dtype` holding the data. """ - return __from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) + return _cyb_from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -326,10 +334,10 @@ cdef class ExternalSemaphoreHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalSemaphoreHandleDesc obj = ExternalSemaphoreHandleDesc.__new__(ExternalSemaphoreHandleDesc) if owner is None: - obj._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + obj._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -377,7 +385,7 @@ cdef class ModuleTensorDescriptor: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaModuleTensorDescriptor)) + self._ptr = _cyb_calloc(1, sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") self._owner = None @@ -389,7 +397,7 @@ cdef class ModuleTensorDescriptor: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ModuleTensorDescriptor object at {hex(id(self))}>" @@ -410,20 +418,20 @@ cdef class ModuleTensorDescriptor: if not isinstance(other, ModuleTensorDescriptor): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) + self._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -433,7 +441,7 @@ cdef class ModuleTensorDescriptor: @property def name(self): """~_numpy.int8: (array of length 81).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -443,7 +451,7 @@ cdef class ModuleTensorDescriptor: if len(buf) >= 81: raise ValueError("String too long for field name, max length is 80") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 81) + _cyb_memcpy((self._ptr[0].name), ptr, 81) @property def size_(self): @@ -558,7 +566,7 @@ cdef class ModuleTensorDescriptor: @property def stride(self): """~_numpy.uint32: (array of length 8).""" - cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].stride)) return _numpy.asarray(arr) @@ -568,14 +576,14 @@ cdef class ModuleTensorDescriptor: raise ValueError("This ModuleTensorDescriptor instance is read-only") if len(val) != 8: raise ValueError(f"Expected length { 8 } for field stride, got {len(val)}") - cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) + _cyb_memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an ModuleTensorDescriptor instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) + return _cyb_from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) @staticmethod def from_data(data): @@ -584,7 +592,7 @@ cdef class ModuleTensorDescriptor: Args: data (_numpy.ndarray): a single-element array of dtype `module_tensor_descriptor_dtype` holding the data. """ - return __from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) + return _cyb_from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -599,10 +607,10 @@ cdef class ModuleTensorDescriptor: raise ValueError("ptr must not be null (0)") cdef ModuleTensorDescriptor obj = ModuleTensorDescriptor.__new__(ModuleTensorDescriptor) if owner is None: - obj._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) + obj._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) obj._owner = None obj._owned = True else: @@ -640,7 +648,7 @@ cdef class Fence: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CudlaFence)) + self._ptr = _cyb_calloc(1, sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") self._owner = None @@ -652,7 +660,7 @@ cdef class Fence: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Fence object at {hex(id(self))}>" @@ -673,20 +681,20 @@ cdef class Fence: if not isinstance(other, Fence): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CudlaFence)) + self._ptr = _cyb_malloc(sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") - memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -718,7 +726,7 @@ cdef class Fence: @staticmethod def from_buffer(buffer): """Create an Fence instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CudlaFence), Fence) + return _cyb_from_buffer(buffer, sizeof(CudlaFence), Fence) @staticmethod def from_data(data): @@ -727,7 +735,7 @@ cdef class Fence: Args: data (_numpy.ndarray): a single-element array of dtype `fence_dtype` holding the data. """ - return __from_data(data, "fence_dtype", fence_dtype, Fence) + return _cyb_from_data(data, "fence_dtype", fence_dtype, Fence) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -742,10 +750,10 @@ cdef class Fence: raise ValueError("ptr must not be null (0)") cdef Fence obj = Fence.__new__(Fence) if owner is None: - obj._ptr = malloc(sizeof(CudlaFence)) + obj._ptr = _cyb_malloc(sizeof(CudlaFence)) if obj._ptr == NULL: raise MemoryError("Error allocating Fence") - memcpy((obj._ptr), ptr, sizeof(CudlaFence)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CudlaFence)) obj._owner = None obj._owned = True else: @@ -777,7 +785,7 @@ cdef class DevAttribute: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaDevAttribute)) + self._ptr = _cyb_calloc(1, sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") self._owner = None @@ -789,7 +797,7 @@ cdef class DevAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DevAttribute object at {hex(id(self))}>" @@ -810,20 +818,20 @@ cdef class DevAttribute: if not isinstance(other, DevAttribute): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaDevAttribute)) + self._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -855,7 +863,7 @@ cdef class DevAttribute: @staticmethod def from_buffer(buffer): """Create an DevAttribute instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) + return _cyb_from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) @staticmethod def from_data(data): @@ -864,7 +872,7 @@ cdef class DevAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `dev_attribute_dtype` holding the data. """ - return __from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) + return _cyb_from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -879,10 +887,10 @@ cdef class DevAttribute: raise ValueError("ptr must not be null (0)") cdef DevAttribute obj = DevAttribute.__new__(DevAttribute) if owner is None: - obj._ptr = malloc(sizeof(cudlaDevAttribute)) + obj._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) obj._owner = None obj._owned = True else: @@ -916,7 +924,7 @@ cdef class ModuleAttribute: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaModuleAttribute)) + self._ptr = _cyb_calloc(1, sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") self._owner = None @@ -928,7 +936,7 @@ cdef class ModuleAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ModuleAttribute object at {hex(id(self))}>" @@ -949,20 +957,20 @@ cdef class ModuleAttribute: if not isinstance(other, ModuleAttribute): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaModuleAttribute)) + self._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1016,7 +1024,7 @@ cdef class ModuleAttribute: @staticmethod def from_buffer(buffer): """Create an ModuleAttribute instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) + return _cyb_from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) @staticmethod def from_data(data): @@ -1025,7 +1033,7 @@ cdef class ModuleAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `module_attribute_dtype` holding the data. """ - return __from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) + return _cyb_from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1040,10 +1048,10 @@ cdef class ModuleAttribute: raise ValueError("ptr must not be null (0)") cdef ModuleAttribute obj = ModuleAttribute.__new__(ModuleAttribute) if owner is None: - obj._ptr = malloc(sizeof(cudlaModuleAttribute)) + obj._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) obj._owner = None obj._owned = True else: @@ -1082,7 +1090,7 @@ cdef class WaitEvents: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(cudlaWaitEvents)) + self._ptr = _cyb_calloc(1, sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") self._owner = None @@ -1095,7 +1103,7 @@ cdef class WaitEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.WaitEvents object at {hex(id(self))}>" @@ -1116,20 +1124,20 @@ cdef class WaitEvents: if not isinstance(other, WaitEvents): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaWaitEvents)) + self._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1155,7 +1163,7 @@ cdef class WaitEvents: @staticmethod def from_buffer(buffer): """Create an WaitEvents instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) + return _cyb_from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) @staticmethod def from_data(data): @@ -1164,7 +1172,7 @@ cdef class WaitEvents: Args: data (_numpy.ndarray): a single-element array of dtype `wait_events_dtype` holding the data. """ - return __from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) + return _cyb_from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1179,10 +1187,10 @@ cdef class WaitEvents: raise ValueError("ptr must not be null (0)") cdef WaitEvents obj = WaitEvents.__new__(WaitEvents) if owner is None: - obj._ptr = malloc(sizeof(cudlaWaitEvents)) + obj._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) obj._owner = None obj._owned = True else: @@ -1223,7 +1231,7 @@ cdef class SignalEvents: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(cudlaSignalEvents)) + self._ptr = _cyb_calloc(1, sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") self._owner = None @@ -1236,7 +1244,7 @@ cdef class SignalEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.SignalEvents object at {hex(id(self))}>" @@ -1257,20 +1265,20 @@ cdef class SignalEvents: if not isinstance(other, SignalEvents): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaSignalEvents)) + self._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1281,8 +1289,8 @@ cdef class SignalEvents: def dev_ptrs(self): """int: """ if self._ptr[0].devPtrs == NULL or self._ptr[0].numEvents == 0: - return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef view.array arr = view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].devPtrs) return arr @@ -1294,7 +1302,7 @@ cdef class SignalEvents: self._ptr[0].numEvents = _n if _n == 0: return - cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1321,7 +1329,7 @@ cdef class SignalEvents: @staticmethod def from_buffer(buffer): """Create an SignalEvents instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) + return _cyb_from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) @staticmethod def from_data(data): @@ -1330,7 +1338,7 @@ cdef class SignalEvents: Args: data (_numpy.ndarray): a single-element array of dtype `signal_events_dtype` holding the data. """ - return __from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) + return _cyb_from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1345,10 +1353,10 @@ cdef class SignalEvents: raise ValueError("ptr must not be null (0)") cdef SignalEvents obj = SignalEvents.__new__(SignalEvents) if owner is None: - obj._ptr = malloc(sizeof(cudlaSignalEvents)) + obj._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) obj._owner = None obj._owned = True else: @@ -1393,7 +1401,7 @@ cdef class Task: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(cudlaTask)) + self._ptr = _cyb_calloc(1, sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") self._owner = None @@ -1406,7 +1414,7 @@ cdef class Task: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Task object at {hex(id(self))}>" @@ -1427,20 +1435,20 @@ cdef class Task: if not isinstance(other, Task): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaTask)) + self._ptr = _cyb_malloc(sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1462,8 +1470,8 @@ cdef class Task: def output_tensor(self): """int: """ if self._ptr[0].outputTensor == NULL or self._ptr[0].numOutputTensors == 0: - return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef view.array arr = view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].outputTensor) return arr @@ -1475,7 +1483,7 @@ cdef class Task: self._ptr[0].numOutputTensors = _n if _n == 0: return - cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1487,8 +1495,8 @@ cdef class Task: def input_tensor(self): """int: """ if self._ptr[0].inputTensor == NULL or self._ptr[0].numInputTensors == 0: - return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef view.array arr = view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].inputTensor) return arr @@ -1500,7 +1508,7 @@ cdef class Task: self._ptr[0].numInputTensors = _n if _n == 0: return - cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1533,7 +1541,7 @@ cdef class Task: @staticmethod def from_buffer(buffer): """Create an Task instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaTask), Task) + return _cyb_from_buffer(buffer, sizeof(cudlaTask), Task) @staticmethod def from_data(data): @@ -1542,7 +1550,7 @@ cdef class Task: Args: data (_numpy.ndarray): a single-element array of dtype `task_dtype` holding the data. """ - return __from_data(data, "task_dtype", task_dtype, Task) + return _cyb_from_data(data, "task_dtype", task_dtype, Task) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1557,10 +1565,10 @@ cdef class Task: raise ValueError("ptr must not be null (0)") cdef Task obj = Task.__new__(Task) if owner is None: - obj._ptr = malloc(sizeof(cudlaTask)) + obj._ptr = _cyb_malloc(sizeof(cudlaTask)) if obj._ptr == NULL: raise MemoryError("Error allocating Task") - memcpy((obj._ptr), ptr, sizeof(cudlaTask)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaTask)) obj._owner = None obj._owned = True else: @@ -1576,7 +1584,7 @@ cdef class Task: # Enum ############################################################################### -class Status(_IntEnum): +class Status(_cyb_IntEnum): """ See `cudlaStatus`. """ @@ -1605,14 +1613,14 @@ class Status(_IntEnum): ErrorDlaErrDataMismatch = cudlaErrorDlaErrDataMismatch ErrorUnknown = cudlaErrorUnknown -class Mode(_IntEnum): +class Mode(_cyb_IntEnum): """ See `cudlaMode`. """ CUDA_DLA = CUDLA_CUDA_DLA STANDALONE = CUDLA_STANDALONE -class ModuleAttributeType(_IntEnum): +class ModuleAttributeType(_cyb_IntEnum): """ See `cudlaModuleAttributeType`. """ @@ -1623,21 +1631,21 @@ class ModuleAttributeType(_IntEnum): NUM_OUTPUT_TASK_STATISTICS = CUDLA_NUM_OUTPUT_TASK_STATISTICS OUTPUT_TASK_STATISTICS_DESCRIPTORS = CUDLA_OUTPUT_TASK_STATISTICS_DESCRIPTORS -class FenceType(_IntEnum): +class FenceType(_cyb_IntEnum): """ See `cudlaFenceType`. """ NVSCISYNC_FENCE = CUDLA_NVSCISYNC_FENCE NVSCISYNC_FENCE_SOF = CUDLA_NVSCISYNC_FENCE_SOF -class ModuleLoadFlags(_IntEnum): +class ModuleLoadFlags(_cyb_IntEnum): """ See `cudlaModuleLoadFlags`. """ MODULE_DEFAULT = CUDLA_MODULE_DEFAULT MODULE_ENABLE_FAULT_DIAGNOSTICS = CUDLA_MODULE_ENABLE_FAULT_DIAGNOSTICS -class SubmissionFlags(_IntEnum): +class SubmissionFlags(_cyb_IntEnum): """ See `cudlaSubmissionFlags`. """ @@ -1645,7 +1653,7 @@ class SubmissionFlags(_IntEnum): SUBMIT_SKIP_LOCK_ACQUIRE = CUDLA_SUBMIT_SKIP_LOCK_ACQUIRE SUBMIT_DIAGNOSTICS_TASK = CUDLA_SUBMIT_DIAGNOSTICS_TASK -class AccessPermissionFlags(_IntEnum): +class AccessPermissionFlags(_cyb_IntEnum): """ See `cudlaAccessPermissionFlags`. """ @@ -1653,7 +1661,7 @@ class AccessPermissionFlags(_IntEnum): READ_ONLY_PERM = CUDLA_READ_ONLY_PERM TASK_STATISTICS = CUDLA_TASK_STATISTICS -class DevAttributeType(_IntEnum): +class DevAttributeType(_cyb_IntEnum): """ See `cudlaDevAttributeType`. """ @@ -1825,3 +1833,4 @@ cpdef module_get_attributes(intptr_t h_module, int attr_type) except *: free(desc_buf) else: raise ValueError(f"Unknown attribute type: {attr_type}") +del _cyb_IntEnum diff --git a/cuda_bindings/cuda/bindings/cufile.pyx b/cuda_bindings/cuda/bindings/cufile.pyx index 7ed935e5791..80fb323e7ac 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -2,28 +2,53 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. - -cimport cython # NOQA -from libc cimport errno -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum - -import cython - -from cuda.bindings.driver import CUresult as pyCUresult - -from libc.stdlib cimport calloc, free, malloc -from cython cimport view -cimport cpython.buffer -cimport cpython.memoryview -cimport cpython -from libc.string cimport memcmp, memcpy +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +cimport cpython as _cyb_cpython +cimport cpython.buffer as _cyb_cpython_buffer +cimport cpython.memoryview as _cyb_cpython_memoryview +from cython cimport view as _cyb_view +from libc.stdlib cimport ( + calloc as _cyb_calloc, + free as _cyb_free, + malloc as _cyb_malloc, +) +from libc.string cimport ( + memcmp as _cyb_memcmp, + memcpy as _cyb_memcpy, +) +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum import numpy as _numpy +cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL + +cdef _cyb_from_buffer(buffer, size, lowpp_type): + cdef _cyb_cpython.Py_buffer view + if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + _cyb_cpython.PyBuffer_Release(&view) -cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): +cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -35,33 +60,17 @@ cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) +# <<<< END OF PREAMBLE CONTENT >>>> -cdef __from_buffer(buffer, size, lowpp_type): - cdef Py_buffer view - if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - cpython.PyBuffer_Release(&view) +cimport cython # NOQA +from libc cimport errno +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) -cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +import cython + +from cuda.bindings.driver import CUresult as pyCUresult ############################################################################### # POD @@ -88,7 +97,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof((NULL).handle)) + self._ptr = _cyb_calloc(1, sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") self._owner = None @@ -100,7 +109,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -121,20 +130,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof((NULL).handle)) + self._ptr = _cyb_malloc(sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -166,7 +175,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((NULL).handle), _py_anon_pod1) + return _cyb_from_buffer(buffer, sizeof((NULL).handle), _py_anon_pod1) @staticmethod def from_data(data): @@ -175,7 +184,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -190,10 +199,10 @@ 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 = malloc(sizeof((NULL).handle)) + obj._ptr = _cyb_malloc(sizeof((NULL).handle)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy((obj._ptr), ptr, sizeof((NULL).handle)) + _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).handle)) obj._owner = None obj._owned = True else: @@ -233,7 +242,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof((NULL).u.batch)) + self._ptr = _cyb_calloc(1, sizeof((NULL).u.batch)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") self._owner = None @@ -245,7 +254,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -266,20 +275,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof((NULL).u.batch)) + self._ptr = _cyb_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)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u.batch)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -333,7 +342,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((NULL).u.batch), _py_anon_pod3) + return _cyb_from_buffer(buffer, sizeof((NULL).u.batch), _py_anon_pod3) @staticmethod def from_data(data): @@ -342,7 +351,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -357,10 +366,10 @@ 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 = malloc(sizeof((NULL).u.batch)) + obj._ptr = _cyb_malloc(sizeof((NULL).u.batch)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) + _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) obj._owner = None obj._owned = True else: @@ -435,10 +444,10 @@ cdef class IOEvents: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def cookie(self): @@ -527,8 +536,8 @@ cdef class IOEvents: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOEvents obj = IOEvents.__new__(IOEvents) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOEvents_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_events_dtype) obj._data = data.view(_numpy.recarray) @@ -563,7 +572,7 @@ cdef class OpCounter: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileOpCounter_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") self._owner = None @@ -575,7 +584,7 @@ cdef class OpCounter: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.OpCounter object at {hex(id(self))}>" @@ -596,20 +605,20 @@ cdef class OpCounter: if not isinstance(other, OpCounter): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileOpCounter_t)) + self._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -641,7 +650,7 @@ cdef class OpCounter: @staticmethod def from_buffer(buffer): """Create an OpCounter instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) + return _cyb_from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) @staticmethod def from_data(data): @@ -650,7 +659,7 @@ cdef class OpCounter: Args: data (_numpy.ndarray): a single-element array of dtype `op_counter_dtype` holding the data. """ - return __from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) + return _cyb_from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -665,10 +674,10 @@ cdef class OpCounter: raise ValueError("ptr must not be null (0)") cdef OpCounter obj = OpCounter.__new__(OpCounter) if owner is None: - obj._ptr = malloc(sizeof(CUfileOpCounter_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) if obj._ptr == NULL: raise MemoryError("Error allocating OpCounter") - memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) obj._owner = None obj._owned = True else: @@ -770,10 +779,10 @@ cdef class PerGpuStats: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def uuid(self): @@ -1157,8 +1166,8 @@ cdef class PerGpuStats: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PerGpuStats obj = PerGpuStats.__new__(PerGpuStats) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfilePerGpuStats_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=per_gpu_stats_dtype) obj._data = data.view(_numpy.recarray) @@ -1230,10 +1239,10 @@ cdef class Descr: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def type(self): @@ -1320,8 +1329,8 @@ cdef class Descr: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Descr obj = Descr.__new__(Descr) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileDescr_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=descr_dtype) obj._data = data.view(_numpy.recarray) @@ -1349,7 +1358,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof((NULL).u)) + self._ptr = _cyb_calloc(1, sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") self._owner = None @@ -1361,7 +1370,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -1382,20 +1391,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof((NULL).u)) + self._ptr = _cyb_malloc(sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1412,12 +1421,12 @@ 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(cuda_bindings_cufile__anon_pod3) * 1) + _cyb_memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(cuda_bindings_cufile__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an _py_anon_pod2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) + return _cyb_from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) @staticmethod def from_data(data): @@ -1426,7 +1435,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1441,10 +1450,10 @@ 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 = malloc(sizeof((NULL).u)) + obj._ptr = _cyb_malloc(sizeof((NULL).u)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy((obj._ptr), ptr, sizeof((NULL).u)) + _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u)) obj._owner = None obj._owned = True else: @@ -1523,7 +1532,7 @@ cdef class StatsLevel1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileStatsLevel1_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") self._owner = None @@ -1535,7 +1544,7 @@ cdef class StatsLevel1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel1 object at {hex(id(self))}>" @@ -1556,20 +1565,20 @@ cdef class StatsLevel1: if not isinstance(other, StatsLevel1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileStatsLevel1_t)) + self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1586,7 +1595,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def write_ops(self): @@ -1598,7 +1607,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_register_ops(self): @@ -1610,7 +1619,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_deregister_ops(self): @@ -1622,7 +1631,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_register_ops(self): @@ -1634,7 +1643,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_deregister_ops(self): @@ -1646,7 +1655,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_submit_ops(self): @@ -1658,7 +1667,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_complete_ops(self): @@ -1670,7 +1679,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_setup_ops(self): @@ -1682,7 +1691,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_cancel_ops(self): @@ -1694,7 +1703,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_destroy_ops(self): @@ -1706,7 +1715,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_enqueued_ops(self): @@ -1718,7 +1727,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_enqueued_ops(self): @@ -1730,7 +1739,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_processed_ops(self): @@ -1742,7 +1751,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_processed_ops(self): @@ -1754,7 +1763,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_nvfs_submit_ops(self): @@ -1766,7 +1775,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_p2p_submit_ops(self): @@ -1778,7 +1787,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_aio_submit_ops(self): @@ -1790,7 +1799,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_iouring_submit_ops(self): @@ -1802,7 +1811,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_mixed_io_submit_ops(self): @@ -1814,7 +1823,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_total_submit_ops(self): @@ -1826,7 +1835,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def read_bytes(self): @@ -2073,7 +2082,7 @@ cdef class StatsLevel1: @staticmethod def from_buffer(buffer): """Create an StatsLevel1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) + return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) @staticmethod def from_data(data): @@ -2082,7 +2091,7 @@ cdef class StatsLevel1: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level1_dtype` holding the data. """ - return __from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) + return _cyb_from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2097,10 +2106,10 @@ cdef class StatsLevel1: raise ValueError("ptr must not be null (0)") cdef StatsLevel1 obj = StatsLevel1.__new__(StatsLevel1) if owner is None: - obj._ptr = malloc(sizeof(CUfileStatsLevel1_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) obj._owner = None obj._owned = True else: @@ -2177,10 +2186,10 @@ cdef class IOParams: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def mode(self): @@ -2289,8 +2298,8 @@ cdef class IOParams: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOParams obj = IOParams.__new__(IOParams) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOParams_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_params_dtype) obj._data = data.view(_numpy.recarray) @@ -2326,7 +2335,7 @@ cdef class StatsLevel2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileStatsLevel2_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") self._owner = None @@ -2338,7 +2347,7 @@ cdef class StatsLevel2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel2 object at {hex(id(self))}>" @@ -2359,20 +2368,20 @@ cdef class StatsLevel2: if not isinstance(other, StatsLevel2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileStatsLevel2_t)) + self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2389,12 +2398,12 @@ cdef class StatsLevel2: if self._readonly: raise ValueError("This StatsLevel2 instance is read-only") cdef StatsLevel1 val_ = val - memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) + _cyb_memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) @property def read_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].read_size_kb_hist)) return _numpy.asarray(arr) @@ -2404,14 +2413,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field read_size_kb_hist, got {len(val)}") - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + _cyb_memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @property def write_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].write_size_kb_hist)) return _numpy.asarray(arr) @@ -2421,14 +2430,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field write_size_kb_hist, got {len(val)}") - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + _cyb_memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an StatsLevel2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) + return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) @staticmethod def from_data(data): @@ -2437,7 +2446,7 @@ cdef class StatsLevel2: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level2_dtype` holding the data. """ - return __from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) + return _cyb_from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2452,10 +2461,10 @@ cdef class StatsLevel2: raise ValueError("ptr must not be null (0)") cdef StatsLevel2 obj = StatsLevel2.__new__(StatsLevel2) if owner is None: - obj._ptr = malloc(sizeof(CUfileStatsLevel2_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) obj._owner = None obj._owned = True else: @@ -2494,7 +2503,7 @@ cdef class StatsLevel3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileStatsLevel3_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") self._owner = None @@ -2506,7 +2515,7 @@ cdef class StatsLevel3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel3 object at {hex(id(self))}>" @@ -2527,20 +2536,20 @@ cdef class StatsLevel3: if not isinstance(other, StatsLevel3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileStatsLevel3_t)) + self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2557,7 +2566,7 @@ cdef class StatsLevel3: if self._readonly: raise ValueError("This StatsLevel3 instance is read-only") cdef StatsLevel2 val_ = val - memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) + _cyb_memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) @property def per_gpu_stats(self): @@ -2571,7 +2580,7 @@ cdef class StatsLevel3: cdef PerGpuStats val_ = val if len(val) != 16: raise ValueError(f"Expected length { 16 } for field per_gpu_stats, got {len(val)}") - memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) + _cyb_memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) @property def num_gpus(self): @@ -2587,7 +2596,7 @@ cdef class StatsLevel3: @staticmethod def from_buffer(buffer): """Create an StatsLevel3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) + return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) @staticmethod def from_data(data): @@ -2596,7 +2605,7 @@ cdef class StatsLevel3: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level3_dtype` holding the data. """ - return __from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) + return _cyb_from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2611,10 +2620,10 @@ cdef class StatsLevel3: raise ValueError("ptr must not be null (0)") cdef StatsLevel3 obj = StatsLevel3.__new__(StatsLevel3) if owner is None: - obj._ptr = malloc(sizeof(CUfileStatsLevel3_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) obj._owner = None obj._owned = True else: @@ -2629,7 +2638,7 @@ cdef class StatsLevel3: # Enum ############################################################################### -class OpError(_FastEnum): +class OpError(_cyb_FastEnum): """ See `CUfileOpError`. """ @@ -2683,7 +2692,7 @@ class OpError(_FastEnum): BATCH_NOCOMPAT_ERROR = CU_FILE_BATCH_NOCOMPAT_ERROR IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR -class DriverStatusFlags(_FastEnum): +class DriverStatusFlags(_cyb_FastEnum): """ See `CUfileDriverStatusFlags_t`. """ @@ -2702,7 +2711,7 @@ class DriverStatusFlags(_FastEnum): VIRTIOFS_SUPPORTED = (CU_FILE_VIRTIOFS_SUPPORTED, 'Support for VirtioFS') MAX_TARGET_TYPES = (CU_FILE_MAX_TARGET_TYPES, 'Maximum FS supported') -class DriverControlFlags(_FastEnum): +class DriverControlFlags(_cyb_FastEnum): """ See `CUfileDriverControlFlags_t`. """ @@ -2711,7 +2720,7 @@ class DriverControlFlags(_FastEnum): POSIX_IO_MODE = (CU_FILE_POSIX_IO_MODE, 'Vanilla posix io mode. properties.posix_io_mode') FALLBACK_IO_MODE = (CU_FILE_FALLBACK_IO_MODE, 'Fallback io mode. properties.gds_fallback_io') -class FeatureFlags(_FastEnum): +class FeatureFlags(_cyb_FastEnum): """ See `CUfileFeatureFlags_t`. """ @@ -2721,7 +2730,7 @@ class FeatureFlags(_FastEnum): PARALLEL_IO_SUPPORTED = (CU_FILE_PARALLEL_IO_SUPPORTED, 'Supported') P2P_SUPPORTED = (CU_FILE_P2P_SUPPORTED, 'Support for PCI P2PDMA') -class FileHandleType(_FastEnum): +class FileHandleType(_cyb_FastEnum): """ See `CUfileFileHandleType`. """ @@ -2729,14 +2738,14 @@ class FileHandleType(_FastEnum): OPAQUE_WIN32 = (CU_FILE_HANDLE_TYPE_OPAQUE_WIN32, 'Windows based handle (unsupported)') USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS -class Opcode(_FastEnum): +class Opcode(_cyb_FastEnum): """ See `CUfileOpcode_t`. """ READ = CUFILE_READ WRITE = CUFILE_WRITE -class Status(_FastEnum): +class Status(_cyb_FastEnum): """ See `CUfileStatus_t`. """ @@ -2748,13 +2757,13 @@ class Status(_FastEnum): TIMEOUT = CUFILE_TIMEOUT FAILED = CUFILE_FAILED -class BatchMode(_FastEnum): +class BatchMode(_cyb_FastEnum): """ See `CUfileBatchMode_t`. """ BATCH = CUFILE_BATCH -class SizeTConfigParameter(_FastEnum): +class SizeTConfigParameter(_cyb_FastEnum): """ See `CUFileSizeTConfigParameter_t`. """ @@ -2771,7 +2780,7 @@ class SizeTConfigParameter(_FastEnum): POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS -class BoolConfigParameter(_FastEnum): +class BoolConfigParameter(_cyb_FastEnum): """ See `CUFileBoolConfigParameter_t`. """ @@ -2788,7 +2797,7 @@ class BoolConfigParameter(_FastEnum): SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS -class StringConfigParameter(_FastEnum): +class StringConfigParameter(_cyb_FastEnum): """ See `CUFileStringConfigParameter_t`. """ @@ -2796,7 +2805,7 @@ class StringConfigParameter(_FastEnum): ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH LOG_DIR = CUFILE_PARAM_LOG_DIR -class ArrayConfigParameter(_FastEnum): +class ArrayConfigParameter(_cyb_FastEnum): """ See `CUFileArrayConfigParameter_t`. """ @@ -2805,7 +2814,7 @@ class ArrayConfigParameter(_FastEnum): GPU_BOUNCE_BUFFER_SLAB_SIZE_KB = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_SIZE_KB GPU_BOUNCE_BUFFER_SLAB_COUNT = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_COUNT -class P2PFlags(_FastEnum): +class P2PFlags(_cyb_FastEnum): """ See `CUfileP2PFlags_t`. """ @@ -3093,7 +3102,7 @@ cpdef str get_parameter_string(int param, int len): with nogil: __status__ = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) check_status(__status__) - return cpython.PyUnicode_FromString(desc_str) + return _cyb_cpython.PyUnicode_FromString(desc_str) cpdef set_parameter_size_t(int param, size_t value): @@ -3331,3 +3340,4 @@ cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) check_status(status) return status +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index 3638a506676..106e74bf4ba 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -2,14 +2,20 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum + +# <<<< END OF PREAMBLE CONTENT >>>> + cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) -from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum from libcpp.vector cimport vector @@ -17,7 +23,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_IntEnum): +class Result(_cyb_FastEnum): """ The enumerated type `nvFatbinResult` defines API call result codes. nvFatbin APIs return `nvFatbinResult` codes to indicate the result. @@ -323,3 +329,4 @@ cpdef add_tile_ir(intptr_t handle, code, size_t size, identifier, options_cmd_li with nogil: __status__ = nvFatbinAddTileIR(handle, _code_, size, _identifier_, _options_cmd_line_) check_status(__status__) +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pyx b/cuda_bindings/cuda/bindings/nvjitlink.pyx index 8e73e021ba8..c8876790843 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -2,14 +2,20 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum + +# <<<< END OF PREAMBLE CONTENT >>>> + cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum from libcpp.vector cimport vector @@ -17,7 +23,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_FastEnum): +class Result(_cyb_FastEnum): """ The enumerated type `nvJitLinkResult` defines API call result codes. nvJitLink APIs return `nvJitLinkResult` codes to indicate the result. @@ -44,7 +50,7 @@ class Result(_FastEnum): ERROR_UNSUPPORTED_ARCH = (NVJITLINK_ERROR_UNSUPPORTED_ARCH, 'Unsupported -arch value') ERROR_LTO_NOT_ENABLED = (NVJITLINK_ERROR_LTO_NOT_ENABLED, 'Requires -lto') -class InputType(_FastEnum): +class InputType(_cyb_FastEnum): """ The enumerated type `nvJitLinkInputType` defines the kind of inputs that can be passed to nvJitLinkAdd* APIs. @@ -367,3 +373,4 @@ cpdef get_linked_ltoir(intptr_t handle, ltoir): with nogil: __status__ = nvJitLinkGetLinkedLTOIR(handle, _ltoir_) check_status(__status__) +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index c631d7a4c75..a5cf165098a 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -2,28 +2,53 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1779+ga8cc71818.d20260626. Do not modify it directly. - -cimport cython # NOQA - -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) - -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum - -from cuda.bindings.cydriver cimport CUDA_VERSION - - -from libc.stdlib cimport calloc, free, malloc -from cython cimport view -cimport cpython.buffer -cimport cpython.memoryview -cimport cpython -from libc.string cimport memcmp, memcpy +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +cimport cpython as _cyb_cpython +cimport cpython.buffer as _cyb_cpython_buffer +cimport cpython.memoryview as _cyb_cpython_memoryview +from cython cimport view as _cyb_view +from libc.stdlib cimport ( + calloc as _cyb_calloc, + free as _cyb_free, + malloc as _cyb_malloc, +) +from libc.string cimport ( + memcmp as _cyb_memcmp, + memcpy as _cyb_memcpy, +) +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum import numpy as _numpy +cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): +cdef _cyb_from_buffer(buffer, size, lowpp_type): + cdef _cyb_cpython.Py_buffer view + if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + _cyb_cpython.PyBuffer_Release(&view) + +cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -35,33 +60,20 @@ cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) +# <<<< END OF PREAMBLE CONTENT >>>> -cdef __from_buffer(buffer, size, lowpp_type): - cdef Py_buffer view - if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - cpython.PyBuffer_Release(&view) +cimport cython # NOQA +from cython cimport view +cimport cpython +from libc.string cimport memcpy -cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) + +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum + +from cuda.bindings.cydriver cimport CUDA_VERSION cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsigned int ver) nogil: @@ -72,7 +84,7 @@ cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsi # Enum ############################################################################### -class BridgeChipType(_FastEnum): +class BridgeChipType(_cyb_FastEnum): """ Enum to represent type of bridge chip @@ -81,7 +93,7 @@ class BridgeChipType(_FastEnum): BRIDGE_CHIP_PLX = NVML_BRIDGE_CHIP_PLX BRIDGE_CHIP_BRO4 = NVML_BRIDGE_CHIP_BRO4 -class NvLinkUtilizationCountUnits(_FastEnum): +class NvLinkUtilizationCountUnits(_cyb_FastEnum): """ Enum to represent the NvLink utilization counter packet units @@ -93,7 +105,7 @@ class NvLinkUtilizationCountUnits(_FastEnum): NVLINK_COUNTER_UNIT_RESERVED = NVML_NVLINK_COUNTER_UNIT_RESERVED NVLINK_COUNTER_UNIT_COUNT = NVML_NVLINK_COUNTER_UNIT_COUNT -class NvLinkUtilizationCountPktTypes(_FastEnum): +class NvLinkUtilizationCountPktTypes(_cyb_FastEnum): """ Enum to represent the NvLink utilization counter packet types to count ** this is ONLY applicable with the units as packets or bytes ** as @@ -112,7 +124,7 @@ class NvLinkUtilizationCountPktTypes(_FastEnum): NVLINK_COUNTER_PKTFILTER_RESPNODATA = NVML_NVLINK_COUNTER_PKTFILTER_RESPNODATA NVLINK_COUNTER_PKTFILTER_ALL = NVML_NVLINK_COUNTER_PKTFILTER_ALL -class NvLinkCapability(_FastEnum): +class NvLinkCapability(_cyb_FastEnum): """ Enum to represent NvLink queryable capabilities @@ -126,7 +138,7 @@ class NvLinkCapability(_FastEnum): NVLINK_CAP_VALID = NVML_NVLINK_CAP_VALID NVLINK_CAP_COUNT = NVML_NVLINK_CAP_COUNT -class NvLinkErrorCounter(_FastEnum): +class NvLinkErrorCounter(_cyb_FastEnum): """ Enum to represent NvLink queryable error counters @@ -139,7 +151,7 @@ class NvLinkErrorCounter(_FastEnum): NVLINK_ERROR_DL_ECC_DATA = NVML_NVLINK_ERROR_DL_ECC_DATA NVLINK_ERROR_COUNT = NVML_NVLINK_ERROR_COUNT -class IntNvLinkDeviceType(_FastEnum): +class IntNvLinkDeviceType(_cyb_FastEnum): """ Enum to represent NvLink's remote device type @@ -150,7 +162,7 @@ class IntNvLinkDeviceType(_FastEnum): NVLINK_DEVICE_TYPE_SWITCH = NVML_NVLINK_DEVICE_TYPE_SWITCH NVLINK_DEVICE_TYPE_UNKNOWN = NVML_NVLINK_DEVICE_TYPE_UNKNOWN -class GpuTopologyLevel(_FastEnum): +class GpuTopologyLevel(_cyb_FastEnum): """ Represents level relationships within a system between two GPUs The enums are spaced to allow for future relationships @@ -164,7 +176,7 @@ class GpuTopologyLevel(_FastEnum): TOPOLOGY_NODE = NVML_TOPOLOGY_NODE TOPOLOGY_SYSTEM = NVML_TOPOLOGY_SYSTEM -class GpuP2PStatus(_FastEnum): +class GpuP2PStatus(_cyb_FastEnum): """ See `nvmlGpuP2PStatus_t`. """ @@ -177,7 +189,7 @@ class GpuP2PStatus(_FastEnum): P2P_STATUS_NOT_SUPPORTED = NVML_P2P_STATUS_NOT_SUPPORTED P2P_STATUS_UNKNOWN = NVML_P2P_STATUS_UNKNOWN -class GpuP2PCapsIndex(_FastEnum): +class GpuP2PCapsIndex(_cyb_FastEnum): """ See `nvmlGpuP2PCapsIndex_t`. """ @@ -189,7 +201,7 @@ class GpuP2PCapsIndex(_FastEnum): P2P_CAPS_INDEX_PROP = NVML_P2P_CAPS_INDEX_PROP P2P_CAPS_INDEX_UNKNOWN = NVML_P2P_CAPS_INDEX_UNKNOWN -class SamplingType(_FastEnum): +class SamplingType(_cyb_FastEnum): """ Represents Type of Sampling Event @@ -207,7 +219,7 @@ class SamplingType(_FastEnum): OFA_UTILIZATION_SAMPLES = (NVML_OFA_UTILIZATION_SAMPLES, 'To represent percent of time during which NVOFA remains busy.') SAMPLINGTYPE_COUNT = NVML_SAMPLINGTYPE_COUNT -class PcieUtilCounter(_FastEnum): +class PcieUtilCounter(_cyb_FastEnum): """ Represents the queryable PCIe utilization counters @@ -217,7 +229,7 @@ class PcieUtilCounter(_FastEnum): PCIE_UTIL_RX_BYTES = NVML_PCIE_UTIL_RX_BYTES PCIE_UTIL_COUNT = NVML_PCIE_UTIL_COUNT -class ValueType(_FastEnum): +class ValueType(_cyb_FastEnum): """ Represents the type for sample value returned @@ -232,7 +244,7 @@ class ValueType(_FastEnum): UNSIGNED_SHORT = NVML_VALUE_TYPE_UNSIGNED_SHORT COUNT = NVML_VALUE_TYPE_COUNT -class PerfPolicyType(_FastEnum): +class PerfPolicyType(_cyb_FastEnum): """ Represents type of perf policy for which violation times can be queried @@ -248,7 +260,7 @@ class PerfPolicyType(_FastEnum): PERF_POLICY_TOTAL_BASE_CLOCKS = (NVML_PERF_POLICY_TOTAL_BASE_CLOCKS, 'Total time the GPU was held below base clocks.') PERF_POLICY_COUNT = NVML_PERF_POLICY_COUNT -class ThermalTarget(_FastEnum): +class ThermalTarget(_cyb_FastEnum): """ Represents the thermal sensor targets @@ -265,7 +277,7 @@ class ThermalTarget(_FastEnum): ALL = NVML_THERMAL_TARGET_ALL UNKNOWN = NVML_THERMAL_TARGET_UNKNOWN -class ThermalController(_FastEnum): +class ThermalController(_cyb_FastEnum): """ Represents the thermal sensor controllers @@ -291,7 +303,7 @@ class ThermalController(_FastEnum): ADT7473S = NVML_THERMAL_CONTROLLER_ADT7473S UNKNOWN = NVML_THERMAL_CONTROLLER_UNKNOWN -class CoolerControl(_FastEnum): +class CoolerControl(_cyb_FastEnum): """ Cooler control type @@ -302,7 +314,7 @@ class CoolerControl(_FastEnum): THERMAL_COOLER_SIGNAL_VARIABLE = (NVML_THERMAL_COOLER_SIGNAL_VARIABLE, "This cooler's level can be adjusted from some minimum to some maximum (eg a knob).") THERMAL_COOLER_SIGNAL_COUNT = NVML_THERMAL_COOLER_SIGNAL_COUNT -class CoolerTarget(_FastEnum): +class CoolerTarget(_cyb_FastEnum): """ Cooler's target @@ -314,7 +326,7 @@ class CoolerTarget(_FastEnum): THERMAL_POWER_SUPPLY = (NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY, 'This cooler can cool the power supply.') THERMAL_GPU_RELATED = (NVML_THERMAL_COOLER_TARGET_GPU_RELATED, 'This cooler cools all of the components related to its target gpu. GPU_RELATED = GPU | MEMORY | POWER_SUPPLY.') -class UUIDType(_FastEnum): +class UUIDType(_cyb_FastEnum): """ Enum to represent different UUID types @@ -324,7 +336,7 @@ class UUIDType(_FastEnum): ASCII = (NVML_UUID_TYPE_ASCII, 'ASCII format type.') BINARY = (NVML_UUID_TYPE_BINARY, 'Binary format type.') -class EnableState(_FastEnum): +class EnableState(_cyb_FastEnum): """ Generic enable/disable enum. @@ -333,7 +345,7 @@ class EnableState(_FastEnum): FEATURE_DISABLED = (NVML_FEATURE_DISABLED, 'Feature disabled.') FEATURE_ENABLED = (NVML_FEATURE_ENABLED, 'Feature enabled.') -class BrandType(_FastEnum): +class BrandType(_cyb_FastEnum): """ - The Brand of the GPU @@ -359,7 +371,7 @@ class BrandType(_FastEnum): BRAND_TITAN_RTX = NVML_BRAND_TITAN_RTX BRAND_COUNT = NVML_BRAND_COUNT -class TemperatureThresholds(_FastEnum): +class TemperatureThresholds(_cyb_FastEnum): """ Temperature thresholds. @@ -375,7 +387,7 @@ class TemperatureThresholds(_FastEnum): TEMPERATURE_THRESHOLD_GPS_CURR = NVML_TEMPERATURE_THRESHOLD_GPS_CURR TEMPERATURE_THRESHOLD_COUNT = NVML_TEMPERATURE_THRESHOLD_COUNT -class TemperatureSensors(_FastEnum): +class TemperatureSensors(_cyb_FastEnum): """ Temperature sensors. @@ -384,7 +396,7 @@ class TemperatureSensors(_FastEnum): TEMPERATURE_GPU = (NVML_TEMPERATURE_GPU, 'Temperature sensor for the GPU die.') TEMPERATURE_COUNT = NVML_TEMPERATURE_COUNT -class ComputeMode(_FastEnum): +class ComputeMode(_cyb_FastEnum): """ Compute mode. NVML_COMPUTEMODE_EXCLUSIVE_PROCESS was added in CUDA 4.0. Earlier CUDA versions supported a single exclusive mode, which is @@ -398,7 +410,7 @@ class ComputeMode(_FastEnum): COMPUTEMODE_EXCLUSIVE_PROCESS = (NVML_COMPUTEMODE_EXCLUSIVE_PROCESS, 'Compute-exclusive-process mode -- only one context per device, usable from multiple threads at a time.') COMPUTEMODE_COUNT = NVML_COMPUTEMODE_COUNT -class MemoryErrorType(_FastEnum): +class MemoryErrorType(_cyb_FastEnum): """ Memory error types @@ -408,7 +420,7 @@ class MemoryErrorType(_FastEnum): UNCORRECTED = (NVML_MEMORY_ERROR_TYPE_UNCORRECTED, 'A memory error that was not corrected For ECC errors, these are double bit errors For Texture memory, these are errors where the resend fails') COUNT = (NVML_MEMORY_ERROR_TYPE_COUNT, 'Count of memory error types.') -class NvlinkVersion(_FastEnum): +class NvlinkVersion(_cyb_FastEnum): """ Represents Nvlink Version @@ -424,7 +436,7 @@ class NvlinkVersion(_FastEnum): VERSION_5_0 = (NVML_NVLINK_VERSION_5_0, 'NVLink Version 5.0.') VERSION_6_0 = (NVML_NVLINK_VERSION_6_0, 'NVLink Version 6.0.') -class EccCounterType(_FastEnum): +class EccCounterType(_cyb_FastEnum): """ ECC counter types. Note: Volatile counts are reset each time the driver loads. On Windows this is once per boot. On Linux this can be @@ -439,7 +451,7 @@ class EccCounterType(_FastEnum): AGGREGATE_ECC = (NVML_AGGREGATE_ECC, 'Aggregate counts persist across reboots (i.e. for the lifetime of the device).') COUNT = (NVML_ECC_COUNTER_TYPE_COUNT, 'Count of memory counter types.') -class ClockType(_FastEnum): +class ClockType(_cyb_FastEnum): """ Clock types. All speeds are in Mhz. @@ -451,7 +463,7 @@ class ClockType(_FastEnum): CLOCK_VIDEO = (NVML_CLOCK_VIDEO, 'Video encoder/decoder clock domain.') CLOCK_COUNT = (NVML_CLOCK_COUNT, 'Count of clock types.') -class ClockId(_FastEnum): +class ClockId(_cyb_FastEnum): """ Clock Ids. These are used in combination with `nvmlClockType_t` to specify a single clock value. @@ -464,7 +476,7 @@ class ClockId(_FastEnum): CUSTOMER_BOOST_MAX = (NVML_CLOCK_ID_CUSTOMER_BOOST_MAX, 'OEM-defined maximum clock rate.') COUNT = (NVML_CLOCK_ID_COUNT, 'Count of Clock Ids.') -class DriverModel(_FastEnum): +class DriverModel(_cyb_FastEnum): """ Driver models. Windows only. @@ -474,7 +486,7 @@ class DriverModel(_FastEnum): DRIVER_WDM = (NVML_DRIVER_WDM, 'WDM (TCC) model (deprecated) -- GPU treated as a generic compute device.') DRIVER_MCDM = (NVML_DRIVER_MCDM, 'MCDM driver model -- GPU treated as a Microsoft compute device.') -class Pstates(_FastEnum): +class Pstates(_cyb_FastEnum): """ Allowed PStates. @@ -498,7 +510,7 @@ class Pstates(_FastEnum): PSTATE_15 = (NVML_PSTATE_15, 'Performance state 15 -- Minimum Performance.') PSTATE_UNKNOWN = (NVML_PSTATE_UNKNOWN, 'Unknown performance state.') -class GpuOperationMode(_FastEnum): +class GpuOperationMode(_cyb_FastEnum): """ GPU Operation Mode GOM allows to reduce power usage and optimize GPU throughput by disabling GPU features. Each GOM is designed to meet @@ -510,7 +522,7 @@ class GpuOperationMode(_FastEnum): GOM_COMPUTE = (NVML_GOM_COMPUTE, 'Designed for running only compute tasks. Graphics operations are not allowed') GOM_LOW_DP = (NVML_GOM_LOW_DP, "Designed for running graphics applications that don't require high bandwidth double precision") -class InforomObject(_FastEnum): +class InforomObject(_cyb_FastEnum): """ Available infoROM objects. @@ -522,7 +534,7 @@ class InforomObject(_FastEnum): INFOROM_DEN = (NVML_INFOROM_DEN, 'DRAM Encryption object.') INFOROM_COUNT = (NVML_INFOROM_COUNT, 'This counts the number of infoROM objects the driver knows about.') -class Return(_FastEnum): +class Return(_cyb_FastEnum): """ Return values for NVML API calls. @@ -561,7 +573,7 @@ class Return(_FastEnum): ERROR_RESET_TYPE_NOT_SUPPORTED = (NVML_ERROR_RESET_TYPE_NOT_SUPPORTED, 'Reset not supported for given device/parameters.') ERROR_UNKNOWN = (NVML_ERROR_UNKNOWN, 'An internal driver error occurred.') -class MemoryLocation(_FastEnum): +class MemoryLocation(_cyb_FastEnum): """ See `nvmlDeviceGetMemoryErrorCounter` @@ -578,7 +590,7 @@ class MemoryLocation(_FastEnum): SRAM = (NVML_MEMORY_LOCATION_SRAM, 'Turing+ SRAM.') COUNT = (NVML_MEMORY_LOCATION_COUNT, 'This counts the number of memory locations the driver knows about.') -class PageRetirementCause(_FastEnum): +class PageRetirementCause(_cyb_FastEnum): """ Causes for page retirement @@ -588,7 +600,7 @@ class PageRetirementCause(_FastEnum): DOUBLE_BIT_ECC_ERROR = (NVML_PAGE_RETIREMENT_CAUSE_DOUBLE_BIT_ECC_ERROR, 'Page was retired due to double bit ECC error.') COUNT = NVML_PAGE_RETIREMENT_CAUSE_COUNT -class RestrictedAPI(_FastEnum): +class RestrictedAPI(_cyb_FastEnum): """ API types that allow changes to default permission restrictions @@ -598,7 +610,7 @@ class RestrictedAPI(_FastEnum): SET_AUTO_BOOSTED_CLOCKS = (NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS, 'APIs that enable/disable Auto Boosted clocks see nvmlDeviceSetAutoBoostedClocksEnabled') COUNT = NVML_RESTRICTED_API_COUNT -class GpuUtilizationDomainId(_FastEnum): +class GpuUtilizationDomainId(_cyb_FastEnum): """ Represents the GPU utilization domains @@ -609,7 +621,7 @@ class GpuUtilizationDomainId(_FastEnum): GPU_UTILIZATION_DOMAIN_VID = (NVML_GPU_UTILIZATION_DOMAIN_VID, 'Video engine domain.') GPU_UTILIZATION_DOMAIN_BUS = (NVML_GPU_UTILIZATION_DOMAIN_BUS, 'Bus interface domain.') -class GpuVirtualizationMode(_FastEnum): +class GpuVirtualizationMode(_cyb_FastEnum): """ GPU virtualization mode types. @@ -621,7 +633,7 @@ class GpuVirtualizationMode(_FastEnum): HOST_VGPU = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU, 'Device is associated with VGX hypervisor in vGPU mode.') HOST_VSGA = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA, 'Device is associated with VGX hypervisor in vSGA mode.') -class HostVgpuMode(_FastEnum): +class HostVgpuMode(_cyb_FastEnum): """ Host vGPU modes @@ -630,7 +642,7 @@ class HostVgpuMode(_FastEnum): NON_SRIOV = (NVML_HOST_VGPU_MODE_NON_SRIOV, 'Non SR-IOV mode.') SRIOV = (NVML_HOST_VGPU_MODE_SRIOV, 'SR-IOV mode.') -class VgpuVmIdType(_FastEnum): +class VgpuVmIdType(_cyb_FastEnum): """ Types of VM identifiers @@ -639,7 +651,7 @@ class VgpuVmIdType(_FastEnum): VGPU_VM_ID_DOMAIN_ID = (NVML_VGPU_VM_ID_DOMAIN_ID, 'VM ID represents DOMAIN ID.') VGPU_VM_ID_UUID = (NVML_VGPU_VM_ID_UUID, 'VM ID represents UUID.') -class VgpuGuestInfoState(_FastEnum): +class VgpuGuestInfoState(_cyb_FastEnum): """ vGPU GUEST info state @@ -648,7 +660,7 @@ class VgpuGuestInfoState(_FastEnum): VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED, 'Guest-dependent fields uninitialized.') VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED, 'Guest-dependent fields initialized.') -class GridLicenseFeatureCode(_FastEnum): +class GridLicenseFeatureCode(_cyb_FastEnum): """ vGPU software licensable features @@ -661,7 +673,7 @@ class GridLicenseFeatureCode(_FastEnum): GAMING = (NVML_GRID_LICENSE_FEATURE_CODE_GAMING, 'Gaming.') COMPUTE = (NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE, 'Compute.') -class VgpuCapability(_FastEnum): +class VgpuCapability(_cyb_FastEnum): """ vGPU queryable capabilities @@ -674,7 +686,7 @@ class VgpuCapability(_FastEnum): VGPU_CAP_EXCLUSIVE_SIZE = (NVML_VGPU_CAP_EXCLUSIVE_SIZE, 'vGPU profile cannot run on a GPU alongside other profiles of different size') VGPU_CAP_COUNT = NVML_VGPU_CAP_COUNT -class VgpuDriverCapability(_FastEnum): +class VgpuDriverCapability(_cyb_FastEnum): """ vGPU driver queryable capabilities @@ -684,7 +696,7 @@ class VgpuDriverCapability(_FastEnum): VGPU_DRIVER_CAP_WARM_UPDATE = (NVML_VGPU_DRIVER_CAP_WARM_UPDATE, 'Supports FSR and warm update of vGPU host driver without terminating the running guest VM.') VGPU_DRIVER_CAP_COUNT = NVML_VGPU_DRIVER_CAP_COUNT -class DeviceVgpuCapability(_FastEnum): +class DeviceVgpuCapability(_cyb_FastEnum): """ Device vGPU queryable capabilities @@ -704,7 +716,7 @@ class DeviceVgpuCapability(_FastEnum): DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = (NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED, 'Set/Get MIG timesliced mode reporting, without impacting the underlying functionality.') DEVICE_VGPU_CAP_COUNT = NVML_DEVICE_VGPU_CAP_COUNT -class DeviceGpuRecoveryAction(_FastEnum): +class DeviceGpuRecoveryAction(_cyb_FastEnum): """ Enum describing the GPU Recovery Action @@ -717,7 +729,7 @@ class DeviceGpuRecoveryAction(_FastEnum): GPU_RECOVERY_ACTION_DRAIN_AND_RESET = (NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET, 'Drain P2P and Reset Gpu.') GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN = (NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN, 'Recover IMEX Domain.') -class FanState(_FastEnum): +class FanState(_cyb_FastEnum): """ Fan state enum. @@ -726,7 +738,7 @@ class FanState(_FastEnum): FAN_NORMAL = (NVML_FAN_NORMAL, 'Fan is working properly.') FAN_FAILED = (NVML_FAN_FAILED, 'Fan has failed.') -class LedColor(_FastEnum): +class LedColor(_cyb_FastEnum): """ Led color enum. @@ -735,7 +747,7 @@ class LedColor(_FastEnum): GREEN = (NVML_LED_COLOR_GREEN, 'GREEN, indicates good health.') AMBER = (NVML_LED_COLOR_AMBER, 'AMBER, indicates problem.') -class EncoderType(_FastEnum): +class EncoderType(_cyb_FastEnum): """ Represents type of encoder for capacity can be queried @@ -746,7 +758,7 @@ class EncoderType(_FastEnum): ENCODER_QUERY_AV1 = (NVML_ENCODER_QUERY_AV1, 'AV1 encoder.') ENCODER_QUERY_UNKNOWN = (NVML_ENCODER_QUERY_UNKNOWN, 'Unknown encoder.') -class FBCSessionType(_FastEnum): +class FBCSessionType(_cyb_FastEnum): """ Represents frame buffer capture session type @@ -758,7 +770,7 @@ class FBCSessionType(_FastEnum): VID = (NVML_FBC_SESSION_TYPE_VID, 'Vid.') HWENC = (NVML_FBC_SESSION_TYPE_HWENC, 'HEnc.') -class DetachGpuState(_FastEnum): +class DetachGpuState(_cyb_FastEnum): """ Is the GPU device to be removed from the kernel by `nvmlDeviceRemoveGpu()` @@ -768,7 +780,7 @@ class DetachGpuState(_FastEnum): DETACH_GPU_KEEP = NVML_DETACH_GPU_KEEP DETACH_GPU_REMOVE = NVML_DETACH_GPU_REMOVE -class PcieLinkState(_FastEnum): +class PcieLinkState(_cyb_FastEnum): """ Parent bridge PCIe link state requested by `nvmlDeviceRemoveGpu()` @@ -777,7 +789,7 @@ class PcieLinkState(_FastEnum): PCIE_LINK_KEEP = NVML_PCIE_LINK_KEEP PCIE_LINK_SHUT_DOWN = NVML_PCIE_LINK_SHUT_DOWN -class ClockLimitId(_FastEnum): +class ClockLimitId(_cyb_FastEnum): """ See `nvmlClockLimitId_t`. """ @@ -785,7 +797,7 @@ class ClockLimitId(_FastEnum): TDP = NVML_CLOCK_LIMIT_ID_TDP UNLIMITED = NVML_CLOCK_LIMIT_ID_UNLIMITED -class VgpuVmCompatibility(_FastEnum): +class VgpuVmCompatibility(_cyb_FastEnum): """ vGPU VM compatibility codes @@ -797,7 +809,7 @@ class VgpuVmCompatibility(_FastEnum): SLEEP = (NVML_VGPU_VM_COMPATIBILITY_SLEEP, 'vGPU is runnable from a sleeped state (ACPI S3)') LIVE = (NVML_VGPU_VM_COMPATIBILITY_LIVE, 'vGPU is runnable from a live/paused (ACPI S0)') -class VgpuPgpuCompatibilityLimitCode(_FastEnum): +class VgpuPgpuCompatibilityLimitCode(_cyb_FastEnum): """ vGPU-pGPU compatibility limit codes @@ -809,7 +821,7 @@ class VgpuPgpuCompatibilityLimitCode(_FastEnum): VGPU_COMPATIBILITY_LIMIT_GPU = (NVML_VGPU_COMPATIBILITY_LIMIT_GPU, 'Compatibility is limited by GPU hardware.') VGPU_COMPATIBILITY_LIMIT_OTHER = (NVML_VGPU_COMPATIBILITY_LIMIT_OTHER, 'Compatibility is limited by an undefined factor.') -class GpmMetricId(_FastEnum): +class GpmMetricId(_cyb_FastEnum): """ GPM Metric Identifiers @@ -1119,7 +1131,7 @@ class GpmMetricId(_FastEnum): GPM_METRIC_NVLINK_L35_TX = (NVML_GPM_METRIC_NVLINK_L35_TX, 'NvLink write for link 35 in bytes since reboot.') GPM_METRIC_MAX = (NVML_GPM_METRIC_MAX, 'Maximum value above +1.') -class PowerProfileType(_FastEnum): +class PowerProfileType(_cyb_FastEnum): """ See `nvmlPowerProfileType_t`. """ @@ -1140,7 +1152,7 @@ class PowerProfileType(_FastEnum): POWER_PROFILE_MIG = NVML_POWER_PROFILE_MIG POWER_PROFILE_MAX = NVML_POWER_PROFILE_MAX -class DeviceAddressingModeType(_FastEnum): +class DeviceAddressingModeType(_cyb_FastEnum): """ Enum to represent device addressing mode values @@ -1150,7 +1162,7 @@ class DeviceAddressingModeType(_FastEnum): DEVICE_ADDRESSING_MODE_HMM = (NVML_DEVICE_ADDRESSING_MODE_HMM, 'Heterogeneous Memory Management mode.') DEVICE_ADDRESSING_MODE_ATS = (NVML_DEVICE_ADDRESSING_MODE_ATS, 'Address Translation Services mode.') -class PRMCounterId(_FastEnum): +class PRMCounterId(_cyb_FastEnum): """ PRM Counter IDs @@ -1172,7 +1184,7 @@ class PRMCounterId(_FastEnum): PPCNT_PLR_SYNC_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS PPRM_OPER_RECOVERY = NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY -class PowerProfileOperation(_FastEnum): +class PowerProfileOperation(_cyb_FastEnum): """ Enum for operation to perform on the requested profiles @@ -1183,7 +1195,7 @@ class PowerProfileOperation(_FastEnum): SET_AND_OVERWRITE = (NVML_POWER_PROFILE_OPERATION_SET_AND_OVERWRITE, 'Overwrite the existing list of requested profiles with just the requested profiles.') MAX = (NVML_POWER_PROFILE_OPERATION_MAX, 'Max value above +1.') -class ProcessMode(_FastEnum): +class ProcessMode(_cyb_FastEnum): """ Enum to represent process mode. @@ -1195,7 +1207,7 @@ class ProcessMode(_FastEnum): ALL = (NVML_PROCESS_MODE_ALL, 'All processes running on the GPU (compute, graphics, MPS, and other types).') MAX = (NVML_PROCESS_MODE_MAX, 'Maximum value for bounds checking.') -class CPERType(_FastEnum): +class CPERType(_cyb_FastEnum): """ Bitmask of CPER record types. Multiple values may be combined to request records from several sources in one call. @@ -2179,7 +2191,7 @@ cdef class PciInfoExt_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") self._owner = None @@ -2191,7 +2203,7 @@ cdef class PciInfoExt_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PciInfoExt_v1 object at {hex(id(self))}>" @@ -2212,20 +2224,20 @@ cdef class PciInfoExt_v1: if not isinstance(other, PciInfoExt_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2323,7 +2335,7 @@ cdef class PciInfoExt_v1: @property def bus_id(self): """~_numpy.int8: (array of length 32).The tuple domain:bus:device.function PCI identifier (& NULL terminator).""" - return cpython.PyUnicode_FromString(self._ptr[0].busId) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2333,12 +2345,12 @@ cdef class PciInfoExt_v1: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - memcpy((self._ptr[0].busId), ptr, 32) + _cyb_memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfoExt_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) @staticmethod def from_data(data): @@ -2347,7 +2359,7 @@ cdef class PciInfoExt_v1: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_ext_v1_dtype` holding the data. """ - return __from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) + return _cyb_from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2362,10 +2374,10 @@ cdef class PciInfoExt_v1: raise ValueError("ptr must not be null (0)") cdef PciInfoExt_v1 obj = PciInfoExt_v1.__new__(PciInfoExt_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) obj._owner = None obj._owned = True else: @@ -2408,7 +2420,7 @@ cdef class PciInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPciInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") self._owner = None @@ -2420,7 +2432,7 @@ cdef class PciInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PciInfo object at {hex(id(self))}>" @@ -2441,20 +2453,20 @@ cdef class PciInfo: if not isinstance(other, PciInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPciInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2464,7 +2476,7 @@ cdef class PciInfo: @property def bus_id_legacy(self): """~_numpy.int8: (array of length 16).""" - return cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) @bus_id_legacy.setter def bus_id_legacy(self, val): @@ -2474,7 +2486,7 @@ cdef class PciInfo: if len(buf) >= 16: raise ValueError("String too long for field bus_id_legacy, max length is 15") cdef char *ptr = buf - memcpy((self._ptr[0].busIdLegacy), ptr, 16) + _cyb_memcpy((self._ptr[0].busIdLegacy), ptr, 16) @property def domain(self): @@ -2534,7 +2546,7 @@ cdef class PciInfo: @property def bus_id(self): """~_numpy.int8: (array of length 32).""" - return cpython.PyUnicode_FromString(self._ptr[0].busId) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2544,12 +2556,12 @@ cdef class PciInfo: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - memcpy((self._ptr[0].busId), ptr, 32) + _cyb_memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) @staticmethod def from_data(data): @@ -2558,7 +2570,7 @@ cdef class PciInfo: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_dtype` holding the data. """ - return __from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) + return _cyb_from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2573,10 +2585,10 @@ cdef class PciInfo: raise ValueError("ptr must not be null (0)") cdef PciInfo obj = PciInfo.__new__(PciInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlPciInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) obj._owner = None obj._owned = True else: @@ -2614,7 +2626,7 @@ cdef class Utilization: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlUtilization_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") self._owner = None @@ -2626,7 +2638,7 @@ cdef class Utilization: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Utilization object at {hex(id(self))}>" @@ -2647,20 +2659,20 @@ cdef class Utilization: if not isinstance(other, Utilization): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlUtilization_t)) + self._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2692,7 +2704,7 @@ cdef class Utilization: @staticmethod def from_buffer(buffer): """Create an Utilization instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) + return _cyb_from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) @staticmethod def from_data(data): @@ -2701,7 +2713,7 @@ cdef class Utilization: Args: data (_numpy.ndarray): a single-element array of dtype `utilization_dtype` holding the data. """ - return __from_data(data, "utilization_dtype", utilization_dtype, Utilization) + return _cyb_from_data(data, "utilization_dtype", utilization_dtype, Utilization) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2716,10 +2728,10 @@ cdef class Utilization: raise ValueError("ptr must not be null (0)") cdef Utilization obj = Utilization.__new__(Utilization) if owner is None: - obj._ptr = malloc(sizeof(nvmlUtilization_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Utilization") - memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) obj._owner = None obj._owned = True else: @@ -2758,7 +2770,7 @@ cdef class Memory: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlMemory_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") self._owner = None @@ -2770,7 +2782,7 @@ cdef class Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Memory object at {hex(id(self))}>" @@ -2791,20 +2803,20 @@ cdef class Memory: if not isinstance(other, Memory): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlMemory_t)) + self._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2847,7 +2859,7 @@ cdef class Memory: @staticmethod def from_buffer(buffer): """Create an Memory instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlMemory_t), Memory) + return _cyb_from_buffer(buffer, sizeof(nvmlMemory_t), Memory) @staticmethod def from_data(data): @@ -2856,7 +2868,7 @@ cdef class Memory: Args: data (_numpy.ndarray): a single-element array of dtype `memory_dtype` holding the data. """ - return __from_data(data, "memory_dtype", memory_dtype, Memory) + return _cyb_from_data(data, "memory_dtype", memory_dtype, Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2871,10 +2883,10 @@ cdef class Memory: raise ValueError("ptr must not be null (0)") cdef Memory obj = Memory.__new__(Memory) if owner is None: - obj._ptr = malloc(sizeof(nvmlMemory_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory") - memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) obj._owner = None obj._owned = True else: @@ -2915,7 +2927,7 @@ cdef class Memory_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlMemory_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") self._owner = None @@ -2927,7 +2939,7 @@ cdef class Memory_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Memory_v2 object at {hex(id(self))}>" @@ -2948,20 +2960,20 @@ cdef class Memory_v2: if not isinstance(other, Memory_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlMemory_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3026,7 +3038,7 @@ cdef class Memory_v2: @staticmethod def from_buffer(buffer): """Create an Memory_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) @staticmethod def from_data(data): @@ -3035,7 +3047,7 @@ cdef class Memory_v2: Args: data (_numpy.ndarray): a single-element array of dtype `memory_v2_dtype` holding the data. """ - return __from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) + return _cyb_from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3050,10 +3062,10 @@ cdef class Memory_v2: raise ValueError("ptr must not be null (0)") cdef Memory_v2 obj = Memory_v2.__new__(Memory_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlMemory_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) obj._owner = None obj._owned = True else: @@ -3092,7 +3104,7 @@ cdef class BAR1Memory: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlBAR1Memory_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") self._owner = None @@ -3104,7 +3116,7 @@ cdef class BAR1Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.BAR1Memory object at {hex(id(self))}>" @@ -3125,20 +3137,20 @@ cdef class BAR1Memory: if not isinstance(other, BAR1Memory): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlBAR1Memory_t)) + self._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3181,7 +3193,7 @@ cdef class BAR1Memory: @staticmethod def from_buffer(buffer): """Create an BAR1Memory instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) + return _cyb_from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) @staticmethod def from_data(data): @@ -3190,7 +3202,7 @@ cdef class BAR1Memory: Args: data (_numpy.ndarray): a single-element array of dtype `ba_r1memory_dtype` holding the data. """ - return __from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) + return _cyb_from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3205,10 +3217,10 @@ cdef class BAR1Memory: raise ValueError("ptr must not be null (0)") cdef BAR1Memory obj = BAR1Memory.__new__(BAR1Memory) if owner is None: - obj._ptr = malloc(sizeof(nvmlBAR1Memory_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) obj._owner = None obj._owned = True else: @@ -3284,10 +3296,10 @@ cdef class ProcessInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3387,8 +3399,8 @@ cdef class ProcessInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessInfo obj = ProcessInfo.__new__(ProcessInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_info_dtype) obj._data = data.view(_numpy.recarray) @@ -3462,10 +3474,10 @@ cdef class ProcessDetail_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3576,8 +3588,8 @@ cdef class ProcessDetail_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessDetail_v1 obj = ProcessDetail_v1.__new__(ProcessDetail_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessDetail_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_detail_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -3619,7 +3631,7 @@ cdef class DeviceAttributes: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlDeviceAttributes_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") self._owner = None @@ -3631,7 +3643,7 @@ cdef class DeviceAttributes: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DeviceAttributes object at {hex(id(self))}>" @@ -3652,20 +3664,20 @@ cdef class DeviceAttributes: if not isinstance(other, DeviceAttributes): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) + self._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3774,7 +3786,7 @@ cdef class DeviceAttributes: @staticmethod def from_buffer(buffer): """Create an DeviceAttributes instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) + return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) @staticmethod def from_data(data): @@ -3783,7 +3795,7 @@ cdef class DeviceAttributes: Args: data (_numpy.ndarray): a single-element array of dtype `device_attributes_dtype` holding the data. """ - return __from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) + return _cyb_from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3798,10 +3810,10 @@ cdef class DeviceAttributes: raise ValueError("ptr must not be null (0)") cdef DeviceAttributes obj = DeviceAttributes.__new__(DeviceAttributes) if owner is None: - obj._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) obj._owner = None obj._owned = True else: @@ -3838,7 +3850,7 @@ cdef class C2cModeInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") self._owner = None @@ -3850,7 +3862,7 @@ cdef class C2cModeInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.C2cModeInfo_v1 object at {hex(id(self))}>" @@ -3871,20 +3883,20 @@ cdef class C2cModeInfo_v1: if not isinstance(other, C2cModeInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3905,7 +3917,7 @@ cdef class C2cModeInfo_v1: @staticmethod def from_buffer(buffer): """Create an C2cModeInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) @staticmethod def from_data(data): @@ -3914,7 +3926,7 @@ cdef class C2cModeInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `c2c_mode_info_v1_dtype` holding the data. """ - return __from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) + return _cyb_from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3929,10 +3941,10 @@ cdef class C2cModeInfo_v1: raise ValueError("ptr must not be null (0)") cdef C2cModeInfo_v1 obj = C2cModeInfo_v1.__new__(C2cModeInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -3973,7 +3985,7 @@ cdef class RowRemapperHistogramValues: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") self._owner = None @@ -3985,7 +3997,7 @@ cdef class RowRemapperHistogramValues: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.RowRemapperHistogramValues object at {hex(id(self))}>" @@ -4006,20 +4018,20 @@ cdef class RowRemapperHistogramValues: if not isinstance(other, RowRemapperHistogramValues): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4084,7 +4096,7 @@ cdef class RowRemapperHistogramValues: @staticmethod def from_buffer(buffer): """Create an RowRemapperHistogramValues instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) + return _cyb_from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) @staticmethod def from_data(data): @@ -4093,7 +4105,7 @@ cdef class RowRemapperHistogramValues: Args: data (_numpy.ndarray): a single-element array of dtype `row_remapper_histogram_values_dtype` holding the data. """ - return __from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) + return _cyb_from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4108,10 +4120,10 @@ cdef class RowRemapperHistogramValues: raise ValueError("ptr must not be null (0)") cdef RowRemapperHistogramValues obj = RowRemapperHistogramValues.__new__(RowRemapperHistogramValues) if owner is None: - obj._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) obj._owner = None obj._owned = True else: @@ -4185,10 +4197,10 @@ cdef class BridgeChipInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def type(self): @@ -4266,8 +4278,8 @@ cdef class BridgeChipInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef BridgeChipInfo obj = BridgeChipInfo.__new__(BridgeChipInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlBridgeChipInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=bridge_chip_info_dtype) obj._data = data.view(_numpy.recarray) @@ -4301,7 +4313,7 @@ cdef class Value: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlValue_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") self._owner = None @@ -4313,7 +4325,7 @@ cdef class Value: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Value object at {hex(id(self))}>" @@ -4334,20 +4346,20 @@ cdef class Value: if not isinstance(other, Value): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlValue_t)) + self._ptr = _cyb_malloc(sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4434,7 +4446,7 @@ cdef class Value: @staticmethod def from_buffer(buffer): """Create an Value instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlValue_t), Value) + return _cyb_from_buffer(buffer, sizeof(nvmlValue_t), Value) @staticmethod def from_data(data): @@ -4443,7 +4455,7 @@ cdef class Value: Args: data (_numpy.ndarray): a single-element array of dtype `value_dtype` holding the data. """ - return __from_data(data, "value_dtype", value_dtype, Value) + return _cyb_from_data(data, "value_dtype", value_dtype, Value) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4458,10 +4470,10 @@ cdef class Value: raise ValueError("ptr must not be null (0)") cdef Value obj = Value.__new__(Value) if owner is None: - obj._ptr = malloc(sizeof(nvmlValue_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlValue_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Value") - memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) obj._owner = None obj._owned = True else: @@ -4502,7 +4514,7 @@ cdef class _py_anon_pod0: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod0)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod0)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") self._owner = None @@ -4514,7 +4526,7 @@ cdef class _py_anon_pod0: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod0 object at {hex(id(self))}>" @@ -4535,20 +4547,20 @@ cdef class _py_anon_pod0: if not isinstance(other, _py_anon_pod0): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod0), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod0)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod0)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4613,7 +4625,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(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) @staticmethod def from_data(data): @@ -4622,7 +4634,7 @@ cdef class _py_anon_pod0: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod0_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) + return _cyb_from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4637,10 +4649,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) obj._owner = None obj._owned = True else: @@ -4680,7 +4692,7 @@ cdef class CoolerInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") self._owner = None @@ -4692,7 +4704,7 @@ cdef class CoolerInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.CoolerInfo_v1 object at {hex(id(self))}>" @@ -4713,20 +4725,20 @@ cdef class CoolerInfo_v1: if not isinstance(other, CoolerInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4780,7 +4792,7 @@ cdef class CoolerInfo_v1: @staticmethod def from_buffer(buffer): """Create an CoolerInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) @staticmethod def from_data(data): @@ -4789,7 +4801,7 @@ cdef class CoolerInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `cooler_info_v1_dtype` holding the data. """ - return __from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) + return _cyb_from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4804,10 +4816,10 @@ cdef class CoolerInfo_v1: raise ValueError("ptr must not be null (0)") cdef CoolerInfo_v1 obj = CoolerInfo_v1.__new__(CoolerInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -4881,10 +4893,10 @@ cdef class ClkMonFaultInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def clk_api_domain(self): @@ -4962,8 +4974,8 @@ cdef class ClkMonFaultInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ClkMonFaultInfo obj = ClkMonFaultInfo.__new__(ClkMonFaultInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlClkMonFaultInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=clk_mon_fault_info_dtype) obj._data = data.view(_numpy.recarray) @@ -5002,7 +5014,7 @@ cdef class ClockOffset_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlClockOffset_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") self._owner = None @@ -5014,7 +5026,7 @@ cdef class ClockOffset_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ClockOffset_v1 object at {hex(id(self))}>" @@ -5035,20 +5047,20 @@ cdef class ClockOffset_v1: if not isinstance(other, ClockOffset_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5124,7 +5136,7 @@ cdef class ClockOffset_v1: @staticmethod def from_buffer(buffer): """Create an ClockOffset_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) @staticmethod def from_data(data): @@ -5133,7 +5145,7 @@ cdef class ClockOffset_v1: Args: data (_numpy.ndarray): a single-element array of dtype `clock_offset_v1_dtype` holding the data. """ - return __from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) + return _cyb_from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5148,10 +5160,10 @@ cdef class ClockOffset_v1: raise ValueError("ptr must not be null (0)") cdef ClockOffset_v1 obj = ClockOffset_v1.__new__(ClockOffset_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) obj._owner = None obj._owned = True else: @@ -5229,10 +5241,10 @@ cdef class ProcessUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -5354,8 +5366,8 @@ cdef class ProcessUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationSample obj = ProcessUtilizationSample.__new__(ProcessUtilizationSample) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -5432,10 +5444,10 @@ cdef class ProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -5579,8 +5591,8 @@ cdef class ProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationInfo_v1 obj = ProcessUtilizationInfo_v1.__new__(ProcessUtilizationInfo_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -5626,7 +5638,7 @@ cdef class EccSramErrorStatus_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") self._owner = None @@ -5638,7 +5650,7 @@ cdef class EccSramErrorStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.EccSramErrorStatus_v1 object at {hex(id(self))}>" @@ -5659,20 +5671,20 @@ cdef class EccSramErrorStatus_v1: if not isinstance(other, EccSramErrorStatus_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5825,7 +5837,7 @@ cdef class EccSramErrorStatus_v1: @staticmethod def from_buffer(buffer): """Create an EccSramErrorStatus_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) @staticmethod def from_data(data): @@ -5834,7 +5846,7 @@ cdef class EccSramErrorStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_error_status_v1_dtype` holding the data. """ - return __from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) + return _cyb_from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5849,10 +5861,10 @@ cdef class EccSramErrorStatus_v1: raise ValueError("ptr must not be null (0)") cdef EccSramErrorStatus_v1 obj = EccSramErrorStatus_v1.__new__(EccSramErrorStatus_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -5896,7 +5908,7 @@ cdef class PlatformInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") self._owner = None @@ -5908,7 +5920,7 @@ cdef class PlatformInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v1 object at {hex(id(self))}>" @@ -5929,20 +5941,20 @@ cdef class PlatformInfo_v1: if not isinstance(other, PlatformInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5963,7 +5975,7 @@ cdef class PlatformInfo_v1: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -5973,14 +5985,14 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def rack_guid(self): """~_numpy.uint8: (array of length 16).GUID of the rack containing this GPU (for Blackwell rackGuid is 13 bytes so indices 13-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].rackGuid)) return _numpy.asarray(arr) @@ -5990,9 +6002,9 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field rack_guid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_physical_slot_number(self): @@ -6052,7 +6064,7 @@ cdef class PlatformInfo_v1: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) @staticmethod def from_data(data): @@ -6061,7 +6073,7 @@ cdef class PlatformInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v1_dtype` holding the data. """ - return __from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) + return _cyb_from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6076,10 +6088,10 @@ cdef class PlatformInfo_v1: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v1 obj = PlatformInfo_v1.__new__(PlatformInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -6123,7 +6135,7 @@ cdef class PlatformInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") self._owner = None @@ -6135,7 +6147,7 @@ cdef class PlatformInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v2 object at {hex(id(self))}>" @@ -6156,20 +6168,20 @@ cdef class PlatformInfo_v2: if not isinstance(other, PlatformInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6190,7 +6202,7 @@ cdef class PlatformInfo_v2: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -6200,14 +6212,14 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_serial_number(self): """~_numpy.uint8: (array of length 16).Serial number of the chassis containing this GPU (for Blackwell it is 13 bytes so indices 13-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].chassisSerialNumber)) return _numpy.asarray(arr) @@ -6217,9 +6229,9 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field chassis_serial_number, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) @property def slot_number(self): @@ -6279,7 +6291,7 @@ cdef class PlatformInfo_v2: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) @staticmethod def from_data(data): @@ -6288,7 +6300,7 @@ cdef class PlatformInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v2_dtype` holding the data. """ - return __from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) + return _cyb_from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6303,10 +6315,10 @@ cdef class PlatformInfo_v2: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v2 obj = PlatformInfo_v2.__new__(PlatformInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -6346,7 +6358,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod1)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod1)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") self._owner = None @@ -6358,7 +6370,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -6379,20 +6391,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod1), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod1)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod1)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6446,7 +6458,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(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) @staticmethod def from_data(data): @@ -6455,7 +6467,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6470,10 +6482,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) obj._owner = None obj._owned = True else: @@ -6515,7 +6527,7 @@ cdef class VgpuPlacementList_v2: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") self._owner = None @@ -6528,7 +6540,7 @@ cdef class VgpuPlacementList_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuPlacementList_v2 object at {hex(id(self))}>" @@ -6549,20 +6561,20 @@ cdef class VgpuPlacementList_v2: if not isinstance(other, VgpuPlacementList_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6596,7 +6608,7 @@ cdef class VgpuPlacementList_v2: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -6604,7 +6616,7 @@ cdef class VgpuPlacementList_v2: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuPlacementList_v2 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].count = len(val) @@ -6624,7 +6636,7 @@ cdef class VgpuPlacementList_v2: @staticmethod def from_buffer(buffer): """Create an VgpuPlacementList_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) @staticmethod def from_data(data): @@ -6633,7 +6645,7 @@ cdef class VgpuPlacementList_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_placement_list_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) + return _cyb_from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6648,10 +6660,10 @@ cdef class VgpuPlacementList_v2: raise ValueError("ptr must not be null (0)") cdef VgpuPlacementList_v2 obj = VgpuPlacementList_v2.__new__(VgpuPlacementList_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) obj._owner = None obj._owned = True else: @@ -6690,7 +6702,7 @@ cdef class VgpuTypeBar1Info_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") self._owner = None @@ -6702,7 +6714,7 @@ cdef class VgpuTypeBar1Info_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeBar1Info_v1 object at {hex(id(self))}>" @@ -6723,20 +6735,20 @@ cdef class VgpuTypeBar1Info_v1: if not isinstance(other, VgpuTypeBar1Info_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6768,7 +6780,7 @@ cdef class VgpuTypeBar1Info_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeBar1Info_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) @staticmethod def from_data(data): @@ -6777,7 +6789,7 @@ cdef class VgpuTypeBar1Info_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_bar1info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) + return _cyb_from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6792,10 +6804,10 @@ cdef class VgpuTypeBar1Info_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeBar1Info_v1 obj = VgpuTypeBar1Info_v1.__new__(VgpuTypeBar1Info_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) obj._owner = None obj._owned = True else: @@ -6877,10 +6889,10 @@ cdef class VgpuProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def process_name(self): @@ -7044,8 +7056,8 @@ cdef class VgpuProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuProcessUtilizationInfo_v1 obj = VgpuProcessUtilizationInfo_v1.__new__(VgpuProcessUtilizationInfo_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -7080,7 +7092,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod2)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod2)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") self._owner = None @@ -7092,7 +7104,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -7113,20 +7125,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod2), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod2)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod2)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7158,7 +7170,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(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) @staticmethod def from_data(data): @@ -7167,7 +7179,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7182,10 +7194,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) obj._owner = None obj._owned = True else: @@ -7222,7 +7234,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod3)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod3)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") self._owner = None @@ -7234,7 +7246,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -7255,20 +7267,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod3), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod3)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod3)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7289,7 +7301,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(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) @staticmethod def from_data(data): @@ -7298,7 +7310,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7313,10 +7325,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) obj._owner = None obj._owned = True else: @@ -7394,10 +7406,10 @@ cdef class VgpuSchedulerLogEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -7519,8 +7531,8 @@ cdef class VgpuSchedulerLogEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry obj = VgpuSchedulerLogEntry.__new__(VgpuSchedulerLogEntry) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -7555,7 +7567,7 @@ cdef class _py_anon_pod4: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod4)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod4)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") self._owner = None @@ -7567,7 +7579,7 @@ cdef class _py_anon_pod4: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod4 object at {hex(id(self))}>" @@ -7588,20 +7600,20 @@ cdef class _py_anon_pod4: if not isinstance(other, _py_anon_pod4): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod4), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod4)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod4)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7633,7 +7645,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(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) @staticmethod def from_data(data): @@ -7642,7 +7654,7 @@ cdef class _py_anon_pod4: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod4_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) + return _cyb_from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7657,10 +7669,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) obj._owner = None obj._owned = True else: @@ -7697,7 +7709,7 @@ cdef class _py_anon_pod5: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod5)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod5)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") self._owner = None @@ -7709,7 +7721,7 @@ cdef class _py_anon_pod5: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod5 object at {hex(id(self))}>" @@ -7730,20 +7742,20 @@ cdef class _py_anon_pod5: if not isinstance(other, _py_anon_pod5): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod5), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod5)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod5)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7764,7 +7776,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(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) @staticmethod def from_data(data): @@ -7773,7 +7785,7 @@ cdef class _py_anon_pod5: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod5_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) + return _cyb_from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7788,10 +7800,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) obj._owner = None obj._owned = True else: @@ -7835,7 +7847,7 @@ cdef class VgpuSchedulerCapabilities: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") self._owner = None @@ -7847,7 +7859,7 @@ cdef class VgpuSchedulerCapabilities: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerCapabilities object at {hex(id(self))}>" @@ -7868,20 +7880,20 @@ cdef class VgpuSchedulerCapabilities: if not isinstance(other, VgpuSchedulerCapabilities): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7891,7 +7903,7 @@ cdef class VgpuSchedulerCapabilities: @property def supported_schedulers(self): """~_numpy.uint32: (array of length 3).""" - cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].supportedSchedulers)) return _numpy.asarray(arr) @@ -7901,9 +7913,9 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("This VgpuSchedulerCapabilities instance is read-only") if len(val) != 3: raise ValueError(f"Expected length { 3 } for field supported_schedulers, got {len(val)}") - cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) + _cyb_memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) @property def max_timeslice(self): @@ -7985,7 +7997,7 @@ cdef class VgpuSchedulerCapabilities: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerCapabilities instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) @staticmethod def from_data(data): @@ -7994,7 +8006,7 @@ cdef class VgpuSchedulerCapabilities: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_capabilities_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) + return _cyb_from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8009,10 +8021,10 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerCapabilities obj = VgpuSchedulerCapabilities.__new__(VgpuSchedulerCapabilities) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) obj._owner = None obj._owned = True else: @@ -8055,7 +8067,7 @@ cdef class VgpuLicenseExpiry: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") self._owner = None @@ -8067,7 +8079,7 @@ cdef class VgpuLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseExpiry object at {hex(id(self))}>" @@ -8088,20 +8100,20 @@ cdef class VgpuLicenseExpiry: if not isinstance(other, VgpuLicenseExpiry): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8188,7 +8200,7 @@ cdef class VgpuLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseExpiry instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) @staticmethod def from_data(data): @@ -8197,7 +8209,7 @@ cdef class VgpuLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_expiry_dtype` holding the data. """ - return __from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) + return _cyb_from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8212,10 +8224,10 @@ cdef class VgpuLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseExpiry obj = VgpuLicenseExpiry.__new__(VgpuLicenseExpiry) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8258,7 +8270,7 @@ cdef class GridLicenseExpiry: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") self._owner = None @@ -8270,7 +8282,7 @@ cdef class GridLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GridLicenseExpiry object at {hex(id(self))}>" @@ -8291,20 +8303,20 @@ cdef class GridLicenseExpiry: if not isinstance(other, GridLicenseExpiry): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8391,7 +8403,7 @@ cdef class GridLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an GridLicenseExpiry instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) + return _cyb_from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) @staticmethod def from_data(data): @@ -8400,7 +8412,7 @@ cdef class GridLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `grid_license_expiry_dtype` holding the data. """ - return __from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) + return _cyb_from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8415,10 +8427,10 @@ cdef class GridLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef GridLicenseExpiry obj = GridLicenseExpiry.__new__(GridLicenseExpiry) if owner is None: - obj._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8458,7 +8470,7 @@ cdef class VgpuTypeIdInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") self._owner = None @@ -8471,7 +8483,7 @@ cdef class VgpuTypeIdInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeIdInfo_v1 object at {hex(id(self))}>" @@ -8492,20 +8504,20 @@ cdef class VgpuTypeIdInfo_v1: if not isinstance(other, VgpuTypeIdInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8528,7 +8540,7 @@ cdef class VgpuTypeIdInfo_v1: """int: OUT: List of vGPU type IDs.""" if self._ptr[0].vgpuTypeIds == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuTypeIds) return _numpy.asarray(arr) @@ -8536,7 +8548,7 @@ cdef class VgpuTypeIdInfo_v1: def vgpu_type_ids(self, val): if self._readonly: raise ValueError("This VgpuTypeIdInfo_v1 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuTypeIds = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8545,7 +8557,7 @@ cdef class VgpuTypeIdInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeIdInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) @staticmethod def from_data(data): @@ -8554,7 +8566,7 @@ cdef class VgpuTypeIdInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_id_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) + return _cyb_from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8569,10 +8581,10 @@ cdef class VgpuTypeIdInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeIdInfo_v1 obj = VgpuTypeIdInfo_v1.__new__(VgpuTypeIdInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8613,7 +8625,7 @@ cdef class ActiveVgpuInstanceInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") self._owner = None @@ -8626,7 +8638,7 @@ cdef class ActiveVgpuInstanceInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ActiveVgpuInstanceInfo_v1 object at {hex(id(self))}>" @@ -8647,20 +8659,20 @@ cdef class ActiveVgpuInstanceInfo_v1: if not isinstance(other, ActiveVgpuInstanceInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8683,7 +8695,7 @@ cdef class ActiveVgpuInstanceInfo_v1: """int: IN/OUT: list of active vGPU instances.""" if self._ptr[0].vgpuInstances == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuInstances) return _numpy.asarray(arr) @@ -8691,7 +8703,7 @@ cdef class ActiveVgpuInstanceInfo_v1: def vgpu_instances(self, val): if self._readonly: raise ValueError("This ActiveVgpuInstanceInfo_v1 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuInstances = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8700,7 +8712,7 @@ cdef class ActiveVgpuInstanceInfo_v1: @staticmethod def from_buffer(buffer): """Create an ActiveVgpuInstanceInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) @staticmethod def from_data(data): @@ -8709,7 +8721,7 @@ cdef class ActiveVgpuInstanceInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `active_vgpu_instance_info_v1_dtype` holding the data. """ - return __from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) + return _cyb_from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8724,10 +8736,10 @@ cdef class ActiveVgpuInstanceInfo_v1: raise ValueError("ptr must not be null (0)") cdef ActiveVgpuInstanceInfo_v1 obj = ActiveVgpuInstanceInfo_v1.__new__(ActiveVgpuInstanceInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8770,7 +8782,7 @@ cdef class VgpuCreatablePlacementInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") self._owner = None @@ -8783,7 +8795,7 @@ cdef class VgpuCreatablePlacementInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuCreatablePlacementInfo_v1 object at {hex(id(self))}>" @@ -8804,20 +8816,20 @@ cdef class VgpuCreatablePlacementInfo_v1: if not isinstance(other, VgpuCreatablePlacementInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8862,7 +8874,7 @@ cdef class VgpuCreatablePlacementInfo_v1: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -8870,7 +8882,7 @@ cdef class VgpuCreatablePlacementInfo_v1: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuCreatablePlacementInfo_v1 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].placementSize = len(val) @@ -8879,7 +8891,7 @@ cdef class VgpuCreatablePlacementInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuCreatablePlacementInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) @staticmethod def from_data(data): @@ -8888,7 +8900,7 @@ cdef class VgpuCreatablePlacementInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_creatable_placement_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) + return _cyb_from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8903,10 +8915,10 @@ cdef class VgpuCreatablePlacementInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuCreatablePlacementInfo_v1 obj = VgpuCreatablePlacementInfo_v1.__new__(VgpuCreatablePlacementInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8981,10 +8993,10 @@ cdef class HwbcEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def hwbc_id(self): @@ -9060,8 +9072,8 @@ cdef class HwbcEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef HwbcEntry obj = HwbcEntry.__new__(HwbcEntry) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlHwbcEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=hwbc_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -9096,7 +9108,7 @@ cdef class LedState: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlLedState_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") self._owner = None @@ -9108,7 +9120,7 @@ cdef class LedState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.LedState object at {hex(id(self))}>" @@ -9129,20 +9141,20 @@ cdef class LedState: if not isinstance(other, LedState): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlLedState_t)) + self._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9152,7 +9164,7 @@ cdef class LedState: @property def cause(self): """~_numpy.int8: (array of length 256).""" - return cpython.PyUnicode_FromString(self._ptr[0].cause) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].cause) @cause.setter def cause(self, val): @@ -9162,7 +9174,7 @@ cdef class LedState: if len(buf) >= 256: raise ValueError("String too long for field cause, max length is 255") cdef char *ptr = buf - memcpy((self._ptr[0].cause), ptr, 256) + _cyb_memcpy((self._ptr[0].cause), ptr, 256) @property def color(self): @@ -9178,7 +9190,7 @@ cdef class LedState: @staticmethod def from_buffer(buffer): """Create an LedState instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlLedState_t), LedState) + return _cyb_from_buffer(buffer, sizeof(nvmlLedState_t), LedState) @staticmethod def from_data(data): @@ -9187,7 +9199,7 @@ cdef class LedState: Args: data (_numpy.ndarray): a single-element array of dtype `led_state_dtype` holding the data. """ - return __from_data(data, "led_state_dtype", led_state_dtype, LedState) + return _cyb_from_data(data, "led_state_dtype", led_state_dtype, LedState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9202,10 +9214,10 @@ cdef class LedState: raise ValueError("ptr must not be null (0)") cdef LedState obj = LedState.__new__(LedState) if owner is None: - obj._ptr = malloc(sizeof(nvmlLedState_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating LedState") - memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) obj._owner = None obj._owned = True else: @@ -9245,7 +9257,7 @@ cdef class UnitInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlUnitInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") self._owner = None @@ -9257,7 +9269,7 @@ cdef class UnitInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.UnitInfo object at {hex(id(self))}>" @@ -9278,20 +9290,20 @@ cdef class UnitInfo: if not isinstance(other, UnitInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlUnitInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9301,7 +9313,7 @@ cdef class UnitInfo: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -9311,12 +9323,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @property def id(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].id) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].id) @id.setter def id(self, val): @@ -9326,12 +9338,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field id, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].id), ptr, 96) + _cyb_memcpy((self._ptr[0].id), ptr, 96) @property def serial(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].serial) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].serial) @serial.setter def serial(self, val): @@ -9341,12 +9353,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field serial, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].serial), ptr, 96) + _cyb_memcpy((self._ptr[0].serial), ptr, 96) @property def firmware_version(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) @firmware_version.setter def firmware_version(self, val): @@ -9356,12 +9368,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field firmware_version, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].firmwareVersion), ptr, 96) + _cyb_memcpy((self._ptr[0].firmwareVersion), ptr, 96) @staticmethod def from_buffer(buffer): """Create an UnitInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) @staticmethod def from_data(data): @@ -9370,7 +9382,7 @@ cdef class UnitInfo: Args: data (_numpy.ndarray): a single-element array of dtype `unit_info_dtype` holding the data. """ - return __from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) + return _cyb_from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9385,10 +9397,10 @@ cdef class UnitInfo: raise ValueError("ptr must not be null (0)") cdef UnitInfo obj = UnitInfo.__new__(UnitInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlUnitInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) obj._owner = None obj._owned = True else: @@ -9428,7 +9440,7 @@ cdef class PSUInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPSUInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") self._owner = None @@ -9440,7 +9452,7 @@ cdef class PSUInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PSUInfo object at {hex(id(self))}>" @@ -9461,20 +9473,20 @@ cdef class PSUInfo: if not isinstance(other, PSUInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPSUInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9484,7 +9496,7 @@ cdef class PSUInfo: @property def state(self): """~_numpy.int8: (array of length 256).""" - return cpython.PyUnicode_FromString(self._ptr[0].state) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].state) @state.setter def state(self, val): @@ -9494,7 +9506,7 @@ cdef class PSUInfo: if len(buf) >= 256: raise ValueError("String too long for field state, max length is 255") cdef char *ptr = buf - memcpy((self._ptr[0].state), ptr, 256) + _cyb_memcpy((self._ptr[0].state), ptr, 256) @property def current(self): @@ -9532,7 +9544,7 @@ cdef class PSUInfo: @staticmethod def from_buffer(buffer): """Create an PSUInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) @staticmethod def from_data(data): @@ -9541,7 +9553,7 @@ cdef class PSUInfo: Args: data (_numpy.ndarray): a single-element array of dtype `psu_info_dtype` holding the data. """ - return __from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) + return _cyb_from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9556,10 +9568,10 @@ cdef class PSUInfo: raise ValueError("ptr must not be null (0)") cdef PSUInfo obj = PSUInfo.__new__(PSUInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlPSUInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) obj._owner = None obj._owned = True else: @@ -9633,10 +9645,10 @@ cdef class UnitFanInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def speed(self): @@ -9714,8 +9726,8 @@ cdef class UnitFanInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef UnitFanInfo obj = UnitFanInfo.__new__(UnitFanInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlUnitFanInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=unit_fan_info_dtype) obj._data = data.view(_numpy.recarray) @@ -9753,7 +9765,7 @@ cdef class EventData: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlEventData_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") self._owner = None @@ -9765,7 +9777,7 @@ cdef class EventData: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.EventData object at {hex(id(self))}>" @@ -9786,20 +9798,20 @@ cdef class EventData: if not isinstance(other, EventData): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlEventData_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9864,7 +9876,7 @@ cdef class EventData: @staticmethod def from_buffer(buffer): """Create an EventData instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlEventData_t), EventData) + return _cyb_from_buffer(buffer, sizeof(nvmlEventData_t), EventData) @staticmethod def from_data(data): @@ -9873,7 +9885,7 @@ cdef class EventData: Args: data (_numpy.ndarray): a single-element array of dtype `event_data_dtype` holding the data. """ - return __from_data(data, "event_data_dtype", event_data_dtype, EventData) + return _cyb_from_data(data, "event_data_dtype", event_data_dtype, EventData) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9888,10 +9900,10 @@ cdef class EventData: raise ValueError("ptr must not be null (0)") cdef EventData obj = EventData.__new__(EventData) if owner is None: - obj._ptr = malloc(sizeof(nvmlEventData_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EventData") - memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) obj._owner = None obj._owned = True else: @@ -9965,10 +9977,10 @@ cdef class SystemEventData_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def event_type(self): @@ -10046,8 +10058,8 @@ cdef class SystemEventData_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef SystemEventData_v1 obj = SystemEventData_v1.__new__(SystemEventData_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSystemEventData_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=system_event_data_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -10087,7 +10099,7 @@ cdef class AccountingStats: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlAccountingStats_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") self._owner = None @@ -10099,7 +10111,7 @@ cdef class AccountingStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.AccountingStats object at {hex(id(self))}>" @@ -10120,20 +10132,20 @@ cdef class AccountingStats: if not isinstance(other, AccountingStats): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlAccountingStats_t)) + self._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10209,7 +10221,7 @@ cdef class AccountingStats: @staticmethod def from_buffer(buffer): """Create an AccountingStats instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) + return _cyb_from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) @staticmethod def from_data(data): @@ -10218,7 +10230,7 @@ cdef class AccountingStats: Args: data (_numpy.ndarray): a single-element array of dtype `accounting_stats_dtype` holding the data. """ - return __from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) + return _cyb_from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10233,10 +10245,10 @@ cdef class AccountingStats: raise ValueError("ptr must not be null (0)") cdef AccountingStats obj = AccountingStats.__new__(AccountingStats) if owner is None: - obj._ptr = malloc(sizeof(nvmlAccountingStats_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) obj._owner = None obj._owned = True else: @@ -10316,10 +10328,10 @@ cdef class EncoderSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10463,8 +10475,8 @@ cdef class EncoderSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EncoderSessionInfo obj = EncoderSessionInfo.__new__(EncoderSessionInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEncoderSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=encoder_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10500,7 +10512,7 @@ cdef class FBCStats: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlFBCStats_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") self._owner = None @@ -10512,7 +10524,7 @@ cdef class FBCStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.FBCStats object at {hex(id(self))}>" @@ -10533,20 +10545,20 @@ cdef class FBCStats: if not isinstance(other, FBCStats): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlFBCStats_t)) + self._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10589,7 +10601,7 @@ cdef class FBCStats: @staticmethod def from_buffer(buffer): """Create an FBCStats instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) + return _cyb_from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) @staticmethod def from_data(data): @@ -10598,7 +10610,7 @@ cdef class FBCStats: Args: data (_numpy.ndarray): a single-element array of dtype `fbc_stats_dtype` holding the data. """ - return __from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) + return _cyb_from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10613,10 +10625,10 @@ cdef class FBCStats: raise ValueError("ptr must not be null (0)") cdef FBCStats obj = FBCStats.__new__(FBCStats) if owner is None: - obj._ptr = malloc(sizeof(nvmlFBCStats_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating FBCStats") - memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) obj._owner = None obj._owned = True else: @@ -10700,10 +10712,10 @@ cdef class FBCSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10891,8 +10903,8 @@ cdef class FBCSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FBCSessionInfo obj = FBCSessionInfo.__new__(FBCSessionInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFBCSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=fbc_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10927,7 +10939,7 @@ cdef class ConfComputeSystemCaps: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") self._owner = None @@ -10939,7 +10951,7 @@ cdef class ConfComputeSystemCaps: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemCaps object at {hex(id(self))}>" @@ -10960,20 +10972,20 @@ cdef class ConfComputeSystemCaps: if not isinstance(other, ConfComputeSystemCaps): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11005,7 +11017,7 @@ cdef class ConfComputeSystemCaps: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemCaps instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) @staticmethod def from_data(data): @@ -11014,7 +11026,7 @@ cdef class ConfComputeSystemCaps: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_caps_dtype` holding the data. """ - return __from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) + return _cyb_from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11029,10 +11041,10 @@ cdef class ConfComputeSystemCaps: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemCaps obj = ConfComputeSystemCaps.__new__(ConfComputeSystemCaps) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) obj._owner = None obj._owned = True else: @@ -11071,7 +11083,7 @@ cdef class ConfComputeSystemState: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeSystemState_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") self._owner = None @@ -11083,7 +11095,7 @@ cdef class ConfComputeSystemState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemState object at {hex(id(self))}>" @@ -11104,20 +11116,20 @@ cdef class ConfComputeSystemState: if not isinstance(other, ConfComputeSystemState): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11160,7 +11172,7 @@ cdef class ConfComputeSystemState: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemState instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) @staticmethod def from_data(data): @@ -11169,7 +11181,7 @@ cdef class ConfComputeSystemState: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_state_dtype` holding the data. """ - return __from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) + return _cyb_from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11184,10 +11196,10 @@ cdef class ConfComputeSystemState: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemState obj = ConfComputeSystemState.__new__(ConfComputeSystemState) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) obj._owner = None obj._owned = True else: @@ -11228,7 +11240,7 @@ cdef class SystemConfComputeSettings_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") self._owner = None @@ -11240,7 +11252,7 @@ cdef class SystemConfComputeSettings_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.SystemConfComputeSettings_v1 object at {hex(id(self))}>" @@ -11261,20 +11273,20 @@ cdef class SystemConfComputeSettings_v1: if not isinstance(other, SystemConfComputeSettings_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11339,7 +11351,7 @@ cdef class SystemConfComputeSettings_v1: @staticmethod def from_buffer(buffer): """Create an SystemConfComputeSettings_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) @staticmethod def from_data(data): @@ -11348,7 +11360,7 @@ cdef class SystemConfComputeSettings_v1: Args: data (_numpy.ndarray): a single-element array of dtype `system_conf_compute_settings_v1_dtype` holding the data. """ - return __from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) + return _cyb_from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11363,10 +11375,10 @@ cdef class SystemConfComputeSettings_v1: raise ValueError("ptr must not be null (0)") cdef SystemConfComputeSettings_v1 obj = SystemConfComputeSettings_v1.__new__(SystemConfComputeSettings_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) obj._owner = None obj._owned = True else: @@ -11404,7 +11416,7 @@ cdef class ConfComputeMemSizeInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") self._owner = None @@ -11416,7 +11428,7 @@ cdef class ConfComputeMemSizeInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeMemSizeInfo object at {hex(id(self))}>" @@ -11437,20 +11449,20 @@ cdef class ConfComputeMemSizeInfo: if not isinstance(other, ConfComputeMemSizeInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11482,7 +11494,7 @@ cdef class ConfComputeMemSizeInfo: @staticmethod def from_buffer(buffer): """Create an ConfComputeMemSizeInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) @staticmethod def from_data(data): @@ -11491,7 +11503,7 @@ cdef class ConfComputeMemSizeInfo: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_mem_size_info_dtype` holding the data. """ - return __from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) + return _cyb_from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11506,10 +11518,10 @@ cdef class ConfComputeMemSizeInfo: raise ValueError("ptr must not be null (0)") cdef ConfComputeMemSizeInfo obj = ConfComputeMemSizeInfo.__new__(ConfComputeMemSizeInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) obj._owner = None obj._owned = True else: @@ -11549,7 +11561,7 @@ cdef class ConfComputeGpuCertificate: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") self._owner = None @@ -11561,7 +11573,7 @@ cdef class ConfComputeGpuCertificate: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuCertificate object at {hex(id(self))}>" @@ -11582,20 +11594,20 @@ cdef class ConfComputeGpuCertificate: if not isinstance(other, ConfComputeGpuCertificate): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11607,7 +11619,7 @@ cdef class ConfComputeGpuCertificate: """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].certChainSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].certChain)) return _numpy.asarray(arr) @@ -11620,16 +11632,16 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].certChainSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_cert_chain(self): """~_numpy.uint8: (array of length 5120).""" if self._ptr[0].attestationCertChainSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationCertChain)) return _numpy.asarray(arr) @@ -11642,14 +11654,14 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].attestationCertChainSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuCertificate instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) @staticmethod def from_data(data): @@ -11658,7 +11670,7 @@ cdef class ConfComputeGpuCertificate: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_certificate_dtype` holding the data. """ - return __from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) + return _cyb_from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11673,10 +11685,10 @@ cdef class ConfComputeGpuCertificate: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuCertificate obj = ConfComputeGpuCertificate.__new__(ConfComputeGpuCertificate) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) obj._owner = None obj._owned = True else: @@ -11718,7 +11730,7 @@ cdef class ConfComputeGpuAttestationReport: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") self._owner = None @@ -11730,7 +11742,7 @@ cdef class ConfComputeGpuAttestationReport: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuAttestationReport object at {hex(id(self))}>" @@ -11751,20 +11763,20 @@ cdef class ConfComputeGpuAttestationReport: if not isinstance(other, ConfComputeGpuAttestationReport): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11785,7 +11797,7 @@ cdef class ConfComputeGpuAttestationReport: @property def nonce(self): """~_numpy.uint8: (array of length 32).""" - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].nonce)) return _numpy.asarray(arr) @@ -11795,16 +11807,16 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("This ConfComputeGpuAttestationReport instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field nonce, got {len(val)}") - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_report(self): """~_numpy.uint8: (array of length 8192).""" if self._ptr[0].attestationReportSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationReport)) return _numpy.asarray(arr) @@ -11817,16 +11829,16 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].attestationReportSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @property def cec_attestation_report(self): """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].cecAttestationReportSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].cecAttestationReport)) return _numpy.asarray(arr) @@ -11839,14 +11851,14 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].cecAttestationReportSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuAttestationReport instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) @staticmethod def from_data(data): @@ -11855,7 +11867,7 @@ cdef class ConfComputeGpuAttestationReport: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_attestation_report_dtype` holding the data. """ - return __from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) + return _cyb_from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11870,10 +11882,10 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuAttestationReport obj = ConfComputeGpuAttestationReport.__new__(ConfComputeGpuAttestationReport) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) obj._owner = None obj._owned = True else: @@ -11915,7 +11927,7 @@ cdef class GpuFabricInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") self._owner = None @@ -11927,7 +11939,7 @@ cdef class GpuFabricInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v2 object at {hex(id(self))}>" @@ -11948,20 +11960,20 @@ cdef class GpuFabricInfo_v2: if not isinstance(other, GpuFabricInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11982,7 +11994,7 @@ cdef class GpuFabricInfo_v2: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -11992,9 +12004,9 @@ cdef class GpuFabricInfo_v2: raise ValueError("This GpuFabricInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -12043,7 +12055,7 @@ cdef class GpuFabricInfo_v2: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) @staticmethod def from_data(data): @@ -12052,7 +12064,7 @@ cdef class GpuFabricInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v2_dtype` holding the data. """ - return __from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) + return _cyb_from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12067,10 +12079,10 @@ cdef class GpuFabricInfo_v2: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v2 obj = GpuFabricInfo_v2.__new__(GpuFabricInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -12109,7 +12121,7 @@ cdef class NvlinkSupportedBwModes_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") self._owner = None @@ -12121,7 +12133,7 @@ cdef class NvlinkSupportedBwModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSupportedBwModes_v1 object at {hex(id(self))}>" @@ -12142,20 +12154,20 @@ cdef class NvlinkSupportedBwModes_v1: if not isinstance(other, NvlinkSupportedBwModes_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12178,7 +12190,7 @@ cdef class NvlinkSupportedBwModes_v1: """~_numpy.uint8: (array of length 23).""" if self._ptr[0].totalBwModes == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].bwModes)) return _numpy.asarray(arr) @@ -12191,14 +12203,14 @@ cdef class NvlinkSupportedBwModes_v1: self._ptr[0].totalBwModes = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an NvlinkSupportedBwModes_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) @staticmethod def from_data(data): @@ -12207,7 +12219,7 @@ cdef class NvlinkSupportedBwModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_supported_bw_modes_v1_dtype` holding the data. """ - return __from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) + return _cyb_from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12222,10 +12234,10 @@ cdef class NvlinkSupportedBwModes_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSupportedBwModes_v1 obj = NvlinkSupportedBwModes_v1.__new__(NvlinkSupportedBwModes_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) obj._owner = None obj._owned = True else: @@ -12264,7 +12276,7 @@ cdef class NvlinkGetBwMode_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") self._owner = None @@ -12276,7 +12288,7 @@ cdef class NvlinkGetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkGetBwMode_v1 object at {hex(id(self))}>" @@ -12297,20 +12309,20 @@ cdef class NvlinkGetBwMode_v1: if not isinstance(other, NvlinkGetBwMode_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12353,7 +12365,7 @@ cdef class NvlinkGetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkGetBwMode_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) @staticmethod def from_data(data): @@ -12362,7 +12374,7 @@ cdef class NvlinkGetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_get_bw_mode_v1_dtype` holding the data. """ - return __from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) + return _cyb_from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12377,10 +12389,10 @@ cdef class NvlinkGetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkGetBwMode_v1 obj = NvlinkGetBwMode_v1.__new__(NvlinkGetBwMode_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12419,7 +12431,7 @@ cdef class NvlinkSetBwMode_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") self._owner = None @@ -12431,7 +12443,7 @@ cdef class NvlinkSetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSetBwMode_v1 object at {hex(id(self))}>" @@ -12452,20 +12464,20 @@ cdef class NvlinkSetBwMode_v1: if not isinstance(other, NvlinkSetBwMode_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12508,7 +12520,7 @@ cdef class NvlinkSetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkSetBwMode_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) @staticmethod def from_data(data): @@ -12517,7 +12529,7 @@ cdef class NvlinkSetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_set_bw_mode_v1_dtype` holding the data. """ - return __from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) + return _cyb_from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12532,10 +12544,10 @@ cdef class NvlinkSetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSetBwMode_v1 obj = NvlinkSetBwMode_v1.__new__(NvlinkSetBwMode_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12573,7 +12585,7 @@ cdef class VgpuVersion: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuVersion_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") self._owner = None @@ -12585,7 +12597,7 @@ cdef class VgpuVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuVersion object at {hex(id(self))}>" @@ -12606,20 +12618,20 @@ cdef class VgpuVersion: if not isinstance(other, VgpuVersion): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuVersion_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12651,7 +12663,7 @@ cdef class VgpuVersion: @staticmethod def from_buffer(buffer): """Create an VgpuVersion instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) @staticmethod def from_data(data): @@ -12660,7 +12672,7 @@ cdef class VgpuVersion: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_version_dtype` holding the data. """ - return __from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) + return _cyb_from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12675,10 +12687,10 @@ cdef class VgpuVersion: raise ValueError("ptr must not be null (0)") cdef VgpuVersion obj = VgpuVersion.__new__(VgpuVersion) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuVersion_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) obj._owner = None obj._owned = True else: @@ -12724,7 +12736,7 @@ cdef class VgpuMetadata: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuMetadata_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") self._owner = None @@ -12736,7 +12748,7 @@ cdef class VgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuMetadata object at {hex(id(self))}>" @@ -12757,20 +12769,20 @@ cdef class VgpuMetadata: if not isinstance(other, VgpuMetadata): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12813,7 +12825,7 @@ cdef class VgpuMetadata: @property def guest_driver_version(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) @guest_driver_version.setter def guest_driver_version(self, val): @@ -12823,12 +12835,12 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field guest_driver_version, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].guestDriverVersion), ptr, 80) + _cyb_memcpy((self._ptr[0].guestDriverVersion), ptr, 80) @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -12838,7 +12850,7 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def vgpu_virtualization_caps(self): @@ -12876,7 +12888,7 @@ cdef class VgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -12886,12 +12898,12 @@ cdef class VgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - memcpy((self._ptr[0].opaqueData), ptr, 4) + _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuMetadata instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) @staticmethod def from_data(data): @@ -12900,7 +12912,7 @@ cdef class VgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_metadata_dtype` holding the data. """ - return __from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) + return _cyb_from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12915,10 +12927,10 @@ cdef class VgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuMetadata obj = VgpuMetadata.__new__(VgpuMetadata) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -12956,7 +12968,7 @@ cdef class VgpuPgpuCompatibility: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") self._owner = None @@ -12968,7 +12980,7 @@ cdef class VgpuPgpuCompatibility: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuCompatibility object at {hex(id(self))}>" @@ -12989,20 +13001,20 @@ cdef class VgpuPgpuCompatibility: if not isinstance(other, VgpuPgpuCompatibility): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13034,7 +13046,7 @@ cdef class VgpuPgpuCompatibility: @staticmethod def from_buffer(buffer): """Create an VgpuPgpuCompatibility instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) @staticmethod def from_data(data): @@ -13043,7 +13055,7 @@ cdef class VgpuPgpuCompatibility: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_compatibility_dtype` holding the data. """ - return __from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) + return _cyb_from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13058,10 +13070,10 @@ cdef class VgpuPgpuCompatibility: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuCompatibility obj = VgpuPgpuCompatibility.__new__(VgpuPgpuCompatibility) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) obj._owner = None obj._owned = True else: @@ -13135,10 +13147,10 @@ cdef class GpuInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13216,8 +13228,8 @@ cdef class GpuInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GpuInstancePlacement obj = GpuInstancePlacement.__new__(GpuInstancePlacement) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGpuInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=gpu_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13263,7 +13275,7 @@ cdef class GpuInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") self._owner = None @@ -13275,7 +13287,7 @@ cdef class GpuInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13296,20 +13308,20 @@ cdef class GpuInstanceProfileInfo_v3: if not isinstance(other, GpuInstanceProfileInfo_v3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13440,7 +13452,7 @@ cdef class GpuInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13450,7 +13462,7 @@ cdef class GpuInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -13466,7 +13478,7 @@ cdef class GpuInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -13475,7 +13487,7 @@ cdef class GpuInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_profile_info_v3_dtype` holding the data. """ - return __from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) + return _cyb_from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13490,10 +13502,10 @@ cdef class GpuInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuInstanceProfileInfo_v3 obj = GpuInstanceProfileInfo_v3.__new__(GpuInstanceProfileInfo_v3) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -13567,10 +13579,10 @@ cdef class ComputeInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13648,8 +13660,8 @@ cdef class ComputeInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ComputeInstancePlacement obj = ComputeInstancePlacement.__new__(ComputeInstancePlacement) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlComputeInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=compute_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13693,7 +13705,7 @@ cdef class ComputeInstanceProfileInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") self._owner = None @@ -13705,7 +13717,7 @@ cdef class ComputeInstanceProfileInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v2 object at {hex(id(self))}>" @@ -13726,20 +13738,20 @@ cdef class ComputeInstanceProfileInfo_v2: if not isinstance(other, ComputeInstanceProfileInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13859,7 +13871,7 @@ cdef class ComputeInstanceProfileInfo_v2: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13869,12 +13881,12 @@ cdef class ComputeInstanceProfileInfo_v2: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) @staticmethod def from_data(data): @@ -13883,7 +13895,7 @@ cdef class ComputeInstanceProfileInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v2_dtype` holding the data. """ - return __from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) + return _cyb_from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13898,10 +13910,10 @@ cdef class ComputeInstanceProfileInfo_v2: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v2 obj = ComputeInstanceProfileInfo_v2.__new__(ComputeInstanceProfileInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -13949,7 +13961,7 @@ cdef class ComputeInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") self._owner = None @@ -13961,7 +13973,7 @@ cdef class ComputeInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13982,20 +13994,20 @@ cdef class ComputeInstanceProfileInfo_v3: if not isinstance(other, ComputeInstanceProfileInfo_v3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14115,7 +14127,7 @@ cdef class ComputeInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -14125,7 +14137,7 @@ cdef class ComputeInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -14141,7 +14153,7 @@ cdef class ComputeInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) + return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -14150,7 +14162,7 @@ cdef class ComputeInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v3_dtype` holding the data. """ - return __from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) + return _cyb_from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14165,10 +14177,10 @@ cdef class ComputeInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v3 obj = ComputeInstanceProfileInfo_v3.__new__(ComputeInstanceProfileInfo_v3) if owner is None: - obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -14206,7 +14218,7 @@ cdef class DeviceAddressingMode_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") self._owner = None @@ -14218,7 +14230,7 @@ cdef class DeviceAddressingMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DeviceAddressingMode_v1 object at {hex(id(self))}>" @@ -14239,20 +14251,20 @@ cdef class DeviceAddressingMode_v1: if not isinstance(other, DeviceAddressingMode_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14284,7 +14296,7 @@ cdef class DeviceAddressingMode_v1: @staticmethod def from_buffer(buffer): """Create an DeviceAddressingMode_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) @staticmethod def from_data(data): @@ -14293,7 +14305,7 @@ cdef class DeviceAddressingMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_addressing_mode_v1_dtype` holding the data. """ - return __from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) + return _cyb_from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14308,10 +14320,10 @@ cdef class DeviceAddressingMode_v1: raise ValueError("ptr must not be null (0)") cdef DeviceAddressingMode_v1 obj = DeviceAddressingMode_v1.__new__(DeviceAddressingMode_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) obj._owner = None obj._owned = True else: @@ -14350,7 +14362,7 @@ cdef class RepairStatus_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlRepairStatus_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") self._owner = None @@ -14362,7 +14374,7 @@ cdef class RepairStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.RepairStatus_v1 object at {hex(id(self))}>" @@ -14383,20 +14395,20 @@ cdef class RepairStatus_v1: if not isinstance(other, RepairStatus_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14439,7 +14451,7 @@ cdef class RepairStatus_v1: @staticmethod def from_buffer(buffer): """Create an RepairStatus_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) @staticmethod def from_data(data): @@ -14448,7 +14460,7 @@ cdef class RepairStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `repair_status_v1_dtype` holding the data. """ - return __from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) + return _cyb_from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14463,10 +14475,10 @@ cdef class RepairStatus_v1: raise ValueError("ptr must not be null (0)") cdef RepairStatus_v1 obj = RepairStatus_v1.__new__(RepairStatus_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -14505,7 +14517,7 @@ cdef class DevicePowerMizerModes_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") self._owner = None @@ -14517,7 +14529,7 @@ cdef class DevicePowerMizerModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DevicePowerMizerModes_v1 object at {hex(id(self))}>" @@ -14538,20 +14550,20 @@ cdef class DevicePowerMizerModes_v1: if not isinstance(other, DevicePowerMizerModes_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14594,7 +14606,7 @@ cdef class DevicePowerMizerModes_v1: @staticmethod def from_buffer(buffer): """Create an DevicePowerMizerModes_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) @staticmethod def from_data(data): @@ -14603,7 +14615,7 @@ cdef class DevicePowerMizerModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_power_mizer_modes_v1_dtype` holding the data. """ - return __from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) + return _cyb_from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14618,10 +14630,10 @@ cdef class DevicePowerMizerModes_v1: raise ValueError("ptr must not be null (0)") cdef DevicePowerMizerModes_v1 obj = DevicePowerMizerModes_v1.__new__(DevicePowerMizerModes_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) obj._owner = None obj._owned = True else: @@ -14700,10 +14712,10 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def unit(self): @@ -14836,8 +14848,8 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorEntry_v1 obj = EccSramUniqueUncorrectedErrorEntry_v1.__new__(EccSramUniqueUncorrectedErrorEntry_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorEntry_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=ecc_sram_unique_uncorrected_error_entry_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -14877,7 +14889,7 @@ cdef class GpuFabricInfo_v3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") self._owner = None @@ -14889,7 +14901,7 @@ cdef class GpuFabricInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v3 object at {hex(id(self))}>" @@ -14910,20 +14922,20 @@ cdef class GpuFabricInfo_v3: if not isinstance(other, GpuFabricInfo_v3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14944,7 +14956,7 @@ cdef class GpuFabricInfo_v3: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -14954,9 +14966,9 @@ cdef class GpuFabricInfo_v3: raise ValueError("This GpuFabricInfo_v3 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -15016,7 +15028,7 @@ cdef class GpuFabricInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) @staticmethod def from_data(data): @@ -15025,7 +15037,7 @@ cdef class GpuFabricInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v3_dtype` holding the data. """ - return __from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) + return _cyb_from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15040,10 +15052,10 @@ cdef class GpuFabricInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v3 obj = GpuFabricInfo_v3.__new__(GpuFabricInfo_v3) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -15081,7 +15093,7 @@ cdef class NvLinkInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") self._owner = None @@ -15093,7 +15105,7 @@ cdef class NvLinkInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v1 object at {hex(id(self))}>" @@ -15114,20 +15126,20 @@ cdef class NvLinkInfo_v1: if not isinstance(other, NvLinkInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15159,7 +15171,7 @@ cdef class NvLinkInfo_v1: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) @staticmethod def from_data(data): @@ -15168,7 +15180,7 @@ cdef class NvLinkInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v1_dtype` holding the data. """ - return __from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) + return _cyb_from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15183,10 +15195,10 @@ cdef class NvLinkInfo_v1: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v1 obj = NvLinkInfo_v1.__new__(NvLinkInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -15226,7 +15238,7 @@ cdef class NvlinkFirmwareVersion: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") self._owner = None @@ -15238,7 +15250,7 @@ cdef class NvlinkFirmwareVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareVersion object at {hex(id(self))}>" @@ -15259,20 +15271,20 @@ cdef class NvlinkFirmwareVersion: if not isinstance(other, NvlinkFirmwareVersion): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15326,7 +15338,7 @@ cdef class NvlinkFirmwareVersion: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareVersion instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) @staticmethod def from_data(data): @@ -15335,7 +15347,7 @@ cdef class NvlinkFirmwareVersion: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_version_dtype` holding the data. """ - return __from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) + return _cyb_from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15350,10 +15362,10 @@ cdef class NvlinkFirmwareVersion: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareVersion obj = NvlinkFirmwareVersion.__new__(NvlinkFirmwareVersion) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) obj._owner = None obj._owned = True else: @@ -15390,7 +15402,7 @@ cdef class PRMCounterInput_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") self._owner = None @@ -15402,7 +15414,7 @@ cdef class PRMCounterInput_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterInput_v1 object at {hex(id(self))}>" @@ -15423,20 +15435,20 @@ cdef class PRMCounterInput_v1: if not isinstance(other, PRMCounterInput_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15457,7 +15469,7 @@ cdef class PRMCounterInput_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterInput_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) @staticmethod def from_data(data): @@ -15466,7 +15478,7 @@ cdef class PRMCounterInput_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_input_v1_dtype` holding the data. """ - return __from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) + return _cyb_from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15481,10 +15493,10 @@ cdef class PRMCounterInput_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterInput_v1 obj = PRMCounterInput_v1.__new__(PRMCounterInput_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) obj._owner = None obj._owned = True else: @@ -15524,7 +15536,7 @@ cdef class VgpuSchedulerStateInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") self._owner = None @@ -15536,7 +15548,7 @@ cdef class VgpuSchedulerStateInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v2 object at {hex(id(self))}>" @@ -15557,20 +15569,20 @@ cdef class VgpuSchedulerStateInfo_v2: if not isinstance(other, VgpuSchedulerStateInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15624,7 +15636,7 @@ cdef class VgpuSchedulerStateInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) @staticmethod def from_data(data): @@ -15633,7 +15645,7 @@ cdef class VgpuSchedulerStateInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) + return _cyb_from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15648,10 +15660,10 @@ cdef class VgpuSchedulerStateInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v2 obj = VgpuSchedulerStateInfo_v2.__new__(VgpuSchedulerStateInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -15730,10 +15742,10 @@ cdef class VgpuSchedulerLogEntry_v2: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -15866,8 +15878,8 @@ cdef class VgpuSchedulerLogEntry_v2: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry_v2 obj = VgpuSchedulerLogEntry_v2.__new__(VgpuSchedulerLogEntry_v2) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_v2_dtype) obj._data = data.view(_numpy.recarray) @@ -15904,7 +15916,7 @@ cdef class VgpuSchedulerState_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") self._owner = None @@ -15916,7 +15928,7 @@ cdef class VgpuSchedulerState_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v2 object at {hex(id(self))}>" @@ -15937,20 +15949,20 @@ cdef class VgpuSchedulerState_v2: if not isinstance(other, VgpuSchedulerState_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16004,7 +16016,7 @@ cdef class VgpuSchedulerState_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) @staticmethod def from_data(data): @@ -16013,7 +16025,7 @@ cdef class VgpuSchedulerState_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) + return _cyb_from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16028,10 +16040,10 @@ cdef class VgpuSchedulerState_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v2 obj = VgpuSchedulerState_v2.__new__(VgpuSchedulerState_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) obj._owner = None obj._owned = True else: @@ -16069,7 +16081,7 @@ cdef class ExcludedDeviceInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") self._owner = None @@ -16081,7 +16093,7 @@ cdef class ExcludedDeviceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ExcludedDeviceInfo object at {hex(id(self))}>" @@ -16102,20 +16114,20 @@ cdef class ExcludedDeviceInfo: if not isinstance(other, ExcludedDeviceInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16132,12 +16144,12 @@ cdef class ExcludedDeviceInfo: if self._readonly: raise ValueError("This ExcludedDeviceInfo instance is read-only") cdef PciInfo val_ = val - memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) + _cyb_memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) @property def uuid(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].uuid) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].uuid) @uuid.setter def uuid(self, val): @@ -16147,12 +16159,12 @@ cdef class ExcludedDeviceInfo: if len(buf) >= 80: raise ValueError("String too long for field uuid, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].uuid), ptr, 80) + _cyb_memcpy((self._ptr[0].uuid), ptr, 80) @staticmethod def from_buffer(buffer): """Create an ExcludedDeviceInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) @staticmethod def from_data(data): @@ -16161,7 +16173,7 @@ cdef class ExcludedDeviceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `excluded_device_info_dtype` holding the data. """ - return __from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) + return _cyb_from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16176,10 +16188,10 @@ cdef class ExcludedDeviceInfo: raise ValueError("ptr must not be null (0)") cdef ExcludedDeviceInfo obj = ExcludedDeviceInfo.__new__(ExcludedDeviceInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) obj._owner = None obj._owned = True else: @@ -16220,7 +16232,7 @@ cdef class ProcessDetailList_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") self._owner = None @@ -16233,7 +16245,7 @@ cdef class ProcessDetailList_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ProcessDetailList_v1 object at {hex(id(self))}>" @@ -16254,20 +16266,20 @@ cdef class ProcessDetailList_v1: if not isinstance(other, ProcessDetailList_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16315,7 +16327,7 @@ cdef class ProcessDetailList_v1: @staticmethod def from_buffer(buffer): """Create an ProcessDetailList_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) @staticmethod def from_data(data): @@ -16324,7 +16336,7 @@ cdef class ProcessDetailList_v1: Args: data (_numpy.ndarray): a single-element array of dtype `process_detail_list_v1_dtype` holding the data. """ - return __from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) + return _cyb_from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16339,10 +16351,10 @@ cdef class ProcessDetailList_v1: raise ValueError("ptr must not be null (0)") cdef ProcessDetailList_v1 obj = ProcessDetailList_v1.__new__(ProcessDetailList_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) obj._owner = None obj._owned = True else: @@ -16381,7 +16393,7 @@ cdef class BridgeChipHierarchy: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") self._owner = None @@ -16393,7 +16405,7 @@ cdef class BridgeChipHierarchy: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.BridgeChipHierarchy object at {hex(id(self))}>" @@ -16414,20 +16426,20 @@ cdef class BridgeChipHierarchy: if not isinstance(other, BridgeChipHierarchy): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16449,12 +16461,12 @@ cdef class BridgeChipHierarchy: self._ptr[0].bridgeCount = len(val) if len(val) == 0: return - memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) + _cyb_memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) @staticmethod def from_buffer(buffer): """Create an BridgeChipHierarchy instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) + return _cyb_from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) @staticmethod def from_data(data): @@ -16463,7 +16475,7 @@ cdef class BridgeChipHierarchy: Args: data (_numpy.ndarray): a single-element array of dtype `bridge_chip_hierarchy_dtype` holding the data. """ - return __from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) + return _cyb_from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16478,10 +16490,10 @@ cdef class BridgeChipHierarchy: raise ValueError("ptr must not be null (0)") cdef BridgeChipHierarchy obj = BridgeChipHierarchy.__new__(BridgeChipHierarchy) if owner is None: - obj._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) obj._owner = None obj._owned = True else: @@ -16555,10 +16567,10 @@ cdef class Sample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -16634,8 +16646,8 @@ cdef class Sample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Sample obj = Sample.__new__(Sample) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16710,10 +16722,10 @@ cdef class VgpuInstanceUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def vgpu_instance(self): @@ -16827,8 +16839,8 @@ cdef class VgpuInstanceUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationSample obj = VgpuInstanceUtilizationSample.__new__(VgpuInstanceUtilizationSample) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16905,10 +16917,10 @@ cdef class VgpuInstanceUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -17040,8 +17052,8 @@ cdef class VgpuInstanceUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationInfo_v1 obj = VgpuInstanceUtilizationInfo_v1.__new__(VgpuInstanceUtilizationInfo_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -17117,10 +17129,10 @@ cdef class FieldValue: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def field_id(self): @@ -17251,8 +17263,8 @@ cdef class FieldValue: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FieldValue obj = FieldValue.__new__(FieldValue) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFieldValue_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=field_value_dtype) obj._data = data.view(_numpy.recarray) @@ -17288,7 +17300,7 @@ cdef class PRMCounterValue_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") self._owner = None @@ -17300,7 +17312,7 @@ cdef class PRMCounterValue_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterValue_v1 object at {hex(id(self))}>" @@ -17321,20 +17333,20 @@ cdef class PRMCounterValue_v1: if not isinstance(other, PRMCounterValue_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17351,7 +17363,7 @@ cdef class PRMCounterValue_v1: if self._readonly: raise ValueError("This PRMCounterValue_v1 instance is read-only") cdef Value val_ = val - memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) + _cyb_memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) @property def status(self): @@ -17378,7 +17390,7 @@ cdef class PRMCounterValue_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterValue_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) @staticmethod def from_data(data): @@ -17387,7 +17399,7 @@ cdef class PRMCounterValue_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_value_v1_dtype` holding the data. """ - return __from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) + return _cyb_from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17402,10 +17414,10 @@ cdef class PRMCounterValue_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterValue_v1 obj = PRMCounterValue_v1.__new__(PRMCounterValue_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) obj._owner = None obj._owned = True else: @@ -17443,7 +17455,7 @@ cdef class GpuThermalSettings: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuThermalSettings_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") self._owner = None @@ -17455,7 +17467,7 @@ cdef class GpuThermalSettings: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuThermalSettings object at {hex(id(self))}>" @@ -17476,20 +17488,20 @@ cdef class GpuThermalSettings: if not isinstance(other, GpuThermalSettings): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17508,7 +17520,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(cuda_bindings_nvml__anon_pod0) * 3) + _cyb_memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) @property def count(self): @@ -17524,7 +17536,7 @@ cdef class GpuThermalSettings: @staticmethod def from_buffer(buffer): """Create an GpuThermalSettings instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) @staticmethod def from_data(data): @@ -17533,7 +17545,7 @@ cdef class GpuThermalSettings: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_thermal_settings_dtype` holding the data. """ - return __from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) + return _cyb_from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17548,10 +17560,10 @@ cdef class GpuThermalSettings: raise ValueError("ptr must not be null (0)") cdef GpuThermalSettings obj = GpuThermalSettings.__new__(GpuThermalSettings) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) obj._owner = None obj._owned = True else: @@ -17590,7 +17602,7 @@ cdef class ClkMonStatus: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlClkMonStatus_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") self._owner = None @@ -17602,7 +17614,7 @@ cdef class ClkMonStatus: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ClkMonStatus object at {hex(id(self))}>" @@ -17623,20 +17635,20 @@ cdef class ClkMonStatus: if not isinstance(other, ClkMonStatus): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlClkMonStatus_t)) + self._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17658,7 +17670,7 @@ cdef class ClkMonStatus: self._ptr[0].clkMonListSize = len(val) if len(val) == 0: return - memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) + _cyb_memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) @property def b_global_status(self): @@ -17674,7 +17686,7 @@ cdef class ClkMonStatus: @staticmethod def from_buffer(buffer): """Create an ClkMonStatus instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) + return _cyb_from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) @staticmethod def from_data(data): @@ -17683,7 +17695,7 @@ cdef class ClkMonStatus: Args: data (_numpy.ndarray): a single-element array of dtype `clk_mon_status_dtype` holding the data. """ - return __from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) + return _cyb_from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17698,10 +17710,10 @@ cdef class ClkMonStatus: raise ValueError("ptr must not be null (0)") cdef ClkMonStatus obj = ClkMonStatus.__new__(ClkMonStatus) if owner is None: - obj._ptr = malloc(sizeof(nvmlClkMonStatus_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) obj._owner = None obj._owned = True else: @@ -17742,7 +17754,7 @@ cdef class ProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") self._owner = None @@ -17755,7 +17767,7 @@ cdef class ProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -17776,20 +17788,20 @@ cdef class ProcessesUtilizationInfo_v1: if not isinstance(other, ProcessesUtilizationInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17837,7 +17849,7 @@ cdef class ProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an ProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -17846,7 +17858,7 @@ cdef class ProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `processes_utilization_info_v1_dtype` holding the data. """ - return __from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) + return _cyb_from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17861,10 +17873,10 @@ cdef class ProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef ProcessesUtilizationInfo_v1 obj = ProcessesUtilizationInfo_v1.__new__(ProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -17903,7 +17915,7 @@ cdef class GpuDynamicPstatesInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") self._owner = None @@ -17915,7 +17927,7 @@ cdef class GpuDynamicPstatesInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuDynamicPstatesInfo object at {hex(id(self))}>" @@ -17936,20 +17948,20 @@ cdef class GpuDynamicPstatesInfo: if not isinstance(other, GpuDynamicPstatesInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17968,7 +17980,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(cuda_bindings_nvml__anon_pod1) * 8) + _cyb_memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) @property def flags_(self): @@ -17984,7 +17996,7 @@ cdef class GpuDynamicPstatesInfo: @staticmethod def from_buffer(buffer): """Create an GpuDynamicPstatesInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) @staticmethod def from_data(data): @@ -17993,7 +18005,7 @@ cdef class GpuDynamicPstatesInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_dynamic_pstates_info_dtype` holding the data. """ - return __from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) + return _cyb_from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18008,10 +18020,10 @@ cdef class GpuDynamicPstatesInfo: raise ValueError("ptr must not be null (0)") cdef GpuDynamicPstatesInfo obj = GpuDynamicPstatesInfo.__new__(GpuDynamicPstatesInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) obj._owner = None obj._owned = True else: @@ -18052,7 +18064,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") self._owner = None @@ -18065,7 +18077,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -18086,20 +18098,20 @@ cdef class VgpuProcessesUtilizationInfo_v1: if not isinstance(other, VgpuProcessesUtilizationInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18147,7 +18159,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -18156,7 +18168,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_processes_utilization_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) + return _cyb_from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18171,10 +18183,10 @@ cdef class VgpuProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuProcessesUtilizationInfo_v1 obj = VgpuProcessesUtilizationInfo_v1.__new__(VgpuProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -18207,7 +18219,7 @@ cdef class VgpuSchedulerParams: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") self._owner = None @@ -18219,7 +18231,7 @@ cdef class VgpuSchedulerParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerParams object at {hex(id(self))}>" @@ -18240,20 +18252,20 @@ cdef class VgpuSchedulerParams: if not isinstance(other, VgpuSchedulerParams): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18270,7 +18282,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(cuda_bindings_nvml__anon_pod2) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) @property def vgpu_sched_data(self): @@ -18282,12 +18294,12 @@ 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(cuda_bindings_nvml__anon_pod3) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerParams instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) @staticmethod def from_data(data): @@ -18296,7 +18308,7 @@ cdef class VgpuSchedulerParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_params_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) + return _cyb_from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18311,10 +18323,10 @@ cdef class VgpuSchedulerParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerParams obj = VgpuSchedulerParams.__new__(VgpuSchedulerParams) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) obj._owner = None obj._owned = True else: @@ -18346,7 +18358,7 @@ cdef class VgpuSchedulerSetParams: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") self._owner = None @@ -18358,7 +18370,7 @@ cdef class VgpuSchedulerSetParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerSetParams object at {hex(id(self))}>" @@ -18379,20 +18391,20 @@ cdef class VgpuSchedulerSetParams: if not isinstance(other, VgpuSchedulerSetParams): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18409,7 +18421,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(cuda_bindings_nvml__anon_pod4) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) @property def vgpu_sched_data(self): @@ -18421,12 +18433,12 @@ 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(cuda_bindings_nvml__anon_pod5) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerSetParams instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) @staticmethod def from_data(data): @@ -18435,7 +18447,7 @@ cdef class VgpuSchedulerSetParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_set_params_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) + return _cyb_from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18450,10 +18462,10 @@ cdef class VgpuSchedulerSetParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerSetParams obj = VgpuSchedulerSetParams.__new__(VgpuSchedulerSetParams) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) obj._owner = None obj._owned = True else: @@ -18492,7 +18504,7 @@ cdef class VgpuLicenseInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") self._owner = None @@ -18504,7 +18516,7 @@ cdef class VgpuLicenseInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseInfo object at {hex(id(self))}>" @@ -18525,20 +18537,20 @@ cdef class VgpuLicenseInfo: if not isinstance(other, VgpuLicenseInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18555,7 +18567,7 @@ cdef class VgpuLicenseInfo: if self._readonly: raise ValueError("This VgpuLicenseInfo instance is read-only") cdef VgpuLicenseExpiry val_ = val - memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) + _cyb_memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) @property def is_licensed(self): @@ -18582,7 +18594,7 @@ cdef class VgpuLicenseInfo: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) @staticmethod def from_data(data): @@ -18591,7 +18603,7 @@ cdef class VgpuLicenseInfo: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_info_dtype` holding the data. """ - return __from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) + return _cyb_from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18606,10 +18618,10 @@ cdef class VgpuLicenseInfo: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseInfo obj = VgpuLicenseInfo.__new__(VgpuLicenseInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) obj._owner = None obj._owned = True else: @@ -18687,10 +18699,10 @@ cdef class GridLicensableFeature: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def feature_code(self): @@ -18806,8 +18818,8 @@ cdef class GridLicensableFeature: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeature obj = GridLicensableFeature.__new__(GridLicensableFeature) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGridLicensableFeature_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=grid_licensable_feature_dtype) obj._data = data.view(_numpy.recarray) @@ -18842,7 +18854,7 @@ cdef class UnitFanSpeeds: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") self._owner = None @@ -18854,7 +18866,7 @@ cdef class UnitFanSpeeds: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.UnitFanSpeeds object at {hex(id(self))}>" @@ -18875,20 +18887,20 @@ cdef class UnitFanSpeeds: if not isinstance(other, UnitFanSpeeds): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18907,7 +18919,7 @@ cdef class UnitFanSpeeds: cdef UnitFanInfo val_ = val if len(val) != 24: raise ValueError(f"Expected length { 24 } for field fans, got {len(val)}") - memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) + _cyb_memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) @property def count(self): @@ -18923,7 +18935,7 @@ cdef class UnitFanSpeeds: @staticmethod def from_buffer(buffer): """Create an UnitFanSpeeds instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) + return _cyb_from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) @staticmethod def from_data(data): @@ -18932,7 +18944,7 @@ cdef class UnitFanSpeeds: Args: data (_numpy.ndarray): a single-element array of dtype `unit_fan_speeds_dtype` holding the data. """ - return __from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) + return _cyb_from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18947,10 +18959,10 @@ cdef class UnitFanSpeeds: raise ValueError("ptr must not be null (0)") cdef UnitFanSpeeds obj = UnitFanSpeeds.__new__(UnitFanSpeeds) if owner is None: - obj._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) obj._owner = None obj._owned = True else: @@ -18994,7 +19006,7 @@ cdef class VgpuPgpuMetadata: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") self._owner = None @@ -19006,7 +19018,7 @@ cdef class VgpuPgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuMetadata object at {hex(id(self))}>" @@ -19027,20 +19039,20 @@ cdef class VgpuPgpuMetadata: if not isinstance(other, VgpuPgpuMetadata): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19057,7 +19069,7 @@ cdef class VgpuPgpuMetadata: if self._readonly: raise ValueError("This VgpuPgpuMetadata instance is read-only") cdef VgpuVersion val_ = val - memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) + _cyb_memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) @property def version(self): @@ -19084,7 +19096,7 @@ cdef class VgpuPgpuMetadata: @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -19094,7 +19106,7 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def pgpu_virtualization_caps(self): @@ -19121,7 +19133,7 @@ cdef class VgpuPgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -19131,12 +19143,12 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - memcpy((self._ptr[0].opaqueData), ptr, 4) + _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuPgpuMetadata instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) @staticmethod def from_data(data): @@ -19145,7 +19157,7 @@ cdef class VgpuPgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_metadata_dtype` holding the data. """ - return __from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) + return _cyb_from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19160,10 +19172,10 @@ cdef class VgpuPgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuMetadata obj = VgpuPgpuMetadata.__new__(VgpuPgpuMetadata) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -19203,7 +19215,7 @@ cdef class GpuInstanceInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") self._owner = None @@ -19215,7 +19227,7 @@ cdef class GpuInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceInfo object at {hex(id(self))}>" @@ -19236,20 +19248,20 @@ cdef class GpuInstanceInfo: if not isinstance(other, GpuInstanceInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19266,7 +19278,7 @@ cdef class GpuInstanceInfo: if self._readonly: raise ValueError("This GpuInstanceInfo instance is read-only") cdef GpuInstancePlacement val_ = val - memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) + _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) @property def device_(self): @@ -19304,7 +19316,7 @@ cdef class GpuInstanceInfo: @staticmethod def from_buffer(buffer): """Create an GpuInstanceInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) @staticmethod def from_data(data): @@ -19313,7 +19325,7 @@ cdef class GpuInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_info_dtype` holding the data. """ - return __from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) + return _cyb_from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19328,10 +19340,10 @@ cdef class GpuInstanceInfo: raise ValueError("ptr must not be null (0)") cdef GpuInstanceInfo obj = GpuInstanceInfo.__new__(GpuInstanceInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19372,7 +19384,7 @@ cdef class ComputeInstanceInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") self._owner = None @@ -19384,7 +19396,7 @@ cdef class ComputeInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceInfo object at {hex(id(self))}>" @@ -19405,20 +19417,20 @@ cdef class ComputeInstanceInfo: if not isinstance(other, ComputeInstanceInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19435,7 +19447,7 @@ cdef class ComputeInstanceInfo: if self._readonly: raise ValueError("This ComputeInstanceInfo instance is read-only") cdef ComputeInstancePlacement val_ = val - memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) + _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) @property def device_(self): @@ -19484,7 +19496,7 @@ cdef class ComputeInstanceInfo: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) @staticmethod def from_data(data): @@ -19493,7 +19505,7 @@ cdef class ComputeInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_info_dtype` holding the data. """ - return __from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) + return _cyb_from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19508,10 +19520,10 @@ cdef class ComputeInstanceInfo: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceInfo obj = ComputeInstanceInfo.__new__(ComputeInstanceInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19551,7 +19563,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") self._owner = None @@ -19564,7 +19576,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.EccSramUniqueUncorrectedErrorCounts_v1 object at {hex(id(self))}>" @@ -19585,20 +19597,20 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if not isinstance(other, EccSramUniqueUncorrectedErrorCounts_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19635,7 +19647,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: @staticmethod def from_buffer(buffer): """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_data(data): @@ -19644,7 +19656,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_unique_uncorrected_error_counts_v1_dtype` holding the data. """ - return __from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) + return _cyb_from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19659,10 +19671,10 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorCounts_v1 obj = EccSramUniqueUncorrectedErrorCounts_v1.__new__(EccSramUniqueUncorrectedErrorCounts_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) obj._owner = None obj._owned = True else: @@ -19701,7 +19713,7 @@ cdef class NvlinkFirmwareInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") self._owner = None @@ -19713,7 +19725,7 @@ cdef class NvlinkFirmwareInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareInfo object at {hex(id(self))}>" @@ -19734,20 +19746,20 @@ cdef class NvlinkFirmwareInfo: if not isinstance(other, NvlinkFirmwareInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19766,7 +19778,7 @@ cdef class NvlinkFirmwareInfo: cdef NvlinkFirmwareVersion val_ = val if len(val) != 100: raise ValueError(f"Expected length { 100 } for field firmware_version, got {len(val)}") - memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) + _cyb_memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) @property def num_valid_entries(self): @@ -19782,7 +19794,7 @@ cdef class NvlinkFirmwareInfo: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) @staticmethod def from_data(data): @@ -19791,7 +19803,7 @@ cdef class NvlinkFirmwareInfo: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_info_dtype` holding the data. """ - return __from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) + return _cyb_from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19806,10 +19818,10 @@ cdef class NvlinkFirmwareInfo: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareInfo obj = NvlinkFirmwareInfo.__new__(NvlinkFirmwareInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) obj._owner = None obj._owned = True else: @@ -19851,7 +19863,7 @@ cdef class VgpuSchedulerLogInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") self._owner = None @@ -19863,7 +19875,7 @@ cdef class VgpuSchedulerLogInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v2 object at {hex(id(self))}>" @@ -19884,20 +19896,20 @@ cdef class VgpuSchedulerLogInfo_v2: if not isinstance(other, VgpuSchedulerLogInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19916,7 +19928,7 @@ cdef class VgpuSchedulerLogInfo_v2: cdef VgpuSchedulerLogEntry_v2 val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) @property def engine_id(self): @@ -19976,7 +19988,7 @@ cdef class VgpuSchedulerLogInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) @staticmethod def from_data(data): @@ -19985,7 +19997,7 @@ cdef class VgpuSchedulerLogInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) + return _cyb_from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20000,10 +20012,10 @@ cdef class VgpuSchedulerLogInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v2 obj = VgpuSchedulerLogInfo_v2.__new__(VgpuSchedulerLogInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -20045,7 +20057,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") self._owner = None @@ -20058,7 +20070,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuInstancesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -20079,20 +20091,20 @@ cdef class VgpuInstancesUtilizationInfo_v1: if not isinstance(other, VgpuInstancesUtilizationInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20151,7 +20163,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuInstancesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -20160,7 +20172,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_instances_utilization_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) + return _cyb_from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20175,10 +20187,10 @@ cdef class VgpuInstancesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuInstancesUtilizationInfo_v1 obj = VgpuInstancesUtilizationInfo_v1.__new__(VgpuInstancesUtilizationInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20254,10 +20266,10 @@ cdef class PRMCounter_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def counter_id(self): @@ -20342,8 +20354,8 @@ cdef class PRMCounter_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PRMCounter_v1 obj = PRMCounter_v1.__new__(PRMCounter_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlPRMCounter_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=prm_counter_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -20382,7 +20394,7 @@ cdef class VgpuSchedulerLog: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") self._owner = None @@ -20394,7 +20406,7 @@ cdef class VgpuSchedulerLog: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLog object at {hex(id(self))}>" @@ -20415,20 +20427,20 @@ cdef class VgpuSchedulerLog: if not isinstance(other, VgpuSchedulerLog): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20445,7 +20457,7 @@ cdef class VgpuSchedulerLog: if self._readonly: raise ValueError("This VgpuSchedulerLog instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -20459,7 +20471,7 @@ cdef class VgpuSchedulerLog: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def engine_id(self): @@ -20508,7 +20520,7 @@ cdef class VgpuSchedulerLog: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLog instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) @staticmethod def from_data(data): @@ -20517,7 +20529,7 @@ cdef class VgpuSchedulerLog: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) + return _cyb_from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20532,10 +20544,10 @@ cdef class VgpuSchedulerLog: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLog obj = VgpuSchedulerLog.__new__(VgpuSchedulerLog) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) obj._owner = None obj._owned = True else: @@ -20574,7 +20586,7 @@ cdef class VgpuSchedulerGetState: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") self._owner = None @@ -20586,7 +20598,7 @@ cdef class VgpuSchedulerGetState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerGetState object at {hex(id(self))}>" @@ -20607,20 +20619,20 @@ cdef class VgpuSchedulerGetState: if not isinstance(other, VgpuSchedulerGetState): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20637,7 +20649,7 @@ cdef class VgpuSchedulerGetState: if self._readonly: raise ValueError("This VgpuSchedulerGetState instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def scheduler_policy(self): @@ -20664,7 +20676,7 @@ cdef class VgpuSchedulerGetState: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerGetState instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) @staticmethod def from_data(data): @@ -20673,7 +20685,7 @@ cdef class VgpuSchedulerGetState: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_get_state_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) + return _cyb_from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20688,10 +20700,10 @@ cdef class VgpuSchedulerGetState: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerGetState obj = VgpuSchedulerGetState.__new__(VgpuSchedulerGetState) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) obj._owner = None obj._owned = True else: @@ -20732,7 +20744,7 @@ cdef class VgpuSchedulerStateInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") self._owner = None @@ -20744,7 +20756,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v1 object at {hex(id(self))}>" @@ -20765,20 +20777,20 @@ cdef class VgpuSchedulerStateInfo_v1: if not isinstance(other, VgpuSchedulerStateInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20795,7 +20807,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def version(self): @@ -20844,7 +20856,7 @@ cdef class VgpuSchedulerStateInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) @staticmethod def from_data(data): @@ -20853,7 +20865,7 @@ cdef class VgpuSchedulerStateInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) + return _cyb_from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20868,10 +20880,10 @@ cdef class VgpuSchedulerStateInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v1 obj = VgpuSchedulerStateInfo_v1.__new__(VgpuSchedulerStateInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20914,7 +20926,7 @@ cdef class VgpuSchedulerLogInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") self._owner = None @@ -20926,7 +20938,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v1 object at {hex(id(self))}>" @@ -20947,20 +20959,20 @@ cdef class VgpuSchedulerLogInfo_v1: if not isinstance(other, VgpuSchedulerLogInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20977,7 +20989,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -20991,7 +21003,7 @@ cdef class VgpuSchedulerLogInfo_v1: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def version(self): @@ -21051,7 +21063,7 @@ cdef class VgpuSchedulerLogInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) @staticmethod def from_data(data): @@ -21060,7 +21072,7 @@ cdef class VgpuSchedulerLogInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) + return _cyb_from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21075,10 +21087,10 @@ cdef class VgpuSchedulerLogInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v1 obj = VgpuSchedulerLogInfo_v1.__new__(VgpuSchedulerLogInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -21119,7 +21131,7 @@ cdef class VgpuSchedulerState_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") self._owner = None @@ -21131,7 +21143,7 @@ cdef class VgpuSchedulerState_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v1 object at {hex(id(self))}>" @@ -21152,20 +21164,20 @@ cdef class VgpuSchedulerState_v1: if not isinstance(other, VgpuSchedulerState_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21182,7 +21194,7 @@ cdef class VgpuSchedulerState_v1: if self._readonly: raise ValueError("This VgpuSchedulerState_v1 instance is read-only") cdef VgpuSchedulerSetParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) @property def version(self): @@ -21231,7 +21243,7 @@ cdef class VgpuSchedulerState_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) @staticmethod def from_data(data): @@ -21240,7 +21252,7 @@ cdef class VgpuSchedulerState_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) + return _cyb_from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21255,10 +21267,10 @@ cdef class VgpuSchedulerState_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v1 obj = VgpuSchedulerState_v1.__new__(VgpuSchedulerState_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) obj._owner = None obj._owned = True else: @@ -21297,7 +21309,7 @@ cdef class GridLicensableFeatures: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") self._owner = None @@ -21309,7 +21321,7 @@ cdef class GridLicensableFeatures: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GridLicensableFeatures object at {hex(id(self))}>" @@ -21330,20 +21342,20 @@ cdef class GridLicensableFeatures: if not isinstance(other, GridLicensableFeatures): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21365,7 +21377,7 @@ cdef class GridLicensableFeatures: self._ptr[0].licensableFeaturesCount = len(val) if len(val) == 0: return - memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) + _cyb_memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) @property def is_grid_license_supported(self): @@ -21381,7 +21393,7 @@ cdef class GridLicensableFeatures: @staticmethod def from_buffer(buffer): """Create an GridLicensableFeatures instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) + return _cyb_from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) @staticmethod def from_data(data): @@ -21390,7 +21402,7 @@ cdef class GridLicensableFeatures: Args: data (_numpy.ndarray): a single-element array of dtype `grid_licensable_features_dtype` holding the data. """ - return __from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) + return _cyb_from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21405,10 +21417,10 @@ cdef class GridLicensableFeatures: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeatures obj = GridLicensableFeatures.__new__(GridLicensableFeatures) if owner is None: - obj._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) obj._owner = None obj._owned = True else: @@ -21447,7 +21459,7 @@ cdef class NvLinkInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") self._owner = None @@ -21459,7 +21471,7 @@ cdef class NvLinkInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v2 object at {hex(id(self))}>" @@ -21480,20 +21492,20 @@ cdef class NvLinkInfo_v2: if not isinstance(other, NvLinkInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21510,7 +21522,7 @@ cdef class NvLinkInfo_v2: if self._readonly: raise ValueError("This NvLinkInfo_v2 instance is read-only") cdef NvlinkFirmwareInfo val_ = val - memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) + _cyb_memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) @property def version(self): @@ -21537,7 +21549,7 @@ cdef class NvLinkInfo_v2: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) @staticmethod def from_data(data): @@ -21546,7 +21558,7 @@ cdef class NvLinkInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v2_dtype` holding the data. """ - return __from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) + return _cyb_from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21561,10 +21573,10 @@ cdef class NvLinkInfo_v2: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v2 obj = NvLinkInfo_v2.__new__(NvLinkInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -21634,7 +21646,7 @@ cpdef str system_get_driver_version(): with nogil: __status__ = nvmlSystemGetDriverVersion(version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef str system_get_nvml_version(): @@ -21650,7 +21662,7 @@ cpdef str system_get_nvml_version(): with nogil: __status__ = nvmlSystemGetNVMLVersion(version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef int system_get_cuda_driver_version() except *: @@ -21699,7 +21711,7 @@ cpdef str system_get_process_name(unsigned int pid): with nogil: __status__ = nvmlSystemGetProcessName(pid, name, length) check_status(__status__) - return cpython.PyUnicode_FromString(name) + return _cyb_cpython.PyUnicode_FromString(name) cpdef object system_get_hic_version(): @@ -21986,7 +21998,7 @@ cpdef str device_get_name(intptr_t device): with nogil: __status__ = nvmlDeviceGetName(device, name, length) check_status(__status__) - return cpython.PyUnicode_FromString(name) + return _cyb_cpython.PyUnicode_FromString(name) cpdef int device_get_brand(intptr_t device) except? -1: @@ -22041,7 +22053,7 @@ cpdef str device_get_serial(intptr_t device): with nogil: __status__ = nvmlDeviceGetSerial(device, serial, length) check_status(__status__) - return cpython.PyUnicode_FromString(serial) + return _cyb_cpython.PyUnicode_FromString(serial) cpdef unsigned int device_get_module_id(intptr_t device) except? 0: @@ -22095,8 +22107,8 @@ cpdef object device_get_memory_affinity(intptr_t device, unsigned int node_set_s .. seealso:: `nvmlDeviceGetMemoryAffinity` """ if node_set_size == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef view.array node_set = view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef _cyb_view.array node_set = _cyb_view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *node_set_ptr = (node_set.data) with nogil: __status__ = nvmlDeviceGetMemoryAffinity(device, node_set_size, node_set_ptr, scope) @@ -22118,8 +22130,8 @@ cpdef object device_get_cpu_affinity_within_scope(intptr_t device, unsigned int .. seealso:: `nvmlDeviceGetCpuAffinityWithinScope` """ if cpu_set_size == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinityWithinScope(device, cpu_set_size, cpu_set_ptr, scope) @@ -22140,8 +22152,8 @@ cpdef object device_get_cpu_affinity(intptr_t device, unsigned int cpu_set_size) .. seealso:: `nvmlDeviceGetCpuAffinity` """ if cpu_set_size == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinity(device, cpu_set_size, cpu_set_ptr) @@ -22248,7 +22260,7 @@ cpdef str device_get_uuid(intptr_t device): with nogil: __status__ = nvmlDeviceGetUUID(device, uuid, length) check_status(__status__) - return cpython.PyUnicode_FromString(uuid) + return _cyb_cpython.PyUnicode_FromString(uuid) cpdef unsigned int device_get_minor_number(intptr_t device) except? 0: @@ -22285,7 +22297,7 @@ cpdef str device_get_board_part_number(intptr_t device): with nogil: __status__ = nvmlDeviceGetBoardPartNumber(device, part_number, length) check_status(__status__) - return cpython.PyUnicode_FromString(part_number) + return _cyb_cpython.PyUnicode_FromString(part_number) cpdef str device_get_inforom_version(intptr_t device, int object): @@ -22305,7 +22317,7 @@ cpdef str device_get_inforom_version(intptr_t device, int object): with nogil: __status__ = nvmlDeviceGetInforomVersion(device, <_InforomObject>object, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef str device_get_inforom_image_version(intptr_t device): @@ -22324,7 +22336,7 @@ cpdef str device_get_inforom_image_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetInforomImageVersion(device, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef unsigned int device_get_inforom_configuration_checksum(intptr_t device) except? 0: @@ -22711,8 +22723,8 @@ cpdef object device_get_supported_memory_clocks(intptr_t device): __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, clocks_m_hz_ptr) @@ -22737,8 +22749,8 @@ cpdef object device_get_supported_graphics_clocks(intptr_t device, unsigned int __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, clocks_m_hz_ptr) @@ -23701,7 +23713,7 @@ cpdef str device_get_vbios_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetVbiosVersion(device, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef object device_get_bridge_chip_info(intptr_t device): @@ -24261,8 +24273,8 @@ cpdef object device_get_accounting_pids(intptr_t device): __status__ = nvmlDeviceGetAccountingPids(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlDeviceGetAccountingPids(device, count, pids_ptr) @@ -24305,8 +24317,8 @@ cpdef object device_get_retired_pages(intptr_t device, int cause): __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, NULL) check_status_size(__status__) if page_count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] - cdef view.array addresses = view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] + cdef _cyb_view.array addresses = _cyb_view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") cdef unsigned long long *addresses_ptr = (addresses.data) with nogil: __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, addresses_ptr) @@ -25244,7 +25256,7 @@ cpdef str vgpu_type_get_class(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetClass(vgpu_type_id, vgpu_type_class, size) check_status(__status__) - return cpython.PyUnicode_FromString(vgpu_type_class) + return _cyb_cpython.PyUnicode_FromString(vgpu_type_class) cpdef unsigned int vgpu_type_get_gpu_instance_profile_id(unsigned int vgpu_type_id) except? 0: @@ -25362,7 +25374,7 @@ cpdef str vgpu_type_get_license(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetLicense(vgpu_type_id, vgpu_type_license_string, size) check_status(__status__) - return cpython.PyUnicode_FromString(vgpu_type_license_string) + return _cyb_cpython.PyUnicode_FromString(vgpu_type_license_string) cpdef unsigned int vgpu_type_get_frame_rate_limit(unsigned int vgpu_type_id) except? 0: @@ -25456,7 +25468,7 @@ cpdef str vgpu_instance_get_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetUUID(vgpu_instance, uuid, size) check_status(__status__) - return cpython.PyUnicode_FromString(uuid) + return _cyb_cpython.PyUnicode_FromString(uuid) cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): @@ -25475,7 +25487,7 @@ cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetVmDriverVersion(vgpu_instance, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef unsigned long long vgpu_instance_get_fb_usage(unsigned int vgpu_instance) except? 0: @@ -25733,7 +25745,7 @@ cpdef str vgpu_instance_get_gpu_pci_id(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetGpuPciId(vgpu_instance, vgpu_pci_id, length) check_status(__status__) - return cpython.PyUnicode_FromString(vgpu_pci_id) + return _cyb_cpython.PyUnicode_FromString(vgpu_pci_id) cpdef unsigned int vgpu_type_get_capabilities(unsigned int vgpu_type_id, int capability) except? 0: @@ -25771,7 +25783,7 @@ cpdef str vgpu_instance_get_mdev_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetMdevUUID(vgpu_instance, mdev_uuid, size) check_status(__status__) - return cpython.PyUnicode_FromString(mdev_uuid) + return _cyb_cpython.PyUnicode_FromString(mdev_uuid) cpdef gpu_instance_set_vgpu_scheduler_state(intptr_t gpu_instance, intptr_t p_scheduler): @@ -25851,7 +25863,7 @@ cpdef str device_get_pgpu_metadata_string(intptr_t device): with nogil: __status__ = nvmlDeviceGetPgpuMetadataString(device, pgpu_metadata, buffer_size) check_status(__status__) - return cpython.PyUnicode_FromString(pgpu_metadata) + return _cyb_cpython.PyUnicode_FromString(pgpu_metadata) cpdef object device_get_vgpu_scheduler_log(intptr_t device): @@ -25995,8 +26007,8 @@ cpdef object vgpu_instance_get_accounting_pids(unsigned int vgpu_instance): __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, pids_ptr) @@ -28451,3 +28463,4 @@ cpdef str vgpu_type_get_name(unsigned int vgpu_type_id): device_get_virtualization_mode.__doc__ = device_get_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") device_set_virtualization_mode.__doc__ = device_set_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") GpmMetricId.GPM_METRIC_DRAM_BW_UTIL.__doc__ = "Percentage of DRAM bw used vs theoretical maximum. ``0.0 - 100.0 *\u200d/``." +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index 411db62dc00..f0f4d92f015 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -2,21 +2,26 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum + +# <<<< END OF PREAMBLE CONTENT >>>> + cimport cython # NOQA from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, nested_resource) -from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum - ############################################################################### # Enum ############################################################################### -class Result(_IntEnum): +class Result(_cyb_FastEnum): """ NVVM API call result code. @@ -321,3 +326,4 @@ cpdef int llvm_version(arch) except? 0: __status__ = nvvmLLVMVersion(_arch_, &major) check_status(__status__) return major +del _cyb_FastEnum From c0767176b17d1083fab18e108ad413f62e09ea84 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 3 Jul 2026 21:09:45 -0700 Subject: [PATCH 06/22] run_cybind_native 13.3.0 ../cuda-python --- cuda_bindings/cuda/bindings/cudla.pyx | 330 ++- cuda_bindings/cuda/bindings/cufile.pyx | 371 ++- cuda_bindings/cuda/bindings/nvfatbin.pyx | 13 +- cuda_bindings/cuda/bindings/nvjitlink.pyx | 15 +- cuda_bindings/cuda/bindings/nvml.pyx | 2604 ++++++++++----------- cuda_bindings/cuda/bindings/nvvm.pyx | 14 +- 6 files changed, 1649 insertions(+), 1698 deletions(-) diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index 1b62676a0e3..f1b0938f108 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -1,50 +1,25 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# <<<< PREAMBLE CONTENT >>>> - -cimport cpython as _cyb_cpython -cimport cpython.buffer as _cyb_cpython_buffer -from cython cimport view as _cyb_view -from libc.stdlib cimport ( - calloc as _cyb_calloc, - free as _cyb_free, - malloc as _cyb_malloc, -) -from libc.string cimport ( - memcmp as _cyb_memcmp, - memcpy as _cyb_memcpy, -) -from enum import IntEnum as _cyb_IntEnum -import numpy as _numpy +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. -cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +cimport cython # NOQA +from libc.stdint cimport intptr_t, uintptr_t -cdef _cyb_from_buffer(buffer, size, lowpp_type): - cdef _cyb_cpython.Py_buffer view - if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - _cyb_cpython.PyBuffer_Release(&view) +from ._internal.utils cimport get_buffer_pointer + +from enum import IntEnum as _IntEnum -cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): +from libc.stdlib cimport calloc, free, malloc +from cython cimport view +cimport cpython.buffer +cimport cpython.memoryview +cimport cpython +from libc.string cimport memcmp, memcpy +import numpy as _numpy + + +cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -56,16 +31,34 @@ cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) -# <<<< END OF PREAMBLE CONTENT >>>> +cdef __from_buffer(buffer, size, lowpp_type): + cdef Py_buffer view + if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + cpython.PyBuffer_Release(&view) -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. -cimport cython # NOQA -from libc.stdint cimport intptr_t, uintptr_t -from libc.stdlib cimport malloc, free +cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -from ._internal.utils cimport get_buffer_pointer @@ -101,7 +94,7 @@ cdef class ExternalMemoryHandleDesc: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") self._owner = None @@ -113,7 +106,7 @@ cdef class ExternalMemoryHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ExternalMemoryHandleDesc object at {hex(id(self))}>" @@ -134,20 +127,20 @@ cdef class ExternalMemoryHandleDesc: if not isinstance(other, ExternalMemoryHandleDesc): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -179,7 +172,7 @@ cdef class ExternalMemoryHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalMemoryHandleDesc instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) + return __from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) @staticmethod def from_data(data): @@ -188,7 +181,7 @@ cdef class ExternalMemoryHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_memory_handle_desc_dtype` holding the data. """ - return _cyb_from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) + return __from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -203,10 +196,10 @@ cdef class ExternalMemoryHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalMemoryHandleDesc obj = ExternalMemoryHandleDesc.__new__(ExternalMemoryHandleDesc) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + obj._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) + memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -243,7 +236,7 @@ cdef class ExternalSemaphoreHandleDesc: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") self._owner = None @@ -255,7 +248,7 @@ cdef class ExternalSemaphoreHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ExternalSemaphoreHandleDesc object at {hex(id(self))}>" @@ -276,20 +269,20 @@ cdef class ExternalSemaphoreHandleDesc: if not isinstance(other, ExternalSemaphoreHandleDesc): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -310,7 +303,7 @@ cdef class ExternalSemaphoreHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalSemaphoreHandleDesc instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) + return __from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) @staticmethod def from_data(data): @@ -319,7 +312,7 @@ cdef class ExternalSemaphoreHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_semaphore_handle_desc_dtype` holding the data. """ - return _cyb_from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) + return __from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -334,10 +327,10 @@ cdef class ExternalSemaphoreHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalSemaphoreHandleDesc obj = ExternalSemaphoreHandleDesc.__new__(ExternalSemaphoreHandleDesc) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + obj._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -385,7 +378,7 @@ cdef class ModuleTensorDescriptor: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaModuleTensorDescriptor)) + self._ptr = calloc(1, sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") self._owner = None @@ -397,7 +390,7 @@ cdef class ModuleTensorDescriptor: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ModuleTensorDescriptor object at {hex(id(self))}>" @@ -418,20 +411,20 @@ cdef class ModuleTensorDescriptor: if not isinstance(other, ModuleTensorDescriptor): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) + self._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -441,7 +434,7 @@ cdef class ModuleTensorDescriptor: @property def name(self): """~_numpy.int8: (array of length 81).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -451,7 +444,7 @@ cdef class ModuleTensorDescriptor: if len(buf) >= 81: raise ValueError("String too long for field name, max length is 80") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 81) + memcpy((self._ptr[0].name), ptr, 81) @property def size_(self): @@ -566,7 +559,7 @@ cdef class ModuleTensorDescriptor: @property def stride(self): """~_numpy.uint32: (array of length 8).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].stride)) return _numpy.asarray(arr) @@ -576,14 +569,14 @@ cdef class ModuleTensorDescriptor: raise ValueError("This ModuleTensorDescriptor instance is read-only") if len(val) != 8: raise ValueError(f"Expected length { 8 } for field stride, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") + cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - _cyb_memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) + memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an ModuleTensorDescriptor instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) + return __from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) @staticmethod def from_data(data): @@ -592,7 +585,7 @@ cdef class ModuleTensorDescriptor: Args: data (_numpy.ndarray): a single-element array of dtype `module_tensor_descriptor_dtype` holding the data. """ - return _cyb_from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) + return __from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -607,10 +600,10 @@ cdef class ModuleTensorDescriptor: raise ValueError("ptr must not be null (0)") cdef ModuleTensorDescriptor obj = ModuleTensorDescriptor.__new__(ModuleTensorDescriptor) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) + obj._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) + memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) obj._owner = None obj._owned = True else: @@ -648,7 +641,7 @@ cdef class Fence: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CudlaFence)) + self._ptr = calloc(1, sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") self._owner = None @@ -660,7 +653,7 @@ cdef class Fence: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Fence object at {hex(id(self))}>" @@ -681,20 +674,20 @@ cdef class Fence: if not isinstance(other, Fence): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CudlaFence)) + self._ptr = malloc(sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) + memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -726,7 +719,7 @@ cdef class Fence: @staticmethod def from_buffer(buffer): """Create an Fence instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CudlaFence), Fence) + return __from_buffer(buffer, sizeof(CudlaFence), Fence) @staticmethod def from_data(data): @@ -735,7 +728,7 @@ cdef class Fence: Args: data (_numpy.ndarray): a single-element array of dtype `fence_dtype` holding the data. """ - return _cyb_from_data(data, "fence_dtype", fence_dtype, Fence) + return __from_data(data, "fence_dtype", fence_dtype, Fence) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -750,10 +743,10 @@ cdef class Fence: raise ValueError("ptr must not be null (0)") cdef Fence obj = Fence.__new__(Fence) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CudlaFence)) + obj._ptr = malloc(sizeof(CudlaFence)) if obj._ptr == NULL: raise MemoryError("Error allocating Fence") - _cyb_memcpy((obj._ptr), ptr, sizeof(CudlaFence)) + memcpy((obj._ptr), ptr, sizeof(CudlaFence)) obj._owner = None obj._owned = True else: @@ -785,7 +778,7 @@ cdef class DevAttribute: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaDevAttribute)) + self._ptr = calloc(1, sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") self._owner = None @@ -797,7 +790,7 @@ cdef class DevAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DevAttribute object at {hex(id(self))}>" @@ -818,20 +811,20 @@ cdef class DevAttribute: if not isinstance(other, DevAttribute): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) + self._ptr = malloc(sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -863,7 +856,7 @@ cdef class DevAttribute: @staticmethod def from_buffer(buffer): """Create an DevAttribute instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) + return __from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) @staticmethod def from_data(data): @@ -872,7 +865,7 @@ cdef class DevAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `dev_attribute_dtype` holding the data. """ - return _cyb_from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) + return __from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -887,10 +880,10 @@ cdef class DevAttribute: raise ValueError("ptr must not be null (0)") cdef DevAttribute obj = DevAttribute.__new__(DevAttribute) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) + obj._ptr = malloc(sizeof(cudlaDevAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) + memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) obj._owner = None obj._owned = True else: @@ -924,7 +917,7 @@ cdef class ModuleAttribute: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaModuleAttribute)) + self._ptr = calloc(1, sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") self._owner = None @@ -936,7 +929,7 @@ cdef class ModuleAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ModuleAttribute object at {hex(id(self))}>" @@ -957,20 +950,20 @@ cdef class ModuleAttribute: if not isinstance(other, ModuleAttribute): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) + self._ptr = malloc(sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1024,7 +1017,7 @@ cdef class ModuleAttribute: @staticmethod def from_buffer(buffer): """Create an ModuleAttribute instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) + return __from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) @staticmethod def from_data(data): @@ -1033,7 +1026,7 @@ cdef class ModuleAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `module_attribute_dtype` holding the data. """ - return _cyb_from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) + return __from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1048,10 +1041,10 @@ cdef class ModuleAttribute: raise ValueError("ptr must not be null (0)") cdef ModuleAttribute obj = ModuleAttribute.__new__(ModuleAttribute) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) + obj._ptr = malloc(sizeof(cudlaModuleAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) + memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) obj._owner = None obj._owned = True else: @@ -1090,7 +1083,7 @@ cdef class WaitEvents: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaWaitEvents)) + self._ptr = calloc(1, sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") self._owner = None @@ -1103,7 +1096,7 @@ cdef class WaitEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.WaitEvents object at {hex(id(self))}>" @@ -1124,20 +1117,20 @@ cdef class WaitEvents: if not isinstance(other, WaitEvents): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) + self._ptr = malloc(sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1163,7 +1156,7 @@ cdef class WaitEvents: @staticmethod def from_buffer(buffer): """Create an WaitEvents instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) + return __from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) @staticmethod def from_data(data): @@ -1172,7 +1165,7 @@ cdef class WaitEvents: Args: data (_numpy.ndarray): a single-element array of dtype `wait_events_dtype` holding the data. """ - return _cyb_from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) + return __from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1187,10 +1180,10 @@ cdef class WaitEvents: raise ValueError("ptr must not be null (0)") cdef WaitEvents obj = WaitEvents.__new__(WaitEvents) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) + obj._ptr = malloc(sizeof(cudlaWaitEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) + memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) obj._owner = None obj._owned = True else: @@ -1231,7 +1224,7 @@ cdef class SignalEvents: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaSignalEvents)) + self._ptr = calloc(1, sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") self._owner = None @@ -1244,7 +1237,7 @@ cdef class SignalEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.SignalEvents object at {hex(id(self))}>" @@ -1265,20 +1258,20 @@ cdef class SignalEvents: if not isinstance(other, SignalEvents): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) + self._ptr = malloc(sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1289,8 +1282,8 @@ cdef class SignalEvents: def dev_ptrs(self): """int: """ if self._ptr[0].devPtrs == NULL or self._ptr[0].numEvents == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef view.array arr = view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].devPtrs) return arr @@ -1302,7 +1295,7 @@ cdef class SignalEvents: self._ptr[0].numEvents = _n if _n == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1329,7 +1322,7 @@ cdef class SignalEvents: @staticmethod def from_buffer(buffer): """Create an SignalEvents instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) + return __from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) @staticmethod def from_data(data): @@ -1338,7 +1331,7 @@ cdef class SignalEvents: Args: data (_numpy.ndarray): a single-element array of dtype `signal_events_dtype` holding the data. """ - return _cyb_from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) + return __from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1353,10 +1346,10 @@ cdef class SignalEvents: raise ValueError("ptr must not be null (0)") cdef SignalEvents obj = SignalEvents.__new__(SignalEvents) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) + obj._ptr = malloc(sizeof(cudlaSignalEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) + memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) obj._owner = None obj._owned = True else: @@ -1401,7 +1394,7 @@ cdef class Task: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaTask)) + self._ptr = calloc(1, sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") self._owner = None @@ -1414,7 +1407,7 @@ cdef class Task: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Task object at {hex(id(self))}>" @@ -1435,20 +1428,20 @@ cdef class Task: if not isinstance(other, Task): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaTask)) + self._ptr = malloc(sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1470,8 +1463,8 @@ cdef class Task: def output_tensor(self): """int: """ if self._ptr[0].outputTensor == NULL or self._ptr[0].numOutputTensors == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef view.array arr = view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].outputTensor) return arr @@ -1483,7 +1476,7 @@ cdef class Task: self._ptr[0].numOutputTensors = _n if _n == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1495,8 +1488,8 @@ cdef class Task: def input_tensor(self): """int: """ if self._ptr[0].inputTensor == NULL or self._ptr[0].numInputTensors == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef view.array arr = view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].inputTensor) return arr @@ -1508,7 +1501,7 @@ cdef class Task: self._ptr[0].numInputTensors = _n if _n == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1541,7 +1534,7 @@ cdef class Task: @staticmethod def from_buffer(buffer): """Create an Task instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaTask), Task) + return __from_buffer(buffer, sizeof(cudlaTask), Task) @staticmethod def from_data(data): @@ -1550,7 +1543,7 @@ cdef class Task: Args: data (_numpy.ndarray): a single-element array of dtype `task_dtype` holding the data. """ - return _cyb_from_data(data, "task_dtype", task_dtype, Task) + return __from_data(data, "task_dtype", task_dtype, Task) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1565,10 +1558,10 @@ cdef class Task: raise ValueError("ptr must not be null (0)") cdef Task obj = Task.__new__(Task) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaTask)) + obj._ptr = malloc(sizeof(cudlaTask)) if obj._ptr == NULL: raise MemoryError("Error allocating Task") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaTask)) + memcpy((obj._ptr), ptr, sizeof(cudlaTask)) obj._owner = None obj._owned = True else: @@ -1584,7 +1577,7 @@ cdef class Task: # Enum ############################################################################### -class Status(_cyb_IntEnum): +class Status(_IntEnum): """ See `cudlaStatus`. """ @@ -1613,14 +1606,14 @@ class Status(_cyb_IntEnum): ErrorDlaErrDataMismatch = cudlaErrorDlaErrDataMismatch ErrorUnknown = cudlaErrorUnknown -class Mode(_cyb_IntEnum): +class Mode(_IntEnum): """ See `cudlaMode`. """ CUDA_DLA = CUDLA_CUDA_DLA STANDALONE = CUDLA_STANDALONE -class ModuleAttributeType(_cyb_IntEnum): +class ModuleAttributeType(_IntEnum): """ See `cudlaModuleAttributeType`. """ @@ -1631,21 +1624,21 @@ class ModuleAttributeType(_cyb_IntEnum): NUM_OUTPUT_TASK_STATISTICS = CUDLA_NUM_OUTPUT_TASK_STATISTICS OUTPUT_TASK_STATISTICS_DESCRIPTORS = CUDLA_OUTPUT_TASK_STATISTICS_DESCRIPTORS -class FenceType(_cyb_IntEnum): +class FenceType(_IntEnum): """ See `cudlaFenceType`. """ NVSCISYNC_FENCE = CUDLA_NVSCISYNC_FENCE NVSCISYNC_FENCE_SOF = CUDLA_NVSCISYNC_FENCE_SOF -class ModuleLoadFlags(_cyb_IntEnum): +class ModuleLoadFlags(_IntEnum): """ See `cudlaModuleLoadFlags`. """ MODULE_DEFAULT = CUDLA_MODULE_DEFAULT MODULE_ENABLE_FAULT_DIAGNOSTICS = CUDLA_MODULE_ENABLE_FAULT_DIAGNOSTICS -class SubmissionFlags(_cyb_IntEnum): +class SubmissionFlags(_IntEnum): """ See `cudlaSubmissionFlags`. """ @@ -1653,7 +1646,7 @@ class SubmissionFlags(_cyb_IntEnum): SUBMIT_SKIP_LOCK_ACQUIRE = CUDLA_SUBMIT_SKIP_LOCK_ACQUIRE SUBMIT_DIAGNOSTICS_TASK = CUDLA_SUBMIT_DIAGNOSTICS_TASK -class AccessPermissionFlags(_cyb_IntEnum): +class AccessPermissionFlags(_IntEnum): """ See `cudlaAccessPermissionFlags`. """ @@ -1661,7 +1654,7 @@ class AccessPermissionFlags(_cyb_IntEnum): READ_ONLY_PERM = CUDLA_READ_ONLY_PERM TASK_STATISTICS = CUDLA_TASK_STATISTICS -class DevAttributeType(_cyb_IntEnum): +class DevAttributeType(_IntEnum): """ See `cudlaDevAttributeType`. """ @@ -1833,4 +1826,3 @@ cpdef module_get_attributes(intptr_t h_module, int attr_type) except *: free(desc_buf) else: raise ValueError(f"Unknown attribute type: {attr_type}") -del _cyb_IntEnum diff --git a/cuda_bindings/cuda/bindings/cufile.pyx b/cuda_bindings/cuda/bindings/cufile.pyx index 80fb323e7ac..2798a65cb3f 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -2,53 +2,28 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -cimport cpython as _cyb_cpython -cimport cpython.buffer as _cyb_cpython_buffer -cimport cpython.memoryview as _cyb_cpython_memoryview -from cython cimport view as _cyb_view -from libc.stdlib cimport ( - calloc as _cyb_calloc, - free as _cyb_free, - malloc as _cyb_malloc, -) -from libc.string cimport ( - memcmp as _cyb_memcmp, - memcpy as _cyb_memcpy, -) -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum -import numpy as _numpy +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. -cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +cimport cython # NOQA +from libc cimport errno +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum -cdef _cyb_from_buffer(buffer, size, lowpp_type): - cdef _cyb_cpython.Py_buffer view - if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - _cyb_cpython.PyBuffer_Release(&view) +import cython + +from cuda.bindings.driver import CUresult as pyCUresult -cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): +from libc.stdlib cimport calloc, free, malloc +from cython cimport view +cimport cpython.buffer +cimport cpython.memoryview +cimport cpython +from libc.string cimport memcmp, memcpy +import numpy as _numpy + + +cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -60,17 +35,34 @@ cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) -# <<<< END OF PREAMBLE CONTENT >>>> +cdef __from_buffer(buffer, size, lowpp_type): + cdef Py_buffer view + if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + cpython.PyBuffer_Release(&view) -cimport cython # NOQA -from libc cimport errno -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) -import cython +cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -from cuda.bindings.driver import CUresult as pyCUresult ############################################################################### # POD @@ -97,7 +89,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = _cyb_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 @@ -109,7 +101,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -130,20 +122,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof((NULL).handle)) + self._ptr = malloc(sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) + memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -175,7 +167,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 _cyb_from_buffer(buffer, sizeof((NULL).handle), _py_anon_pod1) + return __from_buffer(buffer, sizeof((NULL).handle), _py_anon_pod1) @staticmethod def from_data(data): @@ -184,7 +176,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -199,10 +191,10 @@ 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 = _cyb_malloc(sizeof((NULL).handle)) + obj._ptr = malloc(sizeof((NULL).handle)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).handle)) + memcpy((obj._ptr), ptr, sizeof((NULL).handle)) obj._owner = None obj._owned = True else: @@ -242,7 +234,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = _cyb_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 @@ -254,7 +246,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -275,20 +267,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof((NULL).u.batch)) + self._ptr = malloc(sizeof((NULL).u.batch)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u.batch)) + memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u.batch)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -342,7 +334,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 _cyb_from_buffer(buffer, sizeof((NULL).u.batch), _py_anon_pod3) + return __from_buffer(buffer, sizeof((NULL).u.batch), _py_anon_pod3) @staticmethod def from_data(data): @@ -351,7 +343,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -366,10 +358,10 @@ 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 = _cyb_malloc(sizeof((NULL).u.batch)) + obj._ptr = malloc(sizeof((NULL).u.batch)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) + memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) obj._owner = None obj._owned = True else: @@ -444,10 +436,10 @@ cdef class IOEvents: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def cookie(self): @@ -536,8 +528,8 @@ cdef class IOEvents: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOEvents obj = IOEvents.__new__(IOEvents) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOEvents_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_events_dtype) obj._data = data.view(_numpy.recarray) @@ -572,7 +564,7 @@ cdef class OpCounter: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileOpCounter_t)) + self._ptr = calloc(1, sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") self._owner = None @@ -584,7 +576,7 @@ cdef class OpCounter: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.OpCounter object at {hex(id(self))}>" @@ -605,20 +597,20 @@ cdef class OpCounter: if not isinstance(other, OpCounter): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) + self._ptr = malloc(sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -650,7 +642,7 @@ cdef class OpCounter: @staticmethod def from_buffer(buffer): """Create an OpCounter instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) + return __from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) @staticmethod def from_data(data): @@ -659,7 +651,7 @@ cdef class OpCounter: Args: data (_numpy.ndarray): a single-element array of dtype `op_counter_dtype` holding the data. """ - return _cyb_from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) + return __from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -674,10 +666,10 @@ cdef class OpCounter: raise ValueError("ptr must not be null (0)") cdef OpCounter obj = OpCounter.__new__(OpCounter) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) + obj._ptr = malloc(sizeof(CUfileOpCounter_t)) if obj._ptr == NULL: raise MemoryError("Error allocating OpCounter") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) obj._owner = None obj._owned = True else: @@ -779,10 +771,10 @@ cdef class PerGpuStats: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def uuid(self): @@ -1166,8 +1158,8 @@ cdef class PerGpuStats: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PerGpuStats obj = PerGpuStats.__new__(PerGpuStats) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfilePerGpuStats_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=per_gpu_stats_dtype) obj._data = data.view(_numpy.recarray) @@ -1239,10 +1231,10 @@ cdef class Descr: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def type(self): @@ -1329,8 +1321,8 @@ cdef class Descr: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Descr obj = Descr.__new__(Descr) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileDescr_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=descr_dtype) obj._data = data.view(_numpy.recarray) @@ -1358,7 +1350,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = _cyb_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 @@ -1370,7 +1362,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -1391,20 +1383,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof((NULL).u)) + self._ptr = malloc(sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) + memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1421,12 +1413,12 @@ cdef class _py_anon_pod2: if self._readonly: raise ValueError("This _py_anon_pod2 instance is read-only") cdef _py_anon_pod3 val_ = val - _cyb_memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(cuda_bindings_cufile__anon_pod3) * 1) + memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(cuda_bindings_cufile__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an _py_anon_pod2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) + return __from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) @staticmethod def from_data(data): @@ -1435,7 +1427,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1450,10 +1442,10 @@ 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 = _cyb_malloc(sizeof((NULL).u)) + obj._ptr = malloc(sizeof((NULL).u)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u)) + memcpy((obj._ptr), ptr, sizeof((NULL).u)) obj._owner = None obj._owned = True else: @@ -1532,7 +1524,7 @@ cdef class StatsLevel1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel1_t)) + self._ptr = calloc(1, sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") self._owner = None @@ -1544,7 +1536,7 @@ cdef class StatsLevel1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel1 object at {hex(id(self))}>" @@ -1565,20 +1557,20 @@ cdef class StatsLevel1: if not isinstance(other, StatsLevel1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) + self._ptr = malloc(sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1595,7 +1587,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def write_ops(self): @@ -1607,7 +1599,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_register_ops(self): @@ -1619,7 +1611,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_deregister_ops(self): @@ -1631,7 +1623,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_register_ops(self): @@ -1643,7 +1635,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_deregister_ops(self): @@ -1655,7 +1647,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_submit_ops(self): @@ -1667,7 +1659,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_complete_ops(self): @@ -1679,7 +1671,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_setup_ops(self): @@ -1691,7 +1683,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_cancel_ops(self): @@ -1703,7 +1695,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_destroy_ops(self): @@ -1715,7 +1707,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_enqueued_ops(self): @@ -1727,7 +1719,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_enqueued_ops(self): @@ -1739,7 +1731,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_processed_ops(self): @@ -1751,7 +1743,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_processed_ops(self): @@ -1763,7 +1755,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_nvfs_submit_ops(self): @@ -1775,7 +1767,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_p2p_submit_ops(self): @@ -1787,7 +1779,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_aio_submit_ops(self): @@ -1799,7 +1791,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_iouring_submit_ops(self): @@ -1811,7 +1803,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_mixed_io_submit_ops(self): @@ -1823,7 +1815,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_total_submit_ops(self): @@ -1835,7 +1827,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def read_bytes(self): @@ -2082,7 +2074,7 @@ cdef class StatsLevel1: @staticmethod def from_buffer(buffer): """Create an StatsLevel1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) + return __from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) @staticmethod def from_data(data): @@ -2091,7 +2083,7 @@ cdef class StatsLevel1: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level1_dtype` holding the data. """ - return _cyb_from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) + return __from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2106,10 +2098,10 @@ cdef class StatsLevel1: raise ValueError("ptr must not be null (0)") cdef StatsLevel1 obj = StatsLevel1.__new__(StatsLevel1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) + obj._ptr = malloc(sizeof(CUfileStatsLevel1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) obj._owner = None obj._owned = True else: @@ -2186,10 +2178,10 @@ cdef class IOParams: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def mode(self): @@ -2298,8 +2290,8 @@ cdef class IOParams: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOParams obj = IOParams.__new__(IOParams) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOParams_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_params_dtype) obj._data = data.view(_numpy.recarray) @@ -2335,7 +2327,7 @@ cdef class StatsLevel2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel2_t)) + self._ptr = calloc(1, sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") self._owner = None @@ -2347,7 +2339,7 @@ cdef class StatsLevel2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel2 object at {hex(id(self))}>" @@ -2368,20 +2360,20 @@ cdef class StatsLevel2: if not isinstance(other, StatsLevel2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) + self._ptr = malloc(sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2398,12 +2390,12 @@ cdef class StatsLevel2: if self._readonly: raise ValueError("This StatsLevel2 instance is read-only") cdef StatsLevel1 val_ = val - _cyb_memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) + memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) @property def read_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].read_size_kb_hist)) return _numpy.asarray(arr) @@ -2413,14 +2405,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field read_size_kb_hist, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - _cyb_memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @property def write_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].write_size_kb_hist)) return _numpy.asarray(arr) @@ -2430,14 +2422,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field write_size_kb_hist, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - _cyb_memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an StatsLevel2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) + return __from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) @staticmethod def from_data(data): @@ -2446,7 +2438,7 @@ cdef class StatsLevel2: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level2_dtype` holding the data. """ - return _cyb_from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) + return __from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2461,10 +2453,10 @@ cdef class StatsLevel2: raise ValueError("ptr must not be null (0)") cdef StatsLevel2 obj = StatsLevel2.__new__(StatsLevel2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) + obj._ptr = malloc(sizeof(CUfileStatsLevel2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) obj._owner = None obj._owned = True else: @@ -2503,7 +2495,7 @@ cdef class StatsLevel3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel3_t)) + self._ptr = calloc(1, sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") self._owner = None @@ -2515,7 +2507,7 @@ cdef class StatsLevel3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel3 object at {hex(id(self))}>" @@ -2536,20 +2528,20 @@ cdef class StatsLevel3: if not isinstance(other, StatsLevel3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) + self._ptr = malloc(sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2566,7 +2558,7 @@ cdef class StatsLevel3: if self._readonly: raise ValueError("This StatsLevel3 instance is read-only") cdef StatsLevel2 val_ = val - _cyb_memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) + memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) @property def per_gpu_stats(self): @@ -2580,7 +2572,7 @@ cdef class StatsLevel3: cdef PerGpuStats val_ = val if len(val) != 16: raise ValueError(f"Expected length { 16 } for field per_gpu_stats, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) + memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) @property def num_gpus(self): @@ -2596,7 +2588,7 @@ cdef class StatsLevel3: @staticmethod def from_buffer(buffer): """Create an StatsLevel3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) + return __from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) @staticmethod def from_data(data): @@ -2605,7 +2597,7 @@ cdef class StatsLevel3: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level3_dtype` holding the data. """ - return _cyb_from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) + return __from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2620,10 +2612,10 @@ cdef class StatsLevel3: raise ValueError("ptr must not be null (0)") cdef StatsLevel3 obj = StatsLevel3.__new__(StatsLevel3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) + obj._ptr = malloc(sizeof(CUfileStatsLevel3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) obj._owner = None obj._owned = True else: @@ -2638,7 +2630,7 @@ cdef class StatsLevel3: # Enum ############################################################################### -class OpError(_cyb_FastEnum): +class OpError(_FastEnum): """ See `CUfileOpError`. """ @@ -2692,7 +2684,7 @@ class OpError(_cyb_FastEnum): BATCH_NOCOMPAT_ERROR = CU_FILE_BATCH_NOCOMPAT_ERROR IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR -class DriverStatusFlags(_cyb_FastEnum): +class DriverStatusFlags(_FastEnum): """ See `CUfileDriverStatusFlags_t`. """ @@ -2711,7 +2703,7 @@ class DriverStatusFlags(_cyb_FastEnum): VIRTIOFS_SUPPORTED = (CU_FILE_VIRTIOFS_SUPPORTED, 'Support for VirtioFS') MAX_TARGET_TYPES = (CU_FILE_MAX_TARGET_TYPES, 'Maximum FS supported') -class DriverControlFlags(_cyb_FastEnum): +class DriverControlFlags(_FastEnum): """ See `CUfileDriverControlFlags_t`. """ @@ -2720,7 +2712,7 @@ class DriverControlFlags(_cyb_FastEnum): POSIX_IO_MODE = (CU_FILE_POSIX_IO_MODE, 'Vanilla posix io mode. properties.posix_io_mode') FALLBACK_IO_MODE = (CU_FILE_FALLBACK_IO_MODE, 'Fallback io mode. properties.gds_fallback_io') -class FeatureFlags(_cyb_FastEnum): +class FeatureFlags(_FastEnum): """ See `CUfileFeatureFlags_t`. """ @@ -2730,7 +2722,7 @@ class FeatureFlags(_cyb_FastEnum): PARALLEL_IO_SUPPORTED = (CU_FILE_PARALLEL_IO_SUPPORTED, 'Supported') P2P_SUPPORTED = (CU_FILE_P2P_SUPPORTED, 'Support for PCI P2PDMA') -class FileHandleType(_cyb_FastEnum): +class FileHandleType(_FastEnum): """ See `CUfileFileHandleType`. """ @@ -2738,14 +2730,14 @@ class FileHandleType(_cyb_FastEnum): OPAQUE_WIN32 = (CU_FILE_HANDLE_TYPE_OPAQUE_WIN32, 'Windows based handle (unsupported)') USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS -class Opcode(_cyb_FastEnum): +class Opcode(_FastEnum): """ See `CUfileOpcode_t`. """ READ = CUFILE_READ WRITE = CUFILE_WRITE -class Status(_cyb_FastEnum): +class Status(_FastEnum): """ See `CUfileStatus_t`. """ @@ -2757,13 +2749,13 @@ class Status(_cyb_FastEnum): TIMEOUT = CUFILE_TIMEOUT FAILED = CUFILE_FAILED -class BatchMode(_cyb_FastEnum): +class BatchMode(_FastEnum): """ See `CUfileBatchMode_t`. """ BATCH = CUFILE_BATCH -class SizeTConfigParameter(_cyb_FastEnum): +class SizeTConfigParameter(_FastEnum): """ See `CUFileSizeTConfigParameter_t`. """ @@ -2780,7 +2772,7 @@ class SizeTConfigParameter(_cyb_FastEnum): POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS -class BoolConfigParameter(_cyb_FastEnum): +class BoolConfigParameter(_FastEnum): """ See `CUFileBoolConfigParameter_t`. """ @@ -2797,7 +2789,7 @@ class BoolConfigParameter(_cyb_FastEnum): SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS -class StringConfigParameter(_cyb_FastEnum): +class StringConfigParameter(_FastEnum): """ See `CUFileStringConfigParameter_t`. """ @@ -2805,7 +2797,7 @@ class StringConfigParameter(_cyb_FastEnum): ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH LOG_DIR = CUFILE_PARAM_LOG_DIR -class ArrayConfigParameter(_cyb_FastEnum): +class ArrayConfigParameter(_FastEnum): """ See `CUFileArrayConfigParameter_t`. """ @@ -2814,7 +2806,7 @@ class ArrayConfigParameter(_cyb_FastEnum): GPU_BOUNCE_BUFFER_SLAB_SIZE_KB = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_SIZE_KB GPU_BOUNCE_BUFFER_SLAB_COUNT = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_COUNT -class P2PFlags(_cyb_FastEnum): +class P2PFlags(_FastEnum): """ See `CUfileP2PFlags_t`. """ @@ -3102,7 +3094,7 @@ cpdef str get_parameter_string(int param, int len): with nogil: __status__ = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(desc_str) + return cpython.PyUnicode_FromString(desc_str) cpdef set_parameter_size_t(int param, size_t value): @@ -3340,4 +3332,3 @@ cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) check_status(status) return status -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index 106e74bf4ba..8367cd14e83 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -2,20 +2,14 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum - -# <<<< END OF PREAMBLE CONTENT >>>> - +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) +from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum from libcpp.vector cimport vector @@ -23,7 +17,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_cyb_FastEnum): +class Result(_IntEnum): """ The enumerated type `nvFatbinResult` defines API call result codes. nvFatbin APIs return `nvFatbinResult` codes to indicate the result. @@ -329,4 +323,3 @@ cpdef add_tile_ir(intptr_t handle, code, size_t size, identifier, options_cmd_li with nogil: __status__ = nvFatbinAddTileIR(handle, _code_, size, _identifier_, _options_cmd_line_) check_status(__status__) -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pyx b/cuda_bindings/cuda/bindings/nvjitlink.pyx index c8876790843..0f36b3afe1e 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -2,20 +2,14 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum - -# <<<< END OF PREAMBLE CONTENT >>>> - +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum from libcpp.vector cimport vector @@ -23,7 +17,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_cyb_FastEnum): +class Result(_FastEnum): """ The enumerated type `nvJitLinkResult` defines API call result codes. nvJitLink APIs return `nvJitLinkResult` codes to indicate the result. @@ -50,7 +44,7 @@ class Result(_cyb_FastEnum): ERROR_UNSUPPORTED_ARCH = (NVJITLINK_ERROR_UNSUPPORTED_ARCH, 'Unsupported -arch value') ERROR_LTO_NOT_ENABLED = (NVJITLINK_ERROR_LTO_NOT_ENABLED, 'Requires -lto') -class InputType(_cyb_FastEnum): +class InputType(_FastEnum): """ The enumerated type `nvJitLinkInputType` defines the kind of inputs that can be passed to nvJitLinkAdd* APIs. @@ -373,4 +367,3 @@ cpdef get_linked_ltoir(intptr_t handle, ltoir): with nogil: __status__ = nvJitLinkGetLinkedLTOIR(handle, _ltoir_) check_status(__status__) -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index a5cf165098a..52fefd94e32 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -2,53 +2,28 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -cimport cpython as _cyb_cpython -cimport cpython.buffer as _cyb_cpython_buffer -cimport cpython.memoryview as _cyb_cpython_memoryview -from cython cimport view as _cyb_view -from libc.stdlib cimport ( - calloc as _cyb_calloc, - free as _cyb_free, - malloc as _cyb_malloc, -) -from libc.string cimport ( - memcmp as _cyb_memcmp, - memcpy as _cyb_memcpy, -) -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum -import numpy as _numpy +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. -cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +cimport cython # NOQA -cdef _cyb_from_buffer(buffer, size, lowpp_type): - cdef _cyb_cpython.Py_buffer view - if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - _cyb_cpython.PyBuffer_Release(&view) +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) + +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum + +from cuda.bindings.cydriver cimport CUDA_VERSION -cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): + +from libc.stdlib cimport calloc, free, malloc +from cython cimport view +cimport cpython.buffer +cimport cpython.memoryview +cimport cpython +from libc.string cimport memcmp, memcpy +import numpy as _numpy + + +cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -60,20 +35,34 @@ cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) -# <<<< END OF PREAMBLE CONTENT >>>> - -cimport cython # NOQA -from cython cimport view -cimport cpython -from libc.string cimport memcpy +cdef __from_buffer(buffer, size, lowpp_type): + cdef Py_buffer view + if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + cpython.PyBuffer_Release(&view) -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum +cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -from cuda.bindings.cydriver cimport CUDA_VERSION cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsigned int ver) nogil: @@ -84,7 +73,7 @@ cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsi # Enum ############################################################################### -class BridgeChipType(_cyb_FastEnum): +class BridgeChipType(_FastEnum): """ Enum to represent type of bridge chip @@ -93,7 +82,7 @@ class BridgeChipType(_cyb_FastEnum): BRIDGE_CHIP_PLX = NVML_BRIDGE_CHIP_PLX BRIDGE_CHIP_BRO4 = NVML_BRIDGE_CHIP_BRO4 -class NvLinkUtilizationCountUnits(_cyb_FastEnum): +class NvLinkUtilizationCountUnits(_FastEnum): """ Enum to represent the NvLink utilization counter packet units @@ -105,7 +94,7 @@ class NvLinkUtilizationCountUnits(_cyb_FastEnum): NVLINK_COUNTER_UNIT_RESERVED = NVML_NVLINK_COUNTER_UNIT_RESERVED NVLINK_COUNTER_UNIT_COUNT = NVML_NVLINK_COUNTER_UNIT_COUNT -class NvLinkUtilizationCountPktTypes(_cyb_FastEnum): +class NvLinkUtilizationCountPktTypes(_FastEnum): """ Enum to represent the NvLink utilization counter packet types to count ** this is ONLY applicable with the units as packets or bytes ** as @@ -124,7 +113,7 @@ class NvLinkUtilizationCountPktTypes(_cyb_FastEnum): NVLINK_COUNTER_PKTFILTER_RESPNODATA = NVML_NVLINK_COUNTER_PKTFILTER_RESPNODATA NVLINK_COUNTER_PKTFILTER_ALL = NVML_NVLINK_COUNTER_PKTFILTER_ALL -class NvLinkCapability(_cyb_FastEnum): +class NvLinkCapability(_FastEnum): """ Enum to represent NvLink queryable capabilities @@ -138,7 +127,7 @@ class NvLinkCapability(_cyb_FastEnum): NVLINK_CAP_VALID = NVML_NVLINK_CAP_VALID NVLINK_CAP_COUNT = NVML_NVLINK_CAP_COUNT -class NvLinkErrorCounter(_cyb_FastEnum): +class NvLinkErrorCounter(_FastEnum): """ Enum to represent NvLink queryable error counters @@ -151,7 +140,7 @@ class NvLinkErrorCounter(_cyb_FastEnum): NVLINK_ERROR_DL_ECC_DATA = NVML_NVLINK_ERROR_DL_ECC_DATA NVLINK_ERROR_COUNT = NVML_NVLINK_ERROR_COUNT -class IntNvLinkDeviceType(_cyb_FastEnum): +class IntNvLinkDeviceType(_FastEnum): """ Enum to represent NvLink's remote device type @@ -162,7 +151,7 @@ class IntNvLinkDeviceType(_cyb_FastEnum): NVLINK_DEVICE_TYPE_SWITCH = NVML_NVLINK_DEVICE_TYPE_SWITCH NVLINK_DEVICE_TYPE_UNKNOWN = NVML_NVLINK_DEVICE_TYPE_UNKNOWN -class GpuTopologyLevel(_cyb_FastEnum): +class GpuTopologyLevel(_FastEnum): """ Represents level relationships within a system between two GPUs The enums are spaced to allow for future relationships @@ -176,7 +165,7 @@ class GpuTopologyLevel(_cyb_FastEnum): TOPOLOGY_NODE = NVML_TOPOLOGY_NODE TOPOLOGY_SYSTEM = NVML_TOPOLOGY_SYSTEM -class GpuP2PStatus(_cyb_FastEnum): +class GpuP2PStatus(_FastEnum): """ See `nvmlGpuP2PStatus_t`. """ @@ -189,7 +178,7 @@ class GpuP2PStatus(_cyb_FastEnum): P2P_STATUS_NOT_SUPPORTED = NVML_P2P_STATUS_NOT_SUPPORTED P2P_STATUS_UNKNOWN = NVML_P2P_STATUS_UNKNOWN -class GpuP2PCapsIndex(_cyb_FastEnum): +class GpuP2PCapsIndex(_FastEnum): """ See `nvmlGpuP2PCapsIndex_t`. """ @@ -201,7 +190,7 @@ class GpuP2PCapsIndex(_cyb_FastEnum): P2P_CAPS_INDEX_PROP = NVML_P2P_CAPS_INDEX_PROP P2P_CAPS_INDEX_UNKNOWN = NVML_P2P_CAPS_INDEX_UNKNOWN -class SamplingType(_cyb_FastEnum): +class SamplingType(_FastEnum): """ Represents Type of Sampling Event @@ -219,7 +208,7 @@ class SamplingType(_cyb_FastEnum): OFA_UTILIZATION_SAMPLES = (NVML_OFA_UTILIZATION_SAMPLES, 'To represent percent of time during which NVOFA remains busy.') SAMPLINGTYPE_COUNT = NVML_SAMPLINGTYPE_COUNT -class PcieUtilCounter(_cyb_FastEnum): +class PcieUtilCounter(_FastEnum): """ Represents the queryable PCIe utilization counters @@ -229,7 +218,7 @@ class PcieUtilCounter(_cyb_FastEnum): PCIE_UTIL_RX_BYTES = NVML_PCIE_UTIL_RX_BYTES PCIE_UTIL_COUNT = NVML_PCIE_UTIL_COUNT -class ValueType(_cyb_FastEnum): +class ValueType(_FastEnum): """ Represents the type for sample value returned @@ -244,7 +233,7 @@ class ValueType(_cyb_FastEnum): UNSIGNED_SHORT = NVML_VALUE_TYPE_UNSIGNED_SHORT COUNT = NVML_VALUE_TYPE_COUNT -class PerfPolicyType(_cyb_FastEnum): +class PerfPolicyType(_FastEnum): """ Represents type of perf policy for which violation times can be queried @@ -260,7 +249,7 @@ class PerfPolicyType(_cyb_FastEnum): PERF_POLICY_TOTAL_BASE_CLOCKS = (NVML_PERF_POLICY_TOTAL_BASE_CLOCKS, 'Total time the GPU was held below base clocks.') PERF_POLICY_COUNT = NVML_PERF_POLICY_COUNT -class ThermalTarget(_cyb_FastEnum): +class ThermalTarget(_FastEnum): """ Represents the thermal sensor targets @@ -277,7 +266,7 @@ class ThermalTarget(_cyb_FastEnum): ALL = NVML_THERMAL_TARGET_ALL UNKNOWN = NVML_THERMAL_TARGET_UNKNOWN -class ThermalController(_cyb_FastEnum): +class ThermalController(_FastEnum): """ Represents the thermal sensor controllers @@ -303,7 +292,7 @@ class ThermalController(_cyb_FastEnum): ADT7473S = NVML_THERMAL_CONTROLLER_ADT7473S UNKNOWN = NVML_THERMAL_CONTROLLER_UNKNOWN -class CoolerControl(_cyb_FastEnum): +class CoolerControl(_FastEnum): """ Cooler control type @@ -314,7 +303,7 @@ class CoolerControl(_cyb_FastEnum): THERMAL_COOLER_SIGNAL_VARIABLE = (NVML_THERMAL_COOLER_SIGNAL_VARIABLE, "This cooler's level can be adjusted from some minimum to some maximum (eg a knob).") THERMAL_COOLER_SIGNAL_COUNT = NVML_THERMAL_COOLER_SIGNAL_COUNT -class CoolerTarget(_cyb_FastEnum): +class CoolerTarget(_FastEnum): """ Cooler's target @@ -326,7 +315,7 @@ class CoolerTarget(_cyb_FastEnum): THERMAL_POWER_SUPPLY = (NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY, 'This cooler can cool the power supply.') THERMAL_GPU_RELATED = (NVML_THERMAL_COOLER_TARGET_GPU_RELATED, 'This cooler cools all of the components related to its target gpu. GPU_RELATED = GPU | MEMORY | POWER_SUPPLY.') -class UUIDType(_cyb_FastEnum): +class UUIDType(_FastEnum): """ Enum to represent different UUID types @@ -336,7 +325,7 @@ class UUIDType(_cyb_FastEnum): ASCII = (NVML_UUID_TYPE_ASCII, 'ASCII format type.') BINARY = (NVML_UUID_TYPE_BINARY, 'Binary format type.') -class EnableState(_cyb_FastEnum): +class EnableState(_FastEnum): """ Generic enable/disable enum. @@ -345,7 +334,7 @@ class EnableState(_cyb_FastEnum): FEATURE_DISABLED = (NVML_FEATURE_DISABLED, 'Feature disabled.') FEATURE_ENABLED = (NVML_FEATURE_ENABLED, 'Feature enabled.') -class BrandType(_cyb_FastEnum): +class BrandType(_FastEnum): """ - The Brand of the GPU @@ -371,7 +360,7 @@ class BrandType(_cyb_FastEnum): BRAND_TITAN_RTX = NVML_BRAND_TITAN_RTX BRAND_COUNT = NVML_BRAND_COUNT -class TemperatureThresholds(_cyb_FastEnum): +class TemperatureThresholds(_FastEnum): """ Temperature thresholds. @@ -387,7 +376,7 @@ class TemperatureThresholds(_cyb_FastEnum): TEMPERATURE_THRESHOLD_GPS_CURR = NVML_TEMPERATURE_THRESHOLD_GPS_CURR TEMPERATURE_THRESHOLD_COUNT = NVML_TEMPERATURE_THRESHOLD_COUNT -class TemperatureSensors(_cyb_FastEnum): +class TemperatureSensors(_FastEnum): """ Temperature sensors. @@ -396,7 +385,7 @@ class TemperatureSensors(_cyb_FastEnum): TEMPERATURE_GPU = (NVML_TEMPERATURE_GPU, 'Temperature sensor for the GPU die.') TEMPERATURE_COUNT = NVML_TEMPERATURE_COUNT -class ComputeMode(_cyb_FastEnum): +class ComputeMode(_FastEnum): """ Compute mode. NVML_COMPUTEMODE_EXCLUSIVE_PROCESS was added in CUDA 4.0. Earlier CUDA versions supported a single exclusive mode, which is @@ -410,7 +399,7 @@ class ComputeMode(_cyb_FastEnum): COMPUTEMODE_EXCLUSIVE_PROCESS = (NVML_COMPUTEMODE_EXCLUSIVE_PROCESS, 'Compute-exclusive-process mode -- only one context per device, usable from multiple threads at a time.') COMPUTEMODE_COUNT = NVML_COMPUTEMODE_COUNT -class MemoryErrorType(_cyb_FastEnum): +class MemoryErrorType(_FastEnum): """ Memory error types @@ -420,7 +409,7 @@ class MemoryErrorType(_cyb_FastEnum): UNCORRECTED = (NVML_MEMORY_ERROR_TYPE_UNCORRECTED, 'A memory error that was not corrected For ECC errors, these are double bit errors For Texture memory, these are errors where the resend fails') COUNT = (NVML_MEMORY_ERROR_TYPE_COUNT, 'Count of memory error types.') -class NvlinkVersion(_cyb_FastEnum): +class NvlinkVersion(_FastEnum): """ Represents Nvlink Version @@ -436,7 +425,7 @@ class NvlinkVersion(_cyb_FastEnum): VERSION_5_0 = (NVML_NVLINK_VERSION_5_0, 'NVLink Version 5.0.') VERSION_6_0 = (NVML_NVLINK_VERSION_6_0, 'NVLink Version 6.0.') -class EccCounterType(_cyb_FastEnum): +class EccCounterType(_FastEnum): """ ECC counter types. Note: Volatile counts are reset each time the driver loads. On Windows this is once per boot. On Linux this can be @@ -451,7 +440,7 @@ class EccCounterType(_cyb_FastEnum): AGGREGATE_ECC = (NVML_AGGREGATE_ECC, 'Aggregate counts persist across reboots (i.e. for the lifetime of the device).') COUNT = (NVML_ECC_COUNTER_TYPE_COUNT, 'Count of memory counter types.') -class ClockType(_cyb_FastEnum): +class ClockType(_FastEnum): """ Clock types. All speeds are in Mhz. @@ -463,7 +452,7 @@ class ClockType(_cyb_FastEnum): CLOCK_VIDEO = (NVML_CLOCK_VIDEO, 'Video encoder/decoder clock domain.') CLOCK_COUNT = (NVML_CLOCK_COUNT, 'Count of clock types.') -class ClockId(_cyb_FastEnum): +class ClockId(_FastEnum): """ Clock Ids. These are used in combination with `nvmlClockType_t` to specify a single clock value. @@ -476,7 +465,7 @@ class ClockId(_cyb_FastEnum): CUSTOMER_BOOST_MAX = (NVML_CLOCK_ID_CUSTOMER_BOOST_MAX, 'OEM-defined maximum clock rate.') COUNT = (NVML_CLOCK_ID_COUNT, 'Count of Clock Ids.') -class DriverModel(_cyb_FastEnum): +class DriverModel(_FastEnum): """ Driver models. Windows only. @@ -486,7 +475,7 @@ class DriverModel(_cyb_FastEnum): DRIVER_WDM = (NVML_DRIVER_WDM, 'WDM (TCC) model (deprecated) -- GPU treated as a generic compute device.') DRIVER_MCDM = (NVML_DRIVER_MCDM, 'MCDM driver model -- GPU treated as a Microsoft compute device.') -class Pstates(_cyb_FastEnum): +class Pstates(_FastEnum): """ Allowed PStates. @@ -510,7 +499,7 @@ class Pstates(_cyb_FastEnum): PSTATE_15 = (NVML_PSTATE_15, 'Performance state 15 -- Minimum Performance.') PSTATE_UNKNOWN = (NVML_PSTATE_UNKNOWN, 'Unknown performance state.') -class GpuOperationMode(_cyb_FastEnum): +class GpuOperationMode(_FastEnum): """ GPU Operation Mode GOM allows to reduce power usage and optimize GPU throughput by disabling GPU features. Each GOM is designed to meet @@ -522,7 +511,7 @@ class GpuOperationMode(_cyb_FastEnum): GOM_COMPUTE = (NVML_GOM_COMPUTE, 'Designed for running only compute tasks. Graphics operations are not allowed') GOM_LOW_DP = (NVML_GOM_LOW_DP, "Designed for running graphics applications that don't require high bandwidth double precision") -class InforomObject(_cyb_FastEnum): +class InforomObject(_FastEnum): """ Available infoROM objects. @@ -534,7 +523,7 @@ class InforomObject(_cyb_FastEnum): INFOROM_DEN = (NVML_INFOROM_DEN, 'DRAM Encryption object.') INFOROM_COUNT = (NVML_INFOROM_COUNT, 'This counts the number of infoROM objects the driver knows about.') -class Return(_cyb_FastEnum): +class Return(_FastEnum): """ Return values for NVML API calls. @@ -573,7 +562,7 @@ class Return(_cyb_FastEnum): ERROR_RESET_TYPE_NOT_SUPPORTED = (NVML_ERROR_RESET_TYPE_NOT_SUPPORTED, 'Reset not supported for given device/parameters.') ERROR_UNKNOWN = (NVML_ERROR_UNKNOWN, 'An internal driver error occurred.') -class MemoryLocation(_cyb_FastEnum): +class MemoryLocation(_FastEnum): """ See `nvmlDeviceGetMemoryErrorCounter` @@ -590,7 +579,7 @@ class MemoryLocation(_cyb_FastEnum): SRAM = (NVML_MEMORY_LOCATION_SRAM, 'Turing+ SRAM.') COUNT = (NVML_MEMORY_LOCATION_COUNT, 'This counts the number of memory locations the driver knows about.') -class PageRetirementCause(_cyb_FastEnum): +class PageRetirementCause(_FastEnum): """ Causes for page retirement @@ -600,7 +589,7 @@ class PageRetirementCause(_cyb_FastEnum): DOUBLE_BIT_ECC_ERROR = (NVML_PAGE_RETIREMENT_CAUSE_DOUBLE_BIT_ECC_ERROR, 'Page was retired due to double bit ECC error.') COUNT = NVML_PAGE_RETIREMENT_CAUSE_COUNT -class RestrictedAPI(_cyb_FastEnum): +class RestrictedAPI(_FastEnum): """ API types that allow changes to default permission restrictions @@ -610,7 +599,7 @@ class RestrictedAPI(_cyb_FastEnum): SET_AUTO_BOOSTED_CLOCKS = (NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS, 'APIs that enable/disable Auto Boosted clocks see nvmlDeviceSetAutoBoostedClocksEnabled') COUNT = NVML_RESTRICTED_API_COUNT -class GpuUtilizationDomainId(_cyb_FastEnum): +class GpuUtilizationDomainId(_FastEnum): """ Represents the GPU utilization domains @@ -621,7 +610,7 @@ class GpuUtilizationDomainId(_cyb_FastEnum): GPU_UTILIZATION_DOMAIN_VID = (NVML_GPU_UTILIZATION_DOMAIN_VID, 'Video engine domain.') GPU_UTILIZATION_DOMAIN_BUS = (NVML_GPU_UTILIZATION_DOMAIN_BUS, 'Bus interface domain.') -class GpuVirtualizationMode(_cyb_FastEnum): +class GpuVirtualizationMode(_FastEnum): """ GPU virtualization mode types. @@ -633,7 +622,7 @@ class GpuVirtualizationMode(_cyb_FastEnum): HOST_VGPU = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU, 'Device is associated with VGX hypervisor in vGPU mode.') HOST_VSGA = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA, 'Device is associated with VGX hypervisor in vSGA mode.') -class HostVgpuMode(_cyb_FastEnum): +class HostVgpuMode(_FastEnum): """ Host vGPU modes @@ -642,7 +631,7 @@ class HostVgpuMode(_cyb_FastEnum): NON_SRIOV = (NVML_HOST_VGPU_MODE_NON_SRIOV, 'Non SR-IOV mode.') SRIOV = (NVML_HOST_VGPU_MODE_SRIOV, 'SR-IOV mode.') -class VgpuVmIdType(_cyb_FastEnum): +class VgpuVmIdType(_FastEnum): """ Types of VM identifiers @@ -651,7 +640,7 @@ class VgpuVmIdType(_cyb_FastEnum): VGPU_VM_ID_DOMAIN_ID = (NVML_VGPU_VM_ID_DOMAIN_ID, 'VM ID represents DOMAIN ID.') VGPU_VM_ID_UUID = (NVML_VGPU_VM_ID_UUID, 'VM ID represents UUID.') -class VgpuGuestInfoState(_cyb_FastEnum): +class VgpuGuestInfoState(_FastEnum): """ vGPU GUEST info state @@ -660,7 +649,7 @@ class VgpuGuestInfoState(_cyb_FastEnum): VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED, 'Guest-dependent fields uninitialized.') VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED, 'Guest-dependent fields initialized.') -class GridLicenseFeatureCode(_cyb_FastEnum): +class GridLicenseFeatureCode(_FastEnum): """ vGPU software licensable features @@ -673,7 +662,7 @@ class GridLicenseFeatureCode(_cyb_FastEnum): GAMING = (NVML_GRID_LICENSE_FEATURE_CODE_GAMING, 'Gaming.') COMPUTE = (NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE, 'Compute.') -class VgpuCapability(_cyb_FastEnum): +class VgpuCapability(_FastEnum): """ vGPU queryable capabilities @@ -686,7 +675,7 @@ class VgpuCapability(_cyb_FastEnum): VGPU_CAP_EXCLUSIVE_SIZE = (NVML_VGPU_CAP_EXCLUSIVE_SIZE, 'vGPU profile cannot run on a GPU alongside other profiles of different size') VGPU_CAP_COUNT = NVML_VGPU_CAP_COUNT -class VgpuDriverCapability(_cyb_FastEnum): +class VgpuDriverCapability(_FastEnum): """ vGPU driver queryable capabilities @@ -696,7 +685,7 @@ class VgpuDriverCapability(_cyb_FastEnum): VGPU_DRIVER_CAP_WARM_UPDATE = (NVML_VGPU_DRIVER_CAP_WARM_UPDATE, 'Supports FSR and warm update of vGPU host driver without terminating the running guest VM.') VGPU_DRIVER_CAP_COUNT = NVML_VGPU_DRIVER_CAP_COUNT -class DeviceVgpuCapability(_cyb_FastEnum): +class DeviceVgpuCapability(_FastEnum): """ Device vGPU queryable capabilities @@ -716,7 +705,7 @@ class DeviceVgpuCapability(_cyb_FastEnum): DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = (NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED, 'Set/Get MIG timesliced mode reporting, without impacting the underlying functionality.') DEVICE_VGPU_CAP_COUNT = NVML_DEVICE_VGPU_CAP_COUNT -class DeviceGpuRecoveryAction(_cyb_FastEnum): +class DeviceGpuRecoveryAction(_FastEnum): """ Enum describing the GPU Recovery Action @@ -729,7 +718,7 @@ class DeviceGpuRecoveryAction(_cyb_FastEnum): GPU_RECOVERY_ACTION_DRAIN_AND_RESET = (NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET, 'Drain P2P and Reset Gpu.') GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN = (NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN, 'Recover IMEX Domain.') -class FanState(_cyb_FastEnum): +class FanState(_FastEnum): """ Fan state enum. @@ -738,7 +727,7 @@ class FanState(_cyb_FastEnum): FAN_NORMAL = (NVML_FAN_NORMAL, 'Fan is working properly.') FAN_FAILED = (NVML_FAN_FAILED, 'Fan has failed.') -class LedColor(_cyb_FastEnum): +class LedColor(_FastEnum): """ Led color enum. @@ -747,7 +736,7 @@ class LedColor(_cyb_FastEnum): GREEN = (NVML_LED_COLOR_GREEN, 'GREEN, indicates good health.') AMBER = (NVML_LED_COLOR_AMBER, 'AMBER, indicates problem.') -class EncoderType(_cyb_FastEnum): +class EncoderType(_FastEnum): """ Represents type of encoder for capacity can be queried @@ -758,7 +747,7 @@ class EncoderType(_cyb_FastEnum): ENCODER_QUERY_AV1 = (NVML_ENCODER_QUERY_AV1, 'AV1 encoder.') ENCODER_QUERY_UNKNOWN = (NVML_ENCODER_QUERY_UNKNOWN, 'Unknown encoder.') -class FBCSessionType(_cyb_FastEnum): +class FBCSessionType(_FastEnum): """ Represents frame buffer capture session type @@ -770,7 +759,7 @@ class FBCSessionType(_cyb_FastEnum): VID = (NVML_FBC_SESSION_TYPE_VID, 'Vid.') HWENC = (NVML_FBC_SESSION_TYPE_HWENC, 'HEnc.') -class DetachGpuState(_cyb_FastEnum): +class DetachGpuState(_FastEnum): """ Is the GPU device to be removed from the kernel by `nvmlDeviceRemoveGpu()` @@ -780,7 +769,7 @@ class DetachGpuState(_cyb_FastEnum): DETACH_GPU_KEEP = NVML_DETACH_GPU_KEEP DETACH_GPU_REMOVE = NVML_DETACH_GPU_REMOVE -class PcieLinkState(_cyb_FastEnum): +class PcieLinkState(_FastEnum): """ Parent bridge PCIe link state requested by `nvmlDeviceRemoveGpu()` @@ -789,7 +778,7 @@ class PcieLinkState(_cyb_FastEnum): PCIE_LINK_KEEP = NVML_PCIE_LINK_KEEP PCIE_LINK_SHUT_DOWN = NVML_PCIE_LINK_SHUT_DOWN -class ClockLimitId(_cyb_FastEnum): +class ClockLimitId(_FastEnum): """ See `nvmlClockLimitId_t`. """ @@ -797,7 +786,7 @@ class ClockLimitId(_cyb_FastEnum): TDP = NVML_CLOCK_LIMIT_ID_TDP UNLIMITED = NVML_CLOCK_LIMIT_ID_UNLIMITED -class VgpuVmCompatibility(_cyb_FastEnum): +class VgpuVmCompatibility(_FastEnum): """ vGPU VM compatibility codes @@ -809,7 +798,7 @@ class VgpuVmCompatibility(_cyb_FastEnum): SLEEP = (NVML_VGPU_VM_COMPATIBILITY_SLEEP, 'vGPU is runnable from a sleeped state (ACPI S3)') LIVE = (NVML_VGPU_VM_COMPATIBILITY_LIVE, 'vGPU is runnable from a live/paused (ACPI S0)') -class VgpuPgpuCompatibilityLimitCode(_cyb_FastEnum): +class VgpuPgpuCompatibilityLimitCode(_FastEnum): """ vGPU-pGPU compatibility limit codes @@ -821,7 +810,7 @@ class VgpuPgpuCompatibilityLimitCode(_cyb_FastEnum): VGPU_COMPATIBILITY_LIMIT_GPU = (NVML_VGPU_COMPATIBILITY_LIMIT_GPU, 'Compatibility is limited by GPU hardware.') VGPU_COMPATIBILITY_LIMIT_OTHER = (NVML_VGPU_COMPATIBILITY_LIMIT_OTHER, 'Compatibility is limited by an undefined factor.') -class GpmMetricId(_cyb_FastEnum): +class GpmMetricId(_FastEnum): """ GPM Metric Identifiers @@ -1131,7 +1120,7 @@ class GpmMetricId(_cyb_FastEnum): GPM_METRIC_NVLINK_L35_TX = (NVML_GPM_METRIC_NVLINK_L35_TX, 'NvLink write for link 35 in bytes since reboot.') GPM_METRIC_MAX = (NVML_GPM_METRIC_MAX, 'Maximum value above +1.') -class PowerProfileType(_cyb_FastEnum): +class PowerProfileType(_FastEnum): """ See `nvmlPowerProfileType_t`. """ @@ -1152,7 +1141,7 @@ class PowerProfileType(_cyb_FastEnum): POWER_PROFILE_MIG = NVML_POWER_PROFILE_MIG POWER_PROFILE_MAX = NVML_POWER_PROFILE_MAX -class DeviceAddressingModeType(_cyb_FastEnum): +class DeviceAddressingModeType(_FastEnum): """ Enum to represent device addressing mode values @@ -1162,7 +1151,7 @@ class DeviceAddressingModeType(_cyb_FastEnum): DEVICE_ADDRESSING_MODE_HMM = (NVML_DEVICE_ADDRESSING_MODE_HMM, 'Heterogeneous Memory Management mode.') DEVICE_ADDRESSING_MODE_ATS = (NVML_DEVICE_ADDRESSING_MODE_ATS, 'Address Translation Services mode.') -class PRMCounterId(_cyb_FastEnum): +class PRMCounterId(_FastEnum): """ PRM Counter IDs @@ -1184,7 +1173,7 @@ class PRMCounterId(_cyb_FastEnum): PPCNT_PLR_SYNC_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS PPRM_OPER_RECOVERY = NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY -class PowerProfileOperation(_cyb_FastEnum): +class PowerProfileOperation(_FastEnum): """ Enum for operation to perform on the requested profiles @@ -1195,7 +1184,7 @@ class PowerProfileOperation(_cyb_FastEnum): SET_AND_OVERWRITE = (NVML_POWER_PROFILE_OPERATION_SET_AND_OVERWRITE, 'Overwrite the existing list of requested profiles with just the requested profiles.') MAX = (NVML_POWER_PROFILE_OPERATION_MAX, 'Max value above +1.') -class ProcessMode(_cyb_FastEnum): +class ProcessMode(_FastEnum): """ Enum to represent process mode. @@ -1207,7 +1196,7 @@ class ProcessMode(_cyb_FastEnum): ALL = (NVML_PROCESS_MODE_ALL, 'All processes running on the GPU (compute, graphics, MPS, and other types).') MAX = (NVML_PROCESS_MODE_MAX, 'Maximum value for bounds checking.') -class CPERType(_cyb_FastEnum): +class CPERType(_FastEnum): """ Bitmask of CPER record types. Multiple values may be combined to request records from several sources in one call. @@ -2191,7 +2180,7 @@ cdef class PciInfoExt_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") self._owner = None @@ -2203,7 +2192,7 @@ cdef class PciInfoExt_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PciInfoExt_v1 object at {hex(id(self))}>" @@ -2224,20 +2213,20 @@ cdef class PciInfoExt_v1: if not isinstance(other, PciInfoExt_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2335,7 +2324,7 @@ cdef class PciInfoExt_v1: @property def bus_id(self): """~_numpy.int8: (array of length 32).The tuple domain:bus:device.function PCI identifier (& NULL terminator).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) + return cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2345,12 +2334,12 @@ cdef class PciInfoExt_v1: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].busId), ptr, 32) + memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfoExt_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) + return __from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) @staticmethod def from_data(data): @@ -2359,7 +2348,7 @@ cdef class PciInfoExt_v1: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_ext_v1_dtype` holding the data. """ - return _cyb_from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) + return __from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2374,10 +2363,10 @@ cdef class PciInfoExt_v1: raise ValueError("ptr must not be null (0)") cdef PciInfoExt_v1 obj = PciInfoExt_v1.__new__(PciInfoExt_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) + obj._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) obj._owner = None obj._owned = True else: @@ -2420,7 +2409,7 @@ cdef class PciInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfo_t)) + self._ptr = calloc(1, sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") self._owner = None @@ -2432,7 +2421,7 @@ cdef class PciInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PciInfo object at {hex(id(self))}>" @@ -2453,20 +2442,20 @@ cdef class PciInfo: if not isinstance(other, PciInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) + self._ptr = malloc(sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2476,7 +2465,7 @@ cdef class PciInfo: @property def bus_id_legacy(self): """~_numpy.int8: (array of length 16).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) + return cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) @bus_id_legacy.setter def bus_id_legacy(self, val): @@ -2486,7 +2475,7 @@ cdef class PciInfo: if len(buf) >= 16: raise ValueError("String too long for field bus_id_legacy, max length is 15") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].busIdLegacy), ptr, 16) + memcpy((self._ptr[0].busIdLegacy), ptr, 16) @property def domain(self): @@ -2546,7 +2535,7 @@ cdef class PciInfo: @property def bus_id(self): """~_numpy.int8: (array of length 32).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) + return cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2556,12 +2545,12 @@ cdef class PciInfo: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].busId), ptr, 32) + memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) + return __from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) @staticmethod def from_data(data): @@ -2570,7 +2559,7 @@ cdef class PciInfo: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_dtype` holding the data. """ - return _cyb_from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) + return __from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2585,10 +2574,10 @@ cdef class PciInfo: raise ValueError("ptr must not be null (0)") cdef PciInfo obj = PciInfo.__new__(PciInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) + obj._ptr = malloc(sizeof(nvmlPciInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) obj._owner = None obj._owned = True else: @@ -2626,7 +2615,7 @@ cdef class Utilization: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlUtilization_t)) + self._ptr = calloc(1, sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") self._owner = None @@ -2638,7 +2627,7 @@ cdef class Utilization: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Utilization object at {hex(id(self))}>" @@ -2659,20 +2648,20 @@ cdef class Utilization: if not isinstance(other, Utilization): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) + self._ptr = malloc(sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2704,7 +2693,7 @@ cdef class Utilization: @staticmethod def from_buffer(buffer): """Create an Utilization instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) + return __from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) @staticmethod def from_data(data): @@ -2713,7 +2702,7 @@ cdef class Utilization: Args: data (_numpy.ndarray): a single-element array of dtype `utilization_dtype` holding the data. """ - return _cyb_from_data(data, "utilization_dtype", utilization_dtype, Utilization) + return __from_data(data, "utilization_dtype", utilization_dtype, Utilization) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2728,10 +2717,10 @@ cdef class Utilization: raise ValueError("ptr must not be null (0)") cdef Utilization obj = Utilization.__new__(Utilization) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) + obj._ptr = malloc(sizeof(nvmlUtilization_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Utilization") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) obj._owner = None obj._owned = True else: @@ -2770,7 +2759,7 @@ cdef class Memory: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_t)) + self._ptr = calloc(1, sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") self._owner = None @@ -2782,7 +2771,7 @@ cdef class Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Memory object at {hex(id(self))}>" @@ -2803,20 +2792,20 @@ cdef class Memory: if not isinstance(other, Memory): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) + self._ptr = malloc(sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2859,7 +2848,7 @@ cdef class Memory: @staticmethod def from_buffer(buffer): """Create an Memory instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlMemory_t), Memory) + return __from_buffer(buffer, sizeof(nvmlMemory_t), Memory) @staticmethod def from_data(data): @@ -2868,7 +2857,7 @@ cdef class Memory: Args: data (_numpy.ndarray): a single-element array of dtype `memory_dtype` holding the data. """ - return _cyb_from_data(data, "memory_dtype", memory_dtype, Memory) + return __from_data(data, "memory_dtype", memory_dtype, Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2883,10 +2872,10 @@ cdef class Memory: raise ValueError("ptr must not be null (0)") cdef Memory obj = Memory.__new__(Memory) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) + obj._ptr = malloc(sizeof(nvmlMemory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) obj._owner = None obj._owned = True else: @@ -2927,7 +2916,7 @@ cdef class Memory_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_v2_t)) + self._ptr = calloc(1, sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") self._owner = None @@ -2939,7 +2928,7 @@ cdef class Memory_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Memory_v2 object at {hex(id(self))}>" @@ -2960,20 +2949,20 @@ cdef class Memory_v2: if not isinstance(other, Memory_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) + self._ptr = malloc(sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3038,7 +3027,7 @@ cdef class Memory_v2: @staticmethod def from_buffer(buffer): """Create an Memory_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) + return __from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) @staticmethod def from_data(data): @@ -3047,7 +3036,7 @@ cdef class Memory_v2: Args: data (_numpy.ndarray): a single-element array of dtype `memory_v2_dtype` holding the data. """ - return _cyb_from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) + return __from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3062,10 +3051,10 @@ cdef class Memory_v2: raise ValueError("ptr must not be null (0)") cdef Memory_v2 obj = Memory_v2.__new__(Memory_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) + obj._ptr = malloc(sizeof(nvmlMemory_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) obj._owner = None obj._owned = True else: @@ -3104,7 +3093,7 @@ cdef class BAR1Memory: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlBAR1Memory_t)) + self._ptr = calloc(1, sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") self._owner = None @@ -3116,7 +3105,7 @@ cdef class BAR1Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.BAR1Memory object at {hex(id(self))}>" @@ -3137,20 +3126,20 @@ cdef class BAR1Memory: if not isinstance(other, BAR1Memory): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) + self._ptr = malloc(sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3193,7 +3182,7 @@ cdef class BAR1Memory: @staticmethod def from_buffer(buffer): """Create an BAR1Memory instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) + return __from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) @staticmethod def from_data(data): @@ -3202,7 +3191,7 @@ cdef class BAR1Memory: Args: data (_numpy.ndarray): a single-element array of dtype `ba_r1memory_dtype` holding the data. """ - return _cyb_from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) + return __from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3217,10 +3206,10 @@ cdef class BAR1Memory: raise ValueError("ptr must not be null (0)") cdef BAR1Memory obj = BAR1Memory.__new__(BAR1Memory) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) + obj._ptr = malloc(sizeof(nvmlBAR1Memory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) obj._owner = None obj._owned = True else: @@ -3296,10 +3285,10 @@ cdef class ProcessInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3399,8 +3388,8 @@ cdef class ProcessInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessInfo obj = ProcessInfo.__new__(ProcessInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_info_dtype) obj._data = data.view(_numpy.recarray) @@ -3474,10 +3463,10 @@ cdef class ProcessDetail_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3588,8 +3577,8 @@ cdef class ProcessDetail_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessDetail_v1 obj = ProcessDetail_v1.__new__(ProcessDetail_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessDetail_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_detail_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -3631,7 +3620,7 @@ cdef class DeviceAttributes: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAttributes_t)) + self._ptr = calloc(1, sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") self._owner = None @@ -3643,7 +3632,7 @@ cdef class DeviceAttributes: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DeviceAttributes object at {hex(id(self))}>" @@ -3664,20 +3653,20 @@ cdef class DeviceAttributes: if not isinstance(other, DeviceAttributes): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) + self._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3786,7 +3775,7 @@ cdef class DeviceAttributes: @staticmethod def from_buffer(buffer): """Create an DeviceAttributes instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) + return __from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) @staticmethod def from_data(data): @@ -3795,7 +3784,7 @@ cdef class DeviceAttributes: Args: data (_numpy.ndarray): a single-element array of dtype `device_attributes_dtype` holding the data. """ - return _cyb_from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) + return __from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3810,10 +3799,10 @@ cdef class DeviceAttributes: raise ValueError("ptr must not be null (0)") cdef DeviceAttributes obj = DeviceAttributes.__new__(DeviceAttributes) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) + obj._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) obj._owner = None obj._owned = True else: @@ -3850,7 +3839,7 @@ cdef class C2cModeInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") self._owner = None @@ -3862,7 +3851,7 @@ cdef class C2cModeInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.C2cModeInfo_v1 object at {hex(id(self))}>" @@ -3883,20 +3872,20 @@ cdef class C2cModeInfo_v1: if not isinstance(other, C2cModeInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3917,7 +3906,7 @@ cdef class C2cModeInfo_v1: @staticmethod def from_buffer(buffer): """Create an C2cModeInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) + return __from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) @staticmethod def from_data(data): @@ -3926,7 +3915,7 @@ cdef class C2cModeInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `c2c_mode_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) + return __from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3941,10 +3930,10 @@ cdef class C2cModeInfo_v1: raise ValueError("ptr must not be null (0)") cdef C2cModeInfo_v1 obj = C2cModeInfo_v1.__new__(C2cModeInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -3985,7 +3974,7 @@ cdef class RowRemapperHistogramValues: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") self._owner = None @@ -3997,7 +3986,7 @@ cdef class RowRemapperHistogramValues: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.RowRemapperHistogramValues object at {hex(id(self))}>" @@ -4018,20 +4007,20 @@ cdef class RowRemapperHistogramValues: if not isinstance(other, RowRemapperHistogramValues): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4096,7 +4085,7 @@ cdef class RowRemapperHistogramValues: @staticmethod def from_buffer(buffer): """Create an RowRemapperHistogramValues instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) + return __from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) @staticmethod def from_data(data): @@ -4105,7 +4094,7 @@ cdef class RowRemapperHistogramValues: Args: data (_numpy.ndarray): a single-element array of dtype `row_remapper_histogram_values_dtype` holding the data. """ - return _cyb_from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) + return __from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4120,10 +4109,10 @@ cdef class RowRemapperHistogramValues: raise ValueError("ptr must not be null (0)") cdef RowRemapperHistogramValues obj = RowRemapperHistogramValues.__new__(RowRemapperHistogramValues) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + obj._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) obj._owner = None obj._owned = True else: @@ -4197,10 +4186,10 @@ cdef class BridgeChipInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def type(self): @@ -4278,8 +4267,8 @@ cdef class BridgeChipInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef BridgeChipInfo obj = BridgeChipInfo.__new__(BridgeChipInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlBridgeChipInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=bridge_chip_info_dtype) obj._data = data.view(_numpy.recarray) @@ -4313,7 +4302,7 @@ cdef class Value: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlValue_t)) + self._ptr = calloc(1, sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") self._owner = None @@ -4325,7 +4314,7 @@ cdef class Value: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Value object at {hex(id(self))}>" @@ -4346,20 +4335,20 @@ cdef class Value: if not isinstance(other, Value): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlValue_t)) + self._ptr = malloc(sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4446,7 +4435,7 @@ cdef class Value: @staticmethod def from_buffer(buffer): """Create an Value instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlValue_t), Value) + return __from_buffer(buffer, sizeof(nvmlValue_t), Value) @staticmethod def from_data(data): @@ -4455,7 +4444,7 @@ cdef class Value: Args: data (_numpy.ndarray): a single-element array of dtype `value_dtype` holding the data. """ - return _cyb_from_data(data, "value_dtype", value_dtype, Value) + return __from_data(data, "value_dtype", value_dtype, Value) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4470,10 +4459,10 @@ cdef class Value: raise ValueError("ptr must not be null (0)") cdef Value obj = Value.__new__(Value) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlValue_t)) + obj._ptr = malloc(sizeof(nvmlValue_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Value") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) obj._owner = None obj._owned = True else: @@ -4514,7 +4503,7 @@ cdef class _py_anon_pod0: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -4526,7 +4515,7 @@ cdef class _py_anon_pod0: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod0 object at {hex(id(self))}>" @@ -4547,20 +4536,20 @@ cdef class _py_anon_pod0: if not isinstance(other, _py_anon_pod0): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod0), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -4625,7 +4614,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) @staticmethod def from_data(data): @@ -4634,7 +4623,7 @@ cdef class _py_anon_pod0: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod0_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) + return __from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4649,10 +4638,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) obj._owner = None obj._owned = True else: @@ -4692,7 +4681,7 @@ cdef class CoolerInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") self._owner = None @@ -4704,7 +4693,7 @@ cdef class CoolerInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.CoolerInfo_v1 object at {hex(id(self))}>" @@ -4725,20 +4714,20 @@ cdef class CoolerInfo_v1: if not isinstance(other, CoolerInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4792,7 +4781,7 @@ cdef class CoolerInfo_v1: @staticmethod def from_buffer(buffer): """Create an CoolerInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) + return __from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) @staticmethod def from_data(data): @@ -4801,7 +4790,7 @@ cdef class CoolerInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `cooler_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) + return __from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4816,10 +4805,10 @@ cdef class CoolerInfo_v1: raise ValueError("ptr must not be null (0)") cdef CoolerInfo_v1 obj = CoolerInfo_v1.__new__(CoolerInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -4893,10 +4882,10 @@ cdef class ClkMonFaultInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def clk_api_domain(self): @@ -4974,8 +4963,8 @@ cdef class ClkMonFaultInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ClkMonFaultInfo obj = ClkMonFaultInfo.__new__(ClkMonFaultInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlClkMonFaultInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=clk_mon_fault_info_dtype) obj._data = data.view(_numpy.recarray) @@ -5014,7 +5003,7 @@ cdef class ClockOffset_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlClockOffset_v1_t)) + self._ptr = calloc(1, sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") self._owner = None @@ -5026,7 +5015,7 @@ cdef class ClockOffset_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ClockOffset_v1 object at {hex(id(self))}>" @@ -5047,20 +5036,20 @@ cdef class ClockOffset_v1: if not isinstance(other, ClockOffset_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) + self._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5136,7 +5125,7 @@ cdef class ClockOffset_v1: @staticmethod def from_buffer(buffer): """Create an ClockOffset_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) + return __from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) @staticmethod def from_data(data): @@ -5145,7 +5134,7 @@ cdef class ClockOffset_v1: Args: data (_numpy.ndarray): a single-element array of dtype `clock_offset_v1_dtype` holding the data. """ - return _cyb_from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) + return __from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5160,10 +5149,10 @@ cdef class ClockOffset_v1: raise ValueError("ptr must not be null (0)") cdef ClockOffset_v1 obj = ClockOffset_v1.__new__(ClockOffset_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) + obj._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) obj._owner = None obj._owned = True else: @@ -5241,10 +5230,10 @@ cdef class ProcessUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -5366,8 +5355,8 @@ cdef class ProcessUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationSample obj = ProcessUtilizationSample.__new__(ProcessUtilizationSample) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -5444,10 +5433,10 @@ cdef class ProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -5591,8 +5580,8 @@ cdef class ProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationInfo_v1 obj = ProcessUtilizationInfo_v1.__new__(ProcessUtilizationInfo_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -5638,7 +5627,7 @@ cdef class EccSramErrorStatus_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") self._owner = None @@ -5650,7 +5639,7 @@ cdef class EccSramErrorStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.EccSramErrorStatus_v1 object at {hex(id(self))}>" @@ -5671,20 +5660,20 @@ cdef class EccSramErrorStatus_v1: if not isinstance(other, EccSramErrorStatus_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5837,7 +5826,7 @@ cdef class EccSramErrorStatus_v1: @staticmethod def from_buffer(buffer): """Create an EccSramErrorStatus_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) + return __from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) @staticmethod def from_data(data): @@ -5846,7 +5835,7 @@ cdef class EccSramErrorStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_error_status_v1_dtype` holding the data. """ - return _cyb_from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) + return __from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5861,10 +5850,10 @@ cdef class EccSramErrorStatus_v1: raise ValueError("ptr must not be null (0)") cdef EccSramErrorStatus_v1 obj = EccSramErrorStatus_v1.__new__(EccSramErrorStatus_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + obj._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -5908,7 +5897,7 @@ cdef class PlatformInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") self._owner = None @@ -5920,7 +5909,7 @@ cdef class PlatformInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v1 object at {hex(id(self))}>" @@ -5941,20 +5930,20 @@ cdef class PlatformInfo_v1: if not isinstance(other, PlatformInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5975,7 +5964,7 @@ cdef class PlatformInfo_v1: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -5985,14 +5974,14 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def rack_guid(self): """~_numpy.uint8: (array of length 16).GUID of the rack containing this GPU (for Blackwell rackGuid is 13 bytes so indices 13-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].rackGuid)) return _numpy.asarray(arr) @@ -6002,9 +5991,9 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field rack_guid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_physical_slot_number(self): @@ -6064,7 +6053,7 @@ cdef class PlatformInfo_v1: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) + return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) @staticmethod def from_data(data): @@ -6073,7 +6062,7 @@ cdef class PlatformInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) + return __from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6088,10 +6077,10 @@ cdef class PlatformInfo_v1: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v1 obj = PlatformInfo_v1.__new__(PlatformInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -6135,7 +6124,7 @@ cdef class PlatformInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") self._owner = None @@ -6147,7 +6136,7 @@ cdef class PlatformInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v2 object at {hex(id(self))}>" @@ -6168,20 +6157,20 @@ cdef class PlatformInfo_v2: if not isinstance(other, PlatformInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6202,7 +6191,7 @@ cdef class PlatformInfo_v2: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -6212,14 +6201,14 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_serial_number(self): """~_numpy.uint8: (array of length 16).Serial number of the chassis containing this GPU (for Blackwell it is 13 bytes so indices 13-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].chassisSerialNumber)) return _numpy.asarray(arr) @@ -6229,9 +6218,9 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field chassis_serial_number, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) @property def slot_number(self): @@ -6291,7 +6280,7 @@ cdef class PlatformInfo_v2: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) + return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) @staticmethod def from_data(data): @@ -6300,7 +6289,7 @@ cdef class PlatformInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) + return __from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6315,10 +6304,10 @@ cdef class PlatformInfo_v2: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v2 obj = PlatformInfo_v2.__new__(PlatformInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -6358,7 +6347,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -6370,7 +6359,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -6391,20 +6380,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod1), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -6458,7 +6447,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) @staticmethod def from_data(data): @@ -6467,7 +6456,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6482,10 +6471,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) obj._owner = None obj._owned = True else: @@ -6527,7 +6516,7 @@ cdef class VgpuPlacementList_v2: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") self._owner = None @@ -6540,7 +6529,7 @@ cdef class VgpuPlacementList_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuPlacementList_v2 object at {hex(id(self))}>" @@ -6561,20 +6550,20 @@ cdef class VgpuPlacementList_v2: if not isinstance(other, VgpuPlacementList_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6608,7 +6597,7 @@ cdef class VgpuPlacementList_v2: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -6616,7 +6605,7 @@ cdef class VgpuPlacementList_v2: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuPlacementList_v2 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].count = len(val) @@ -6636,7 +6625,7 @@ cdef class VgpuPlacementList_v2: @staticmethod def from_buffer(buffer): """Create an VgpuPlacementList_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) @staticmethod def from_data(data): @@ -6645,7 +6634,7 @@ cdef class VgpuPlacementList_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_placement_list_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) + return __from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6660,10 +6649,10 @@ cdef class VgpuPlacementList_v2: raise ValueError("ptr must not be null (0)") cdef VgpuPlacementList_v2 obj = VgpuPlacementList_v2.__new__(VgpuPlacementList_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) obj._owner = None obj._owned = True else: @@ -6702,7 +6691,7 @@ cdef class VgpuTypeBar1Info_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") self._owner = None @@ -6714,7 +6703,7 @@ cdef class VgpuTypeBar1Info_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeBar1Info_v1 object at {hex(id(self))}>" @@ -6735,20 +6724,20 @@ cdef class VgpuTypeBar1Info_v1: if not isinstance(other, VgpuTypeBar1Info_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6780,7 +6769,7 @@ cdef class VgpuTypeBar1Info_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeBar1Info_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) @staticmethod def from_data(data): @@ -6789,7 +6778,7 @@ cdef class VgpuTypeBar1Info_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_bar1info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) + return __from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6804,10 +6793,10 @@ cdef class VgpuTypeBar1Info_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeBar1Info_v1 obj = VgpuTypeBar1Info_v1.__new__(VgpuTypeBar1Info_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) obj._owner = None obj._owned = True else: @@ -6889,10 +6878,10 @@ cdef class VgpuProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def process_name(self): @@ -7056,8 +7045,8 @@ cdef class VgpuProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuProcessUtilizationInfo_v1 obj = VgpuProcessUtilizationInfo_v1.__new__(VgpuProcessUtilizationInfo_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -7092,7 +7081,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7104,7 +7093,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -7125,20 +7114,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod2), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7170,7 +7159,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) @staticmethod def from_data(data): @@ -7179,7 +7168,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7194,10 +7183,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) obj._owner = None obj._owned = True else: @@ -7234,7 +7223,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7246,7 +7235,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -7267,20 +7256,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod3), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7301,7 +7290,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) @staticmethod def from_data(data): @@ -7310,7 +7299,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7325,10 +7314,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) obj._owner = None obj._owned = True else: @@ -7406,10 +7395,10 @@ cdef class VgpuSchedulerLogEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -7531,8 +7520,8 @@ cdef class VgpuSchedulerLogEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry obj = VgpuSchedulerLogEntry.__new__(VgpuSchedulerLogEntry) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -7567,7 +7556,7 @@ cdef class _py_anon_pod4: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7579,7 +7568,7 @@ cdef class _py_anon_pod4: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod4 object at {hex(id(self))}>" @@ -7600,20 +7589,20 @@ cdef class _py_anon_pod4: if not isinstance(other, _py_anon_pod4): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod4), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7645,7 +7634,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) @staticmethod def from_data(data): @@ -7654,7 +7643,7 @@ cdef class _py_anon_pod4: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod4_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) + return __from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7669,10 +7658,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) obj._owner = None obj._owned = True else: @@ -7709,7 +7698,7 @@ cdef class _py_anon_pod5: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7721,7 +7710,7 @@ cdef class _py_anon_pod5: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod5 object at {hex(id(self))}>" @@ -7742,20 +7731,20 @@ cdef class _py_anon_pod5: if not isinstance(other, _py_anon_pod5): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod5), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7776,7 +7765,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) @staticmethod def from_data(data): @@ -7785,7 +7774,7 @@ cdef class _py_anon_pod5: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod5_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) + return __from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7800,10 +7789,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) obj._owner = None obj._owned = True else: @@ -7847,7 +7836,7 @@ cdef class VgpuSchedulerCapabilities: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") self._owner = None @@ -7859,7 +7848,7 @@ cdef class VgpuSchedulerCapabilities: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerCapabilities object at {hex(id(self))}>" @@ -7880,20 +7869,20 @@ cdef class VgpuSchedulerCapabilities: if not isinstance(other, VgpuSchedulerCapabilities): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7903,7 +7892,7 @@ cdef class VgpuSchedulerCapabilities: @property def supported_schedulers(self): """~_numpy.uint32: (array of length 3).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].supportedSchedulers)) return _numpy.asarray(arr) @@ -7913,9 +7902,9 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("This VgpuSchedulerCapabilities instance is read-only") if len(val) != 3: raise ValueError(f"Expected length { 3 } for field supported_schedulers, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - _cyb_memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) + memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) @property def max_timeslice(self): @@ -7997,7 +7986,7 @@ cdef class VgpuSchedulerCapabilities: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerCapabilities instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) @staticmethod def from_data(data): @@ -8006,7 +7995,7 @@ cdef class VgpuSchedulerCapabilities: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_capabilities_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) + return __from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8021,10 +8010,10 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerCapabilities obj = VgpuSchedulerCapabilities.__new__(VgpuSchedulerCapabilities) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) obj._owner = None obj._owned = True else: @@ -8067,7 +8056,7 @@ cdef class VgpuLicenseExpiry: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") self._owner = None @@ -8079,7 +8068,7 @@ cdef class VgpuLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseExpiry object at {hex(id(self))}>" @@ -8100,20 +8089,20 @@ cdef class VgpuLicenseExpiry: if not isinstance(other, VgpuLicenseExpiry): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8200,7 +8189,7 @@ cdef class VgpuLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseExpiry instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) + return __from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) @staticmethod def from_data(data): @@ -8209,7 +8198,7 @@ cdef class VgpuLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_expiry_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) + return __from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8224,10 +8213,10 @@ cdef class VgpuLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseExpiry obj = VgpuLicenseExpiry.__new__(VgpuLicenseExpiry) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + obj._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8270,7 +8259,7 @@ cdef class GridLicenseExpiry: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = calloc(1, sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") self._owner = None @@ -8282,7 +8271,7 @@ cdef class GridLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GridLicenseExpiry object at {hex(id(self))}>" @@ -8303,20 +8292,20 @@ cdef class GridLicenseExpiry: if not isinstance(other, GridLicenseExpiry): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8403,7 +8392,7 @@ cdef class GridLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an GridLicenseExpiry instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) + return __from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) @staticmethod def from_data(data): @@ -8412,7 +8401,7 @@ cdef class GridLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `grid_license_expiry_dtype` holding the data. """ - return _cyb_from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) + return __from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8427,10 +8416,10 @@ cdef class GridLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef GridLicenseExpiry obj = GridLicenseExpiry.__new__(GridLicenseExpiry) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) + obj._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8470,7 +8459,7 @@ cdef class VgpuTypeIdInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") self._owner = None @@ -8483,7 +8472,7 @@ cdef class VgpuTypeIdInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeIdInfo_v1 object at {hex(id(self))}>" @@ -8504,20 +8493,20 @@ cdef class VgpuTypeIdInfo_v1: if not isinstance(other, VgpuTypeIdInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8540,7 +8529,7 @@ cdef class VgpuTypeIdInfo_v1: """int: OUT: List of vGPU type IDs.""" if self._ptr[0].vgpuTypeIds == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuTypeIds) return _numpy.asarray(arr) @@ -8548,7 +8537,7 @@ cdef class VgpuTypeIdInfo_v1: def vgpu_type_ids(self, val): if self._readonly: raise ValueError("This VgpuTypeIdInfo_v1 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuTypeIds = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8557,7 +8546,7 @@ cdef class VgpuTypeIdInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeIdInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) @staticmethod def from_data(data): @@ -8566,7 +8555,7 @@ cdef class VgpuTypeIdInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_id_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) + return __from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8581,10 +8570,10 @@ cdef class VgpuTypeIdInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeIdInfo_v1 obj = VgpuTypeIdInfo_v1.__new__(VgpuTypeIdInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8625,7 +8614,7 @@ cdef class ActiveVgpuInstanceInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") self._owner = None @@ -8638,7 +8627,7 @@ cdef class ActiveVgpuInstanceInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ActiveVgpuInstanceInfo_v1 object at {hex(id(self))}>" @@ -8659,20 +8648,20 @@ cdef class ActiveVgpuInstanceInfo_v1: if not isinstance(other, ActiveVgpuInstanceInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8695,7 +8684,7 @@ cdef class ActiveVgpuInstanceInfo_v1: """int: IN/OUT: list of active vGPU instances.""" if self._ptr[0].vgpuInstances == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuInstances) return _numpy.asarray(arr) @@ -8703,7 +8692,7 @@ cdef class ActiveVgpuInstanceInfo_v1: def vgpu_instances(self, val): if self._readonly: raise ValueError("This ActiveVgpuInstanceInfo_v1 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuInstances = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8712,7 +8701,7 @@ cdef class ActiveVgpuInstanceInfo_v1: @staticmethod def from_buffer(buffer): """Create an ActiveVgpuInstanceInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) + return __from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) @staticmethod def from_data(data): @@ -8721,7 +8710,7 @@ cdef class ActiveVgpuInstanceInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `active_vgpu_instance_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) + return __from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8736,10 +8725,10 @@ cdef class ActiveVgpuInstanceInfo_v1: raise ValueError("ptr must not be null (0)") cdef ActiveVgpuInstanceInfo_v1 obj = ActiveVgpuInstanceInfo_v1.__new__(ActiveVgpuInstanceInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8782,7 +8771,7 @@ cdef class VgpuCreatablePlacementInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") self._owner = None @@ -8795,7 +8784,7 @@ cdef class VgpuCreatablePlacementInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuCreatablePlacementInfo_v1 object at {hex(id(self))}>" @@ -8816,20 +8805,20 @@ cdef class VgpuCreatablePlacementInfo_v1: if not isinstance(other, VgpuCreatablePlacementInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8874,7 +8863,7 @@ cdef class VgpuCreatablePlacementInfo_v1: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -8882,7 +8871,7 @@ cdef class VgpuCreatablePlacementInfo_v1: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuCreatablePlacementInfo_v1 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].placementSize = len(val) @@ -8891,7 +8880,7 @@ cdef class VgpuCreatablePlacementInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuCreatablePlacementInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) @staticmethod def from_data(data): @@ -8900,7 +8889,7 @@ cdef class VgpuCreatablePlacementInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_creatable_placement_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) + return __from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8915,10 +8904,10 @@ cdef class VgpuCreatablePlacementInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuCreatablePlacementInfo_v1 obj = VgpuCreatablePlacementInfo_v1.__new__(VgpuCreatablePlacementInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8993,10 +8982,10 @@ cdef class HwbcEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def hwbc_id(self): @@ -9072,8 +9061,8 @@ cdef class HwbcEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef HwbcEntry obj = HwbcEntry.__new__(HwbcEntry) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlHwbcEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=hwbc_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -9108,7 +9097,7 @@ cdef class LedState: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlLedState_t)) + self._ptr = calloc(1, sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") self._owner = None @@ -9120,7 +9109,7 @@ cdef class LedState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.LedState object at {hex(id(self))}>" @@ -9141,20 +9130,20 @@ cdef class LedState: if not isinstance(other, LedState): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) + self._ptr = malloc(sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9164,7 +9153,7 @@ cdef class LedState: @property def cause(self): """~_numpy.int8: (array of length 256).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].cause) + return cpython.PyUnicode_FromString(self._ptr[0].cause) @cause.setter def cause(self, val): @@ -9174,7 +9163,7 @@ cdef class LedState: if len(buf) >= 256: raise ValueError("String too long for field cause, max length is 255") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].cause), ptr, 256) + memcpy((self._ptr[0].cause), ptr, 256) @property def color(self): @@ -9190,7 +9179,7 @@ cdef class LedState: @staticmethod def from_buffer(buffer): """Create an LedState instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlLedState_t), LedState) + return __from_buffer(buffer, sizeof(nvmlLedState_t), LedState) @staticmethod def from_data(data): @@ -9199,7 +9188,7 @@ cdef class LedState: Args: data (_numpy.ndarray): a single-element array of dtype `led_state_dtype` holding the data. """ - return _cyb_from_data(data, "led_state_dtype", led_state_dtype, LedState) + return __from_data(data, "led_state_dtype", led_state_dtype, LedState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9214,10 +9203,10 @@ cdef class LedState: raise ValueError("ptr must not be null (0)") cdef LedState obj = LedState.__new__(LedState) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) + obj._ptr = malloc(sizeof(nvmlLedState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating LedState") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) obj._owner = None obj._owned = True else: @@ -9257,7 +9246,7 @@ cdef class UnitInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlUnitInfo_t)) + self._ptr = calloc(1, sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") self._owner = None @@ -9269,7 +9258,7 @@ cdef class UnitInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.UnitInfo object at {hex(id(self))}>" @@ -9290,20 +9279,20 @@ cdef class UnitInfo: if not isinstance(other, UnitInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) + self._ptr = malloc(sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9313,7 +9302,7 @@ cdef class UnitInfo: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -9323,12 +9312,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @property def id(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].id) + return cpython.PyUnicode_FromString(self._ptr[0].id) @id.setter def id(self, val): @@ -9338,12 +9327,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field id, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].id), ptr, 96) + memcpy((self._ptr[0].id), ptr, 96) @property def serial(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].serial) + return cpython.PyUnicode_FromString(self._ptr[0].serial) @serial.setter def serial(self, val): @@ -9353,12 +9342,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field serial, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].serial), ptr, 96) + memcpy((self._ptr[0].serial), ptr, 96) @property def firmware_version(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) + return cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) @firmware_version.setter def firmware_version(self, val): @@ -9368,12 +9357,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field firmware_version, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].firmwareVersion), ptr, 96) + memcpy((self._ptr[0].firmwareVersion), ptr, 96) @staticmethod def from_buffer(buffer): """Create an UnitInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) + return __from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) @staticmethod def from_data(data): @@ -9382,7 +9371,7 @@ cdef class UnitInfo: Args: data (_numpy.ndarray): a single-element array of dtype `unit_info_dtype` holding the data. """ - return _cyb_from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) + return __from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9397,10 +9386,10 @@ cdef class UnitInfo: raise ValueError("ptr must not be null (0)") cdef UnitInfo obj = UnitInfo.__new__(UnitInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) + obj._ptr = malloc(sizeof(nvmlUnitInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) obj._owner = None obj._owned = True else: @@ -9440,7 +9429,7 @@ cdef class PSUInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPSUInfo_t)) + self._ptr = calloc(1, sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") self._owner = None @@ -9452,7 +9441,7 @@ cdef class PSUInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PSUInfo object at {hex(id(self))}>" @@ -9473,20 +9462,20 @@ cdef class PSUInfo: if not isinstance(other, PSUInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) + self._ptr = malloc(sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9496,7 +9485,7 @@ cdef class PSUInfo: @property def state(self): """~_numpy.int8: (array of length 256).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].state) + return cpython.PyUnicode_FromString(self._ptr[0].state) @state.setter def state(self, val): @@ -9506,7 +9495,7 @@ cdef class PSUInfo: if len(buf) >= 256: raise ValueError("String too long for field state, max length is 255") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].state), ptr, 256) + memcpy((self._ptr[0].state), ptr, 256) @property def current(self): @@ -9544,7 +9533,7 @@ cdef class PSUInfo: @staticmethod def from_buffer(buffer): """Create an PSUInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) + return __from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) @staticmethod def from_data(data): @@ -9553,7 +9542,7 @@ cdef class PSUInfo: Args: data (_numpy.ndarray): a single-element array of dtype `psu_info_dtype` holding the data. """ - return _cyb_from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) + return __from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9568,10 +9557,10 @@ cdef class PSUInfo: raise ValueError("ptr must not be null (0)") cdef PSUInfo obj = PSUInfo.__new__(PSUInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) + obj._ptr = malloc(sizeof(nvmlPSUInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) obj._owner = None obj._owned = True else: @@ -9645,10 +9634,10 @@ cdef class UnitFanInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def speed(self): @@ -9726,8 +9715,8 @@ cdef class UnitFanInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef UnitFanInfo obj = UnitFanInfo.__new__(UnitFanInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlUnitFanInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=unit_fan_info_dtype) obj._data = data.view(_numpy.recarray) @@ -9765,7 +9754,7 @@ cdef class EventData: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlEventData_t)) + self._ptr = calloc(1, sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") self._owner = None @@ -9777,7 +9766,7 @@ cdef class EventData: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.EventData object at {hex(id(self))}>" @@ -9798,20 +9787,20 @@ cdef class EventData: if not isinstance(other, EventData): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) + self._ptr = malloc(sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9876,7 +9865,7 @@ cdef class EventData: @staticmethod def from_buffer(buffer): """Create an EventData instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlEventData_t), EventData) + return __from_buffer(buffer, sizeof(nvmlEventData_t), EventData) @staticmethod def from_data(data): @@ -9885,7 +9874,7 @@ cdef class EventData: Args: data (_numpy.ndarray): a single-element array of dtype `event_data_dtype` holding the data. """ - return _cyb_from_data(data, "event_data_dtype", event_data_dtype, EventData) + return __from_data(data, "event_data_dtype", event_data_dtype, EventData) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9900,10 +9889,10 @@ cdef class EventData: raise ValueError("ptr must not be null (0)") cdef EventData obj = EventData.__new__(EventData) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) + obj._ptr = malloc(sizeof(nvmlEventData_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EventData") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) obj._owner = None obj._owned = True else: @@ -9977,10 +9966,10 @@ cdef class SystemEventData_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def event_type(self): @@ -10058,8 +10047,8 @@ cdef class SystemEventData_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef SystemEventData_v1 obj = SystemEventData_v1.__new__(SystemEventData_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSystemEventData_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=system_event_data_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -10099,7 +10088,7 @@ cdef class AccountingStats: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlAccountingStats_t)) + self._ptr = calloc(1, sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") self._owner = None @@ -10111,7 +10100,7 @@ cdef class AccountingStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.AccountingStats object at {hex(id(self))}>" @@ -10132,20 +10121,20 @@ cdef class AccountingStats: if not isinstance(other, AccountingStats): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) + self._ptr = malloc(sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10221,7 +10210,7 @@ cdef class AccountingStats: @staticmethod def from_buffer(buffer): """Create an AccountingStats instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) + return __from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) @staticmethod def from_data(data): @@ -10230,7 +10219,7 @@ cdef class AccountingStats: Args: data (_numpy.ndarray): a single-element array of dtype `accounting_stats_dtype` holding the data. """ - return _cyb_from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) + return __from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10245,10 +10234,10 @@ cdef class AccountingStats: raise ValueError("ptr must not be null (0)") cdef AccountingStats obj = AccountingStats.__new__(AccountingStats) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) + obj._ptr = malloc(sizeof(nvmlAccountingStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) obj._owner = None obj._owned = True else: @@ -10328,10 +10317,10 @@ cdef class EncoderSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10475,8 +10464,8 @@ cdef class EncoderSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EncoderSessionInfo obj = EncoderSessionInfo.__new__(EncoderSessionInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEncoderSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=encoder_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10512,7 +10501,7 @@ cdef class FBCStats: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlFBCStats_t)) + self._ptr = calloc(1, sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") self._owner = None @@ -10524,7 +10513,7 @@ cdef class FBCStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.FBCStats object at {hex(id(self))}>" @@ -10545,20 +10534,20 @@ cdef class FBCStats: if not isinstance(other, FBCStats): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) + self._ptr = malloc(sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10601,7 +10590,7 @@ cdef class FBCStats: @staticmethod def from_buffer(buffer): """Create an FBCStats instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) + return __from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) @staticmethod def from_data(data): @@ -10610,7 +10599,7 @@ cdef class FBCStats: Args: data (_numpy.ndarray): a single-element array of dtype `fbc_stats_dtype` holding the data. """ - return _cyb_from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) + return __from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10625,10 +10614,10 @@ cdef class FBCStats: raise ValueError("ptr must not be null (0)") cdef FBCStats obj = FBCStats.__new__(FBCStats) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) + obj._ptr = malloc(sizeof(nvmlFBCStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating FBCStats") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) obj._owner = None obj._owned = True else: @@ -10712,10 +10701,10 @@ cdef class FBCSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10903,8 +10892,8 @@ cdef class FBCSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FBCSessionInfo obj = FBCSessionInfo.__new__(FBCSessionInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFBCSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=fbc_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10939,7 +10928,7 @@ cdef class ConfComputeSystemCaps: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") self._owner = None @@ -10951,7 +10940,7 @@ cdef class ConfComputeSystemCaps: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemCaps object at {hex(id(self))}>" @@ -10972,20 +10961,20 @@ cdef class ConfComputeSystemCaps: if not isinstance(other, ConfComputeSystemCaps): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11017,7 +11006,7 @@ cdef class ConfComputeSystemCaps: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemCaps instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) + return __from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) @staticmethod def from_data(data): @@ -11026,7 +11015,7 @@ cdef class ConfComputeSystemCaps: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_caps_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) + return __from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11041,10 +11030,10 @@ cdef class ConfComputeSystemCaps: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemCaps obj = ConfComputeSystemCaps.__new__(ConfComputeSystemCaps) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) obj._owner = None obj._owned = True else: @@ -11083,7 +11072,7 @@ cdef class ConfComputeSystemState: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemState_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") self._owner = None @@ -11095,7 +11084,7 @@ cdef class ConfComputeSystemState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemState object at {hex(id(self))}>" @@ -11116,20 +11105,20 @@ cdef class ConfComputeSystemState: if not isinstance(other, ConfComputeSystemState): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) + self._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11172,7 +11161,7 @@ cdef class ConfComputeSystemState: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemState instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) + return __from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) @staticmethod def from_data(data): @@ -11181,7 +11170,7 @@ cdef class ConfComputeSystemState: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_state_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) + return __from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11196,10 +11185,10 @@ cdef class ConfComputeSystemState: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemState obj = ConfComputeSystemState.__new__(ConfComputeSystemState) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) obj._owner = None obj._owned = True else: @@ -11240,7 +11229,7 @@ cdef class SystemConfComputeSettings_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") self._owner = None @@ -11252,7 +11241,7 @@ cdef class SystemConfComputeSettings_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.SystemConfComputeSettings_v1 object at {hex(id(self))}>" @@ -11273,20 +11262,20 @@ cdef class SystemConfComputeSettings_v1: if not isinstance(other, SystemConfComputeSettings_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11351,7 +11340,7 @@ cdef class SystemConfComputeSettings_v1: @staticmethod def from_buffer(buffer): """Create an SystemConfComputeSettings_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) + return __from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) @staticmethod def from_data(data): @@ -11360,7 +11349,7 @@ cdef class SystemConfComputeSettings_v1: Args: data (_numpy.ndarray): a single-element array of dtype `system_conf_compute_settings_v1_dtype` holding the data. """ - return _cyb_from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) + return __from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11375,10 +11364,10 @@ cdef class SystemConfComputeSettings_v1: raise ValueError("ptr must not be null (0)") cdef SystemConfComputeSettings_v1 obj = SystemConfComputeSettings_v1.__new__(SystemConfComputeSettings_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + obj._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) obj._owner = None obj._owned = True else: @@ -11416,7 +11405,7 @@ cdef class ConfComputeMemSizeInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") self._owner = None @@ -11428,7 +11417,7 @@ cdef class ConfComputeMemSizeInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeMemSizeInfo object at {hex(id(self))}>" @@ -11449,20 +11438,20 @@ cdef class ConfComputeMemSizeInfo: if not isinstance(other, ConfComputeMemSizeInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11494,7 +11483,7 @@ cdef class ConfComputeMemSizeInfo: @staticmethod def from_buffer(buffer): """Create an ConfComputeMemSizeInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) + return __from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) @staticmethod def from_data(data): @@ -11503,7 +11492,7 @@ cdef class ConfComputeMemSizeInfo: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_mem_size_info_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) + return __from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11518,10 +11507,10 @@ cdef class ConfComputeMemSizeInfo: raise ValueError("ptr must not be null (0)") cdef ConfComputeMemSizeInfo obj = ConfComputeMemSizeInfo.__new__(ConfComputeMemSizeInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) obj._owner = None obj._owned = True else: @@ -11561,7 +11550,7 @@ cdef class ConfComputeGpuCertificate: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") self._owner = None @@ -11573,7 +11562,7 @@ cdef class ConfComputeGpuCertificate: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuCertificate object at {hex(id(self))}>" @@ -11594,20 +11583,20 @@ cdef class ConfComputeGpuCertificate: if not isinstance(other, ConfComputeGpuCertificate): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11619,7 +11608,7 @@ cdef class ConfComputeGpuCertificate: """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].certChainSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].certChain)) return _numpy.asarray(arr) @@ -11632,16 +11621,16 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].certChainSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_cert_chain(self): """~_numpy.uint8: (array of length 5120).""" if self._ptr[0].attestationCertChainSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationCertChain)) return _numpy.asarray(arr) @@ -11654,14 +11643,14 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].attestationCertChainSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuCertificate instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) + return __from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) @staticmethod def from_data(data): @@ -11670,7 +11659,7 @@ cdef class ConfComputeGpuCertificate: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_certificate_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) + return __from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11685,10 +11674,10 @@ cdef class ConfComputeGpuCertificate: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuCertificate obj = ConfComputeGpuCertificate.__new__(ConfComputeGpuCertificate) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) obj._owner = None obj._owned = True else: @@ -11730,7 +11719,7 @@ cdef class ConfComputeGpuAttestationReport: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") self._owner = None @@ -11742,7 +11731,7 @@ cdef class ConfComputeGpuAttestationReport: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuAttestationReport object at {hex(id(self))}>" @@ -11763,20 +11752,20 @@ cdef class ConfComputeGpuAttestationReport: if not isinstance(other, ConfComputeGpuAttestationReport): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11797,7 +11786,7 @@ cdef class ConfComputeGpuAttestationReport: @property def nonce(self): """~_numpy.uint8: (array of length 32).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].nonce)) return _numpy.asarray(arr) @@ -11807,16 +11796,16 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("This ConfComputeGpuAttestationReport instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field nonce, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_report(self): """~_numpy.uint8: (array of length 8192).""" if self._ptr[0].attestationReportSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationReport)) return _numpy.asarray(arr) @@ -11829,16 +11818,16 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].attestationReportSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @property def cec_attestation_report(self): """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].cecAttestationReportSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].cecAttestationReport)) return _numpy.asarray(arr) @@ -11851,14 +11840,14 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].cecAttestationReportSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuAttestationReport instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) + return __from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) @staticmethod def from_data(data): @@ -11867,7 +11856,7 @@ cdef class ConfComputeGpuAttestationReport: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_attestation_report_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) + return __from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11882,10 +11871,10 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuAttestationReport obj = ConfComputeGpuAttestationReport.__new__(ConfComputeGpuAttestationReport) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) obj._owner = None obj._owned = True else: @@ -11927,7 +11916,7 @@ cdef class GpuFabricInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") self._owner = None @@ -11939,7 +11928,7 @@ cdef class GpuFabricInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v2 object at {hex(id(self))}>" @@ -11960,20 +11949,20 @@ cdef class GpuFabricInfo_v2: if not isinstance(other, GpuFabricInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11994,7 +11983,7 @@ cdef class GpuFabricInfo_v2: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -12004,9 +11993,9 @@ cdef class GpuFabricInfo_v2: raise ValueError("This GpuFabricInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -12055,7 +12044,7 @@ cdef class GpuFabricInfo_v2: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) + return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) @staticmethod def from_data(data): @@ -12064,7 +12053,7 @@ cdef class GpuFabricInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) + return __from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12079,10 +12068,10 @@ cdef class GpuFabricInfo_v2: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v2 obj = GpuFabricInfo_v2.__new__(GpuFabricInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -12121,7 +12110,7 @@ cdef class NvlinkSupportedBwModes_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") self._owner = None @@ -12133,7 +12122,7 @@ cdef class NvlinkSupportedBwModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSupportedBwModes_v1 object at {hex(id(self))}>" @@ -12154,20 +12143,20 @@ cdef class NvlinkSupportedBwModes_v1: if not isinstance(other, NvlinkSupportedBwModes_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12190,7 +12179,7 @@ cdef class NvlinkSupportedBwModes_v1: """~_numpy.uint8: (array of length 23).""" if self._ptr[0].totalBwModes == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].bwModes)) return _numpy.asarray(arr) @@ -12203,14 +12192,14 @@ cdef class NvlinkSupportedBwModes_v1: self._ptr[0].totalBwModes = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an NvlinkSupportedBwModes_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) + return __from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) @staticmethod def from_data(data): @@ -12219,7 +12208,7 @@ cdef class NvlinkSupportedBwModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_supported_bw_modes_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) + return __from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12234,10 +12223,10 @@ cdef class NvlinkSupportedBwModes_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSupportedBwModes_v1 obj = NvlinkSupportedBwModes_v1.__new__(NvlinkSupportedBwModes_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) obj._owner = None obj._owned = True else: @@ -12276,7 +12265,7 @@ cdef class NvlinkGetBwMode_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") self._owner = None @@ -12288,7 +12277,7 @@ cdef class NvlinkGetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkGetBwMode_v1 object at {hex(id(self))}>" @@ -12309,20 +12298,20 @@ cdef class NvlinkGetBwMode_v1: if not isinstance(other, NvlinkGetBwMode_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12365,7 +12354,7 @@ cdef class NvlinkGetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkGetBwMode_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) + return __from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) @staticmethod def from_data(data): @@ -12374,7 +12363,7 @@ cdef class NvlinkGetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_get_bw_mode_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) + return __from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12389,10 +12378,10 @@ cdef class NvlinkGetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkGetBwMode_v1 obj = NvlinkGetBwMode_v1.__new__(NvlinkGetBwMode_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12431,7 +12420,7 @@ cdef class NvlinkSetBwMode_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") self._owner = None @@ -12443,7 +12432,7 @@ cdef class NvlinkSetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSetBwMode_v1 object at {hex(id(self))}>" @@ -12464,20 +12453,20 @@ cdef class NvlinkSetBwMode_v1: if not isinstance(other, NvlinkSetBwMode_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12520,7 +12509,7 @@ cdef class NvlinkSetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkSetBwMode_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) + return __from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) @staticmethod def from_data(data): @@ -12529,7 +12518,7 @@ cdef class NvlinkSetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_set_bw_mode_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) + return __from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12544,10 +12533,10 @@ cdef class NvlinkSetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSetBwMode_v1 obj = NvlinkSetBwMode_v1.__new__(NvlinkSetBwMode_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12585,7 +12574,7 @@ cdef class VgpuVersion: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuVersion_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") self._owner = None @@ -12597,7 +12586,7 @@ cdef class VgpuVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuVersion object at {hex(id(self))}>" @@ -12618,20 +12607,20 @@ cdef class VgpuVersion: if not isinstance(other, VgpuVersion): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) + self._ptr = malloc(sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12663,7 +12652,7 @@ cdef class VgpuVersion: @staticmethod def from_buffer(buffer): """Create an VgpuVersion instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) + return __from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) @staticmethod def from_data(data): @@ -12672,7 +12661,7 @@ cdef class VgpuVersion: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_version_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) + return __from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12687,10 +12676,10 @@ cdef class VgpuVersion: raise ValueError("ptr must not be null (0)") cdef VgpuVersion obj = VgpuVersion.__new__(VgpuVersion) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) + obj._ptr = malloc(sizeof(nvmlVgpuVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) obj._owner = None obj._owned = True else: @@ -12736,7 +12725,7 @@ cdef class VgpuMetadata: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuMetadata_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") self._owner = None @@ -12748,7 +12737,7 @@ cdef class VgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuMetadata object at {hex(id(self))}>" @@ -12769,20 +12758,20 @@ cdef class VgpuMetadata: if not isinstance(other, VgpuMetadata): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) + self._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12825,7 +12814,7 @@ cdef class VgpuMetadata: @property def guest_driver_version(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) + return cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) @guest_driver_version.setter def guest_driver_version(self, val): @@ -12835,12 +12824,12 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field guest_driver_version, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].guestDriverVersion), ptr, 80) + memcpy((self._ptr[0].guestDriverVersion), ptr, 80) @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -12850,7 +12839,7 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def vgpu_virtualization_caps(self): @@ -12888,7 +12877,7 @@ cdef class VgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -12898,12 +12887,12 @@ cdef class VgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) + memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuMetadata instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) + return __from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) @staticmethod def from_data(data): @@ -12912,7 +12901,7 @@ cdef class VgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_metadata_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) + return __from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12927,10 +12916,10 @@ cdef class VgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuMetadata obj = VgpuMetadata.__new__(VgpuMetadata) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) + obj._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -12968,7 +12957,7 @@ cdef class VgpuPgpuCompatibility: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") self._owner = None @@ -12980,7 +12969,7 @@ cdef class VgpuPgpuCompatibility: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuCompatibility object at {hex(id(self))}>" @@ -13001,20 +12990,20 @@ cdef class VgpuPgpuCompatibility: if not isinstance(other, VgpuPgpuCompatibility): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13046,7 +13035,7 @@ cdef class VgpuPgpuCompatibility: @staticmethod def from_buffer(buffer): """Create an VgpuPgpuCompatibility instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) + return __from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) @staticmethod def from_data(data): @@ -13055,7 +13044,7 @@ cdef class VgpuPgpuCompatibility: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_compatibility_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) + return __from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13070,10 +13059,10 @@ cdef class VgpuPgpuCompatibility: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuCompatibility obj = VgpuPgpuCompatibility.__new__(VgpuPgpuCompatibility) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + obj._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) obj._owner = None obj._owned = True else: @@ -13147,10 +13136,10 @@ cdef class GpuInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13228,8 +13217,8 @@ cdef class GpuInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GpuInstancePlacement obj = GpuInstancePlacement.__new__(GpuInstancePlacement) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGpuInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=gpu_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13275,7 +13264,7 @@ cdef class GpuInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") self._owner = None @@ -13287,7 +13276,7 @@ cdef class GpuInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13308,20 +13297,20 @@ cdef class GpuInstanceProfileInfo_v3: if not isinstance(other, GpuInstanceProfileInfo_v3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13452,7 +13441,7 @@ cdef class GpuInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13462,7 +13451,7 @@ cdef class GpuInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -13478,7 +13467,7 @@ cdef class GpuInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) + return __from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -13487,7 +13476,7 @@ cdef class GpuInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_profile_info_v3_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) + return __from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13502,10 +13491,10 @@ cdef class GpuInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuInstanceProfileInfo_v3 obj = GpuInstanceProfileInfo_v3.__new__(GpuInstanceProfileInfo_v3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + obj._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -13579,10 +13568,10 @@ cdef class ComputeInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13660,8 +13649,8 @@ cdef class ComputeInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ComputeInstancePlacement obj = ComputeInstancePlacement.__new__(ComputeInstancePlacement) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlComputeInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=compute_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13705,7 +13694,7 @@ cdef class ComputeInstanceProfileInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") self._owner = None @@ -13717,7 +13706,7 @@ cdef class ComputeInstanceProfileInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v2 object at {hex(id(self))}>" @@ -13738,20 +13727,20 @@ cdef class ComputeInstanceProfileInfo_v2: if not isinstance(other, ComputeInstanceProfileInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13871,7 +13860,7 @@ cdef class ComputeInstanceProfileInfo_v2: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13881,12 +13870,12 @@ cdef class ComputeInstanceProfileInfo_v2: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) + return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) @staticmethod def from_data(data): @@ -13895,7 +13884,7 @@ cdef class ComputeInstanceProfileInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) + return __from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13910,10 +13899,10 @@ cdef class ComputeInstanceProfileInfo_v2: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v2 obj = ComputeInstanceProfileInfo_v2.__new__(ComputeInstanceProfileInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -13961,7 +13950,7 @@ cdef class ComputeInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") self._owner = None @@ -13973,7 +13962,7 @@ cdef class ComputeInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13994,20 +13983,20 @@ cdef class ComputeInstanceProfileInfo_v3: if not isinstance(other, ComputeInstanceProfileInfo_v3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14127,7 +14116,7 @@ cdef class ComputeInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -14137,7 +14126,7 @@ cdef class ComputeInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -14153,7 +14142,7 @@ cdef class ComputeInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) + return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -14162,7 +14151,7 @@ cdef class ComputeInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v3_dtype` holding the data. """ - return _cyb_from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) + return __from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14177,10 +14166,10 @@ cdef class ComputeInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v3 obj = ComputeInstanceProfileInfo_v3.__new__(ComputeInstanceProfileInfo_v3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -14218,7 +14207,7 @@ cdef class DeviceAddressingMode_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") self._owner = None @@ -14230,7 +14219,7 @@ cdef class DeviceAddressingMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DeviceAddressingMode_v1 object at {hex(id(self))}>" @@ -14251,20 +14240,20 @@ cdef class DeviceAddressingMode_v1: if not isinstance(other, DeviceAddressingMode_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14296,7 +14285,7 @@ cdef class DeviceAddressingMode_v1: @staticmethod def from_buffer(buffer): """Create an DeviceAddressingMode_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) + return __from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) @staticmethod def from_data(data): @@ -14305,7 +14294,7 @@ cdef class DeviceAddressingMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_addressing_mode_v1_dtype` holding the data. """ - return _cyb_from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) + return __from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14320,10 +14309,10 @@ cdef class DeviceAddressingMode_v1: raise ValueError("ptr must not be null (0)") cdef DeviceAddressingMode_v1 obj = DeviceAddressingMode_v1.__new__(DeviceAddressingMode_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + obj._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) obj._owner = None obj._owned = True else: @@ -14362,7 +14351,7 @@ cdef class RepairStatus_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlRepairStatus_v1_t)) + self._ptr = calloc(1, sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") self._owner = None @@ -14374,7 +14363,7 @@ cdef class RepairStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.RepairStatus_v1 object at {hex(id(self))}>" @@ -14395,20 +14384,20 @@ cdef class RepairStatus_v1: if not isinstance(other, RepairStatus_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) + self._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14451,7 +14440,7 @@ cdef class RepairStatus_v1: @staticmethod def from_buffer(buffer): """Create an RepairStatus_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) + return __from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) @staticmethod def from_data(data): @@ -14460,7 +14449,7 @@ cdef class RepairStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `repair_status_v1_dtype` holding the data. """ - return _cyb_from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) + return __from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14475,10 +14464,10 @@ cdef class RepairStatus_v1: raise ValueError("ptr must not be null (0)") cdef RepairStatus_v1 obj = RepairStatus_v1.__new__(RepairStatus_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) + obj._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -14517,7 +14506,7 @@ cdef class DevicePowerMizerModes_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") self._owner = None @@ -14529,7 +14518,7 @@ cdef class DevicePowerMizerModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DevicePowerMizerModes_v1 object at {hex(id(self))}>" @@ -14550,20 +14539,20 @@ cdef class DevicePowerMizerModes_v1: if not isinstance(other, DevicePowerMizerModes_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14606,7 +14595,7 @@ cdef class DevicePowerMizerModes_v1: @staticmethod def from_buffer(buffer): """Create an DevicePowerMizerModes_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) + return __from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) @staticmethod def from_data(data): @@ -14615,7 +14604,7 @@ cdef class DevicePowerMizerModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_power_mizer_modes_v1_dtype` holding the data. """ - return _cyb_from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) + return __from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14630,10 +14619,10 @@ cdef class DevicePowerMizerModes_v1: raise ValueError("ptr must not be null (0)") cdef DevicePowerMizerModes_v1 obj = DevicePowerMizerModes_v1.__new__(DevicePowerMizerModes_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + obj._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) obj._owner = None obj._owned = True else: @@ -14712,10 +14701,10 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def unit(self): @@ -14848,8 +14837,8 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorEntry_v1 obj = EccSramUniqueUncorrectedErrorEntry_v1.__new__(EccSramUniqueUncorrectedErrorEntry_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorEntry_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=ecc_sram_unique_uncorrected_error_entry_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -14889,7 +14878,7 @@ cdef class GpuFabricInfo_v3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") self._owner = None @@ -14901,7 +14890,7 @@ cdef class GpuFabricInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v3 object at {hex(id(self))}>" @@ -14922,20 +14911,20 @@ cdef class GpuFabricInfo_v3: if not isinstance(other, GpuFabricInfo_v3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14956,7 +14945,7 @@ cdef class GpuFabricInfo_v3: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -14966,9 +14955,9 @@ cdef class GpuFabricInfo_v3: raise ValueError("This GpuFabricInfo_v3 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -15028,7 +15017,7 @@ cdef class GpuFabricInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) + return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) @staticmethod def from_data(data): @@ -15037,7 +15026,7 @@ cdef class GpuFabricInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v3_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) + return __from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15052,10 +15041,10 @@ cdef class GpuFabricInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v3 obj = GpuFabricInfo_v3.__new__(GpuFabricInfo_v3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -15093,7 +15082,7 @@ cdef class NvLinkInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") self._owner = None @@ -15105,7 +15094,7 @@ cdef class NvLinkInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v1 object at {hex(id(self))}>" @@ -15126,20 +15115,20 @@ cdef class NvLinkInfo_v1: if not isinstance(other, NvLinkInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15171,7 +15160,7 @@ cdef class NvLinkInfo_v1: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) + return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) @staticmethod def from_data(data): @@ -15180,7 +15169,7 @@ cdef class NvLinkInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) + return __from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15195,10 +15184,10 @@ cdef class NvLinkInfo_v1: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v1 obj = NvLinkInfo_v1.__new__(NvLinkInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -15238,7 +15227,7 @@ cdef class NvlinkFirmwareVersion: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") self._owner = None @@ -15250,7 +15239,7 @@ cdef class NvlinkFirmwareVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareVersion object at {hex(id(self))}>" @@ -15271,20 +15260,20 @@ cdef class NvlinkFirmwareVersion: if not isinstance(other, NvlinkFirmwareVersion): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15338,7 +15327,7 @@ cdef class NvlinkFirmwareVersion: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareVersion instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) + return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) @staticmethod def from_data(data): @@ -15347,7 +15336,7 @@ cdef class NvlinkFirmwareVersion: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_version_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) + return __from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15362,10 +15351,10 @@ cdef class NvlinkFirmwareVersion: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareVersion obj = NvlinkFirmwareVersion.__new__(NvlinkFirmwareVersion) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) obj._owner = None obj._owned = True else: @@ -15402,7 +15391,7 @@ cdef class PRMCounterInput_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") self._owner = None @@ -15414,7 +15403,7 @@ cdef class PRMCounterInput_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterInput_v1 object at {hex(id(self))}>" @@ -15435,20 +15424,20 @@ cdef class PRMCounterInput_v1: if not isinstance(other, PRMCounterInput_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15469,7 +15458,7 @@ cdef class PRMCounterInput_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterInput_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) + return __from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) @staticmethod def from_data(data): @@ -15478,7 +15467,7 @@ cdef class PRMCounterInput_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_input_v1_dtype` holding the data. """ - return _cyb_from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) + return __from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15493,10 +15482,10 @@ cdef class PRMCounterInput_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterInput_v1 obj = PRMCounterInput_v1.__new__(PRMCounterInput_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) + obj._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) obj._owner = None obj._owned = True else: @@ -15536,7 +15525,7 @@ cdef class VgpuSchedulerStateInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") self._owner = None @@ -15548,7 +15537,7 @@ cdef class VgpuSchedulerStateInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v2 object at {hex(id(self))}>" @@ -15569,20 +15558,20 @@ cdef class VgpuSchedulerStateInfo_v2: if not isinstance(other, VgpuSchedulerStateInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15636,7 +15625,7 @@ cdef class VgpuSchedulerStateInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) @staticmethod def from_data(data): @@ -15645,7 +15634,7 @@ cdef class VgpuSchedulerStateInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) + return __from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15660,10 +15649,10 @@ cdef class VgpuSchedulerStateInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v2 obj = VgpuSchedulerStateInfo_v2.__new__(VgpuSchedulerStateInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -15742,10 +15731,10 @@ cdef class VgpuSchedulerLogEntry_v2: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -15878,8 +15867,8 @@ cdef class VgpuSchedulerLogEntry_v2: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry_v2 obj = VgpuSchedulerLogEntry_v2.__new__(VgpuSchedulerLogEntry_v2) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_v2_dtype) obj._data = data.view(_numpy.recarray) @@ -15916,7 +15905,7 @@ cdef class VgpuSchedulerState_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") self._owner = None @@ -15928,7 +15917,7 @@ cdef class VgpuSchedulerState_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v2 object at {hex(id(self))}>" @@ -15949,20 +15938,20 @@ cdef class VgpuSchedulerState_v2: if not isinstance(other, VgpuSchedulerState_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16016,7 +16005,7 @@ cdef class VgpuSchedulerState_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) @staticmethod def from_data(data): @@ -16025,7 +16014,7 @@ cdef class VgpuSchedulerState_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) + return __from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16040,10 +16029,10 @@ cdef class VgpuSchedulerState_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v2 obj = VgpuSchedulerState_v2.__new__(VgpuSchedulerState_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) obj._owner = None obj._owned = True else: @@ -16081,7 +16070,7 @@ cdef class ExcludedDeviceInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") self._owner = None @@ -16093,7 +16082,7 @@ cdef class ExcludedDeviceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ExcludedDeviceInfo object at {hex(id(self))}>" @@ -16114,20 +16103,20 @@ cdef class ExcludedDeviceInfo: if not isinstance(other, ExcludedDeviceInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16144,12 +16133,12 @@ cdef class ExcludedDeviceInfo: if self._readonly: raise ValueError("This ExcludedDeviceInfo instance is read-only") cdef PciInfo val_ = val - _cyb_memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) + memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) @property def uuid(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].uuid) + return cpython.PyUnicode_FromString(self._ptr[0].uuid) @uuid.setter def uuid(self, val): @@ -16159,12 +16148,12 @@ cdef class ExcludedDeviceInfo: if len(buf) >= 80: raise ValueError("String too long for field uuid, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].uuid), ptr, 80) + memcpy((self._ptr[0].uuid), ptr, 80) @staticmethod def from_buffer(buffer): """Create an ExcludedDeviceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) + return __from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) @staticmethod def from_data(data): @@ -16173,7 +16162,7 @@ cdef class ExcludedDeviceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `excluded_device_info_dtype` holding the data. """ - return _cyb_from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) + return __from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16188,10 +16177,10 @@ cdef class ExcludedDeviceInfo: raise ValueError("ptr must not be null (0)") cdef ExcludedDeviceInfo obj = ExcludedDeviceInfo.__new__(ExcludedDeviceInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) + obj._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) obj._owner = None obj._owned = True else: @@ -16232,7 +16221,7 @@ cdef class ProcessDetailList_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = calloc(1, sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") self._owner = None @@ -16245,7 +16234,7 @@ cdef class ProcessDetailList_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ProcessDetailList_v1 object at {hex(id(self))}>" @@ -16266,20 +16255,20 @@ cdef class ProcessDetailList_v1: if not isinstance(other, ProcessDetailList_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16327,7 +16316,7 @@ cdef class ProcessDetailList_v1: @staticmethod def from_buffer(buffer): """Create an ProcessDetailList_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) + return __from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) @staticmethod def from_data(data): @@ -16336,7 +16325,7 @@ cdef class ProcessDetailList_v1: Args: data (_numpy.ndarray): a single-element array of dtype `process_detail_list_v1_dtype` holding the data. """ - return _cyb_from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) + return __from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16351,10 +16340,10 @@ cdef class ProcessDetailList_v1: raise ValueError("ptr must not be null (0)") cdef ProcessDetailList_v1 obj = ProcessDetailList_v1.__new__(ProcessDetailList_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) + obj._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) obj._owner = None obj._owned = True else: @@ -16393,7 +16382,7 @@ cdef class BridgeChipHierarchy: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") self._owner = None @@ -16405,7 +16394,7 @@ cdef class BridgeChipHierarchy: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.BridgeChipHierarchy object at {hex(id(self))}>" @@ -16426,20 +16415,20 @@ cdef class BridgeChipHierarchy: if not isinstance(other, BridgeChipHierarchy): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16461,12 +16450,12 @@ cdef class BridgeChipHierarchy: self._ptr[0].bridgeCount = len(val) if len(val) == 0: return - _cyb_memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) + memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) @staticmethod def from_buffer(buffer): """Create an BridgeChipHierarchy instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) + return __from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) @staticmethod def from_data(data): @@ -16475,7 +16464,7 @@ cdef class BridgeChipHierarchy: Args: data (_numpy.ndarray): a single-element array of dtype `bridge_chip_hierarchy_dtype` holding the data. """ - return _cyb_from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) + return __from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16490,10 +16479,10 @@ cdef class BridgeChipHierarchy: raise ValueError("ptr must not be null (0)") cdef BridgeChipHierarchy obj = BridgeChipHierarchy.__new__(BridgeChipHierarchy) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) + obj._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) obj._owner = None obj._owned = True else: @@ -16567,10 +16556,10 @@ cdef class Sample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -16646,8 +16635,8 @@ cdef class Sample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Sample obj = Sample.__new__(Sample) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16722,10 +16711,10 @@ cdef class VgpuInstanceUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def vgpu_instance(self): @@ -16839,8 +16828,8 @@ cdef class VgpuInstanceUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationSample obj = VgpuInstanceUtilizationSample.__new__(VgpuInstanceUtilizationSample) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16917,10 +16906,10 @@ cdef class VgpuInstanceUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -17052,8 +17041,8 @@ cdef class VgpuInstanceUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationInfo_v1 obj = VgpuInstanceUtilizationInfo_v1.__new__(VgpuInstanceUtilizationInfo_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -17129,10 +17118,10 @@ cdef class FieldValue: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def field_id(self): @@ -17263,8 +17252,8 @@ cdef class FieldValue: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FieldValue obj = FieldValue.__new__(FieldValue) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFieldValue_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=field_value_dtype) obj._data = data.view(_numpy.recarray) @@ -17300,7 +17289,7 @@ cdef class PRMCounterValue_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") self._owner = None @@ -17312,7 +17301,7 @@ cdef class PRMCounterValue_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterValue_v1 object at {hex(id(self))}>" @@ -17333,20 +17322,20 @@ cdef class PRMCounterValue_v1: if not isinstance(other, PRMCounterValue_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17363,7 +17352,7 @@ cdef class PRMCounterValue_v1: if self._readonly: raise ValueError("This PRMCounterValue_v1 instance is read-only") cdef Value val_ = val - _cyb_memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) + memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) @property def status(self): @@ -17390,7 +17379,7 @@ cdef class PRMCounterValue_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterValue_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) + return __from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) @staticmethod def from_data(data): @@ -17399,7 +17388,7 @@ cdef class PRMCounterValue_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_value_v1_dtype` holding the data. """ - return _cyb_from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) + return __from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17414,10 +17403,10 @@ cdef class PRMCounterValue_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterValue_v1 obj = PRMCounterValue_v1.__new__(PRMCounterValue_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) + obj._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) obj._owner = None obj._owned = True else: @@ -17455,7 +17444,7 @@ cdef class GpuThermalSettings: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuThermalSettings_t)) + self._ptr = calloc(1, sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") self._owner = None @@ -17467,7 +17456,7 @@ cdef class GpuThermalSettings: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuThermalSettings object at {hex(id(self))}>" @@ -17488,20 +17477,20 @@ cdef class GpuThermalSettings: if not isinstance(other, GpuThermalSettings): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) + self._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17520,7 +17509,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)}") - _cyb_memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) + memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) @property def count(self): @@ -17536,7 +17525,7 @@ cdef class GpuThermalSettings: @staticmethod def from_buffer(buffer): """Create an GpuThermalSettings instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) + return __from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) @staticmethod def from_data(data): @@ -17545,7 +17534,7 @@ cdef class GpuThermalSettings: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_thermal_settings_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) + return __from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17560,10 +17549,10 @@ cdef class GpuThermalSettings: raise ValueError("ptr must not be null (0)") cdef GpuThermalSettings obj = GpuThermalSettings.__new__(GpuThermalSettings) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) + obj._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) obj._owner = None obj._owned = True else: @@ -17602,7 +17591,7 @@ cdef class ClkMonStatus: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlClkMonStatus_t)) + self._ptr = calloc(1, sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") self._owner = None @@ -17614,7 +17603,7 @@ cdef class ClkMonStatus: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ClkMonStatus object at {hex(id(self))}>" @@ -17635,20 +17624,20 @@ cdef class ClkMonStatus: if not isinstance(other, ClkMonStatus): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) + self._ptr = malloc(sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17670,7 +17659,7 @@ cdef class ClkMonStatus: self._ptr[0].clkMonListSize = len(val) if len(val) == 0: return - _cyb_memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) + memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) @property def b_global_status(self): @@ -17686,7 +17675,7 @@ cdef class ClkMonStatus: @staticmethod def from_buffer(buffer): """Create an ClkMonStatus instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) + return __from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) @staticmethod def from_data(data): @@ -17695,7 +17684,7 @@ cdef class ClkMonStatus: Args: data (_numpy.ndarray): a single-element array of dtype `clk_mon_status_dtype` holding the data. """ - return _cyb_from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) + return __from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17710,10 +17699,10 @@ cdef class ClkMonStatus: raise ValueError("ptr must not be null (0)") cdef ClkMonStatus obj = ClkMonStatus.__new__(ClkMonStatus) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) + obj._ptr = malloc(sizeof(nvmlClkMonStatus_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) obj._owner = None obj._owned = True else: @@ -17754,7 +17743,7 @@ cdef class ProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") self._owner = None @@ -17767,7 +17756,7 @@ cdef class ProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -17788,20 +17777,20 @@ cdef class ProcessesUtilizationInfo_v1: if not isinstance(other, ProcessesUtilizationInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17849,7 +17838,7 @@ cdef class ProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an ProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) + return __from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -17858,7 +17847,7 @@ cdef class ProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `processes_utilization_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) + return __from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17873,10 +17862,10 @@ cdef class ProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef ProcessesUtilizationInfo_v1 obj = ProcessesUtilizationInfo_v1.__new__(ProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -17915,7 +17904,7 @@ cdef class GpuDynamicPstatesInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") self._owner = None @@ -17927,7 +17916,7 @@ cdef class GpuDynamicPstatesInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuDynamicPstatesInfo object at {hex(id(self))}>" @@ -17948,20 +17937,20 @@ cdef class GpuDynamicPstatesInfo: if not isinstance(other, GpuDynamicPstatesInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17980,7 +17969,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)}") - _cyb_memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) + memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) @property def flags_(self): @@ -17996,7 +17985,7 @@ cdef class GpuDynamicPstatesInfo: @staticmethod def from_buffer(buffer): """Create an GpuDynamicPstatesInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) + return __from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) @staticmethod def from_data(data): @@ -18005,7 +17994,7 @@ cdef class GpuDynamicPstatesInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_dynamic_pstates_info_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) + return __from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18020,10 +18009,10 @@ cdef class GpuDynamicPstatesInfo: raise ValueError("ptr must not be null (0)") cdef GpuDynamicPstatesInfo obj = GpuDynamicPstatesInfo.__new__(GpuDynamicPstatesInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + obj._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) obj._owner = None obj._owned = True else: @@ -18064,7 +18053,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") self._owner = None @@ -18077,7 +18066,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -18098,20 +18087,20 @@ cdef class VgpuProcessesUtilizationInfo_v1: if not isinstance(other, VgpuProcessesUtilizationInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18159,7 +18148,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -18168,7 +18157,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_processes_utilization_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) + return __from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18183,10 +18172,10 @@ cdef class VgpuProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuProcessesUtilizationInfo_v1 obj = VgpuProcessesUtilizationInfo_v1.__new__(VgpuProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -18219,7 +18208,7 @@ cdef class VgpuSchedulerParams: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") self._owner = None @@ -18231,7 +18220,7 @@ cdef class VgpuSchedulerParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerParams object at {hex(id(self))}>" @@ -18252,20 +18241,20 @@ cdef class VgpuSchedulerParams: if not isinstance(other, VgpuSchedulerParams): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18282,7 +18271,7 @@ cdef class VgpuSchedulerParams: if self._readonly: raise ValueError("This VgpuSchedulerParams instance is read-only") cdef _py_anon_pod2 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) + memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) @property def vgpu_sched_data(self): @@ -18294,12 +18283,12 @@ cdef class VgpuSchedulerParams: if self._readonly: raise ValueError("This VgpuSchedulerParams instance is read-only") cdef _py_anon_pod3 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) + memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerParams instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) @staticmethod def from_data(data): @@ -18308,7 +18297,7 @@ cdef class VgpuSchedulerParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_params_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) + return __from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18323,10 +18312,10 @@ cdef class VgpuSchedulerParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerParams obj = VgpuSchedulerParams.__new__(VgpuSchedulerParams) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) obj._owner = None obj._owned = True else: @@ -18358,7 +18347,7 @@ cdef class VgpuSchedulerSetParams: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") self._owner = None @@ -18370,7 +18359,7 @@ cdef class VgpuSchedulerSetParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerSetParams object at {hex(id(self))}>" @@ -18391,20 +18380,20 @@ cdef class VgpuSchedulerSetParams: if not isinstance(other, VgpuSchedulerSetParams): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18421,7 +18410,7 @@ cdef class VgpuSchedulerSetParams: if self._readonly: raise ValueError("This VgpuSchedulerSetParams instance is read-only") cdef _py_anon_pod4 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) + memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) @property def vgpu_sched_data(self): @@ -18433,12 +18422,12 @@ cdef class VgpuSchedulerSetParams: if self._readonly: raise ValueError("This VgpuSchedulerSetParams instance is read-only") cdef _py_anon_pod5 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) + memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerSetParams instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) @staticmethod def from_data(data): @@ -18447,7 +18436,7 @@ cdef class VgpuSchedulerSetParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_set_params_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) + return __from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18462,10 +18451,10 @@ cdef class VgpuSchedulerSetParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerSetParams obj = VgpuSchedulerSetParams.__new__(VgpuSchedulerSetParams) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) obj._owner = None obj._owned = True else: @@ -18504,7 +18493,7 @@ cdef class VgpuLicenseInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") self._owner = None @@ -18516,7 +18505,7 @@ cdef class VgpuLicenseInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseInfo object at {hex(id(self))}>" @@ -18537,20 +18526,20 @@ cdef class VgpuLicenseInfo: if not isinstance(other, VgpuLicenseInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18567,7 +18556,7 @@ cdef class VgpuLicenseInfo: if self._readonly: raise ValueError("This VgpuLicenseInfo instance is read-only") cdef VgpuLicenseExpiry val_ = val - _cyb_memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) + memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) @property def is_licensed(self): @@ -18594,7 +18583,7 @@ cdef class VgpuLicenseInfo: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) + return __from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) @staticmethod def from_data(data): @@ -18603,7 +18592,7 @@ cdef class VgpuLicenseInfo: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_info_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) + return __from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18618,10 +18607,10 @@ cdef class VgpuLicenseInfo: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseInfo obj = VgpuLicenseInfo.__new__(VgpuLicenseInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) + obj._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) obj._owner = None obj._owned = True else: @@ -18699,10 +18688,10 @@ cdef class GridLicensableFeature: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def feature_code(self): @@ -18818,8 +18807,8 @@ cdef class GridLicensableFeature: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeature obj = GridLicensableFeature.__new__(GridLicensableFeature) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGridLicensableFeature_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=grid_licensable_feature_dtype) obj._data = data.view(_numpy.recarray) @@ -18854,7 +18843,7 @@ cdef class UnitFanSpeeds: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = calloc(1, sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") self._owner = None @@ -18866,7 +18855,7 @@ cdef class UnitFanSpeeds: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.UnitFanSpeeds object at {hex(id(self))}>" @@ -18887,20 +18876,20 @@ cdef class UnitFanSpeeds: if not isinstance(other, UnitFanSpeeds): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18919,7 +18908,7 @@ cdef class UnitFanSpeeds: cdef UnitFanInfo val_ = val if len(val) != 24: raise ValueError(f"Expected length { 24 } for field fans, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) + memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) @property def count(self): @@ -18935,7 +18924,7 @@ cdef class UnitFanSpeeds: @staticmethod def from_buffer(buffer): """Create an UnitFanSpeeds instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) + return __from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) @staticmethod def from_data(data): @@ -18944,7 +18933,7 @@ cdef class UnitFanSpeeds: Args: data (_numpy.ndarray): a single-element array of dtype `unit_fan_speeds_dtype` holding the data. """ - return _cyb_from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) + return __from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18959,10 +18948,10 @@ cdef class UnitFanSpeeds: raise ValueError("ptr must not be null (0)") cdef UnitFanSpeeds obj = UnitFanSpeeds.__new__(UnitFanSpeeds) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) + obj._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) obj._owner = None obj._owned = True else: @@ -19006,7 +18995,7 @@ cdef class VgpuPgpuMetadata: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") self._owner = None @@ -19018,7 +19007,7 @@ cdef class VgpuPgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuMetadata object at {hex(id(self))}>" @@ -19039,20 +19028,20 @@ cdef class VgpuPgpuMetadata: if not isinstance(other, VgpuPgpuMetadata): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19069,7 +19058,7 @@ cdef class VgpuPgpuMetadata: if self._readonly: raise ValueError("This VgpuPgpuMetadata instance is read-only") cdef VgpuVersion val_ = val - _cyb_memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) + memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) @property def version(self): @@ -19096,7 +19085,7 @@ cdef class VgpuPgpuMetadata: @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -19106,7 +19095,7 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def pgpu_virtualization_caps(self): @@ -19133,7 +19122,7 @@ cdef class VgpuPgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -19143,12 +19132,12 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) + memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuPgpuMetadata instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) + return __from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) @staticmethod def from_data(data): @@ -19157,7 +19146,7 @@ cdef class VgpuPgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_metadata_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) + return __from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19172,10 +19161,10 @@ cdef class VgpuPgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuMetadata obj = VgpuPgpuMetadata.__new__(VgpuPgpuMetadata) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + obj._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -19215,7 +19204,7 @@ cdef class GpuInstanceInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = calloc(1, sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") self._owner = None @@ -19227,7 +19216,7 @@ cdef class GpuInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceInfo object at {hex(id(self))}>" @@ -19248,20 +19237,20 @@ cdef class GpuInstanceInfo: if not isinstance(other, GpuInstanceInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19278,7 +19267,7 @@ cdef class GpuInstanceInfo: if self._readonly: raise ValueError("This GpuInstanceInfo instance is read-only") cdef GpuInstancePlacement val_ = val - _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) + memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) @property def device_(self): @@ -19316,7 +19305,7 @@ cdef class GpuInstanceInfo: @staticmethod def from_buffer(buffer): """Create an GpuInstanceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) + return __from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) @staticmethod def from_data(data): @@ -19325,7 +19314,7 @@ cdef class GpuInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_info_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) + return __from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19340,10 +19329,10 @@ cdef class GpuInstanceInfo: raise ValueError("ptr must not be null (0)") cdef GpuInstanceInfo obj = GpuInstanceInfo.__new__(GpuInstanceInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) + obj._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19384,7 +19373,7 @@ cdef class ComputeInstanceInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = calloc(1, sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") self._owner = None @@ -19396,7 +19385,7 @@ cdef class ComputeInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceInfo object at {hex(id(self))}>" @@ -19417,20 +19406,20 @@ cdef class ComputeInstanceInfo: if not isinstance(other, ComputeInstanceInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19447,7 +19436,7 @@ cdef class ComputeInstanceInfo: if self._readonly: raise ValueError("This ComputeInstanceInfo instance is read-only") cdef ComputeInstancePlacement val_ = val - _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) + memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) @property def device_(self): @@ -19496,7 +19485,7 @@ cdef class ComputeInstanceInfo: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) + return __from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) @staticmethod def from_data(data): @@ -19505,7 +19494,7 @@ cdef class ComputeInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_info_dtype` holding the data. """ - return _cyb_from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) + return __from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19520,10 +19509,10 @@ cdef class ComputeInstanceInfo: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceInfo obj = ComputeInstanceInfo.__new__(ComputeInstanceInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) + obj._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19563,7 +19552,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") self._owner = None @@ -19576,7 +19565,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.EccSramUniqueUncorrectedErrorCounts_v1 object at {hex(id(self))}>" @@ -19597,20 +19586,20 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if not isinstance(other, EccSramUniqueUncorrectedErrorCounts_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19647,7 +19636,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: @staticmethod def from_buffer(buffer): """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) + return __from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_data(data): @@ -19656,7 +19645,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_unique_uncorrected_error_counts_v1_dtype` holding the data. """ - return _cyb_from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) + return __from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19671,10 +19660,10 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorCounts_v1 obj = EccSramUniqueUncorrectedErrorCounts_v1.__new__(EccSramUniqueUncorrectedErrorCounts_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + obj._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) obj._owner = None obj._owned = True else: @@ -19713,7 +19702,7 @@ cdef class NvlinkFirmwareInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") self._owner = None @@ -19725,7 +19714,7 @@ cdef class NvlinkFirmwareInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareInfo object at {hex(id(self))}>" @@ -19746,20 +19735,20 @@ cdef class NvlinkFirmwareInfo: if not isinstance(other, NvlinkFirmwareInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19778,7 +19767,7 @@ cdef class NvlinkFirmwareInfo: cdef NvlinkFirmwareVersion val_ = val if len(val) != 100: raise ValueError(f"Expected length { 100 } for field firmware_version, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) + memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) @property def num_valid_entries(self): @@ -19794,7 +19783,7 @@ cdef class NvlinkFirmwareInfo: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) + return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) @staticmethod def from_data(data): @@ -19803,7 +19792,7 @@ cdef class NvlinkFirmwareInfo: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_info_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) + return __from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19818,10 +19807,10 @@ cdef class NvlinkFirmwareInfo: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareInfo obj = NvlinkFirmwareInfo.__new__(NvlinkFirmwareInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) obj._owner = None obj._owned = True else: @@ -19863,7 +19852,7 @@ cdef class VgpuSchedulerLogInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") self._owner = None @@ -19875,7 +19864,7 @@ cdef class VgpuSchedulerLogInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v2 object at {hex(id(self))}>" @@ -19896,20 +19885,20 @@ cdef class VgpuSchedulerLogInfo_v2: if not isinstance(other, VgpuSchedulerLogInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19928,7 +19917,7 @@ cdef class VgpuSchedulerLogInfo_v2: cdef VgpuSchedulerLogEntry_v2 val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) + memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) @property def engine_id(self): @@ -19988,7 +19977,7 @@ cdef class VgpuSchedulerLogInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) @staticmethod def from_data(data): @@ -19997,7 +19986,7 @@ cdef class VgpuSchedulerLogInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) + return __from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20012,10 +20001,10 @@ cdef class VgpuSchedulerLogInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v2 obj = VgpuSchedulerLogInfo_v2.__new__(VgpuSchedulerLogInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -20057,7 +20046,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") self._owner = None @@ -20070,7 +20059,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuInstancesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -20091,20 +20080,20 @@ cdef class VgpuInstancesUtilizationInfo_v1: if not isinstance(other, VgpuInstancesUtilizationInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20163,7 +20152,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuInstancesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -20172,7 +20161,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_instances_utilization_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) + return __from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20187,10 +20176,10 @@ cdef class VgpuInstancesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuInstancesUtilizationInfo_v1 obj = VgpuInstancesUtilizationInfo_v1.__new__(VgpuInstancesUtilizationInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20266,10 +20255,10 @@ cdef class PRMCounter_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def counter_id(self): @@ -20354,8 +20343,8 @@ cdef class PRMCounter_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PRMCounter_v1 obj = PRMCounter_v1.__new__(PRMCounter_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlPRMCounter_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=prm_counter_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -20394,7 +20383,7 @@ cdef class VgpuSchedulerLog: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") self._owner = None @@ -20406,7 +20395,7 @@ cdef class VgpuSchedulerLog: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLog object at {hex(id(self))}>" @@ -20427,20 +20416,20 @@ cdef class VgpuSchedulerLog: if not isinstance(other, VgpuSchedulerLog): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20457,7 +20446,7 @@ cdef class VgpuSchedulerLog: if self._readonly: raise ValueError("This VgpuSchedulerLog instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -20471,7 +20460,7 @@ cdef class VgpuSchedulerLog: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def engine_id(self): @@ -20520,7 +20509,7 @@ cdef class VgpuSchedulerLog: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLog instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) @staticmethod def from_data(data): @@ -20529,7 +20518,7 @@ cdef class VgpuSchedulerLog: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) + return __from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20544,10 +20533,10 @@ cdef class VgpuSchedulerLog: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLog obj = VgpuSchedulerLog.__new__(VgpuSchedulerLog) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) obj._owner = None obj._owned = True else: @@ -20586,7 +20575,7 @@ cdef class VgpuSchedulerGetState: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") self._owner = None @@ -20598,7 +20587,7 @@ cdef class VgpuSchedulerGetState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerGetState object at {hex(id(self))}>" @@ -20619,20 +20608,20 @@ cdef class VgpuSchedulerGetState: if not isinstance(other, VgpuSchedulerGetState): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20649,7 +20638,7 @@ cdef class VgpuSchedulerGetState: if self._readonly: raise ValueError("This VgpuSchedulerGetState instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def scheduler_policy(self): @@ -20676,7 +20665,7 @@ cdef class VgpuSchedulerGetState: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerGetState instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) @staticmethod def from_data(data): @@ -20685,7 +20674,7 @@ cdef class VgpuSchedulerGetState: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_get_state_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) + return __from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20700,10 +20689,10 @@ cdef class VgpuSchedulerGetState: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerGetState obj = VgpuSchedulerGetState.__new__(VgpuSchedulerGetState) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) obj._owner = None obj._owned = True else: @@ -20744,7 +20733,7 @@ cdef class VgpuSchedulerStateInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") self._owner = None @@ -20756,7 +20745,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v1 object at {hex(id(self))}>" @@ -20777,20 +20766,20 @@ cdef class VgpuSchedulerStateInfo_v1: if not isinstance(other, VgpuSchedulerStateInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20807,7 +20796,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def version(self): @@ -20856,7 +20845,7 @@ cdef class VgpuSchedulerStateInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) @staticmethod def from_data(data): @@ -20865,7 +20854,7 @@ cdef class VgpuSchedulerStateInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) + return __from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20880,10 +20869,10 @@ cdef class VgpuSchedulerStateInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v1 obj = VgpuSchedulerStateInfo_v1.__new__(VgpuSchedulerStateInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20926,7 +20915,7 @@ cdef class VgpuSchedulerLogInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") self._owner = None @@ -20938,7 +20927,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v1 object at {hex(id(self))}>" @@ -20959,20 +20948,20 @@ cdef class VgpuSchedulerLogInfo_v1: if not isinstance(other, VgpuSchedulerLogInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20989,7 +20978,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -21003,7 +20992,7 @@ cdef class VgpuSchedulerLogInfo_v1: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def version(self): @@ -21063,7 +21052,7 @@ cdef class VgpuSchedulerLogInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) @staticmethod def from_data(data): @@ -21072,7 +21061,7 @@ cdef class VgpuSchedulerLogInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) + return __from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21087,10 +21076,10 @@ cdef class VgpuSchedulerLogInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v1 obj = VgpuSchedulerLogInfo_v1.__new__(VgpuSchedulerLogInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -21131,7 +21120,7 @@ cdef class VgpuSchedulerState_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") self._owner = None @@ -21143,7 +21132,7 @@ cdef class VgpuSchedulerState_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v1 object at {hex(id(self))}>" @@ -21164,20 +21153,20 @@ cdef class VgpuSchedulerState_v1: if not isinstance(other, VgpuSchedulerState_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21194,7 +21183,7 @@ cdef class VgpuSchedulerState_v1: if self._readonly: raise ValueError("This VgpuSchedulerState_v1 instance is read-only") cdef VgpuSchedulerSetParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) @property def version(self): @@ -21243,7 +21232,7 @@ cdef class VgpuSchedulerState_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) @staticmethod def from_data(data): @@ -21252,7 +21241,7 @@ cdef class VgpuSchedulerState_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) + return __from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21267,10 +21256,10 @@ cdef class VgpuSchedulerState_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v1 obj = VgpuSchedulerState_v1.__new__(VgpuSchedulerState_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) obj._owner = None obj._owned = True else: @@ -21309,7 +21298,7 @@ cdef class GridLicensableFeatures: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = calloc(1, sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") self._owner = None @@ -21321,7 +21310,7 @@ cdef class GridLicensableFeatures: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GridLicensableFeatures object at {hex(id(self))}>" @@ -21342,20 +21331,20 @@ cdef class GridLicensableFeatures: if not isinstance(other, GridLicensableFeatures): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21377,7 +21366,7 @@ cdef class GridLicensableFeatures: self._ptr[0].licensableFeaturesCount = len(val) if len(val) == 0: return - _cyb_memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) + memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) @property def is_grid_license_supported(self): @@ -21393,7 +21382,7 @@ cdef class GridLicensableFeatures: @staticmethod def from_buffer(buffer): """Create an GridLicensableFeatures instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) + return __from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) @staticmethod def from_data(data): @@ -21402,7 +21391,7 @@ cdef class GridLicensableFeatures: Args: data (_numpy.ndarray): a single-element array of dtype `grid_licensable_features_dtype` holding the data. """ - return _cyb_from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) + return __from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21417,10 +21406,10 @@ cdef class GridLicensableFeatures: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeatures obj = GridLicensableFeatures.__new__(GridLicensableFeatures) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) + obj._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) obj._owner = None obj._owned = True else: @@ -21459,7 +21448,7 @@ cdef class NvLinkInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") self._owner = None @@ -21471,7 +21460,7 @@ cdef class NvLinkInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v2 object at {hex(id(self))}>" @@ -21492,20 +21481,20 @@ cdef class NvLinkInfo_v2: if not isinstance(other, NvLinkInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21522,7 +21511,7 @@ cdef class NvLinkInfo_v2: if self._readonly: raise ValueError("This NvLinkInfo_v2 instance is read-only") cdef NvlinkFirmwareInfo val_ = val - _cyb_memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) + memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) @property def version(self): @@ -21549,7 +21538,7 @@ cdef class NvLinkInfo_v2: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) + return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) @staticmethod def from_data(data): @@ -21558,7 +21547,7 @@ cdef class NvLinkInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) + return __from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21573,10 +21562,10 @@ cdef class NvLinkInfo_v2: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v2 obj = NvLinkInfo_v2.__new__(NvLinkInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -21646,7 +21635,7 @@ cpdef str system_get_driver_version(): with nogil: __status__ = nvmlSystemGetDriverVersion(version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef str system_get_nvml_version(): @@ -21662,7 +21651,7 @@ cpdef str system_get_nvml_version(): with nogil: __status__ = nvmlSystemGetNVMLVersion(version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef int system_get_cuda_driver_version() except *: @@ -21711,7 +21700,7 @@ cpdef str system_get_process_name(unsigned int pid): with nogil: __status__ = nvmlSystemGetProcessName(pid, name, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(name) + return cpython.PyUnicode_FromString(name) cpdef object system_get_hic_version(): @@ -21998,7 +21987,7 @@ cpdef str device_get_name(intptr_t device): with nogil: __status__ = nvmlDeviceGetName(device, name, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(name) + return cpython.PyUnicode_FromString(name) cpdef int device_get_brand(intptr_t device) except? -1: @@ -22053,7 +22042,7 @@ cpdef str device_get_serial(intptr_t device): with nogil: __status__ = nvmlDeviceGetSerial(device, serial, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(serial) + return cpython.PyUnicode_FromString(serial) cpdef unsigned int device_get_module_id(intptr_t device) except? 0: @@ -22107,8 +22096,8 @@ cpdef object device_get_memory_affinity(intptr_t device, unsigned int node_set_s .. seealso:: `nvmlDeviceGetMemoryAffinity` """ if node_set_size == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef _cyb_view.array node_set = _cyb_view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef view.array node_set = view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *node_set_ptr = (node_set.data) with nogil: __status__ = nvmlDeviceGetMemoryAffinity(device, node_set_size, node_set_ptr, scope) @@ -22130,8 +22119,8 @@ cpdef object device_get_cpu_affinity_within_scope(intptr_t device, unsigned int .. seealso:: `nvmlDeviceGetCpuAffinityWithinScope` """ if cpu_set_size == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinityWithinScope(device, cpu_set_size, cpu_set_ptr, scope) @@ -22152,8 +22141,8 @@ cpdef object device_get_cpu_affinity(intptr_t device, unsigned int cpu_set_size) .. seealso:: `nvmlDeviceGetCpuAffinity` """ if cpu_set_size == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinity(device, cpu_set_size, cpu_set_ptr) @@ -22260,7 +22249,7 @@ cpdef str device_get_uuid(intptr_t device): with nogil: __status__ = nvmlDeviceGetUUID(device, uuid, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(uuid) + return cpython.PyUnicode_FromString(uuid) cpdef unsigned int device_get_minor_number(intptr_t device) except? 0: @@ -22297,7 +22286,7 @@ cpdef str device_get_board_part_number(intptr_t device): with nogil: __status__ = nvmlDeviceGetBoardPartNumber(device, part_number, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(part_number) + return cpython.PyUnicode_FromString(part_number) cpdef str device_get_inforom_version(intptr_t device, int object): @@ -22317,7 +22306,7 @@ cpdef str device_get_inforom_version(intptr_t device, int object): with nogil: __status__ = nvmlDeviceGetInforomVersion(device, <_InforomObject>object, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef str device_get_inforom_image_version(intptr_t device): @@ -22336,7 +22325,7 @@ cpdef str device_get_inforom_image_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetInforomImageVersion(device, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef unsigned int device_get_inforom_configuration_checksum(intptr_t device) except? 0: @@ -22723,8 +22712,8 @@ cpdef object device_get_supported_memory_clocks(intptr_t device): __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, clocks_m_hz_ptr) @@ -22749,8 +22738,8 @@ cpdef object device_get_supported_graphics_clocks(intptr_t device, unsigned int __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, clocks_m_hz_ptr) @@ -23713,7 +23702,7 @@ cpdef str device_get_vbios_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetVbiosVersion(device, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef object device_get_bridge_chip_info(intptr_t device): @@ -24273,8 +24262,8 @@ cpdef object device_get_accounting_pids(intptr_t device): __status__ = nvmlDeviceGetAccountingPids(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlDeviceGetAccountingPids(device, count, pids_ptr) @@ -24317,8 +24306,8 @@ cpdef object device_get_retired_pages(intptr_t device, int cause): __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, NULL) check_status_size(__status__) if page_count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] - cdef _cyb_view.array addresses = _cyb_view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] + cdef view.array addresses = view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") cdef unsigned long long *addresses_ptr = (addresses.data) with nogil: __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, addresses_ptr) @@ -25256,7 +25245,7 @@ cpdef str vgpu_type_get_class(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetClass(vgpu_type_id, vgpu_type_class, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(vgpu_type_class) + return cpython.PyUnicode_FromString(vgpu_type_class) cpdef unsigned int vgpu_type_get_gpu_instance_profile_id(unsigned int vgpu_type_id) except? 0: @@ -25374,7 +25363,7 @@ cpdef str vgpu_type_get_license(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetLicense(vgpu_type_id, vgpu_type_license_string, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(vgpu_type_license_string) + return cpython.PyUnicode_FromString(vgpu_type_license_string) cpdef unsigned int vgpu_type_get_frame_rate_limit(unsigned int vgpu_type_id) except? 0: @@ -25468,7 +25457,7 @@ cpdef str vgpu_instance_get_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetUUID(vgpu_instance, uuid, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(uuid) + return cpython.PyUnicode_FromString(uuid) cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): @@ -25487,7 +25476,7 @@ cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetVmDriverVersion(vgpu_instance, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef unsigned long long vgpu_instance_get_fb_usage(unsigned int vgpu_instance) except? 0: @@ -25745,7 +25734,7 @@ cpdef str vgpu_instance_get_gpu_pci_id(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetGpuPciId(vgpu_instance, vgpu_pci_id, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(vgpu_pci_id) + return cpython.PyUnicode_FromString(vgpu_pci_id) cpdef unsigned int vgpu_type_get_capabilities(unsigned int vgpu_type_id, int capability) except? 0: @@ -25783,7 +25772,7 @@ cpdef str vgpu_instance_get_mdev_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetMdevUUID(vgpu_instance, mdev_uuid, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(mdev_uuid) + return cpython.PyUnicode_FromString(mdev_uuid) cpdef gpu_instance_set_vgpu_scheduler_state(intptr_t gpu_instance, intptr_t p_scheduler): @@ -25863,7 +25852,7 @@ cpdef str device_get_pgpu_metadata_string(intptr_t device): with nogil: __status__ = nvmlDeviceGetPgpuMetadataString(device, pgpu_metadata, buffer_size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(pgpu_metadata) + return cpython.PyUnicode_FromString(pgpu_metadata) cpdef object device_get_vgpu_scheduler_log(intptr_t device): @@ -26007,8 +25996,8 @@ cpdef object vgpu_instance_get_accounting_pids(unsigned int vgpu_instance): __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, pids_ptr) @@ -28463,4 +28452,3 @@ cpdef str vgpu_type_get_name(unsigned int vgpu_type_id): device_get_virtualization_mode.__doc__ = device_get_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") device_set_virtualization_mode.__doc__ = device_set_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") GpmMetricId.GPM_METRIC_DRAM_BW_UTIL.__doc__ = "Percentage of DRAM bw used vs theoretical maximum. ``0.0 - 100.0 *\u200d/``." -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index f0f4d92f015..b269bb5366f 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -2,26 +2,21 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum - -# <<<< END OF PREAMBLE CONTENT >>>> - +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. cimport cython # NOQA from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, nested_resource) +from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum + ############################################################################### # Enum ############################################################################### -class Result(_cyb_FastEnum): +class Result(_IntEnum): """ NVVM API call result code. @@ -326,4 +321,3 @@ cpdef int llvm_version(arch) except? 0: __status__ = nvvmLLVMVersion(_arch_, &major) check_status(__status__) return major -del _cyb_FastEnum From b8f6a853c8f34cdacbfa426867cc64278818c279 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 5 Jul 2026 21:38:52 -0700 Subject: [PATCH 07/22] run_cybind_cython_gen 13.3.0 ../cuda-python --- .../cuda/bindings/_bindings/cyruntime.pxd.in | 3 ++- .../cuda/bindings/_bindings/cyruntime.pyx.in | 3 ++- .../bindings/_bindings/cyruntime_ptds.pxd.in | 3 ++- .../bindings/_bindings/cyruntime_ptds.pyx.in | 3 ++- .../cuda/bindings/_internal/_fast_enum.py | 3 ++- .../cuda/bindings/_internal/driver.pxd | 3 ++- .../cuda/bindings/_internal/driver_linux.pyx | 3 ++- .../bindings/_internal/driver_windows.pyx | 3 ++- .../cuda/bindings/_internal/nvrtc.pxd | 3 ++- .../cuda/bindings/_internal/nvrtc_linux.pyx | 3 ++- .../cuda/bindings/_internal/nvrtc_windows.pyx | 3 ++- cuda_bindings/cuda/bindings/cydriver.pxd | 10 +++++---- cuda_bindings/cuda/bindings/cydriver.pyx | 3 ++- cuda_bindings/cuda/bindings/cynvrtc.pxd | 3 ++- cuda_bindings/cuda/bindings/cynvrtc.pyx | 3 ++- cuda_bindings/cuda/bindings/cyruntime.pxd.in | 3 ++- cuda_bindings/cuda/bindings/cyruntime.pyx.in | 3 ++- .../cuda/bindings/cyruntime_functions.pxi.in | 3 ++- .../cuda/bindings/cyruntime_types.pxi.in | 3 ++- cuda_bindings/cuda/bindings/driver.pxd | 11 ++-------- cuda_bindings/cuda/bindings/driver.pyx | 22 +++++-------------- cuda_bindings/cuda/bindings/nvrtc.pxd | 3 ++- cuda_bindings/cuda/bindings/nvrtc.pyx | 3 ++- cuda_bindings/cuda/bindings/runtime.pxd.in | 3 ++- cuda_bindings/cuda/bindings/runtime.pyx.in | 3 ++- cuda_bindings/docs/source/module/driver.rst | 1 + cuda_bindings/docs/source/module/nvrtc.rst | 1 + cuda_bindings/docs/source/module/runtime.rst | 1 + 28 files changed, 60 insertions(+), 52 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in index f3e7ad72c3f..8772569c527 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b3a2262d55c56664e63fdbbdc873271231576691f0299f60f751ad16ada2b4bb -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. include "../cyruntime_types.pxi" include "../_lib/cyruntime/cyruntime.pxd" diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in index 565e158cf45..c44b3e58df8 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8ee7c6118c4caa1ce9a74a7f64ae4b650f1c3c3d4862bc8e3ec3c2a8a5b8301a -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. include "../cyruntime_functions.pxi" import os diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in index f44b806d829..009dd0dc517 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3d0cc46c1986151a738226de05cb687a17f22d889db8f7d25f9963f201b01dbd -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in index ceb7e0ac3c4..8fac3ee93c2 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2e3d73f811ab98842ef20fcd09865e4fcde4b54d46400d52bd0e933334809537 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py index c69c822588c..0e86b4e826d 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=64c1e209e2bdea7f3c6c19698ebc1879b3b852178892b01f0ff2ef3009bdf590 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. """ diff --git a/cuda_bindings/cuda/bindings/_internal/driver.pxd b/cuda_bindings/cuda/bindings/_internal/driver.pxd index dd221d2598d..65efb586609 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver.pxd +++ b/cuda_bindings/cuda/bindings/_internal/driver.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9e39aaca65ec3229429f4e6a0ecabdb183f9602b4d0072df39e2161fbfc16293 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ..cydriver cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx index 26d88842946..00134df761d 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f33bed7eb99f02796f63126b9cfbabb23258dbb856b5b6aa25af73d373f8f658 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx index e199aa78ffb..23550677c8c 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=08b9ad7032b4f20684748193e496b6a6adc46cc1a5d2933680a4c40816bcdf8f # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd index 95a8f5c560e..b2ae4c7c409 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=90b341b6ec7a9907edac552831aa4504e5a5bb40401ed524c67b8a6600ebf6f1 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ..cynvrtc cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx index c5b283f1ebb..f7d2a435b64 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=072ab825e78a81dbe61990003592e0e16d8aa44db854c9991f48fe900c8b21f9 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx index 13cfbed4725..8e311ff2fbe 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5415c47174286e4db1eed7437a7c31309640320f36455af48db85b80956738a4 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd b/cuda_bindings/cuda/bindings/cydriver.pxd index 29819407112..d2b56694558 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd +++ b/cuda_bindings/cuda/bindings/cydriver.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5dc400b98d4696fcedfd11c4b05021de9b150edb836be62bd07034a8811524e0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t @@ -586,9 +587,6 @@ cdef extern from 'cuda.h': CU_TARGET_COMPUTE_103F CU_TARGET_COMPUTE_120F CU_TARGET_COMPUTE_121F - CU_TARGET_COMPUTE_101 - CU_TARGET_COMPUTE_101A - CU_TARGET_COMPUTE_101F ctypedef CUjit_target_enum CUjit_target cdef extern from 'cuda.h': @@ -3647,6 +3645,8 @@ cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +cdef enum: CU_GRAPH_NODE_TYPE_RESERVED_16 = 16 + cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 @@ -3715,6 +3715,8 @@ cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +cdef enum: CU_MEM_CREATE_USAGE_GPU_DIRECT_RDMA_OVER_PCIE = 4 + cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx b/cuda_bindings/cuda/bindings/cydriver.pyx index b558e3afd7f..f12ab5ec8a4 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx +++ b/cuda_bindings/cuda/bindings/cydriver.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0d0f36d0d763f489ddf26f5552c6836230ecca38c8ee794c57c4e9742dab67e9 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ._internal cimport driver as _driver diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pxd b/cuda_bindings/cuda/bindings/cynvrtc.pxd index f3066f12130..75559460f73 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pxd +++ b/cuda_bindings/cuda/bindings/cynvrtc.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=cd48fc1a3c6b8a5c6e0ca842b8ab5562bc325465e58be4e52a886285b79167e1 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pyx b/cuda_bindings/cuda/bindings/cynvrtc.pyx index 936e4eff18a..dc4069c097e 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pyx +++ b/cuda_bindings/cuda/bindings/cynvrtc.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fb1b6808a82eb184282bf20605f297efa5791e112fb06ff9e2113abd2635b0ff # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ._internal cimport nvrtc as _nvrtc diff --git a/cuda_bindings/cuda/bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/cyruntime.pxd.in index b714d32bb00..0392006d164 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pxd.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=763764121989e408a4d2d417375585034af004071d2c9220fb18ce2bcec6dfd5 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/cyruntime.pyx.in index 9b8324f1139..67163f7842c 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=94a1b86e911326af73d60ae7523541fdad5a14d3225a725ce16886ced39a91e5 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. cimport cuda.bindings._bindings.cyruntime as cyruntime cimport cython diff --git a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in index 81e54abed07..4d8a7ae64a6 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0a6a7c0de914a4d5f430df440e2c693bd168b5d9bb6eb3956b4d8b6683a69918 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. cdef extern from "cuda_runtime_api.h": {{if 'cudaDeviceReset' in found_functions}} diff --git a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in index d6ae085f5d4..7427060031b 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5e54bef72329c0f63347d9bb279f0c4767bbc52599e07d8adb9fcfe7b5904737 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. cdef extern from "vector_types.h": diff --git a/cuda_bindings/cuda/bindings/driver.pxd b/cuda_bindings/cuda/bindings/driver.pxd index e22a9007115..fb956fdc841 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd +++ b/cuda_bindings/cuda/bindings/driver.pxd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=cabdddc3010a0ec786a37c7059edfd295a5a669d31fb489bf61fa95a211a402f -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. cimport cuda.bindings.cydriver as cydriver include "_lib/utils.pxd" @@ -4989,10 +4990,6 @@ cdef class CUcheckpointRestoreArgs_st: Reserved for future use, must be zeroed - reserved : list[cuuint64_t] - Reserved for future use, must be zeroed - - Methods ------- getPtr() @@ -10590,10 +10587,6 @@ cdef class CUcheckpointRestoreArgs(CUcheckpointRestoreArgs_st): Reserved for future use, must be zeroed - reserved : list[cuuint64_t] - Reserved for future use, must be zeroed - - Methods ------- getPtr() diff --git a/cuda_bindings/cuda/bindings/driver.pyx b/cuda_bindings/cuda/bindings/driver.pyx index e427814ac55..d0055c9b43e 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx +++ b/cuda_bindings/cuda/bindings/driver.pyx @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=12523adba160813127c6cb1d9177baaa18b39bf066bb8836a03a97564848a296 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from typing import Any, Optional import cython import ctypes @@ -23948,10 +23949,6 @@ cdef class CUcheckpointRestoreArgs_st: Reserved for future use, must be zeroed - reserved : list[cuuint64_t] - Reserved for future use, must be zeroed - - Methods ------- getPtr() @@ -24032,11 +24029,11 @@ cdef class CUcheckpointRestoreArgs_st: @property def reserved(self): - return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, {{struct_field_array_lengths['CUcheckpointRestoreArgs_st.reserved']}}) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 52) @reserved.setter def reserved(self, reserved): - if len(reserved) != {{struct_field_array_lengths['CUcheckpointRestoreArgs_st.reserved']}}: - raise ValueError("reserved length must be {{struct_field_array_lengths['CUcheckpointRestoreArgs_st.reserved']}}, is " + str(len(reserved))) + if len(reserved) != 52: + raise ValueError("reserved length must be 52, is " + str(len(reserved))) if CHAR_MIN == 0: for i, b in enumerate(reserved): if b < 0 and b > -129: @@ -24049,15 +24046,6 @@ cdef class CUcheckpointRestoreArgs_st: self._pvt_ptr[0].reserved[i] = b - @property - def reserved(self): - return [cuuint64_t(init_value=_reserved) for _reserved in self._pvt_ptr[0].reserved] - @reserved.setter - def reserved(self, reserved): - self._pvt_ptr[0].reserved = reserved - - - cdef class CUcheckpointUnlockArgs_st: """ CUDA checkpoint optional unlock arguments diff --git a/cuda_bindings/cuda/bindings/nvrtc.pxd b/cuda_bindings/cuda/bindings/nvrtc.pxd index c2e410d1aa2..2c64b14ad78 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/nvrtc.pxd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2dcb374cf17cae1c6109b7c0b3d1f717c73f5bbb7e94cd505771ca60d7305d7b -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. cimport cuda.bindings.cynvrtc as cynvrtc include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx b/cuda_bindings/cuda/bindings/nvrtc.pyx index 94808e0deda..c7e50b8199e 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=556154b46e2590ec7ca850e9c74a8a0af62026f9a639b813914ca77c4da18246 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/runtime.pxd.in b/cuda_bindings/cuda/bindings/runtime.pxd.in index 5d9a9fe9fea..03f487cb34d 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd.in +++ b/cuda_bindings/cuda/bindings/runtime.pxd.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fc155abf4daab6600e2fccea3a1cc68b5f0c0d3877a1f90a7bab4f6b57b9996b -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. cimport cuda.bindings.cyruntime as cyruntime include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index 8654e52fea4..1b19caed026 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d8ac44d495167b1d7cd8fd18e62291b171482a2656bad9b4230e7231dd8d853d -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/docs/source/module/driver.rst b/cuda_bindings/docs/source/module/driver.rst index 4f3df8fbf38..edd1fd212b9 100644 --- a/cuda_bindings/docs/source/module/driver.rst +++ b/cuda_bindings/docs/source/module/driver.rst @@ -1,5 +1,6 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 +.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=15f77ea651a2deffa7f7ae710189546cff9c23ba311b693207743eaf339a0a9c ------ driver diff --git a/cuda_bindings/docs/source/module/nvrtc.rst b/cuda_bindings/docs/source/module/nvrtc.rst index 0432493d47f..963551fce26 100644 --- a/cuda_bindings/docs/source/module/nvrtc.rst +++ b/cuda_bindings/docs/source/module/nvrtc.rst @@ -1,5 +1,6 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 +.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9f44170e12fd85fa04fcd599a18d0b6474ec7920be8f28a5c097000eb3ccb0e0 ----- nvrtc diff --git a/cuda_bindings/docs/source/module/runtime.rst b/cuda_bindings/docs/source/module/runtime.rst index 3e86a79e267..fb1c0bb9015 100644 --- a/cuda_bindings/docs/source/module/runtime.rst +++ b/cuda_bindings/docs/source/module/runtime.rst @@ -1,5 +1,6 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 +.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0eccd5db44f7406acb693f5dd95ad2fa17c787c11659578cf54e116eb0b06e01 ------- runtime From 0338189c4bbbcc53e122e3a110910902b15d3f4a Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 5 Jul 2026 21:40:49 -0700 Subject: [PATCH 08/22] run_cybind_native 13.3.0 ../cuda-python --- .../cuda/bindings/_internal/cudla.pxd | 3 +- .../cuda/bindings/_internal/cudla_linux.pyx | 3 +- .../cuda/bindings/_internal/cufile.pxd | 3 +- .../cuda/bindings/_internal/cufile_linux.pyx | 3 +- .../cuda/bindings/_internal/nvfatbin.pxd | 3 +- .../bindings/_internal/nvfatbin_linux.pyx | 3 +- .../bindings/_internal/nvfatbin_windows.pyx | 3 +- .../cuda/bindings/_internal/nvjitlink.pxd | 3 +- .../bindings/_internal/nvjitlink_linux.pyx | 3 +- .../bindings/_internal/nvjitlink_windows.pyx | 3 +- .../cuda/bindings/_internal/nvml.pxd | 3 +- .../cuda/bindings/_internal/nvml_linux.pyx | 3 +- .../cuda/bindings/_internal/nvml_windows.pyx | 3 +- .../cuda/bindings/_internal/nvvm.pxd | 3 +- .../cuda/bindings/_internal/nvvm_linux.pyx | 3 +- .../cuda/bindings/_internal/nvvm_windows.pyx | 3 +- cuda_bindings/cuda/bindings/cudla.pxd | 3 +- cuda_bindings/cuda/bindings/cudla.pyx | 333 +- cuda_bindings/cuda/bindings/cufile.pxd | 4 +- cuda_bindings/cuda/bindings/cufile.pyx | 527 ++- cuda_bindings/cuda/bindings/cycudla.pxd | 3 +- cuda_bindings/cuda/bindings/cycudla.pyx | 3 +- cuda_bindings/cuda/bindings/cycufile.pxd | 25 +- cuda_bindings/cuda/bindings/cycufile.pyx | 3 +- cuda_bindings/cuda/bindings/cynvfatbin.pxd | 3 +- cuda_bindings/cuda/bindings/cynvfatbin.pyx | 3 +- cuda_bindings/cuda/bindings/cynvjitlink.pxd | 3 +- cuda_bindings/cuda/bindings/cynvjitlink.pyx | 3 +- cuda_bindings/cuda/bindings/cynvml.pxd | 368 +- cuda_bindings/cuda/bindings/cynvml.pyx | 3 +- cuda_bindings/cuda/bindings/cynvvm.pxd | 3 +- cuda_bindings/cuda/bindings/cynvvm.pyx | 3 +- cuda_bindings/cuda/bindings/nvfatbin.pxd | 3 +- cuda_bindings/cuda/bindings/nvfatbin.pyx | 14 +- cuda_bindings/cuda/bindings/nvjitlink.pxd | 3 +- cuda_bindings/cuda/bindings/nvjitlink.pyx | 16 +- cuda_bindings/cuda/bindings/nvml.pxd | 36 +- cuda_bindings/cuda/bindings/nvml.pyx | 3186 +++++++++-------- cuda_bindings/cuda/bindings/nvvm.pxd | 3 +- cuda_bindings/cuda/bindings/nvvm.pyx | 15 +- 40 files changed, 2745 insertions(+), 1869 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_internal/cudla.pxd b/cuda_bindings/cuda/bindings/_internal/cudla.pxd index 00bf3adc074..d190d99d5c8 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cudla.pxd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f3212e34d88cc1609b3591895240db7535db0e72b1b831484f3adfb84267c5ee -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ..cycudla cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx index 229681244ad..966dcb10450 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b5839e4430988ab39a4801a78157ca92b1a19762a84eaddbcc119ebf221404ce -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/cufile.pxd b/cuda_bindings/cuda/bindings/_internal/cufile.pxd index 7d0ace32466..fc8d567f09b 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cufile.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8ec753d4ca195381b47f65f499c71dfa8303bd237629acc38892084925a085b3 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 7d92fc8ec46..48b674c6cf6 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4f44e77dc91cbadeb20311ef6af8fa51206cf0995c4d5c13c8ff115eb60b6c55 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd index 958e06e18af..edbb9c3defa 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=afaced5906c73026774e7cd3de8a623e1618db376b162cbb078de34b8eafe176 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ..cynvfatbin cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx index 99a50ff9e82..54287d1a325 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d937bfae6078e5fffffab19d3fa1d76fc7e2e9d79729e89a724dd812b7f0c35c # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx index 0a20389e291..e132cace0c5 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8e31f878e7fb2e594d5a30ae19969cd260947b456c9efc1173fd4c10836e4b22 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd index a6488994777..217e17ae92a 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4348359af43e92708e5103fd54a007741dfc00b0069bacaaca8ea3efe1541e64 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 0a399b244c7..97c1851bffb 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=649adcb704527598d678cc3e05d7552dc72c90f3891f96509a7cf0147b222985 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 ba6f1c8d2df..5d0793e1a2b 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ed08995551e262e3ff0d918762c5dcbd989f9659decbba2cb1446555efa80460 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 84a90694c0c..797088a8624 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvml.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2fae6a910dd39a9368a1a1b4b3f91a332ea17da118e66bf0ec379f6b348961d0 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 c61a2d7e22f..84b92fcc121 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4aad961fd49a71119afe66c91bd16c32be2c774ae85a6efb11fe7a89390d8966 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 7697b60af9d..ca57af03723 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fd4f527b2128d54476d15a11200cd3f9fef718f89a1ca4d3bc89cf7d3679acde # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 f265943dda4..ea477dbc7d2 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ce69df610fcc5a59167bd1e25b56f1ca2a11fd8e6f051c5406b60c69d81d963b # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ..cynvvm cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx index f82a058cfb7..a4ead22d3af 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=23d1297da51171de90660f1868669fa1c70b332b0c3b5ecacd59537f864e1cae # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx index 27d31f96257..83ec4679885 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3d5f2fe63d5a684bfbcaba4400d19d0d4195f07798af36a886bbf7df620c27fd # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cudla.pxd b/cuda_bindings/cuda/bindings/cudla.pxd index 6126d868893..df0688e3ccf 100644 --- a/cuda_bindings/cuda/bindings/cudla.pxd +++ b/cuda_bindings/cuda/bindings/cudla.pxd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6926a47842405dc3cc107d5ebed45297790b1edbd6c30017655e1796c5502bc3 -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index f1b0938f108..a6a84168fcd 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -1,25 +1,51 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 - -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. - -cimport cython # NOQA -from libc.stdint cimport intptr_t, uintptr_t - -from ._internal.utils cimport get_buffer_pointer - -from enum import IntEnum as _IntEnum - -from libc.stdlib cimport calloc, free, malloc -from cython cimport view -cimport cpython.buffer -cimport cpython.memoryview -cimport cpython -from libc.string cimport memcmp, memcpy +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=40f5ad9bcc83d4739f48b902a84307f3af06c90c32d53528d4c2d4087743caf9 + +# <<<< PREAMBLE CONTENT >>>> + +cimport cpython as _cyb_cpython +cimport cpython.buffer as _cyb_cpython_buffer +from cython cimport view as _cyb_view +from libc.stdlib cimport ( + calloc as _cyb_calloc, + free as _cyb_free, + malloc as _cyb_malloc, +) +from libc.string cimport ( + memcmp as _cyb_memcmp, + memcpy as _cyb_memcpy, +) +from enum import IntEnum as _cyb_IntEnum import numpy as _numpy +cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL + +cdef _cyb_from_buffer(buffer, size, lowpp_type): + cdef _cyb_cpython.Py_buffer view + if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + _cyb_cpython.PyBuffer_Release(&view) -cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): +cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -31,34 +57,16 @@ cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) +# <<<< END OF PREAMBLE CONTENT >>>> -cdef __from_buffer(buffer, size, lowpp_type): - cdef Py_buffer view - if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - cpython.PyBuffer_Release(&view) +# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. -cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +cimport cython # NOQA +from libc.stdint cimport intptr_t, uintptr_t +from libc.stdlib cimport malloc, free +from ._internal.utils cimport get_buffer_pointer @@ -94,7 +102,7 @@ cdef class ExternalMemoryHandleDesc: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = _cyb_calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") self._owner = None @@ -106,7 +114,7 @@ cdef class ExternalMemoryHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ExternalMemoryHandleDesc object at {hex(id(self))}>" @@ -127,20 +135,20 @@ cdef class ExternalMemoryHandleDesc: if not isinstance(other, ExternalMemoryHandleDesc): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -172,7 +180,7 @@ cdef class ExternalMemoryHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalMemoryHandleDesc instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) + return _cyb_from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) @staticmethod def from_data(data): @@ -181,7 +189,7 @@ cdef class ExternalMemoryHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_memory_handle_desc_dtype` holding the data. """ - return __from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) + return _cyb_from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -196,10 +204,10 @@ cdef class ExternalMemoryHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalMemoryHandleDesc obj = ExternalMemoryHandleDesc.__new__(ExternalMemoryHandleDesc) if owner is None: - obj._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + obj._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -236,7 +244,7 @@ cdef class ExternalSemaphoreHandleDesc: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = _cyb_calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") self._owner = None @@ -248,7 +256,7 @@ cdef class ExternalSemaphoreHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ExternalSemaphoreHandleDesc object at {hex(id(self))}>" @@ -269,20 +277,20 @@ cdef class ExternalSemaphoreHandleDesc: if not isinstance(other, ExternalSemaphoreHandleDesc): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -303,7 +311,7 @@ cdef class ExternalSemaphoreHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalSemaphoreHandleDesc instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) + return _cyb_from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) @staticmethod def from_data(data): @@ -312,7 +320,7 @@ cdef class ExternalSemaphoreHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_semaphore_handle_desc_dtype` holding the data. """ - return __from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) + return _cyb_from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -327,10 +335,10 @@ cdef class ExternalSemaphoreHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalSemaphoreHandleDesc obj = ExternalSemaphoreHandleDesc.__new__(ExternalSemaphoreHandleDesc) if owner is None: - obj._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + obj._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -378,7 +386,7 @@ cdef class ModuleTensorDescriptor: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaModuleTensorDescriptor)) + self._ptr = _cyb_calloc(1, sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") self._owner = None @@ -390,7 +398,7 @@ cdef class ModuleTensorDescriptor: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ModuleTensorDescriptor object at {hex(id(self))}>" @@ -411,20 +419,20 @@ cdef class ModuleTensorDescriptor: if not isinstance(other, ModuleTensorDescriptor): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) + self._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -434,7 +442,7 @@ cdef class ModuleTensorDescriptor: @property def name(self): """~_numpy.int8: (array of length 81).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -444,7 +452,7 @@ cdef class ModuleTensorDescriptor: if len(buf) >= 81: raise ValueError("String too long for field name, max length is 80") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 81) + _cyb_memcpy((self._ptr[0].name), ptr, 81) @property def size_(self): @@ -559,7 +567,7 @@ cdef class ModuleTensorDescriptor: @property def stride(self): """~_numpy.uint32: (array of length 8).""" - cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].stride)) return _numpy.asarray(arr) @@ -569,14 +577,14 @@ cdef class ModuleTensorDescriptor: raise ValueError("This ModuleTensorDescriptor instance is read-only") if len(val) != 8: raise ValueError(f"Expected length { 8 } for field stride, got {len(val)}") - cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) + _cyb_memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an ModuleTensorDescriptor instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) + return _cyb_from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) @staticmethod def from_data(data): @@ -585,7 +593,7 @@ cdef class ModuleTensorDescriptor: Args: data (_numpy.ndarray): a single-element array of dtype `module_tensor_descriptor_dtype` holding the data. """ - return __from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) + return _cyb_from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -600,10 +608,10 @@ cdef class ModuleTensorDescriptor: raise ValueError("ptr must not be null (0)") cdef ModuleTensorDescriptor obj = ModuleTensorDescriptor.__new__(ModuleTensorDescriptor) if owner is None: - obj._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) + obj._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) obj._owner = None obj._owned = True else: @@ -641,7 +649,7 @@ cdef class Fence: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CudlaFence)) + self._ptr = _cyb_calloc(1, sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") self._owner = None @@ -653,7 +661,7 @@ cdef class Fence: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Fence object at {hex(id(self))}>" @@ -674,20 +682,20 @@ cdef class Fence: if not isinstance(other, Fence): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CudlaFence)) + self._ptr = _cyb_malloc(sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") - memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -719,7 +727,7 @@ cdef class Fence: @staticmethod def from_buffer(buffer): """Create an Fence instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CudlaFence), Fence) + return _cyb_from_buffer(buffer, sizeof(CudlaFence), Fence) @staticmethod def from_data(data): @@ -728,7 +736,7 @@ cdef class Fence: Args: data (_numpy.ndarray): a single-element array of dtype `fence_dtype` holding the data. """ - return __from_data(data, "fence_dtype", fence_dtype, Fence) + return _cyb_from_data(data, "fence_dtype", fence_dtype, Fence) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -743,10 +751,10 @@ cdef class Fence: raise ValueError("ptr must not be null (0)") cdef Fence obj = Fence.__new__(Fence) if owner is None: - obj._ptr = malloc(sizeof(CudlaFence)) + obj._ptr = _cyb_malloc(sizeof(CudlaFence)) if obj._ptr == NULL: raise MemoryError("Error allocating Fence") - memcpy((obj._ptr), ptr, sizeof(CudlaFence)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CudlaFence)) obj._owner = None obj._owned = True else: @@ -778,7 +786,7 @@ cdef class DevAttribute: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaDevAttribute)) + self._ptr = _cyb_calloc(1, sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") self._owner = None @@ -790,7 +798,7 @@ cdef class DevAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DevAttribute object at {hex(id(self))}>" @@ -811,20 +819,20 @@ cdef class DevAttribute: if not isinstance(other, DevAttribute): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaDevAttribute)) + self._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -856,7 +864,7 @@ cdef class DevAttribute: @staticmethod def from_buffer(buffer): """Create an DevAttribute instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) + return _cyb_from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) @staticmethod def from_data(data): @@ -865,7 +873,7 @@ cdef class DevAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `dev_attribute_dtype` holding the data. """ - return __from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) + return _cyb_from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -880,10 +888,10 @@ cdef class DevAttribute: raise ValueError("ptr must not be null (0)") cdef DevAttribute obj = DevAttribute.__new__(DevAttribute) if owner is None: - obj._ptr = malloc(sizeof(cudlaDevAttribute)) + obj._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) obj._owner = None obj._owned = True else: @@ -917,7 +925,7 @@ cdef class ModuleAttribute: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaModuleAttribute)) + self._ptr = _cyb_calloc(1, sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") self._owner = None @@ -929,7 +937,7 @@ cdef class ModuleAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ModuleAttribute object at {hex(id(self))}>" @@ -950,20 +958,20 @@ cdef class ModuleAttribute: if not isinstance(other, ModuleAttribute): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaModuleAttribute)) + self._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1017,7 +1025,7 @@ cdef class ModuleAttribute: @staticmethod def from_buffer(buffer): """Create an ModuleAttribute instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) + return _cyb_from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) @staticmethod def from_data(data): @@ -1026,7 +1034,7 @@ cdef class ModuleAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `module_attribute_dtype` holding the data. """ - return __from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) + return _cyb_from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1041,10 +1049,10 @@ cdef class ModuleAttribute: raise ValueError("ptr must not be null (0)") cdef ModuleAttribute obj = ModuleAttribute.__new__(ModuleAttribute) if owner is None: - obj._ptr = malloc(sizeof(cudlaModuleAttribute)) + obj._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) obj._owner = None obj._owned = True else: @@ -1083,7 +1091,7 @@ cdef class WaitEvents: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(cudlaWaitEvents)) + self._ptr = _cyb_calloc(1, sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") self._owner = None @@ -1096,7 +1104,7 @@ cdef class WaitEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.WaitEvents object at {hex(id(self))}>" @@ -1117,20 +1125,20 @@ cdef class WaitEvents: if not isinstance(other, WaitEvents): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaWaitEvents)) + self._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1156,7 +1164,7 @@ cdef class WaitEvents: @staticmethod def from_buffer(buffer): """Create an WaitEvents instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) + return _cyb_from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) @staticmethod def from_data(data): @@ -1165,7 +1173,7 @@ cdef class WaitEvents: Args: data (_numpy.ndarray): a single-element array of dtype `wait_events_dtype` holding the data. """ - return __from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) + return _cyb_from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1180,10 +1188,10 @@ cdef class WaitEvents: raise ValueError("ptr must not be null (0)") cdef WaitEvents obj = WaitEvents.__new__(WaitEvents) if owner is None: - obj._ptr = malloc(sizeof(cudlaWaitEvents)) + obj._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) obj._owner = None obj._owned = True else: @@ -1224,7 +1232,7 @@ cdef class SignalEvents: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(cudlaSignalEvents)) + self._ptr = _cyb_calloc(1, sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") self._owner = None @@ -1237,7 +1245,7 @@ cdef class SignalEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.SignalEvents object at {hex(id(self))}>" @@ -1258,20 +1266,20 @@ cdef class SignalEvents: if not isinstance(other, SignalEvents): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaSignalEvents)) + self._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1282,8 +1290,8 @@ cdef class SignalEvents: def dev_ptrs(self): """int: """ if self._ptr[0].devPtrs == NULL or self._ptr[0].numEvents == 0: - return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef view.array arr = view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].devPtrs) return arr @@ -1295,7 +1303,7 @@ cdef class SignalEvents: self._ptr[0].numEvents = _n if _n == 0: return - cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1322,7 +1330,7 @@ cdef class SignalEvents: @staticmethod def from_buffer(buffer): """Create an SignalEvents instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) + return _cyb_from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) @staticmethod def from_data(data): @@ -1331,7 +1339,7 @@ cdef class SignalEvents: Args: data (_numpy.ndarray): a single-element array of dtype `signal_events_dtype` holding the data. """ - return __from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) + return _cyb_from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1346,10 +1354,10 @@ cdef class SignalEvents: raise ValueError("ptr must not be null (0)") cdef SignalEvents obj = SignalEvents.__new__(SignalEvents) if owner is None: - obj._ptr = malloc(sizeof(cudlaSignalEvents)) + obj._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) obj._owner = None obj._owned = True else: @@ -1394,7 +1402,7 @@ cdef class Task: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(cudlaTask)) + self._ptr = _cyb_calloc(1, sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") self._owner = None @@ -1407,7 +1415,7 @@ cdef class Task: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Task object at {hex(id(self))}>" @@ -1428,20 +1436,20 @@ cdef class Task: if not isinstance(other, Task): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaTask)) + self._ptr = _cyb_malloc(sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1463,8 +1471,8 @@ cdef class Task: def output_tensor(self): """int: """ if self._ptr[0].outputTensor == NULL or self._ptr[0].numOutputTensors == 0: - return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef view.array arr = view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].outputTensor) return arr @@ -1476,7 +1484,7 @@ cdef class Task: self._ptr[0].numOutputTensors = _n if _n == 0: return - cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1488,8 +1496,8 @@ cdef class Task: def input_tensor(self): """int: """ if self._ptr[0].inputTensor == NULL or self._ptr[0].numInputTensors == 0: - return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef view.array arr = view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].inputTensor) return arr @@ -1501,7 +1509,7 @@ cdef class Task: self._ptr[0].numInputTensors = _n if _n == 0: return - cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1534,7 +1542,7 @@ cdef class Task: @staticmethod def from_buffer(buffer): """Create an Task instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaTask), Task) + return _cyb_from_buffer(buffer, sizeof(cudlaTask), Task) @staticmethod def from_data(data): @@ -1543,7 +1551,7 @@ cdef class Task: Args: data (_numpy.ndarray): a single-element array of dtype `task_dtype` holding the data. """ - return __from_data(data, "task_dtype", task_dtype, Task) + return _cyb_from_data(data, "task_dtype", task_dtype, Task) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1558,10 +1566,10 @@ cdef class Task: raise ValueError("ptr must not be null (0)") cdef Task obj = Task.__new__(Task) if owner is None: - obj._ptr = malloc(sizeof(cudlaTask)) + obj._ptr = _cyb_malloc(sizeof(cudlaTask)) if obj._ptr == NULL: raise MemoryError("Error allocating Task") - memcpy((obj._ptr), ptr, sizeof(cudlaTask)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaTask)) obj._owner = None obj._owned = True else: @@ -1577,7 +1585,7 @@ cdef class Task: # Enum ############################################################################### -class Status(_IntEnum): +class Status(_cyb_IntEnum): """ See `cudlaStatus`. """ @@ -1606,14 +1614,14 @@ class Status(_IntEnum): ErrorDlaErrDataMismatch = cudlaErrorDlaErrDataMismatch ErrorUnknown = cudlaErrorUnknown -class Mode(_IntEnum): +class Mode(_cyb_IntEnum): """ See `cudlaMode`. """ CUDA_DLA = CUDLA_CUDA_DLA STANDALONE = CUDLA_STANDALONE -class ModuleAttributeType(_IntEnum): +class ModuleAttributeType(_cyb_IntEnum): """ See `cudlaModuleAttributeType`. """ @@ -1624,21 +1632,21 @@ class ModuleAttributeType(_IntEnum): NUM_OUTPUT_TASK_STATISTICS = CUDLA_NUM_OUTPUT_TASK_STATISTICS OUTPUT_TASK_STATISTICS_DESCRIPTORS = CUDLA_OUTPUT_TASK_STATISTICS_DESCRIPTORS -class FenceType(_IntEnum): +class FenceType(_cyb_IntEnum): """ See `cudlaFenceType`. """ NVSCISYNC_FENCE = CUDLA_NVSCISYNC_FENCE NVSCISYNC_FENCE_SOF = CUDLA_NVSCISYNC_FENCE_SOF -class ModuleLoadFlags(_IntEnum): +class ModuleLoadFlags(_cyb_IntEnum): """ See `cudlaModuleLoadFlags`. """ MODULE_DEFAULT = CUDLA_MODULE_DEFAULT MODULE_ENABLE_FAULT_DIAGNOSTICS = CUDLA_MODULE_ENABLE_FAULT_DIAGNOSTICS -class SubmissionFlags(_IntEnum): +class SubmissionFlags(_cyb_IntEnum): """ See `cudlaSubmissionFlags`. """ @@ -1646,7 +1654,7 @@ class SubmissionFlags(_IntEnum): SUBMIT_SKIP_LOCK_ACQUIRE = CUDLA_SUBMIT_SKIP_LOCK_ACQUIRE SUBMIT_DIAGNOSTICS_TASK = CUDLA_SUBMIT_DIAGNOSTICS_TASK -class AccessPermissionFlags(_IntEnum): +class AccessPermissionFlags(_cyb_IntEnum): """ See `cudlaAccessPermissionFlags`. """ @@ -1654,7 +1662,7 @@ class AccessPermissionFlags(_IntEnum): READ_ONLY_PERM = CUDLA_READ_ONLY_PERM TASK_STATISTICS = CUDLA_TASK_STATISTICS -class DevAttributeType(_IntEnum): +class DevAttributeType(_cyb_IntEnum): """ See `cudlaDevAttributeType`. """ @@ -1826,3 +1834,4 @@ cpdef module_get_attributes(intptr_t h_module, int attr_type) except *: free(desc_buf) else: raise ValueError(f"Unknown attribute type: {attr_type}") +del _cyb_IntEnum diff --git a/cuda_bindings/cuda/bindings/cufile.pxd b/cuda_bindings/cuda/bindings/cufile.pxd index 1803837a4ce..8b0adcd9df2 100644 --- a/cuda_bindings/cuda/bindings/cufile.pxd +++ b/cuda_bindings/cuda/bindings/cufile.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=16358579761023a22e6e7e3d8cf9ce9977dbd34fd15c9c86609ac2b34022da9c # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1568+g289771de9.d20260413. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t @@ -18,6 +19,7 @@ ctypedef CUfileBatchHandle_t BatchHandle ctypedef CUfileError_t Error ctypedef cufileRDMAInfo_t RDMAInfo ctypedef CUfileFSOps_t FSOps +ctypedef CUfileIOVec_t IOVec ctypedef CUfileDrvProps_t DrvProps diff --git a/cuda_bindings/cuda/bindings/cufile.pyx b/cuda_bindings/cuda/bindings/cufile.pyx index 2798a65cb3f..150aad269c0 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -1,29 +1,55 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=416e6a31ac5ac1ba2e219ffa1c8455e145c762f295e4183bfa25db6359704846 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. - -cimport cython # NOQA -from libc cimport errno -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum - -import cython - -from cuda.bindings.driver import CUresult as pyCUresult - -from libc.stdlib cimport calloc, free, malloc -from cython cimport view -cimport cpython.buffer -cimport cpython.memoryview -cimport cpython -from libc.string cimport memcmp, memcpy +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +cimport cpython as _cyb_cpython +cimport cpython.buffer as _cyb_cpython_buffer +cimport cpython.memoryview as _cyb_cpython_memoryview +from cython cimport view as _cyb_view +from libc.stdlib cimport ( + calloc as _cyb_calloc, + free as _cyb_free, + malloc as _cyb_malloc, +) +from libc.string cimport ( + memcmp as _cyb_memcmp, + memcpy as _cyb_memcpy, +) +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum import numpy as _numpy +cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL + +cdef _cyb_from_buffer(buffer, size, lowpp_type): + cdef _cyb_cpython.Py_buffer view + if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + _cyb_cpython.PyBuffer_Release(&view) -cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): +cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -35,34 +61,17 @@ cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) +# <<<< END OF PREAMBLE CONTENT >>>> -cdef __from_buffer(buffer, size, lowpp_type): - cdef Py_buffer view - if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - cpython.PyBuffer_Release(&view) +cimport cython # NOQA +from libc cimport errno +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) -cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +import cython +from cuda.bindings.driver import CUresult as pyCUresult ############################################################################### # POD @@ -89,7 +98,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof((NULL).handle)) + self._ptr = _cyb_calloc(1, sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") self._owner = None @@ -101,7 +110,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -122,20 +131,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof((NULL).handle)) + self._ptr = _cyb_malloc(sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -167,7 +176,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((NULL).handle), _py_anon_pod1) + return _cyb_from_buffer(buffer, sizeof((NULL).handle), _py_anon_pod1) @staticmethod def from_data(data): @@ -176,7 +185,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -191,10 +200,10 @@ 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 = malloc(sizeof((NULL).handle)) + obj._ptr = _cyb_malloc(sizeof((NULL).handle)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy((obj._ptr), ptr, sizeof((NULL).handle)) + _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).handle)) obj._owner = None obj._owned = True else: @@ -234,7 +243,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof((NULL).u.batch)) + self._ptr = _cyb_calloc(1, sizeof((NULL).u.batch)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") self._owner = None @@ -246,7 +255,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -267,20 +276,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof((NULL).u.batch)) + self._ptr = _cyb_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)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u.batch)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -334,7 +343,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((NULL).u.batch), _py_anon_pod3) + return _cyb_from_buffer(buffer, sizeof((NULL).u.batch), _py_anon_pod3) @staticmethod def from_data(data): @@ -343,7 +352,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -358,10 +367,10 @@ 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 = malloc(sizeof((NULL).u.batch)) + obj._ptr = _cyb_malloc(sizeof((NULL).u.batch)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) + _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) obj._owner = None obj._owned = True else: @@ -436,10 +445,10 @@ cdef class IOEvents: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def cookie(self): @@ -528,8 +537,8 @@ cdef class IOEvents: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOEvents obj = IOEvents.__new__(IOEvents) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOEvents_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_events_dtype) obj._data = data.view(_numpy.recarray) @@ -564,7 +573,7 @@ cdef class OpCounter: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileOpCounter_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") self._owner = None @@ -576,7 +585,7 @@ cdef class OpCounter: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.OpCounter object at {hex(id(self))}>" @@ -597,20 +606,20 @@ cdef class OpCounter: if not isinstance(other, OpCounter): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileOpCounter_t)) + self._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -642,7 +651,7 @@ cdef class OpCounter: @staticmethod def from_buffer(buffer): """Create an OpCounter instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) + return _cyb_from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) @staticmethod def from_data(data): @@ -651,7 +660,7 @@ cdef class OpCounter: Args: data (_numpy.ndarray): a single-element array of dtype `op_counter_dtype` holding the data. """ - return __from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) + return _cyb_from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -666,10 +675,10 @@ cdef class OpCounter: raise ValueError("ptr must not be null (0)") cdef OpCounter obj = OpCounter.__new__(OpCounter) if owner is None: - obj._ptr = malloc(sizeof(CUfileOpCounter_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) if obj._ptr == NULL: raise MemoryError("Error allocating OpCounter") - memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) obj._owner = None obj._owned = True else: @@ -771,10 +780,10 @@ cdef class PerGpuStats: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def uuid(self): @@ -1158,8 +1167,8 @@ cdef class PerGpuStats: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PerGpuStats obj = PerGpuStats.__new__(PerGpuStats) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfilePerGpuStats_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=per_gpu_stats_dtype) obj._data = data.view(_numpy.recarray) @@ -1231,10 +1240,10 @@ cdef class Descr: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def type(self): @@ -1321,8 +1330,8 @@ cdef class Descr: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Descr obj = Descr.__new__(Descr) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileDescr_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=descr_dtype) obj._data = data.view(_numpy.recarray) @@ -1350,7 +1359,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof((NULL).u)) + self._ptr = _cyb_calloc(1, sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") self._owner = None @@ -1362,7 +1371,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -1383,20 +1392,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof((NULL).u)) + self._ptr = _cyb_malloc(sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1413,12 +1422,12 @@ 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(cuda_bindings_cufile__anon_pod3) * 1) + _cyb_memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(cuda_bindings_cufile__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an _py_anon_pod2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) + return _cyb_from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) @staticmethod def from_data(data): @@ -1427,7 +1436,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1442,10 +1451,10 @@ 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 = malloc(sizeof((NULL).u)) + obj._ptr = _cyb_malloc(sizeof((NULL).u)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy((obj._ptr), ptr, sizeof((NULL).u)) + _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u)) obj._owner = None obj._owned = True else: @@ -1459,8 +1468,8 @@ cdef class _py_anon_pod2: cdef _get_stats_level1_dtype_offsets(): cdef CUfileStatsLevel1_t pod return _numpy.dtype({ - 'names': ['read_ops', 'write_ops', 'hdl_register_ops', 'hdl_deregister_ops', 'buf_register_ops', 'buf_deregister_ops', 'read_bytes', 'write_bytes', 'read_bw_bytes_per_sec', 'write_bw_bytes_per_sec', 'read_lat_avg_us', 'write_lat_avg_us', 'read_ops_per_sec', 'write_ops_per_sec', 'read_lat_sum_us', 'write_lat_sum_us', 'batch_submit_ops', 'batch_complete_ops', 'batch_setup_ops', 'batch_cancel_ops', 'batch_destroy_ops', 'batch_enqueued_ops', 'batch_posix_enqueued_ops', 'batch_processed_ops', 'batch_posix_processed_ops', 'batch_nvfs_submit_ops', 'batch_p2p_submit_ops', 'batch_aio_submit_ops', 'batch_iouring_submit_ops', 'batch_mixed_io_submit_ops', 'batch_total_submit_ops', 'batch_read_bytes', 'batch_write_bytes', 'batch_read_bw_bytes', 'batch_write_bw_bytes', 'batch_submit_lat_avg_us', 'batch_completion_lat_avg_us', 'batch_submit_ops_per_sec', 'batch_complete_ops_per_sec', 'batch_submit_lat_sum_us', 'batch_completion_lat_sum_us', 'last_batch_read_bytes', 'last_batch_write_bytes'], - 'formats': [op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64], + 'names': ['read_ops', 'write_ops', 'hdl_register_ops', 'hdl_deregister_ops', 'buf_register_ops', 'buf_deregister_ops', 'read_bytes', 'write_bytes', 'read_bw_bytes_per_sec', 'write_bw_bytes_per_sec', 'read_lat_avg_us', 'write_lat_avg_us', 'read_ops_per_sec', 'write_ops_per_sec', 'read_lat_sum_us', 'write_lat_sum_us', 'batch_submit_ops', 'batch_complete_ops', 'batch_setup_ops', 'batch_cancel_ops', 'batch_destroy_ops', 'batch_enqueued_ops', 'batch_posix_enqueued_ops', 'batch_processed_ops', 'batch_posix_processed_ops', 'batch_nvfs_submit_ops', 'batch_p2p_submit_ops', 'batch_aio_submit_ops', 'batch_iouring_submit_ops', 'batch_mixed_io_submit_ops', 'batch_total_submit_ops', 'batch_read_bytes', 'batch_write_bytes', 'batch_read_bw_bytes', 'batch_write_bw_bytes', 'batch_submit_lat_avg_us', 'batch_completion_lat_avg_us', 'batch_submit_ops_per_sec', 'batch_complete_ops_per_sec', 'batch_submit_lat_sum_us', 'batch_completion_lat_sum_us', 'last_batch_read_bytes', 'last_batch_write_bytes', 'readv_ops', 'writev_ops', 'readv_bytes', 'writev_bytes', 'readv_bw_bytes_per_sec', 'writev_bw_bytes_per_sec', 'readv_lat_avg_us', 'writev_lat_avg_us', 'readv_ops_per_sec', 'writev_ops_per_sec', 'readv_lat_sum_us', 'writev_lat_sum_us'], + 'formats': [op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64], 'offsets': [ (&(pod.read_ops)) - (&pod), (&(pod.write_ops)) - (&pod), @@ -1505,6 +1514,18 @@ cdef _get_stats_level1_dtype_offsets(): (&(pod.batch_completion_lat_sum_us)) - (&pod), (&(pod.last_batch_read_bytes)) - (&pod), (&(pod.last_batch_write_bytes)) - (&pod), + (&(pod.readv_ops)) - (&pod), + (&(pod.writev_ops)) - (&pod), + (&(pod.readv_bytes)) - (&pod), + (&(pod.writev_bytes)) - (&pod), + (&(pod.readv_bw_bytes_per_sec)) - (&pod), + (&(pod.writev_bw_bytes_per_sec)) - (&pod), + (&(pod.readv_lat_avg_us)) - (&pod), + (&(pod.writev_lat_avg_us)) - (&pod), + (&(pod.readv_ops_per_sec)) - (&pod), + (&(pod.writev_ops_per_sec)) - (&pod), + (&(pod.readv_lat_sum_us)) - (&pod), + (&(pod.writev_lat_sum_us)) - (&pod), ], 'itemsize': sizeof(CUfileStatsLevel1_t), }) @@ -1524,7 +1545,7 @@ cdef class StatsLevel1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileStatsLevel1_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") self._owner = None @@ -1536,7 +1557,7 @@ cdef class StatsLevel1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel1 object at {hex(id(self))}>" @@ -1557,20 +1578,20 @@ cdef class StatsLevel1: if not isinstance(other, StatsLevel1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileStatsLevel1_t)) + self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1587,7 +1608,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def write_ops(self): @@ -1599,7 +1620,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_register_ops(self): @@ -1611,7 +1632,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_deregister_ops(self): @@ -1623,7 +1644,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_register_ops(self): @@ -1635,7 +1656,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_deregister_ops(self): @@ -1647,7 +1668,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_submit_ops(self): @@ -1659,7 +1680,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_complete_ops(self): @@ -1671,7 +1692,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_setup_ops(self): @@ -1683,7 +1704,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_cancel_ops(self): @@ -1695,7 +1716,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_destroy_ops(self): @@ -1707,7 +1728,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_enqueued_ops(self): @@ -1719,7 +1740,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_enqueued_ops(self): @@ -1731,7 +1752,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_processed_ops(self): @@ -1743,7 +1764,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_processed_ops(self): @@ -1755,7 +1776,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_nvfs_submit_ops(self): @@ -1767,7 +1788,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_p2p_submit_ops(self): @@ -1779,7 +1800,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_aio_submit_ops(self): @@ -1791,7 +1812,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_iouring_submit_ops(self): @@ -1803,7 +1824,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_mixed_io_submit_ops(self): @@ -1815,7 +1836,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_total_submit_ops(self): @@ -1827,7 +1848,31 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + + @property + def readv_ops(self): + """OpCounter: """ + return OpCounter.from_ptr(&(self._ptr[0].readv_ops), self._readonly, self) + + @readv_ops.setter + def readv_ops(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + cdef OpCounter val_ = val + _cyb_memcpy(&(self._ptr[0].readv_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + + @property + def writev_ops(self): + """OpCounter: """ + return OpCounter.from_ptr(&(self._ptr[0].writev_ops), self._readonly, self) + + @writev_ops.setter + def writev_ops(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + cdef OpCounter val_ = val + _cyb_memcpy(&(self._ptr[0].writev_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def read_bytes(self): @@ -2071,10 +2116,120 @@ cdef class StatsLevel1: raise ValueError("This StatsLevel1 instance is read-only") self._ptr[0].last_batch_write_bytes = val + @property + def readv_bytes(self): + """int: """ + return self._ptr[0].readv_bytes + + @readv_bytes.setter + def readv_bytes(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].readv_bytes = val + + @property + def writev_bytes(self): + """int: """ + return self._ptr[0].writev_bytes + + @writev_bytes.setter + def writev_bytes(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].writev_bytes = val + + @property + def readv_bw_bytes_per_sec(self): + """int: """ + return self._ptr[0].readv_bw_bytes_per_sec + + @readv_bw_bytes_per_sec.setter + def readv_bw_bytes_per_sec(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].readv_bw_bytes_per_sec = val + + @property + def writev_bw_bytes_per_sec(self): + """int: """ + return self._ptr[0].writev_bw_bytes_per_sec + + @writev_bw_bytes_per_sec.setter + def writev_bw_bytes_per_sec(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].writev_bw_bytes_per_sec = val + + @property + def readv_lat_avg_us(self): + """int: """ + return self._ptr[0].readv_lat_avg_us + + @readv_lat_avg_us.setter + def readv_lat_avg_us(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].readv_lat_avg_us = val + + @property + def writev_lat_avg_us(self): + """int: """ + return self._ptr[0].writev_lat_avg_us + + @writev_lat_avg_us.setter + def writev_lat_avg_us(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].writev_lat_avg_us = val + + @property + def readv_ops_per_sec(self): + """int: """ + return self._ptr[0].readv_ops_per_sec + + @readv_ops_per_sec.setter + def readv_ops_per_sec(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].readv_ops_per_sec = val + + @property + def writev_ops_per_sec(self): + """int: """ + return self._ptr[0].writev_ops_per_sec + + @writev_ops_per_sec.setter + def writev_ops_per_sec(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].writev_ops_per_sec = val + + @property + def readv_lat_sum_us(self): + """int: """ + return self._ptr[0].readv_lat_sum_us + + @readv_lat_sum_us.setter + def readv_lat_sum_us(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].readv_lat_sum_us = val + + @property + def writev_lat_sum_us(self): + """int: """ + return self._ptr[0].writev_lat_sum_us + + @writev_lat_sum_us.setter + def writev_lat_sum_us(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].writev_lat_sum_us = val + @staticmethod def from_buffer(buffer): """Create an StatsLevel1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) + return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) @staticmethod def from_data(data): @@ -2083,7 +2238,7 @@ cdef class StatsLevel1: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level1_dtype` holding the data. """ - return __from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) + return _cyb_from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2098,10 +2253,10 @@ cdef class StatsLevel1: raise ValueError("ptr must not be null (0)") cdef StatsLevel1 obj = StatsLevel1.__new__(StatsLevel1) if owner is None: - obj._ptr = malloc(sizeof(CUfileStatsLevel1_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) obj._owner = None obj._owned = True else: @@ -2178,10 +2333,10 @@ cdef class IOParams: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def mode(self): @@ -2290,8 +2445,8 @@ cdef class IOParams: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOParams obj = IOParams.__new__(IOParams) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOParams_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_params_dtype) obj._data = data.view(_numpy.recarray) @@ -2327,7 +2482,7 @@ cdef class StatsLevel2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileStatsLevel2_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") self._owner = None @@ -2339,7 +2494,7 @@ cdef class StatsLevel2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel2 object at {hex(id(self))}>" @@ -2360,20 +2515,20 @@ cdef class StatsLevel2: if not isinstance(other, StatsLevel2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileStatsLevel2_t)) + self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2390,12 +2545,12 @@ cdef class StatsLevel2: if self._readonly: raise ValueError("This StatsLevel2 instance is read-only") cdef StatsLevel1 val_ = val - memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) + _cyb_memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) @property def read_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].read_size_kb_hist)) return _numpy.asarray(arr) @@ -2405,14 +2560,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field read_size_kb_hist, got {len(val)}") - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + _cyb_memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @property def write_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].write_size_kb_hist)) return _numpy.asarray(arr) @@ -2422,14 +2577,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field write_size_kb_hist, got {len(val)}") - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + _cyb_memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an StatsLevel2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) + return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) @staticmethod def from_data(data): @@ -2438,7 +2593,7 @@ cdef class StatsLevel2: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level2_dtype` holding the data. """ - return __from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) + return _cyb_from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2453,10 +2608,10 @@ cdef class StatsLevel2: raise ValueError("ptr must not be null (0)") cdef StatsLevel2 obj = StatsLevel2.__new__(StatsLevel2) if owner is None: - obj._ptr = malloc(sizeof(CUfileStatsLevel2_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) obj._owner = None obj._owned = True else: @@ -2495,7 +2650,7 @@ cdef class StatsLevel3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileStatsLevel3_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") self._owner = None @@ -2507,7 +2662,7 @@ cdef class StatsLevel3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel3 object at {hex(id(self))}>" @@ -2528,20 +2683,20 @@ cdef class StatsLevel3: if not isinstance(other, StatsLevel3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileStatsLevel3_t)) + self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2558,7 +2713,7 @@ cdef class StatsLevel3: if self._readonly: raise ValueError("This StatsLevel3 instance is read-only") cdef StatsLevel2 val_ = val - memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) + _cyb_memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) @property def per_gpu_stats(self): @@ -2572,7 +2727,7 @@ cdef class StatsLevel3: cdef PerGpuStats val_ = val if len(val) != 16: raise ValueError(f"Expected length { 16 } for field per_gpu_stats, got {len(val)}") - memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) + _cyb_memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) @property def num_gpus(self): @@ -2588,7 +2743,7 @@ cdef class StatsLevel3: @staticmethod def from_buffer(buffer): """Create an StatsLevel3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) + return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) @staticmethod def from_data(data): @@ -2597,7 +2752,7 @@ cdef class StatsLevel3: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level3_dtype` holding the data. """ - return __from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) + return _cyb_from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2612,10 +2767,10 @@ cdef class StatsLevel3: raise ValueError("ptr must not be null (0)") cdef StatsLevel3 obj = StatsLevel3.__new__(StatsLevel3) if owner is None: - obj._ptr = malloc(sizeof(CUfileStatsLevel3_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) obj._owner = None obj._owned = True else: @@ -2630,7 +2785,7 @@ cdef class StatsLevel3: # Enum ############################################################################### -class OpError(_FastEnum): +class OpError(_cyb_FastEnum): """ See `CUfileOpError`. """ @@ -2684,7 +2839,7 @@ class OpError(_FastEnum): BATCH_NOCOMPAT_ERROR = CU_FILE_BATCH_NOCOMPAT_ERROR IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR -class DriverStatusFlags(_FastEnum): +class DriverStatusFlags(_cyb_FastEnum): """ See `CUfileDriverStatusFlags_t`. """ @@ -2703,16 +2858,16 @@ class DriverStatusFlags(_FastEnum): VIRTIOFS_SUPPORTED = (CU_FILE_VIRTIOFS_SUPPORTED, 'Support for VirtioFS') MAX_TARGET_TYPES = (CU_FILE_MAX_TARGET_TYPES, 'Maximum FS supported') -class DriverControlFlags(_FastEnum): +class DriverControlFlags(_cyb_FastEnum): """ See `CUfileDriverControlFlags_t`. """ USE_POLL_MODE = (CU_FILE_USE_POLL_MODE, 'use POLL mode. properties.use_poll_mode') ALLOW_COMPAT_MODE = (CU_FILE_ALLOW_COMPAT_MODE, 'allow COMPATIBILITY mode. properties.allow_compat_mode') - POSIX_IO_MODE = (CU_FILE_POSIX_IO_MODE, 'Vanilla posix io mode. properties.posix_io_mode') + VANILLA_POSIX_IO_MODE = (CU_FILE_VANILLA_POSIX_IO_MODE, 'Vanilla posix io mode. properties.vanilla_posix_io_mode') FALLBACK_IO_MODE = (CU_FILE_FALLBACK_IO_MODE, 'Fallback io mode. properties.gds_fallback_io') -class FeatureFlags(_FastEnum): +class FeatureFlags(_cyb_FastEnum): """ See `CUfileFeatureFlags_t`. """ @@ -2722,7 +2877,7 @@ class FeatureFlags(_FastEnum): PARALLEL_IO_SUPPORTED = (CU_FILE_PARALLEL_IO_SUPPORTED, 'Supported') P2P_SUPPORTED = (CU_FILE_P2P_SUPPORTED, 'Support for PCI P2PDMA') -class FileHandleType(_FastEnum): +class FileHandleType(_cyb_FastEnum): """ See `CUfileFileHandleType`. """ @@ -2730,14 +2885,14 @@ class FileHandleType(_FastEnum): OPAQUE_WIN32 = (CU_FILE_HANDLE_TYPE_OPAQUE_WIN32, 'Windows based handle (unsupported)') USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS -class Opcode(_FastEnum): +class Opcode(_cyb_FastEnum): """ See `CUfileOpcode_t`. """ READ = CUFILE_READ WRITE = CUFILE_WRITE -class Status(_FastEnum): +class Status(_cyb_FastEnum): """ See `CUfileStatus_t`. """ @@ -2749,13 +2904,13 @@ class Status(_FastEnum): TIMEOUT = CUFILE_TIMEOUT FAILED = CUFILE_FAILED -class BatchMode(_FastEnum): +class BatchMode(_cyb_FastEnum): """ See `CUfileBatchMode_t`. """ BATCH = CUFILE_BATCH -class SizeTConfigParameter(_FastEnum): +class SizeTConfigParameter(_cyb_FastEnum): """ See `CUFileSizeTConfigParameter_t`. """ @@ -2772,7 +2927,7 @@ class SizeTConfigParameter(_FastEnum): POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS -class BoolConfigParameter(_FastEnum): +class BoolConfigParameter(_cyb_FastEnum): """ See `CUFileBoolConfigParameter_t`. """ @@ -2788,16 +2943,19 @@ class BoolConfigParameter(_FastEnum): FORCE_ODIRECT_MODE = CUFILE_PARAM_FORCE_ODIRECT_MODE SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS + PROPERTIES_POSIX_IO_MODE = CUFILE_PARAM_PROPERTIES_POSIX_IO_MODE + GDS_FALLBACK_IO = CUFILE_PARAM_GDS_FALLBACK_IO -class StringConfigParameter(_FastEnum): +class StringConfigParameter(_cyb_FastEnum): """ See `CUFileStringConfigParameter_t`. """ LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH LOG_DIR = CUFILE_PARAM_LOG_DIR + RDMA_TRANSPORT = CUFILE_PARAM_RDMA_TRANSPORT -class ArrayConfigParameter(_FastEnum): +class ArrayConfigParameter(_cyb_FastEnum): """ See `CUFileArrayConfigParameter_t`. """ @@ -2806,7 +2964,7 @@ class ArrayConfigParameter(_FastEnum): GPU_BOUNCE_BUFFER_SLAB_SIZE_KB = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_SIZE_KB GPU_BOUNCE_BUFFER_SLAB_COUNT = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_COUNT -class P2PFlags(_FastEnum): +class P2PFlags(_cyb_FastEnum): """ See `CUfileP2PFlags_t`. """ @@ -3094,7 +3252,7 @@ cpdef str get_parameter_string(int param, int len): with nogil: __status__ = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) check_status(__status__) - return cpython.PyUnicode_FromString(desc_str) + return _cyb_cpython.PyUnicode_FromString(desc_str) cpdef set_parameter_size_t(int param, size_t value): @@ -3332,3 +3490,4 @@ cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) check_status(status) return status +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/cycudla.pxd b/cuda_bindings/cuda/bindings/cycudla.pxd index 8a90dd964a7..899767c126e 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pxd +++ b/cuda_bindings/cuda/bindings/cycudla.pxd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c79dd127cb646ad3fb363a6c047f50b85f498dbedd071da77510c81b022cc7e6 -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. # This layer exposes the C header to Cython as-is. from libc.stdint cimport int8_t, int16_t, int32_t, int64_t diff --git a/cuda_bindings/cuda/bindings/cycudla.pyx b/cuda_bindings/cuda/bindings/cycudla.pyx index 198ffb308a7..74fbf5bf8d1 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pyx +++ b/cuda_bindings/cuda/bindings/cycudla.pyx @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8e4bad343784bf256d5190c2aa8cd40fde47ab2bc886486fbcb7c0c1e4c0275d -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ._internal cimport cudla as _cudla diff --git a/cuda_bindings/cuda/bindings/cycufile.pxd b/cuda_bindings/cuda/bindings/cycufile.pxd index 96c93f1a54e..185735e516c 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pxd +++ b/cuda_bindings/cuda/bindings/cycufile.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e5fd438113697ffd1e5864701bcfc25a0efc8ec9500708429ed3b9b525a5302b # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t from libc.time cimport time_t @@ -106,7 +107,7 @@ cdef extern from 'cufile.h': ctypedef enum CUfileDriverControlFlags_t: CU_FILE_USE_POLL_MODE CU_FILE_ALLOW_COMPAT_MODE - CU_FILE_POSIX_IO_MODE + CU_FILE_VANILLA_POSIX_IO_MODE CU_FILE_FALLBACK_IO_MODE cdef extern from 'cufile.h': @@ -171,12 +172,15 @@ cdef extern from 'cufile.h': CUFILE_PARAM_FORCE_ODIRECT_MODE CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION CUFILE_PARAM_STREAM_MEMOPS_BYPASS + CUFILE_PARAM_PROPERTIES_POSIX_IO_MODE + CUFILE_PARAM_GDS_FALLBACK_IO cdef extern from 'cufile.h': ctypedef enum CUFileStringConfigParameter_t: CUFILE_PARAM_LOGGING_LEVEL CUFILE_PARAM_ENV_LOGFILE_PATH CUFILE_PARAM_LOG_DIR + CUFILE_PARAM_RDMA_TRANSPORT cdef extern from 'cufile.h': ctypedef enum CUFileArrayConfigParameter_t: @@ -284,6 +288,11 @@ cdef extern from 'cufile.h': uint64_t n_mmap_free uint64_t reg_bytes +cdef extern from 'cufile.h': + ctypedef struct CUfileIOVec_t 'CUfileIOVec_t': + void* base + size_t len + cdef extern from 'cufile.h': ctypedef struct CUfileDrvProps_t 'CUfileDrvProps_t': cuda_bindings_cufile__anon_pod0 nvfs @@ -348,6 +357,18 @@ cdef extern from 'cufile.h': uint64_t batch_completion_lat_sum_us uint64_t last_batch_read_bytes uint64_t last_batch_write_bytes + CUfileOpCounter_t readv_ops + CUfileOpCounter_t writev_ops + uint64_t readv_bytes + uint64_t writev_bytes + uint64_t readv_bw_bytes_per_sec + uint64_t writev_bw_bytes_per_sec + uint64_t readv_lat_avg_us + uint64_t writev_lat_avg_us + uint64_t readv_ops_per_sec + uint64_t writev_ops_per_sec + uint64_t readv_lat_sum_us + uint64_t writev_lat_sum_us cdef extern from 'cufile.h': ctypedef struct CUfileIOParams_t 'CUfileIOParams_t': diff --git a/cuda_bindings/cuda/bindings/cycufile.pyx b/cuda_bindings/cuda/bindings/cycufile.pyx index 32b0614be24..5ea5927d067 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pyx +++ b/cuda_bindings/cuda/bindings/cycufile.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4ca4a099a14408433ad4896ffe04c88588a0c0bad943384b39ef89ce1277af86 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ._internal cimport cufile as _cufile diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pxd b/cuda_bindings/cuda/bindings/cynvfatbin.pxd index f810e5e0077..aaa8e4c425b 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5fc20d5790fdbc8d11cdf26bc5ef03030c98a0af2199f86ddb45fcf684fe2aaa # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pyx b/cuda_bindings/cuda/bindings/cynvfatbin.pyx index bac18e05a70..01100a7a023 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0d405302d916b2c8d2c6db393723eaf1e87451ca4f0b0b184b6f5723eee9ee66 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ._internal cimport nvfatbin as _nvfatbin diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pxd b/cuda_bindings/cuda/bindings/cynvjitlink.pxd index 8f8a249acb3..763635b0cb9 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=dd9f43cff55f8c973e93ba17e1c76a7827f809c20a6197667a960a8c720b9dd6 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 a44fedf196e..ba97ede1e48 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0bf841aee683edaafa51851fe371cee7bcb3af972337090e0006839e43ab6cd8 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 21c2ca0c180..830d25d7f63 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pxd +++ b/cuda_bindings/cuda/bindings/cynvml.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c30b5bc9a547d7ddc5fd02faa80bc540c899f35b33816b63c13d11bedd2f9b20 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport int64_t @@ -197,7 +198,10 @@ ctypedef enum nvmlBrandType_t "nvmlBrandType_t": NVML_BRAND_NVIDIA "NVML_BRAND_NVIDIA" = 14 NVML_BRAND_GEFORCE_RTX "NVML_BRAND_GEFORCE_RTX" = 15 NVML_BRAND_TITAN_RTX "NVML_BRAND_TITAN_RTX" = 16 - NVML_BRAND_COUNT "NVML_BRAND_COUNT" = 18 + NVML_BRAND_NVIDIA_DLA "NVML_BRAND_NVIDIA_DLA" = 17 + NVML_BRAND_NVIDIA_VGAMEDEV "NVML_BRAND_NVIDIA_VGAMEDEV" = 18 + NVML_BRAND_NVIDIA_NPU "NVML_BRAND_NVIDIA_NPU" = 19 + NVML_BRAND_COUNT "NVML_BRAND_COUNT" = 20 ctypedef enum nvmlTemperatureThresholds_t "nvmlTemperatureThresholds_t": NVML_TEMPERATURE_THRESHOLD_SHUTDOWN "NVML_TEMPERATURE_THRESHOLD_SHUTDOWN" = 0 @@ -212,6 +216,7 @@ ctypedef enum nvmlTemperatureThresholds_t "nvmlTemperatureThresholds_t": ctypedef enum nvmlTemperatureSensors_t "nvmlTemperatureSensors_t": NVML_TEMPERATURE_GPU "NVML_TEMPERATURE_GPU" = 0 + NVML_TEMPERATURE_GPU_MAX "NVML_TEMPERATURE_GPU_MAX" = 1 NVML_TEMPERATURE_COUNT "NVML_TEMPERATURE_COUNT" ctypedef enum nvmlComputeMode_t "nvmlComputeMode_t": @@ -381,6 +386,7 @@ ctypedef enum nvmlGridLicenseFeatureCode_t "nvmlGridLicenseFeatureCode_t": NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION "NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION" = NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX NVML_GRID_LICENSE_FEATURE_CODE_GAMING "NVML_GRID_LICENSE_FEATURE_CODE_GAMING" = 3 NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE "NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE" = 4 + NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV "NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV" = 5 ctypedef enum nvmlVgpuCapability_t "nvmlVgpuCapability_t": NVML_VGPU_CAP_NVLINK_P2P "NVML_VGPU_CAP_NVLINK_P2P" = 0 @@ -769,7 +775,151 @@ ctypedef enum nvmlGpmMetricId_t "nvmlGpmMetricId_t": NVML_GPM_METRIC_NVLINK_L34_TX "NVML_GPM_METRIC_NVLINK_L34_TX" = 330 NVML_GPM_METRIC_NVLINK_L35_RX "NVML_GPM_METRIC_NVLINK_L35_RX" = 331 NVML_GPM_METRIC_NVLINK_L35_TX "NVML_GPM_METRIC_NVLINK_L35_TX" = 332 - NVML_GPM_METRIC_MAX "NVML_GPM_METRIC_MAX" = 333 + NVML_GPM_METRIC_NVLINK_L36_RX "NVML_GPM_METRIC_NVLINK_L36_RX" = 333 + NVML_GPM_METRIC_NVLINK_L36_TX "NVML_GPM_METRIC_NVLINK_L36_TX" = 334 + NVML_GPM_METRIC_NVLINK_L37_RX "NVML_GPM_METRIC_NVLINK_L37_RX" = 335 + NVML_GPM_METRIC_NVLINK_L37_TX "NVML_GPM_METRIC_NVLINK_L37_TX" = 336 + NVML_GPM_METRIC_NVLINK_L38_RX "NVML_GPM_METRIC_NVLINK_L38_RX" = 337 + NVML_GPM_METRIC_NVLINK_L38_TX "NVML_GPM_METRIC_NVLINK_L38_TX" = 338 + NVML_GPM_METRIC_NVLINK_L39_RX "NVML_GPM_METRIC_NVLINK_L39_RX" = 339 + NVML_GPM_METRIC_NVLINK_L39_TX "NVML_GPM_METRIC_NVLINK_L39_TX" = 340 + NVML_GPM_METRIC_NVLINK_L40_RX "NVML_GPM_METRIC_NVLINK_L40_RX" = 341 + NVML_GPM_METRIC_NVLINK_L40_TX "NVML_GPM_METRIC_NVLINK_L40_TX" = 342 + NVML_GPM_METRIC_NVLINK_L41_RX "NVML_GPM_METRIC_NVLINK_L41_RX" = 343 + NVML_GPM_METRIC_NVLINK_L41_TX "NVML_GPM_METRIC_NVLINK_L41_TX" = 344 + NVML_GPM_METRIC_NVLINK_L42_RX "NVML_GPM_METRIC_NVLINK_L42_RX" = 345 + NVML_GPM_METRIC_NVLINK_L42_TX "NVML_GPM_METRIC_NVLINK_L42_TX" = 346 + NVML_GPM_METRIC_NVLINK_L43_RX "NVML_GPM_METRIC_NVLINK_L43_RX" = 347 + NVML_GPM_METRIC_NVLINK_L43_TX "NVML_GPM_METRIC_NVLINK_L43_TX" = 348 + NVML_GPM_METRIC_NVLINK_L44_RX "NVML_GPM_METRIC_NVLINK_L44_RX" = 349 + NVML_GPM_METRIC_NVLINK_L44_TX "NVML_GPM_METRIC_NVLINK_L44_TX" = 350 + NVML_GPM_METRIC_NVLINK_L45_RX "NVML_GPM_METRIC_NVLINK_L45_RX" = 351 + NVML_GPM_METRIC_NVLINK_L45_TX "NVML_GPM_METRIC_NVLINK_L45_TX" = 352 + NVML_GPM_METRIC_NVLINK_L46_RX "NVML_GPM_METRIC_NVLINK_L46_RX" = 353 + NVML_GPM_METRIC_NVLINK_L46_TX "NVML_GPM_METRIC_NVLINK_L46_TX" = 354 + NVML_GPM_METRIC_NVLINK_L47_RX "NVML_GPM_METRIC_NVLINK_L47_RX" = 355 + NVML_GPM_METRIC_NVLINK_L47_TX "NVML_GPM_METRIC_NVLINK_L47_TX" = 356 + NVML_GPM_METRIC_NVLINK_L48_RX "NVML_GPM_METRIC_NVLINK_L48_RX" = 357 + NVML_GPM_METRIC_NVLINK_L48_TX "NVML_GPM_METRIC_NVLINK_L48_TX" = 358 + NVML_GPM_METRIC_NVLINK_L49_RX "NVML_GPM_METRIC_NVLINK_L49_RX" = 359 + NVML_GPM_METRIC_NVLINK_L49_TX "NVML_GPM_METRIC_NVLINK_L49_TX" = 360 + NVML_GPM_METRIC_NVLINK_L50_RX "NVML_GPM_METRIC_NVLINK_L50_RX" = 361 + NVML_GPM_METRIC_NVLINK_L50_TX "NVML_GPM_METRIC_NVLINK_L50_TX" = 362 + NVML_GPM_METRIC_NVLINK_L51_RX "NVML_GPM_METRIC_NVLINK_L51_RX" = 363 + NVML_GPM_METRIC_NVLINK_L51_TX "NVML_GPM_METRIC_NVLINK_L51_TX" = 364 + NVML_GPM_METRIC_NVLINK_L52_RX "NVML_GPM_METRIC_NVLINK_L52_RX" = 365 + NVML_GPM_METRIC_NVLINK_L52_TX "NVML_GPM_METRIC_NVLINK_L52_TX" = 366 + NVML_GPM_METRIC_NVLINK_L53_RX "NVML_GPM_METRIC_NVLINK_L53_RX" = 367 + NVML_GPM_METRIC_NVLINK_L53_TX "NVML_GPM_METRIC_NVLINK_L53_TX" = 368 + NVML_GPM_METRIC_NVLINK_L54_RX "NVML_GPM_METRIC_NVLINK_L54_RX" = 369 + NVML_GPM_METRIC_NVLINK_L54_TX "NVML_GPM_METRIC_NVLINK_L54_TX" = 370 + NVML_GPM_METRIC_NVLINK_L55_RX "NVML_GPM_METRIC_NVLINK_L55_RX" = 371 + NVML_GPM_METRIC_NVLINK_L55_TX "NVML_GPM_METRIC_NVLINK_L55_TX" = 372 + NVML_GPM_METRIC_NVLINK_L56_RX "NVML_GPM_METRIC_NVLINK_L56_RX" = 373 + NVML_GPM_METRIC_NVLINK_L56_TX "NVML_GPM_METRIC_NVLINK_L56_TX" = 374 + NVML_GPM_METRIC_NVLINK_L57_RX "NVML_GPM_METRIC_NVLINK_L57_RX" = 375 + NVML_GPM_METRIC_NVLINK_L57_TX "NVML_GPM_METRIC_NVLINK_L57_TX" = 376 + NVML_GPM_METRIC_NVLINK_L58_RX "NVML_GPM_METRIC_NVLINK_L58_RX" = 377 + NVML_GPM_METRIC_NVLINK_L58_TX "NVML_GPM_METRIC_NVLINK_L58_TX" = 378 + NVML_GPM_METRIC_NVLINK_L59_RX "NVML_GPM_METRIC_NVLINK_L59_RX" = 379 + NVML_GPM_METRIC_NVLINK_L59_TX "NVML_GPM_METRIC_NVLINK_L59_TX" = 380 + NVML_GPM_METRIC_NVLINK_L60_RX "NVML_GPM_METRIC_NVLINK_L60_RX" = 381 + NVML_GPM_METRIC_NVLINK_L60_TX "NVML_GPM_METRIC_NVLINK_L60_TX" = 382 + NVML_GPM_METRIC_NVLINK_L61_RX "NVML_GPM_METRIC_NVLINK_L61_RX" = 383 + NVML_GPM_METRIC_NVLINK_L61_TX "NVML_GPM_METRIC_NVLINK_L61_TX" = 384 + NVML_GPM_METRIC_NVLINK_L62_RX "NVML_GPM_METRIC_NVLINK_L62_RX" = 385 + NVML_GPM_METRIC_NVLINK_L62_TX "NVML_GPM_METRIC_NVLINK_L62_TX" = 386 + NVML_GPM_METRIC_NVLINK_L63_RX "NVML_GPM_METRIC_NVLINK_L63_RX" = 387 + NVML_GPM_METRIC_NVLINK_L63_TX "NVML_GPM_METRIC_NVLINK_L63_TX" = 388 + NVML_GPM_METRIC_NVLINK_L64_RX "NVML_GPM_METRIC_NVLINK_L64_RX" = 389 + NVML_GPM_METRIC_NVLINK_L64_TX "NVML_GPM_METRIC_NVLINK_L64_TX" = 390 + NVML_GPM_METRIC_NVLINK_L65_RX "NVML_GPM_METRIC_NVLINK_L65_RX" = 391 + NVML_GPM_METRIC_NVLINK_L65_TX "NVML_GPM_METRIC_NVLINK_L65_TX" = 392 + NVML_GPM_METRIC_NVLINK_L66_RX "NVML_GPM_METRIC_NVLINK_L66_RX" = 393 + NVML_GPM_METRIC_NVLINK_L66_TX "NVML_GPM_METRIC_NVLINK_L66_TX" = 394 + NVML_GPM_METRIC_NVLINK_L67_RX "NVML_GPM_METRIC_NVLINK_L67_RX" = 395 + NVML_GPM_METRIC_NVLINK_L67_TX "NVML_GPM_METRIC_NVLINK_L67_TX" = 396 + NVML_GPM_METRIC_NVLINK_L68_RX "NVML_GPM_METRIC_NVLINK_L68_RX" = 397 + NVML_GPM_METRIC_NVLINK_L68_TX "NVML_GPM_METRIC_NVLINK_L68_TX" = 398 + NVML_GPM_METRIC_NVLINK_L69_RX "NVML_GPM_METRIC_NVLINK_L69_RX" = 399 + NVML_GPM_METRIC_NVLINK_L69_TX "NVML_GPM_METRIC_NVLINK_L69_TX" = 400 + NVML_GPM_METRIC_NVLINK_L70_RX "NVML_GPM_METRIC_NVLINK_L70_RX" = 401 + NVML_GPM_METRIC_NVLINK_L70_TX "NVML_GPM_METRIC_NVLINK_L70_TX" = 402 + NVML_GPM_METRIC_NVLINK_L71_RX "NVML_GPM_METRIC_NVLINK_L71_RX" = 403 + NVML_GPM_METRIC_NVLINK_L71_TX "NVML_GPM_METRIC_NVLINK_L71_TX" = 404 + NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC" = 405 + NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC" = 406 + NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC" = 407 + NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC" = 408 + NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC" = 409 + NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC" = 410 + NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC" = 411 + NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC" = 412 + NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC" = 413 + NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC" = 414 + NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC" = 415 + NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC" = 416 + NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC" = 417 + NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC" = 418 + NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC" = 419 + NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC" = 420 + NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC" = 421 + NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC" = 422 + NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC" = 423 + NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC" = 424 + NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC" = 425 + NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC" = 426 + NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC" = 427 + NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC" = 428 + NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC" = 429 + NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC" = 430 + NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC" = 431 + NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC" = 432 + NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC" = 433 + NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC" = 434 + NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC" = 435 + NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC" = 436 + NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC" = 437 + NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC" = 438 + NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC" = 439 + NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC" = 440 + NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC" = 441 + NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC" = 442 + NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC" = 443 + NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC" = 444 + NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC" = 445 + NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC" = 446 + NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC" = 447 + NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC" = 448 + NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC" = 449 + NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC" = 450 + NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC" = 451 + NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC" = 452 + NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC" = 453 + NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC" = 454 + NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC" = 455 + NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC" = 456 + NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC" = 457 + NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC" = 458 + NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC" = 459 + NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC" = 460 + NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC" = 461 + NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC" = 462 + NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC" = 463 + NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC" = 464 + NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC" = 465 + NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC" = 466 + NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC" = 467 + NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC" = 468 + NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC" = 469 + NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC" = 470 + NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC" = 471 + NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC" = 472 + NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC" = 473 + NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC" = 474 + NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC" = 475 + NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC" = 476 + NVML_GPM_METRIC_MAX "NVML_GPM_METRIC_MAX" = 477 ctypedef enum nvmlPowerProfileType_t "nvmlPowerProfileType_t": NVML_POWER_PROFILE_MAX_P "NVML_POWER_PROFILE_MAX_P" = 0 @@ -787,7 +937,17 @@ ctypedef enum nvmlPowerProfileType_t "nvmlPowerProfileType_t": NVML_POWER_PROFILE_SYNC_BALANCED "NVML_POWER_PROFILE_SYNC_BALANCED" = 12 NVML_POWER_PROFILE_HPC "NVML_POWER_PROFILE_HPC" = 13 NVML_POWER_PROFILE_MIG "NVML_POWER_PROFILE_MIG" = 14 - NVML_POWER_PROFILE_MAX "NVML_POWER_PROFILE_MAX" = 15 + NVML_POWER_PROFILE_MAX_Q_1 "NVML_POWER_PROFILE_MAX_Q_1" = 15 + NVML_POWER_PROFILE_NETWORK_BOUND "NVML_POWER_PROFILE_NETWORK_BOUND" = 16 + NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE "NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE" = 17 + NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE "NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE" = 18 + NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE "NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE" = 19 + NVML_POWER_PROFILE_TRAINING "NVML_POWER_PROFILE_TRAINING" = 20 + NVML_POWER_PROFILE_INFERENCE "NVML_POWER_PROFILE_INFERENCE" = 21 + NVML_POWER_PROFILE_MAX_Q_2 "NVML_POWER_PROFILE_MAX_Q_2" = 22 + NVML_POWER_PROFILE_MAX_Q_3 "NVML_POWER_PROFILE_MAX_Q_3" = 23 + NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND "NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND" = 24 + NVML_POWER_PROFILE_MAX "NVML_POWER_PROFILE_MAX" = 25 ctypedef enum nvmlDeviceAddressingModeType_t "nvmlDeviceAddressingModeType_t": NVML_DEVICE_ADDRESSING_MODE_NONE "NVML_DEVICE_ADDRESSING_MODE_NONE" = 0 @@ -801,6 +961,14 @@ ctypedef enum nvmlPRMCounterId_t "nvmlPRMCounterId_t": NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS" = 101 NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY" = 102 NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES" = 103 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY" = 104 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY" = 105 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT" = 106 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT" = 107 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT" = 108 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS" = 109 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME" = 110 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME" = 111 NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT "NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT" = 201 NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES "NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES" = 301 NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR "NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR" = 302 @@ -827,6 +995,30 @@ ctypedef enum nvmlProcessMode_t "nvmlProcessMode_t": ctypedef enum nvmlCPERType_t "nvmlCPERType_t": NVML_CPER_ACCESS_TYPE_GPU "NVML_CPER_ACCESS_TYPE_GPU" = (1 << 0) +ctypedef enum nvmlGpuOperationalEventLogLevel_t "nvmlGpuOperationalEventLogLevel_t": + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL" = 0 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY" = 10 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG" = 20 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE" = 30 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING" = 40 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR" = 50 + +ctypedef enum nvmlOperationalEventSeverity_t "nvmlOperationalEventSeverity_t": + NVML_OPERATIONAL_EVENT_SEVERITY_ALL "NVML_OPERATIONAL_EVENT_SEVERITY_ALL" = 0 + NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL "NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL" = 10 + NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED "NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED" = 20 + NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE "NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE" = 30 + NVML_OPERATIONAL_EVENT_SEVERITY_FATAL "NVML_OPERATIONAL_EVENT_SEVERITY_FATAL" = 40 + +ctypedef enum nvmlEventDataType_t "nvmlEventDataType_t": + NVML_EVENT_DATA_TYPE_NVML_EVENT "NVML_EVENT_DATA_TYPE_NVML_EVENT" = 0 + NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT "NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT" = 1 + +ctypedef enum nvmlNvlinkTelemetrySampleType_t "nvmlNvlinkTelemetrySampleType_t": + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX" = 0 + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX" = 1 + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT" = 2 + # types ctypedef struct nvmlPciInfoExt_v1_t 'nvmlPciInfoExt_v1_t': @@ -1507,6 +1699,101 @@ ctypedef struct nvmlAccountingStats_v2_t 'nvmlAccountingStats_v2_t': unsigned long long time unsigned long long startTime +ctypedef struct nvmlDeviceSetMemoryLimits_v1_t 'nvmlDeviceSetMemoryLimits_v1_t': + char* nameSpace + unsigned long long softLimit + unsigned long long hardLimit + +ctypedef struct nvmlDeviceGetMemoryLimits_v1_t 'nvmlDeviceGetMemoryLimits_v1_t': + char* nameSpace + unsigned long long softLimit + unsigned long long hardLimit + unsigned long long currentUsed + +ctypedef struct nvmlPmgrPwrTuple_t 'nvmlPmgrPwrTuple_t': + unsigned int pwrmW + +ctypedef struct nvmlRailMetrics_t 'nvmlRailMetrics_t': + unsigned int freqkHz + unsigned long long utilPct + +ctypedef struct nvmlPwrModelMetricsDlppm1xPerf_t 'nvmlPwrModelMetricsDlppm1xPerf_t': + unsigned int perfms + +ctypedef struct nvmlPwrModelMetricsSamplePfpp1x_t 'nvmlPwrModelMetricsSamplePfpp1x_t': + unsigned int freqkHz[16] + unsigned int estTgpPwrmW + +ctypedef struct nvmlPwrModelOperatingPointPfpp1x_t 'nvmlPwrModelOperatingPointPfpp1x_t': + unsigned int freqkHz + unsigned int pwrmW + +ctypedef struct nvmlAdaptiveTgpModeInfo_v1_t 'nvmlAdaptiveTgpModeInfo_v1_t': + nvmlEnableState_t inBandEnableRequest + nvmlEnableState_t featureAllowedByAdmin + nvmlEnableState_t adminOverrideEnabled + nvmlEnableState_t enablementStatus + unsigned int adjustedLimitMw + +ctypedef struct nvmlOperationalEventContextInfo_v1_t 'nvmlOperationalEventContextInfo_v1_t': + unsigned int contextType + unsigned int dataSize + unsigned short dataFormatVersion + +ctypedef struct nvmlGpuOperationalEventContextLegacyXid_v1_t 'nvmlGpuOperationalEventContextLegacyXid_v1_t': + unsigned int xidCode + +ctypedef struct nvmlGpuFabricClique_v1_t 'nvmlGpuFabricClique_v1_t': + unsigned char type + unsigned int id + +ctypedef struct nvmlGpuOperationalEventConfig_v1_t 'nvmlGpuOperationalEventConfig_v1_t': + char uuid[96] + unsigned int minLogLevel + unsigned int minSeverity + +ctypedef struct nvmlEventData_v2_t 'nvmlEventData_v2_t': + char uuid[96] + char sourceModule[16] + unsigned long long eventType + unsigned long long eventData + unsigned long long groupCursor + unsigned long long instanceId + unsigned long long timestampUsec + unsigned long long traceId + unsigned int dataType + unsigned int gpuInstanceId + unsigned int computeInstanceId + unsigned int severity + unsigned int categoryId + unsigned int moduleEventCode + unsigned int scope + unsigned int originator + unsigned int moduleInstance + unsigned int chipletId + unsigned int logLevel + unsigned int attributes + unsigned int groupCperSize + unsigned int groupAttributes + unsigned char groupSize + unsigned char groupIndex + +ctypedef struct nvmlNvlinkSetBwModeAsync_v1_t 'nvmlNvlinkSetBwModeAsync_v1_t': + unsigned int bSetBest + unsigned int bwMode + unsigned int asyncPollTimeoutMs + +ctypedef struct nvmlNvlinkTelemetrySample_v1_t 'nvmlNvlinkTelemetrySample_v1_t': + unsigned int linkId + unsigned int sampleType + unsigned int sampleCount + unsigned long long* samples + nvmlReturn_t nvmlReturn + +ctypedef struct nvmlEccBankRemapperHistogram_v1_t 'nvmlEccBankRemapperHistogram_v1_t': + unsigned int maxSpareGroupCount + unsigned int noSpareGroupCount + ctypedef nvmlPciInfoExt_v1_t nvmlPciInfoExt_t 'nvmlPciInfoExt_t' ctypedef nvmlCoolerInfo_v1_t nvmlCoolerInfo_t 'nvmlCoolerInfo_t' @@ -1864,6 +2151,36 @@ ctypedef struct nvmlVgpuSchedulerLogInfo_v2_t 'nvmlVgpuSchedulerLogInfo_v2_t': unsigned int entriesCount nvmlVgpuSchedulerLogEntry_v2_t logEntries[200] +ctypedef struct nvmlCoreRailMetrics_t 'nvmlCoreRailMetrics_t': + nvmlRailMetrics_t rails[2] + +ctypedef struct nvmlPwrModelMetricsPfpp1x_t 'nvmlPwrModelMetricsPfpp1x_t': + unsigned char numVfPoints + nvmlPwrModelMetricsSamplePfpp1x_t estimatedMetrics[32] + unsigned char bValid + nvmlPwrModelOperatingPointPfpp1x_t maxPerfPerWattPoint + nvmlPwrModelOperatingPointPfpp1x_t fmaxAtVmaxPoint + unsigned int tgpHeadroommW + +ctypedef struct nvmlGpuFabricInfo_v4_t 'nvmlGpuFabricInfo_v4_t': + unsigned char clusterUuid[16] + nvmlReturn_t status + nvmlGpuFabricClique_v1_t cliques[64] + unsigned int numCliques + nvmlGpuFabricState_t state + unsigned int healthMask + unsigned char healthSummary + +ctypedef struct nvmlNvlinkTelemetrySamples_v1_t 'nvmlNvlinkTelemetrySamples_v1_t': + unsigned int telemetryCount + nvmlNvlinkTelemetrySample_v1_t* telemetrySamples + +ctypedef struct nvmlEccBankRemapperStatus_v1_t 'nvmlEccBankRemapperStatus_v1_t': + unsigned int activeRemappings + unsigned int inactiveRemappings + unsigned int bPending + nvmlEccBankRemapperHistogram_v1_t histogram + ctypedef nvmlVgpuTypeIdInfo_v1_t nvmlVgpuTypeIdInfo_t 'nvmlVgpuTypeIdInfo_t' ctypedef nvmlVgpuTypeMaxInstance_v1_t nvmlVgpuTypeMaxInstance_t 'nvmlVgpuTypeMaxInstance_t' @@ -1962,7 +2279,7 @@ ctypedef struct nvmlGpmMetricsGet_t 'nvmlGpmMetricsGet_t': unsigned int numMetrics nvmlGpmSample_t sample1 nvmlGpmSample_t sample2 - nvmlGpmMetric_t metrics[333] + nvmlGpmMetric_t metrics[477] ctypedef nvmlWorkloadPowerProfileInfo_v1_t nvmlWorkloadPowerProfileInfo_t 'nvmlWorkloadPowerProfileInfo_t' @@ -1977,6 +2294,16 @@ ctypedef struct nvmlNvLinkInfo_v2_t 'nvmlNvLinkInfo_v2_t': unsigned int isNvleEnabled nvmlNvlinkFirmwareInfo_t firmwareInfo +ctypedef struct nvmlPwrModelMetricsDlppm1x_t 'nvmlPwrModelMetricsDlppm1x_t': + unsigned char bValid + nvmlCoreRailMetrics_t coreRail + nvmlRailMetrics_t fbRail + nvmlPmgrPwrTuple_t tgpPwrTuple + nvmlPwrModelMetricsDlppm1xPerf_t perfMetrics + +ctypedef struct nvmlPerfMetricsPfpp1xSample_t 'nvmlPerfMetricsPfpp1xSample_t': + nvmlPwrModelMetricsPfpp1x_t estimatedMetrics + ctypedef nvmlVgpuProcessesUtilizationInfo_v1_t nvmlVgpuProcessesUtilizationInfo_t 'nvmlVgpuProcessesUtilizationInfo_t' ctypedef nvmlVgpuInstancesUtilizationInfo_v1_t nvmlVgpuInstancesUtilizationInfo_t 'nvmlVgpuInstancesUtilizationInfo_t' @@ -1998,8 +2325,39 @@ ctypedef struct nvmlWorkloadPowerProfileProfilesInfo_v1_t 'nvmlWorkloadPowerProf ctypedef nvmlNvLinkInfo_v2_t nvmlNvLinkInfo_t 'nvmlNvLinkInfo_t' +ctypedef struct nvmlPwrModelMetricsDlppm1xDramclkEstimates_t 'nvmlPwrModelMetricsDlppm1xDramclkEstimates_t': + nvmlPwrModelMetricsDlppm1x_t estimatedMetrics[8] + unsigned char numEstimatedMetrics + ctypedef nvmlWorkloadPowerProfileProfilesInfo_v1_t nvmlWorkloadPowerProfileProfilesInfo_t 'nvmlWorkloadPowerProfileProfilesInfo_t' +ctypedef struct nvmlObservedMetrics_t 'nvmlObservedMetrics_t': + nvmlPwrModelMetricsDlppm1xDramclkEstimates_t initialDramclkEst[3] + unsigned char bValid + nvmlCoreRailMetrics_t coreRail + nvmlRailMetrics_t fbRail + nvmlPmgrPwrTuple_t tgpPwrTuple + nvmlPwrModelMetricsDlppm1xPerf_t perfMetrics + +ctypedef struct nvmlPerfMetricsDlppc2xSample_t 'nvmlPerfMetricsDlppc2xSample_t': + nvmlObservedMetrics_t observedMetrics + +ctypedef union cuda_bindings_nvml__anon_pod8: + nvmlPerfMetricsDlppc2xSample_t dlppc2x + nvmlPerfMetricsPfpp1xSample_t pfpp1x + +ctypedef struct nvmlPerfMetricControllerSample_t 'nvmlPerfMetricControllerSample_t': + unsigned int controllerType + cuda_bindings_nvml__anon_pod8 data + +ctypedef struct nvmlPerfMetricsSample_t 'nvmlPerfMetricsSample_t': + unsigned char numControllerData + nvmlPerfMetricControllerSample_t controllerData[4] + +ctypedef struct nvmlPerfMetricsSamples_v1_t 'nvmlPerfMetricsSamples_v1_t': + unsigned int numSamples + nvmlPerfMetricsSample_t samples[13] + ############################################################################### # Functions diff --git a/cuda_bindings/cuda/bindings/cynvml.pyx b/cuda_bindings/cuda/bindings/cynvml.pyx index 09ee2601a5b..04972f4a13a 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pyx +++ b/cuda_bindings/cuda/bindings/cynvml.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fcdd98e73e212e2f1d347d54c34500537c06c41e725d752a3f270a61ed5ccc34 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 e1f89be12cf..b29e8bf4648 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pxd +++ b/cuda_bindings/cuda/bindings/cynvvm.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=60ee5f67901992be12113c74ccb0663b480a93de668f6e4de73f5ab531add037 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. ############################################################################### diff --git a/cuda_bindings/cuda/bindings/cynvvm.pyx b/cuda_bindings/cuda/bindings/cynvvm.pyx index 4e4b4fe5a74..bbefbc2222c 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pyx +++ b/cuda_bindings/cuda/bindings/cynvvm.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=99d604d3ec58e8e283b26258260a65ac499b39c98fe0bdc3bec03defa3cda74f # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from ._internal cimport nvvm as _nvvm diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pxd b/cuda_bindings/cuda/bindings/nvfatbin.pxd index dbfb587b7f2..b4de4d437ad 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/nvfatbin.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=cc7e8a62c3096b4555d022e957f958c97aa912deb241359b4f47d5d331035382 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index 8367cd14e83..8d7a3ddea16 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -1,15 +1,22 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2d78d001ac0a2ad76abea4a1c0ca5cae6b0494a84d17ee384ccda7a28547d985 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum + +# <<<< END OF PREAMBLE CONTENT >>>> + cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) -from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum from libcpp.vector cimport vector @@ -17,7 +24,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_IntEnum): +class Result(_cyb_FastEnum): """ The enumerated type `nvFatbinResult` defines API call result codes. nvFatbin APIs return `nvFatbinResult` codes to indicate the result. @@ -323,3 +330,4 @@ cpdef add_tile_ir(intptr_t handle, code, size_t size, identifier, options_cmd_li with nogil: __status__ = nvFatbinAddTileIR(handle, _code_, size, _identifier_, _options_cmd_line_) check_status(__status__) +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pxd b/cuda_bindings/cuda/bindings/nvjitlink.pxd index 8c568cbc1b6..d02407e0e9a 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/nvjitlink.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=679e46cfd685c708f5ea57e8063e088710420cf92d6f98c53aa3edef1bd8cfac # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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 0f36b3afe1e..b112dd5d166 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -1,15 +1,22 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d83af37032cfdc59cb39737b87b22bb0d53a32a5d414cbc445539311a42154b6 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum + +# <<<< END OF PREAMBLE CONTENT >>>> + cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum from libcpp.vector cimport vector @@ -17,7 +24,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_FastEnum): +class Result(_cyb_FastEnum): """ The enumerated type `nvJitLinkResult` defines API call result codes. nvJitLink APIs return `nvJitLinkResult` codes to indicate the result. @@ -44,7 +51,7 @@ class Result(_FastEnum): ERROR_UNSUPPORTED_ARCH = (NVJITLINK_ERROR_UNSUPPORTED_ARCH, 'Unsupported -arch value') ERROR_LTO_NOT_ENABLED = (NVJITLINK_ERROR_LTO_NOT_ENABLED, 'Requires -lto') -class InputType(_FastEnum): +class InputType(_cyb_FastEnum): """ The enumerated type `nvJitLinkInputType` defines the kind of inputs that can be passed to nvJitLinkAdd* APIs. @@ -367,3 +374,4 @@ cpdef get_linked_ltoir(intptr_t handle, ltoir): with nogil: __status__ = nvJitLinkGetLinkedLTOIR(handle, _ltoir_) check_status(__status__) +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvml.pxd b/cuda_bindings/cuda/bindings/nvml.pxd index 9c0dd62d8d5..fd8351bb97c 100644 --- a/cuda_bindings/cuda/bindings/nvml.pxd +++ b/cuda_bindings/cuda/bindings/nvml.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=eb0da1438c796d46204369eaa083d50f9d16700caf3d27dcf06c48a79544b887 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t @@ -55,6 +56,22 @@ ctypedef nvmlRusdSettings_v1_t RusdSettings_v1 ctypedef nvmlBBXTimeData_v1_t BBXTimeData_v1 ctypedef nvmlRemappedRowsInfo_v2_t RemappedRowsInfo_v2 ctypedef nvmlAccountingStats_v2_t AccountingStats_v2 +ctypedef nvmlDeviceSetMemoryLimits_v1_t DeviceSetMemoryLimits_v1 +ctypedef nvmlDeviceGetMemoryLimits_v1_t DeviceGetMemoryLimits_v1 +ctypedef nvmlPmgrPwrTuple_t PmgrPwrTuple +ctypedef nvmlRailMetrics_t RailMetrics +ctypedef nvmlPwrModelMetricsDlppm1xPerf_t PwrModelMetricsDlppm1xPerf +ctypedef nvmlPwrModelMetricsSamplePfpp1x_t PwrModelMetricsSamplePfpp1x +ctypedef nvmlPwrModelOperatingPointPfpp1x_t PwrModelOperatingPointPfpp1x +ctypedef nvmlAdaptiveTgpModeInfo_v1_t AdaptiveTgpModeInfo_v1 +ctypedef nvmlOperationalEventContextInfo_v1_t OperationalEventContextInfo_v1 +ctypedef nvmlGpuOperationalEventContextLegacyXid_v1_t GpuOperationalEventContextLegacyXid_v1 +ctypedef nvmlGpuFabricClique_v1_t GpuFabricClique_v1 +ctypedef nvmlGpuOperationalEventConfig_v1_t GpuOperationalEventConfig_v1 +ctypedef nvmlEventData_v2_t EventData_v2 +ctypedef nvmlNvlinkSetBwModeAsync_v1_t NvlinkSetBwModeAsync_v1 +ctypedef nvmlNvlinkTelemetrySample_v1_t NvlinkTelemetrySample_v1 +ctypedef nvmlEccBankRemapperHistogram_v1_t EccBankRemapperHistogram_v1 ctypedef nvmlPowerValue_v2_t PowerValue_v2 ctypedef nvmlVgpuTypeMaxInstance_v1_t VgpuTypeMaxInstance_v1 ctypedef nvmlVgpuProcessUtilizationSample_t VgpuProcessUtilizationSample @@ -71,11 +88,24 @@ ctypedef nvmlWorkloadPowerProfileCurrentProfiles_v1_t WorkloadPowerProfileCurren ctypedef nvmlWorkloadPowerProfileRequestedProfiles_v1_t WorkloadPowerProfileRequestedProfiles_v1 ctypedef nvmlWorkloadPowerProfileUpdateProfiles_v1_t WorkloadPowerProfileUpdateProfiles_v1 ctypedef nvmlPRMTLV_v1_t PRMTLV_v1 +ctypedef nvmlCoreRailMetrics_t CoreRailMetrics +ctypedef nvmlPwrModelMetricsPfpp1x_t PwrModelMetricsPfpp1x +ctypedef nvmlGpuFabricInfo_v4_t GpuFabricInfo_v4 +ctypedef nvmlNvlinkTelemetrySamples_v1_t NvlinkTelemetrySamples_v1 +ctypedef nvmlEccBankRemapperStatus_v1_t EccBankRemapperStatus_v1 ctypedef nvmlGetCPER_v1_t GetCPER_v1 ctypedef nvmlVgpuSchedulerSetState_t VgpuSchedulerSetState ctypedef nvmlGpmMetricsGet_t GpmMetricsGet +ctypedef nvmlPwrModelMetricsDlppm1x_t PwrModelMetricsDlppm1x +ctypedef nvmlPerfMetricsPfpp1xSample_t PerfMetricsPfpp1xSample ctypedef nvmlPRMCounterList_v1_t PRMCounterList_v1 ctypedef nvmlWorkloadPowerProfileProfilesInfo_v1_t WorkloadPowerProfileProfilesInfo_v1 +ctypedef nvmlPwrModelMetricsDlppm1xDramclkEstimates_t PwrModelMetricsDlppm1xDramclkEstimates +ctypedef nvmlObservedMetrics_t ObservedMetrics +ctypedef nvmlPerfMetricsDlppc2xSample_t PerfMetricsDlppc2xSample +ctypedef nvmlPerfMetricControllerSample_t PerfMetricControllerSample +ctypedef nvmlPerfMetricsSample_t PerfMetricsSample +ctypedef nvmlPerfMetricsSamples_v1_t PerfMetricsSamples_v1 ############################################################################### @@ -144,6 +174,10 @@ ctypedef nvmlPRMCounterId_t _PRMCounterId ctypedef nvmlPowerProfileOperation_t _PowerProfileOperation ctypedef nvmlProcessMode_t _ProcessMode ctypedef nvmlCPERType_t _CPERType +ctypedef nvmlGpuOperationalEventLogLevel_t _GpuOperationalEventLogLevel +ctypedef nvmlOperationalEventSeverity_t _OperationalEventSeverity +ctypedef nvmlEventDataType_t _EventDataType +ctypedef nvmlNvlinkTelemetrySampleType_t _NvlinkTelemetrySampleType ############################################################################### diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index 52fefd94e32..a3042207603 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -1,29 +1,55 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=31bde24373116b0cc22916078af47ba61d0e885695fc25557b13265ee6befd94 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. - -cimport cython # NOQA - -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) - -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum - -from cuda.bindings.cydriver cimport CUDA_VERSION - - -from libc.stdlib cimport calloc, free, malloc -from cython cimport view -cimport cpython.buffer -cimport cpython.memoryview -cimport cpython -from libc.string cimport memcmp, memcpy +# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +cimport cpython as _cyb_cpython +cimport cpython.buffer as _cyb_cpython_buffer +cimport cpython.memoryview as _cyb_cpython_memoryview +from cython cimport view as _cyb_view +from libc.stdlib cimport ( + calloc as _cyb_calloc, + free as _cyb_free, + malloc as _cyb_malloc, +) +from libc.string cimport ( + memcmp as _cyb_memcmp, + memcpy as _cyb_memcpy, +) +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum import numpy as _numpy +cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL + +cdef _cyb_from_buffer(buffer, size, lowpp_type): + cdef _cyb_cpython.Py_buffer view + if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + _cyb_cpython.PyBuffer_Release(&view) -cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): +cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -35,34 +61,20 @@ cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) +# <<<< END OF PREAMBLE CONTENT >>>> -cdef __from_buffer(buffer, size, lowpp_type): - cdef Py_buffer view - if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - cpython.PyBuffer_Release(&view) +cimport cython # NOQA +from cython cimport view +cimport cpython +from libc.string cimport memcpy -cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) + +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum +from cuda.bindings.cydriver cimport CUDA_VERSION cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsigned int ver) nogil: @@ -73,7 +85,7 @@ cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsi # Enum ############################################################################### -class BridgeChipType(_FastEnum): +class BridgeChipType(_cyb_FastEnum): """ Enum to represent type of bridge chip @@ -82,7 +94,7 @@ class BridgeChipType(_FastEnum): BRIDGE_CHIP_PLX = NVML_BRIDGE_CHIP_PLX BRIDGE_CHIP_BRO4 = NVML_BRIDGE_CHIP_BRO4 -class NvLinkUtilizationCountUnits(_FastEnum): +class NvLinkUtilizationCountUnits(_cyb_FastEnum): """ Enum to represent the NvLink utilization counter packet units @@ -94,7 +106,7 @@ class NvLinkUtilizationCountUnits(_FastEnum): NVLINK_COUNTER_UNIT_RESERVED = NVML_NVLINK_COUNTER_UNIT_RESERVED NVLINK_COUNTER_UNIT_COUNT = NVML_NVLINK_COUNTER_UNIT_COUNT -class NvLinkUtilizationCountPktTypes(_FastEnum): +class NvLinkUtilizationCountPktTypes(_cyb_FastEnum): """ Enum to represent the NvLink utilization counter packet types to count ** this is ONLY applicable with the units as packets or bytes ** as @@ -113,7 +125,7 @@ class NvLinkUtilizationCountPktTypes(_FastEnum): NVLINK_COUNTER_PKTFILTER_RESPNODATA = NVML_NVLINK_COUNTER_PKTFILTER_RESPNODATA NVLINK_COUNTER_PKTFILTER_ALL = NVML_NVLINK_COUNTER_PKTFILTER_ALL -class NvLinkCapability(_FastEnum): +class NvLinkCapability(_cyb_FastEnum): """ Enum to represent NvLink queryable capabilities @@ -127,7 +139,7 @@ class NvLinkCapability(_FastEnum): NVLINK_CAP_VALID = NVML_NVLINK_CAP_VALID NVLINK_CAP_COUNT = NVML_NVLINK_CAP_COUNT -class NvLinkErrorCounter(_FastEnum): +class NvLinkErrorCounter(_cyb_FastEnum): """ Enum to represent NvLink queryable error counters @@ -140,7 +152,7 @@ class NvLinkErrorCounter(_FastEnum): NVLINK_ERROR_DL_ECC_DATA = NVML_NVLINK_ERROR_DL_ECC_DATA NVLINK_ERROR_COUNT = NVML_NVLINK_ERROR_COUNT -class IntNvLinkDeviceType(_FastEnum): +class IntNvLinkDeviceType(_cyb_FastEnum): """ Enum to represent NvLink's remote device type @@ -151,7 +163,7 @@ class IntNvLinkDeviceType(_FastEnum): NVLINK_DEVICE_TYPE_SWITCH = NVML_NVLINK_DEVICE_TYPE_SWITCH NVLINK_DEVICE_TYPE_UNKNOWN = NVML_NVLINK_DEVICE_TYPE_UNKNOWN -class GpuTopologyLevel(_FastEnum): +class GpuTopologyLevel(_cyb_FastEnum): """ Represents level relationships within a system between two GPUs The enums are spaced to allow for future relationships @@ -165,7 +177,7 @@ class GpuTopologyLevel(_FastEnum): TOPOLOGY_NODE = NVML_TOPOLOGY_NODE TOPOLOGY_SYSTEM = NVML_TOPOLOGY_SYSTEM -class GpuP2PStatus(_FastEnum): +class GpuP2PStatus(_cyb_FastEnum): """ See `nvmlGpuP2PStatus_t`. """ @@ -178,7 +190,7 @@ class GpuP2PStatus(_FastEnum): P2P_STATUS_NOT_SUPPORTED = NVML_P2P_STATUS_NOT_SUPPORTED P2P_STATUS_UNKNOWN = NVML_P2P_STATUS_UNKNOWN -class GpuP2PCapsIndex(_FastEnum): +class GpuP2PCapsIndex(_cyb_FastEnum): """ See `nvmlGpuP2PCapsIndex_t`. """ @@ -190,7 +202,7 @@ class GpuP2PCapsIndex(_FastEnum): P2P_CAPS_INDEX_PROP = NVML_P2P_CAPS_INDEX_PROP P2P_CAPS_INDEX_UNKNOWN = NVML_P2P_CAPS_INDEX_UNKNOWN -class SamplingType(_FastEnum): +class SamplingType(_cyb_FastEnum): """ Represents Type of Sampling Event @@ -208,7 +220,7 @@ class SamplingType(_FastEnum): OFA_UTILIZATION_SAMPLES = (NVML_OFA_UTILIZATION_SAMPLES, 'To represent percent of time during which NVOFA remains busy.') SAMPLINGTYPE_COUNT = NVML_SAMPLINGTYPE_COUNT -class PcieUtilCounter(_FastEnum): +class PcieUtilCounter(_cyb_FastEnum): """ Represents the queryable PCIe utilization counters @@ -218,7 +230,7 @@ class PcieUtilCounter(_FastEnum): PCIE_UTIL_RX_BYTES = NVML_PCIE_UTIL_RX_BYTES PCIE_UTIL_COUNT = NVML_PCIE_UTIL_COUNT -class ValueType(_FastEnum): +class ValueType(_cyb_FastEnum): """ Represents the type for sample value returned @@ -233,7 +245,7 @@ class ValueType(_FastEnum): UNSIGNED_SHORT = NVML_VALUE_TYPE_UNSIGNED_SHORT COUNT = NVML_VALUE_TYPE_COUNT -class PerfPolicyType(_FastEnum): +class PerfPolicyType(_cyb_FastEnum): """ Represents type of perf policy for which violation times can be queried @@ -249,7 +261,7 @@ class PerfPolicyType(_FastEnum): PERF_POLICY_TOTAL_BASE_CLOCKS = (NVML_PERF_POLICY_TOTAL_BASE_CLOCKS, 'Total time the GPU was held below base clocks.') PERF_POLICY_COUNT = NVML_PERF_POLICY_COUNT -class ThermalTarget(_FastEnum): +class ThermalTarget(_cyb_FastEnum): """ Represents the thermal sensor targets @@ -266,7 +278,7 @@ class ThermalTarget(_FastEnum): ALL = NVML_THERMAL_TARGET_ALL UNKNOWN = NVML_THERMAL_TARGET_UNKNOWN -class ThermalController(_FastEnum): +class ThermalController(_cyb_FastEnum): """ Represents the thermal sensor controllers @@ -292,7 +304,7 @@ class ThermalController(_FastEnum): ADT7473S = NVML_THERMAL_CONTROLLER_ADT7473S UNKNOWN = NVML_THERMAL_CONTROLLER_UNKNOWN -class CoolerControl(_FastEnum): +class CoolerControl(_cyb_FastEnum): """ Cooler control type @@ -303,7 +315,7 @@ class CoolerControl(_FastEnum): THERMAL_COOLER_SIGNAL_VARIABLE = (NVML_THERMAL_COOLER_SIGNAL_VARIABLE, "This cooler's level can be adjusted from some minimum to some maximum (eg a knob).") THERMAL_COOLER_SIGNAL_COUNT = NVML_THERMAL_COOLER_SIGNAL_COUNT -class CoolerTarget(_FastEnum): +class CoolerTarget(_cyb_FastEnum): """ Cooler's target @@ -315,7 +327,7 @@ class CoolerTarget(_FastEnum): THERMAL_POWER_SUPPLY = (NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY, 'This cooler can cool the power supply.') THERMAL_GPU_RELATED = (NVML_THERMAL_COOLER_TARGET_GPU_RELATED, 'This cooler cools all of the components related to its target gpu. GPU_RELATED = GPU | MEMORY | POWER_SUPPLY.') -class UUIDType(_FastEnum): +class UUIDType(_cyb_FastEnum): """ Enum to represent different UUID types @@ -325,7 +337,7 @@ class UUIDType(_FastEnum): ASCII = (NVML_UUID_TYPE_ASCII, 'ASCII format type.') BINARY = (NVML_UUID_TYPE_BINARY, 'Binary format type.') -class EnableState(_FastEnum): +class EnableState(_cyb_FastEnum): """ Generic enable/disable enum. @@ -334,7 +346,7 @@ class EnableState(_FastEnum): FEATURE_DISABLED = (NVML_FEATURE_DISABLED, 'Feature disabled.') FEATURE_ENABLED = (NVML_FEATURE_ENABLED, 'Feature enabled.') -class BrandType(_FastEnum): +class BrandType(_cyb_FastEnum): """ - The Brand of the GPU @@ -358,34 +370,38 @@ class BrandType(_FastEnum): BRAND_NVIDIA = NVML_BRAND_NVIDIA BRAND_GEFORCE_RTX = NVML_BRAND_GEFORCE_RTX BRAND_TITAN_RTX = NVML_BRAND_TITAN_RTX + BRAND_NVIDIA_DLA = NVML_BRAND_NVIDIA_DLA + BRAND_NVIDIA_VGAMEDEV = NVML_BRAND_NVIDIA_VGAMEDEV + BRAND_NVIDIA_NPU = NVML_BRAND_NVIDIA_NPU BRAND_COUNT = NVML_BRAND_COUNT -class TemperatureThresholds(_FastEnum): +class TemperatureThresholds(_cyb_FastEnum): """ Temperature thresholds. See `nvmlTemperatureThresholds_t`. """ - TEMPERATURE_THRESHOLD_SHUTDOWN = NVML_TEMPERATURE_THRESHOLD_SHUTDOWN - TEMPERATURE_THRESHOLD_SLOWDOWN = NVML_TEMPERATURE_THRESHOLD_SLOWDOWN - TEMPERATURE_THRESHOLD_MEM_MAX = NVML_TEMPERATURE_THRESHOLD_MEM_MAX - TEMPERATURE_THRESHOLD_GPU_MAX = NVML_TEMPERATURE_THRESHOLD_GPU_MAX - TEMPERATURE_THRESHOLD_ACOUSTIC_MIN = NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MIN - TEMPERATURE_THRESHOLD_ACOUSTIC_CURR = NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_CURR - TEMPERATURE_THRESHOLD_ACOUSTIC_MAX = NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MAX - TEMPERATURE_THRESHOLD_GPS_CURR = NVML_TEMPERATURE_THRESHOLD_GPS_CURR + TEMPERATURE_THRESHOLD_SHUTDOWN = (NVML_TEMPERATURE_THRESHOLD_SHUTDOWN, 'Temperature at which the GPU will shut down for HW protection') + TEMPERATURE_THRESHOLD_SLOWDOWN = (NVML_TEMPERATURE_THRESHOLD_SLOWDOWN, 'Temperature at which the GPU will begin HW slowdown') + TEMPERATURE_THRESHOLD_MEM_MAX = (NVML_TEMPERATURE_THRESHOLD_MEM_MAX, 'Memory Temperature at which the GPU will begin SW slowdown') + TEMPERATURE_THRESHOLD_GPU_MAX = (NVML_TEMPERATURE_THRESHOLD_GPU_MAX, 'GPU Temperature at which the GPU can be throttled below base clock') + TEMPERATURE_THRESHOLD_ACOUSTIC_MIN = (NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MIN, 'Minimum GPU Temperature that can be set as acoustic threshold') + TEMPERATURE_THRESHOLD_ACOUSTIC_CURR = (NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_CURR, 'Current temperature that is set as acoustic threshold.') + TEMPERATURE_THRESHOLD_ACOUSTIC_MAX = (NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MAX, 'Maximum GPU temperature that can be set as acoustic threshold.') + TEMPERATURE_THRESHOLD_GPS_CURR = (NVML_TEMPERATURE_THRESHOLD_GPS_CURR, 'Current temperature that is set as gps threshold.') TEMPERATURE_THRESHOLD_COUNT = NVML_TEMPERATURE_THRESHOLD_COUNT -class TemperatureSensors(_FastEnum): +class TemperatureSensors(_cyb_FastEnum): """ Temperature sensors. See `nvmlTemperatureSensors_t`. """ TEMPERATURE_GPU = (NVML_TEMPERATURE_GPU, 'Temperature sensor for the GPU die.') + TEMPERATURE_GPU_MAX = (NVML_TEMPERATURE_GPU_MAX, 'Temperature from the hottest part of the GPU die.') TEMPERATURE_COUNT = NVML_TEMPERATURE_COUNT -class ComputeMode(_FastEnum): +class ComputeMode(_cyb_FastEnum): """ Compute mode. NVML_COMPUTEMODE_EXCLUSIVE_PROCESS was added in CUDA 4.0. Earlier CUDA versions supported a single exclusive mode, which is @@ -399,7 +415,7 @@ class ComputeMode(_FastEnum): COMPUTEMODE_EXCLUSIVE_PROCESS = (NVML_COMPUTEMODE_EXCLUSIVE_PROCESS, 'Compute-exclusive-process mode -- only one context per device, usable from multiple threads at a time.') COMPUTEMODE_COUNT = NVML_COMPUTEMODE_COUNT -class MemoryErrorType(_FastEnum): +class MemoryErrorType(_cyb_FastEnum): """ Memory error types @@ -409,7 +425,7 @@ class MemoryErrorType(_FastEnum): UNCORRECTED = (NVML_MEMORY_ERROR_TYPE_UNCORRECTED, 'A memory error that was not corrected For ECC errors, these are double bit errors For Texture memory, these are errors where the resend fails') COUNT = (NVML_MEMORY_ERROR_TYPE_COUNT, 'Count of memory error types.') -class NvlinkVersion(_FastEnum): +class NvlinkVersion(_cyb_FastEnum): """ Represents Nvlink Version @@ -425,7 +441,7 @@ class NvlinkVersion(_FastEnum): VERSION_5_0 = (NVML_NVLINK_VERSION_5_0, 'NVLink Version 5.0.') VERSION_6_0 = (NVML_NVLINK_VERSION_6_0, 'NVLink Version 6.0.') -class EccCounterType(_FastEnum): +class EccCounterType(_cyb_FastEnum): """ ECC counter types. Note: Volatile counts are reset each time the driver loads. On Windows this is once per boot. On Linux this can be @@ -440,7 +456,7 @@ class EccCounterType(_FastEnum): AGGREGATE_ECC = (NVML_AGGREGATE_ECC, 'Aggregate counts persist across reboots (i.e. for the lifetime of the device).') COUNT = (NVML_ECC_COUNTER_TYPE_COUNT, 'Count of memory counter types.') -class ClockType(_FastEnum): +class ClockType(_cyb_FastEnum): """ Clock types. All speeds are in Mhz. @@ -452,7 +468,7 @@ class ClockType(_FastEnum): CLOCK_VIDEO = (NVML_CLOCK_VIDEO, 'Video encoder/decoder clock domain.') CLOCK_COUNT = (NVML_CLOCK_COUNT, 'Count of clock types.') -class ClockId(_FastEnum): +class ClockId(_cyb_FastEnum): """ Clock Ids. These are used in combination with `nvmlClockType_t` to specify a single clock value. @@ -465,7 +481,7 @@ class ClockId(_FastEnum): CUSTOMER_BOOST_MAX = (NVML_CLOCK_ID_CUSTOMER_BOOST_MAX, 'OEM-defined maximum clock rate.') COUNT = (NVML_CLOCK_ID_COUNT, 'Count of Clock Ids.') -class DriverModel(_FastEnum): +class DriverModel(_cyb_FastEnum): """ Driver models. Windows only. @@ -475,7 +491,7 @@ class DriverModel(_FastEnum): DRIVER_WDM = (NVML_DRIVER_WDM, 'WDM (TCC) model (deprecated) -- GPU treated as a generic compute device.') DRIVER_MCDM = (NVML_DRIVER_MCDM, 'MCDM driver model -- GPU treated as a Microsoft compute device.') -class Pstates(_FastEnum): +class Pstates(_cyb_FastEnum): """ Allowed PStates. @@ -499,7 +515,7 @@ class Pstates(_FastEnum): PSTATE_15 = (NVML_PSTATE_15, 'Performance state 15 -- Minimum Performance.') PSTATE_UNKNOWN = (NVML_PSTATE_UNKNOWN, 'Unknown performance state.') -class GpuOperationMode(_FastEnum): +class GpuOperationMode(_cyb_FastEnum): """ GPU Operation Mode GOM allows to reduce power usage and optimize GPU throughput by disabling GPU features. Each GOM is designed to meet @@ -511,7 +527,7 @@ class GpuOperationMode(_FastEnum): GOM_COMPUTE = (NVML_GOM_COMPUTE, 'Designed for running only compute tasks. Graphics operations are not allowed') GOM_LOW_DP = (NVML_GOM_LOW_DP, "Designed for running graphics applications that don't require high bandwidth double precision") -class InforomObject(_FastEnum): +class InforomObject(_cyb_FastEnum): """ Available infoROM objects. @@ -523,7 +539,7 @@ class InforomObject(_FastEnum): INFOROM_DEN = (NVML_INFOROM_DEN, 'DRAM Encryption object.') INFOROM_COUNT = (NVML_INFOROM_COUNT, 'This counts the number of infoROM objects the driver knows about.') -class Return(_FastEnum): +class Return(_cyb_FastEnum): """ Return values for NVML API calls. @@ -562,7 +578,7 @@ class Return(_FastEnum): ERROR_RESET_TYPE_NOT_SUPPORTED = (NVML_ERROR_RESET_TYPE_NOT_SUPPORTED, 'Reset not supported for given device/parameters.') ERROR_UNKNOWN = (NVML_ERROR_UNKNOWN, 'An internal driver error occurred.') -class MemoryLocation(_FastEnum): +class MemoryLocation(_cyb_FastEnum): """ See `nvmlDeviceGetMemoryErrorCounter` @@ -579,7 +595,7 @@ class MemoryLocation(_FastEnum): SRAM = (NVML_MEMORY_LOCATION_SRAM, 'Turing+ SRAM.') COUNT = (NVML_MEMORY_LOCATION_COUNT, 'This counts the number of memory locations the driver knows about.') -class PageRetirementCause(_FastEnum): +class PageRetirementCause(_cyb_FastEnum): """ Causes for page retirement @@ -589,7 +605,7 @@ class PageRetirementCause(_FastEnum): DOUBLE_BIT_ECC_ERROR = (NVML_PAGE_RETIREMENT_CAUSE_DOUBLE_BIT_ECC_ERROR, 'Page was retired due to double bit ECC error.') COUNT = NVML_PAGE_RETIREMENT_CAUSE_COUNT -class RestrictedAPI(_FastEnum): +class RestrictedAPI(_cyb_FastEnum): """ API types that allow changes to default permission restrictions @@ -599,7 +615,7 @@ class RestrictedAPI(_FastEnum): SET_AUTO_BOOSTED_CLOCKS = (NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS, 'APIs that enable/disable Auto Boosted clocks see nvmlDeviceSetAutoBoostedClocksEnabled') COUNT = NVML_RESTRICTED_API_COUNT -class GpuUtilizationDomainId(_FastEnum): +class GpuUtilizationDomainId(_cyb_FastEnum): """ Represents the GPU utilization domains @@ -610,7 +626,7 @@ class GpuUtilizationDomainId(_FastEnum): GPU_UTILIZATION_DOMAIN_VID = (NVML_GPU_UTILIZATION_DOMAIN_VID, 'Video engine domain.') GPU_UTILIZATION_DOMAIN_BUS = (NVML_GPU_UTILIZATION_DOMAIN_BUS, 'Bus interface domain.') -class GpuVirtualizationMode(_FastEnum): +class GpuVirtualizationMode(_cyb_FastEnum): """ GPU virtualization mode types. @@ -622,7 +638,7 @@ class GpuVirtualizationMode(_FastEnum): HOST_VGPU = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU, 'Device is associated with VGX hypervisor in vGPU mode.') HOST_VSGA = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA, 'Device is associated with VGX hypervisor in vSGA mode.') -class HostVgpuMode(_FastEnum): +class HostVgpuMode(_cyb_FastEnum): """ Host vGPU modes @@ -631,7 +647,7 @@ class HostVgpuMode(_FastEnum): NON_SRIOV = (NVML_HOST_VGPU_MODE_NON_SRIOV, 'Non SR-IOV mode.') SRIOV = (NVML_HOST_VGPU_MODE_SRIOV, 'SR-IOV mode.') -class VgpuVmIdType(_FastEnum): +class VgpuVmIdType(_cyb_FastEnum): """ Types of VM identifiers @@ -640,7 +656,7 @@ class VgpuVmIdType(_FastEnum): VGPU_VM_ID_DOMAIN_ID = (NVML_VGPU_VM_ID_DOMAIN_ID, 'VM ID represents DOMAIN ID.') VGPU_VM_ID_UUID = (NVML_VGPU_VM_ID_UUID, 'VM ID represents UUID.') -class VgpuGuestInfoState(_FastEnum): +class VgpuGuestInfoState(_cyb_FastEnum): """ vGPU GUEST info state @@ -649,7 +665,7 @@ class VgpuGuestInfoState(_FastEnum): VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED, 'Guest-dependent fields uninitialized.') VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED, 'Guest-dependent fields initialized.') -class GridLicenseFeatureCode(_FastEnum): +class GridLicenseFeatureCode(_cyb_FastEnum): """ vGPU software licensable features @@ -661,8 +677,9 @@ class GridLicenseFeatureCode(_FastEnum): VWORKSTATION = (NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION, 'Deprecated, do not use.') GAMING = (NVML_GRID_LICENSE_FEATURE_CODE_GAMING, 'Gaming.') COMPUTE = (NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE, 'Compute.') + VGAMEDEV = (NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV, 'vGameDev') -class VgpuCapability(_FastEnum): +class VgpuCapability(_cyb_FastEnum): """ vGPU queryable capabilities @@ -675,7 +692,7 @@ class VgpuCapability(_FastEnum): VGPU_CAP_EXCLUSIVE_SIZE = (NVML_VGPU_CAP_EXCLUSIVE_SIZE, 'vGPU profile cannot run on a GPU alongside other profiles of different size') VGPU_CAP_COUNT = NVML_VGPU_CAP_COUNT -class VgpuDriverCapability(_FastEnum): +class VgpuDriverCapability(_cyb_FastEnum): """ vGPU driver queryable capabilities @@ -685,7 +702,7 @@ class VgpuDriverCapability(_FastEnum): VGPU_DRIVER_CAP_WARM_UPDATE = (NVML_VGPU_DRIVER_CAP_WARM_UPDATE, 'Supports FSR and warm update of vGPU host driver without terminating the running guest VM.') VGPU_DRIVER_CAP_COUNT = NVML_VGPU_DRIVER_CAP_COUNT -class DeviceVgpuCapability(_FastEnum): +class DeviceVgpuCapability(_cyb_FastEnum): """ Device vGPU queryable capabilities @@ -705,7 +722,7 @@ class DeviceVgpuCapability(_FastEnum): DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = (NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED, 'Set/Get MIG timesliced mode reporting, without impacting the underlying functionality.') DEVICE_VGPU_CAP_COUNT = NVML_DEVICE_VGPU_CAP_COUNT -class DeviceGpuRecoveryAction(_FastEnum): +class DeviceGpuRecoveryAction(_cyb_FastEnum): """ Enum describing the GPU Recovery Action @@ -718,7 +735,7 @@ class DeviceGpuRecoveryAction(_FastEnum): GPU_RECOVERY_ACTION_DRAIN_AND_RESET = (NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET, 'Drain P2P and Reset Gpu.') GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN = (NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN, 'Recover IMEX Domain.') -class FanState(_FastEnum): +class FanState(_cyb_FastEnum): """ Fan state enum. @@ -727,7 +744,7 @@ class FanState(_FastEnum): FAN_NORMAL = (NVML_FAN_NORMAL, 'Fan is working properly.') FAN_FAILED = (NVML_FAN_FAILED, 'Fan has failed.') -class LedColor(_FastEnum): +class LedColor(_cyb_FastEnum): """ Led color enum. @@ -736,7 +753,7 @@ class LedColor(_FastEnum): GREEN = (NVML_LED_COLOR_GREEN, 'GREEN, indicates good health.') AMBER = (NVML_LED_COLOR_AMBER, 'AMBER, indicates problem.') -class EncoderType(_FastEnum): +class EncoderType(_cyb_FastEnum): """ Represents type of encoder for capacity can be queried @@ -747,7 +764,7 @@ class EncoderType(_FastEnum): ENCODER_QUERY_AV1 = (NVML_ENCODER_QUERY_AV1, 'AV1 encoder.') ENCODER_QUERY_UNKNOWN = (NVML_ENCODER_QUERY_UNKNOWN, 'Unknown encoder.') -class FBCSessionType(_FastEnum): +class FBCSessionType(_cyb_FastEnum): """ Represents frame buffer capture session type @@ -759,7 +776,7 @@ class FBCSessionType(_FastEnum): VID = (NVML_FBC_SESSION_TYPE_VID, 'Vid.') HWENC = (NVML_FBC_SESSION_TYPE_HWENC, 'HEnc.') -class DetachGpuState(_FastEnum): +class DetachGpuState(_cyb_FastEnum): """ Is the GPU device to be removed from the kernel by `nvmlDeviceRemoveGpu()` @@ -769,7 +786,7 @@ class DetachGpuState(_FastEnum): DETACH_GPU_KEEP = NVML_DETACH_GPU_KEEP DETACH_GPU_REMOVE = NVML_DETACH_GPU_REMOVE -class PcieLinkState(_FastEnum): +class PcieLinkState(_cyb_FastEnum): """ Parent bridge PCIe link state requested by `nvmlDeviceRemoveGpu()` @@ -778,7 +795,7 @@ class PcieLinkState(_FastEnum): PCIE_LINK_KEEP = NVML_PCIE_LINK_KEEP PCIE_LINK_SHUT_DOWN = NVML_PCIE_LINK_SHUT_DOWN -class ClockLimitId(_FastEnum): +class ClockLimitId(_cyb_FastEnum): """ See `nvmlClockLimitId_t`. """ @@ -786,7 +803,7 @@ class ClockLimitId(_FastEnum): TDP = NVML_CLOCK_LIMIT_ID_TDP UNLIMITED = NVML_CLOCK_LIMIT_ID_UNLIMITED -class VgpuVmCompatibility(_FastEnum): +class VgpuVmCompatibility(_cyb_FastEnum): """ vGPU VM compatibility codes @@ -798,7 +815,7 @@ class VgpuVmCompatibility(_FastEnum): SLEEP = (NVML_VGPU_VM_COMPATIBILITY_SLEEP, 'vGPU is runnable from a sleeped state (ACPI S3)') LIVE = (NVML_VGPU_VM_COMPATIBILITY_LIVE, 'vGPU is runnable from a live/paused (ACPI S0)') -class VgpuPgpuCompatibilityLimitCode(_FastEnum): +class VgpuPgpuCompatibilityLimitCode(_cyb_FastEnum): """ vGPU-pGPU compatibility limit codes @@ -810,7 +827,7 @@ class VgpuPgpuCompatibilityLimitCode(_FastEnum): VGPU_COMPATIBILITY_LIMIT_GPU = (NVML_VGPU_COMPATIBILITY_LIMIT_GPU, 'Compatibility is limited by GPU hardware.') VGPU_COMPATIBILITY_LIMIT_OTHER = (NVML_VGPU_COMPATIBILITY_LIMIT_OTHER, 'Compatibility is limited by an undefined factor.') -class GpmMetricId(_FastEnum): +class GpmMetricId(_cyb_FastEnum): """ GPM Metric Identifiers @@ -887,152 +904,152 @@ class GpmMetricId(_FastEnum): GPM_METRIC_NVLINK_L16_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L16_TX_PER_SEC, 'NvLink write bandwidth for link 16 in MiB/sec.') GPM_METRIC_NVLINK_L17_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L17_RX_PER_SEC, 'NvLink read bandwidth for link 17 in MiB/sec.') GPM_METRIC_NVLINK_L17_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L17_TX_PER_SEC, 'NvLink write bandwidth for link 17 in MiB/sec.') - GPM_METRIC_C2C_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC - GPM_METRIC_C2C_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC - GPM_METRIC_HOSTMEM_CACHE_HIT = NVML_GPM_METRIC_HOSTMEM_CACHE_HIT - GPM_METRIC_HOSTMEM_CACHE_MISS = NVML_GPM_METRIC_HOSTMEM_CACHE_MISS - GPM_METRIC_PEERMEM_CACHE_HIT = NVML_GPM_METRIC_PEERMEM_CACHE_HIT - GPM_METRIC_PEERMEM_CACHE_MISS = NVML_GPM_METRIC_PEERMEM_CACHE_MISS - GPM_METRIC_DRAM_CACHE_HIT = NVML_GPM_METRIC_DRAM_CACHE_HIT - GPM_METRIC_DRAM_CACHE_MISS = NVML_GPM_METRIC_DRAM_CACHE_MISS - GPM_METRIC_NVENC_0_UTIL = NVML_GPM_METRIC_NVENC_0_UTIL - GPM_METRIC_NVENC_1_UTIL = NVML_GPM_METRIC_NVENC_1_UTIL - GPM_METRIC_NVENC_2_UTIL = NVML_GPM_METRIC_NVENC_2_UTIL - GPM_METRIC_NVENC_3_UTIL = NVML_GPM_METRIC_NVENC_3_UTIL - GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR0_CTXSW_REQUESTS = NVML_GPM_METRIC_GR0_CTXSW_REQUESTS - GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR0_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT - GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR1_CTXSW_REQUESTS = NVML_GPM_METRIC_GR1_CTXSW_REQUESTS - GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR1_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT - GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR2_CTXSW_REQUESTS = NVML_GPM_METRIC_GR2_CTXSW_REQUESTS - GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR2_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT - GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR3_CTXSW_REQUESTS = NVML_GPM_METRIC_GR3_CTXSW_REQUESTS - GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR3_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT - GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR4_CTXSW_REQUESTS = NVML_GPM_METRIC_GR4_CTXSW_REQUESTS - GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR4_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT - GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR5_CTXSW_REQUESTS = NVML_GPM_METRIC_GR5_CTXSW_REQUESTS - GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR5_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT - GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR6_CTXSW_REQUESTS = NVML_GPM_METRIC_GR6_CTXSW_REQUESTS - GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR6_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT - GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR7_CTXSW_REQUESTS = NVML_GPM_METRIC_GR7_CTXSW_REQUESTS - GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR7_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT - GPM_METRIC_NVLINK_L18_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L18_RX_PER_SEC - GPM_METRIC_NVLINK_L18_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L18_TX_PER_SEC - GPM_METRIC_NVLINK_L19_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L19_RX_PER_SEC - GPM_METRIC_NVLINK_L19_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L19_TX_PER_SEC - GPM_METRIC_NVLINK_L20_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L20_RX_PER_SEC - GPM_METRIC_NVLINK_L20_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L20_TX_PER_SEC - GPM_METRIC_NVLINK_L21_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L21_RX_PER_SEC - GPM_METRIC_NVLINK_L21_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L21_TX_PER_SEC - GPM_METRIC_NVLINK_L22_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L22_RX_PER_SEC - GPM_METRIC_NVLINK_L22_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L22_TX_PER_SEC - GPM_METRIC_NVLINK_L23_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L23_RX_PER_SEC - GPM_METRIC_NVLINK_L23_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L23_TX_PER_SEC - GPM_METRIC_NVLINK_L24_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L24_RX_PER_SEC - GPM_METRIC_NVLINK_L24_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L24_TX_PER_SEC - GPM_METRIC_NVLINK_L25_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L25_RX_PER_SEC - GPM_METRIC_NVLINK_L25_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L25_TX_PER_SEC - GPM_METRIC_NVLINK_L26_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L26_RX_PER_SEC - GPM_METRIC_NVLINK_L26_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L26_TX_PER_SEC - GPM_METRIC_NVLINK_L27_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L27_RX_PER_SEC - GPM_METRIC_NVLINK_L27_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L27_TX_PER_SEC - GPM_METRIC_NVLINK_L28_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L28_RX_PER_SEC - GPM_METRIC_NVLINK_L28_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L28_TX_PER_SEC - GPM_METRIC_NVLINK_L29_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L29_RX_PER_SEC - GPM_METRIC_NVLINK_L29_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L29_TX_PER_SEC - GPM_METRIC_NVLINK_L30_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L30_RX_PER_SEC - GPM_METRIC_NVLINK_L30_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L30_TX_PER_SEC - GPM_METRIC_NVLINK_L31_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L31_RX_PER_SEC - GPM_METRIC_NVLINK_L31_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L31_TX_PER_SEC - GPM_METRIC_NVLINK_L32_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L32_RX_PER_SEC - GPM_METRIC_NVLINK_L32_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L32_TX_PER_SEC - GPM_METRIC_NVLINK_L33_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L33_RX_PER_SEC - GPM_METRIC_NVLINK_L33_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L33_TX_PER_SEC - GPM_METRIC_NVLINK_L34_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L34_RX_PER_SEC - GPM_METRIC_NVLINK_L34_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L34_TX_PER_SEC - GPM_METRIC_NVLINK_L35_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L35_RX_PER_SEC - GPM_METRIC_NVLINK_L35_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L35_TX_PER_SEC + GPM_METRIC_C2C_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC, 'C2C total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC, 'C2C total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC, 'C2C data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC, 'C2C data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC, 'C2C link 0 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC, 'C2C link 0 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC, 'C2C link 0 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC, 'C2C link 0 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC, 'C2C link 1 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC, 'C2C link 1 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC, 'C2C link 1 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC, 'C2C link 1 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC, 'C2C link 2 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC, 'C2C link 2 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC, 'C2C link 2 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC, 'C2C link 2 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC, 'C2C link 3 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC, 'C2C link 3 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC, 'C2C link 3 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC, 'C2C link 3 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC, 'C2C link 4 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC, 'C2C link 4 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC, 'C2C link 4 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC, 'C2C link 4 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC, 'C2C link 5 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC, 'C2C link 5 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC, 'C2C link 5 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC, 'C2C link 5 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC, 'C2C link 6 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC, 'C2C link 6 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC, 'C2C link 6 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC, 'C2C link 6 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC, 'C2C link 7 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC, 'C2C link 7 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC, 'C2C link 7 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC, 'C2C link 7 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC, 'C2C link 8 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC, 'C2C link 8 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC, 'C2C link 8 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC, 'C2C link 8 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC, 'C2C link 9 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC, 'C2C link 9 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC, 'C2C link 9 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC, 'C2C link 9 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC, 'C2C link 10 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC, 'C2C link 10 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC, 'C2C link 10 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC, 'C2C link 10 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC, 'C2C link 11 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC, 'C2C link 11 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC, 'C2C link 11 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC, 'C2C link 11 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC, 'C2C link 12 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC, 'C2C link 12 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC, 'C2C link 12 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC, 'C2C link 12 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC, 'C2C link 13 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC, 'C2C link 13 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC, 'C2C link 13 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC, 'C2C link 13 data receive bandwidth in MiB/sec.') + GPM_METRIC_HOSTMEM_CACHE_HIT = (NVML_GPM_METRIC_HOSTMEM_CACHE_HIT, 'Percentage of host memory cache hits. 0.0 - 100.0.') + GPM_METRIC_HOSTMEM_CACHE_MISS = (NVML_GPM_METRIC_HOSTMEM_CACHE_MISS, 'Percentage of host memory cache misses. 0.0 - 100.0.') + GPM_METRIC_PEERMEM_CACHE_HIT = (NVML_GPM_METRIC_PEERMEM_CACHE_HIT, 'Percentage of peer memory cache hits. 0.0 - 100.0.') + GPM_METRIC_PEERMEM_CACHE_MISS = (NVML_GPM_METRIC_PEERMEM_CACHE_MISS, 'Percentage of peer memory cache misses. 0.0 - 100.0.') + GPM_METRIC_DRAM_CACHE_HIT = (NVML_GPM_METRIC_DRAM_CACHE_HIT, 'Percentage of DRAM cache hits. 0.0 - 100.0.') + GPM_METRIC_DRAM_CACHE_MISS = (NVML_GPM_METRIC_DRAM_CACHE_MISS, 'Percentage of DRAM cache misses. 0.0 - 100.0.') + GPM_METRIC_NVENC_0_UTIL = (NVML_GPM_METRIC_NVENC_0_UTIL, 'Percent utilization of NVENC 0. 0.0 - 100.0.') + GPM_METRIC_NVENC_1_UTIL = (NVML_GPM_METRIC_NVENC_1_UTIL, 'Percent utilization of NVENC 1. 0.0 - 100.0.') + GPM_METRIC_NVENC_2_UTIL = (NVML_GPM_METRIC_NVENC_2_UTIL, 'Percent utilization of NVENC 2. 0.0 - 100.0.') + GPM_METRIC_NVENC_3_UTIL = (NVML_GPM_METRIC_NVENC_3_UTIL, 'Percent utilization of NVENC 3. 0.0 - 100.0.') + GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 0.') + GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 0.') + GPM_METRIC_GR0_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR0_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 0.') + GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 0.') + GPM_METRIC_GR0_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 0 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 1.') + GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 1.') + GPM_METRIC_GR1_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR1_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 1.') + GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 1.') + GPM_METRIC_GR1_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 1 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 2.') + GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 2.') + GPM_METRIC_GR2_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR2_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 2.') + GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 2.') + GPM_METRIC_GR2_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 2 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 3.') + GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 3.') + GPM_METRIC_GR3_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR3_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 3.') + GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 3.') + GPM_METRIC_GR3_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 3 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 4.') + GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 4.') + GPM_METRIC_GR4_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR4_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 4.') + GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 4.') + GPM_METRIC_GR4_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 4 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 5.') + GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 5.') + GPM_METRIC_GR5_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR5_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 5.') + GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 5.') + GPM_METRIC_GR5_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 5 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 6.') + GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 6.') + GPM_METRIC_GR6_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR6_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 6.') + GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 6.') + GPM_METRIC_GR6_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 6 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 7.') + GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 7.') + GPM_METRIC_GR7_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR7_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 7.') + GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 7.') + GPM_METRIC_GR7_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 7 context switches were active. 0.0 - 100.0.') + GPM_METRIC_NVLINK_L18_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L18_RX_PER_SEC, 'NvLink read bandwidth for link 18 in MiB/sec.') + GPM_METRIC_NVLINK_L18_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L18_TX_PER_SEC, 'NvLink write bandwidth for link 18 in MiB/sec.') + GPM_METRIC_NVLINK_L19_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L19_RX_PER_SEC, 'NvLink read bandwidth for link 19 in MiB/sec.') + GPM_METRIC_NVLINK_L19_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L19_TX_PER_SEC, 'NvLink write bandwidth for link 19 in MiB/sec.') + GPM_METRIC_NVLINK_L20_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L20_RX_PER_SEC, 'NvLink read bandwidth for link 20 in MiB/sec.') + GPM_METRIC_NVLINK_L20_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L20_TX_PER_SEC, 'NvLink write bandwidth for link 20 in MiB/sec.') + GPM_METRIC_NVLINK_L21_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L21_RX_PER_SEC, 'NvLink read bandwidth for link 21 in MiB/sec.') + GPM_METRIC_NVLINK_L21_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L21_TX_PER_SEC, 'NvLink write bandwidth for link 21 in MiB/sec.') + GPM_METRIC_NVLINK_L22_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L22_RX_PER_SEC, 'NvLink read bandwidth for link 22 in MiB/sec.') + GPM_METRIC_NVLINK_L22_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L22_TX_PER_SEC, 'NvLink write bandwidth for link 22 in MiB/sec.') + GPM_METRIC_NVLINK_L23_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L23_RX_PER_SEC, 'NvLink read bandwidth for link 23 in MiB/sec.') + GPM_METRIC_NVLINK_L23_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L23_TX_PER_SEC, 'NvLink write bandwidth for link 23 in MiB/sec.') + GPM_METRIC_NVLINK_L24_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L24_RX_PER_SEC, 'NvLink read bandwidth for link 24 in MiB/sec.') + GPM_METRIC_NVLINK_L24_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L24_TX_PER_SEC, 'NvLink write bandwidth for link 24 in MiB/sec.') + GPM_METRIC_NVLINK_L25_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L25_RX_PER_SEC, 'NvLink read bandwidth for link 25 in MiB/sec.') + GPM_METRIC_NVLINK_L25_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L25_TX_PER_SEC, 'NvLink write bandwidth for link 25 in MiB/sec.') + GPM_METRIC_NVLINK_L26_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L26_RX_PER_SEC, 'NvLink read bandwidth for link 26 in MiB/sec.') + GPM_METRIC_NVLINK_L26_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L26_TX_PER_SEC, 'NvLink write bandwidth for link 26 in MiB/sec.') + GPM_METRIC_NVLINK_L27_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L27_RX_PER_SEC, 'NvLink read bandwidth for link 27 in MiB/sec.') + GPM_METRIC_NVLINK_L27_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L27_TX_PER_SEC, 'NvLink write bandwidth for link 27 in MiB/sec.') + GPM_METRIC_NVLINK_L28_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L28_RX_PER_SEC, 'NvLink read bandwidth for link 28 in MiB/sec.') + GPM_METRIC_NVLINK_L28_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L28_TX_PER_SEC, 'NvLink write bandwidth for link 28 in MiB/sec.') + GPM_METRIC_NVLINK_L29_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L29_RX_PER_SEC, 'NvLink read bandwidth for link 29 in MiB/sec.') + GPM_METRIC_NVLINK_L29_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L29_TX_PER_SEC, 'NvLink write bandwidth for link 29 in MiB/sec.') + GPM_METRIC_NVLINK_L30_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L30_RX_PER_SEC, 'NvLink read bandwidth for link 30 in MiB/sec.') + GPM_METRIC_NVLINK_L30_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L30_TX_PER_SEC, 'NvLink write bandwidth for link 30 in MiB/sec.') + GPM_METRIC_NVLINK_L31_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L31_RX_PER_SEC, 'NvLink read bandwidth for link 31 in MiB/sec.') + GPM_METRIC_NVLINK_L31_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L31_TX_PER_SEC, 'NvLink write bandwidth for link 31 in MiB/sec.') + GPM_METRIC_NVLINK_L32_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L32_RX_PER_SEC, 'NvLink read bandwidth for link 32 in MiB/sec.') + GPM_METRIC_NVLINK_L32_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L32_TX_PER_SEC, 'NvLink write bandwidth for link 32 in MiB/sec.') + GPM_METRIC_NVLINK_L33_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L33_RX_PER_SEC, 'NvLink read bandwidth for link 33 in MiB/sec.') + GPM_METRIC_NVLINK_L33_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L33_TX_PER_SEC, 'NvLink write bandwidth for link 33 in MiB/sec.') + GPM_METRIC_NVLINK_L34_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L34_RX_PER_SEC, 'NvLink read bandwidth for link 34 in MiB/sec.') + GPM_METRIC_NVLINK_L34_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L34_TX_PER_SEC, 'NvLink write bandwidth for link 34 in MiB/sec.') + GPM_METRIC_NVLINK_L35_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L35_RX_PER_SEC, 'NvLink read bandwidth for link 35 in MiB/sec.') + GPM_METRIC_NVLINK_L35_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L35_TX_PER_SEC, 'NvLink write bandwidth for link 35 in MiB/sec.') GPM_METRIC_SM_CYCLES_ELAPSED = (NVML_GPM_METRIC_SM_CYCLES_ELAPSED, "The GPU's SM cycles elapsed since reboot.") GPM_METRIC_SM_CYCLES_ACTIVE = (NVML_GPM_METRIC_SM_CYCLES_ACTIVE, "The GPU's SM activity since reboot.") GPM_METRIC_MMA_CYCLES_ACTIVE = (NVML_GPM_METRIC_MMA_CYCLES_ACTIVE, "The GPU's SM MMA tensor activity since reboot.") @@ -1044,8 +1061,8 @@ class GpmMetricId(_FastEnum): GPM_METRIC_PCIE_RX = (NVML_GPM_METRIC_PCIE_RX, 'The PCIe RX traffic since reboot.') GPM_METRIC_INTEGER_CYCLES_ACTIVE = (NVML_GPM_METRIC_INTEGER_CYCLES_ACTIVE, "The GPU's SM integer activity since reboot.") GPM_METRIC_FP64_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP64_CYCLES_ACTIVE, "The GPU's SM FP64 activity since reboot.") - GPM_METRIC_FP32_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP32_CYCLES_ACTIVE, "The GPU's SM FP64 activity since reboot.") - GPM_METRIC_FP16_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP16_CYCLES_ACTIVE, "The GPU's SM FP64 activity since reboot.") + GPM_METRIC_FP32_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP32_CYCLES_ACTIVE, "The GPU's SM FP32 activity since reboot.") + GPM_METRIC_FP16_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP16_CYCLES_ACTIVE, "The GPU's SM FP16 activity since reboot.") GPM_METRIC_NVLINK_L0_RX = (NVML_GPM_METRIC_NVLINK_L0_RX, 'NvLink read for link 0 in bytes since reboot.') GPM_METRIC_NVLINK_L0_TX = (NVML_GPM_METRIC_NVLINK_L0_TX, 'NvLink write for link 0 in bytes since reboot.') GPM_METRIC_NVLINK_L1_RX = (NVML_GPM_METRIC_NVLINK_L1_RX, 'NvLink read for link 1 in bytes since reboot.') @@ -1118,9 +1135,153 @@ class GpmMetricId(_FastEnum): GPM_METRIC_NVLINK_L34_TX = (NVML_GPM_METRIC_NVLINK_L34_TX, 'NvLink write for link 34 in bytes since reboot.') GPM_METRIC_NVLINK_L35_RX = (NVML_GPM_METRIC_NVLINK_L35_RX, 'NvLink read for link 35 in bytes since reboot.') GPM_METRIC_NVLINK_L35_TX = (NVML_GPM_METRIC_NVLINK_L35_TX, 'NvLink write for link 35 in bytes since reboot.') + GPM_METRIC_NVLINK_L36_RX = (NVML_GPM_METRIC_NVLINK_L36_RX, 'NvLink read for link 36 in bytes since reboot.') + GPM_METRIC_NVLINK_L36_TX = (NVML_GPM_METRIC_NVLINK_L36_TX, 'NvLink write for link 36 in bytes since reboot.') + GPM_METRIC_NVLINK_L37_RX = (NVML_GPM_METRIC_NVLINK_L37_RX, 'NvLink read for link 37 in bytes since reboot.') + GPM_METRIC_NVLINK_L37_TX = (NVML_GPM_METRIC_NVLINK_L37_TX, 'NvLink write for link 37 in bytes since reboot.') + GPM_METRIC_NVLINK_L38_RX = (NVML_GPM_METRIC_NVLINK_L38_RX, 'NvLink read for link 38 in bytes since reboot.') + GPM_METRIC_NVLINK_L38_TX = (NVML_GPM_METRIC_NVLINK_L38_TX, 'NvLink write for link 38 in bytes since reboot.') + GPM_METRIC_NVLINK_L39_RX = (NVML_GPM_METRIC_NVLINK_L39_RX, 'NvLink read for link 39 in bytes since reboot.') + GPM_METRIC_NVLINK_L39_TX = (NVML_GPM_METRIC_NVLINK_L39_TX, 'NvLink write for link 39 in bytes since reboot.') + GPM_METRIC_NVLINK_L40_RX = (NVML_GPM_METRIC_NVLINK_L40_RX, 'NvLink read for link 40 in bytes since reboot.') + GPM_METRIC_NVLINK_L40_TX = (NVML_GPM_METRIC_NVLINK_L40_TX, 'NvLink write for link 40 in bytes since reboot.') + GPM_METRIC_NVLINK_L41_RX = (NVML_GPM_METRIC_NVLINK_L41_RX, 'NvLink read for link 41 in bytes since reboot.') + GPM_METRIC_NVLINK_L41_TX = (NVML_GPM_METRIC_NVLINK_L41_TX, 'NvLink write for link 41 in bytes since reboot.') + GPM_METRIC_NVLINK_L42_RX = (NVML_GPM_METRIC_NVLINK_L42_RX, 'NvLink read for link 42 in bytes since reboot.') + GPM_METRIC_NVLINK_L42_TX = (NVML_GPM_METRIC_NVLINK_L42_TX, 'NvLink write for link 42 in bytes since reboot.') + GPM_METRIC_NVLINK_L43_RX = (NVML_GPM_METRIC_NVLINK_L43_RX, 'NvLink read for link 43 in bytes since reboot.') + GPM_METRIC_NVLINK_L43_TX = (NVML_GPM_METRIC_NVLINK_L43_TX, 'NvLink write for link 43 in bytes since reboot.') + GPM_METRIC_NVLINK_L44_RX = (NVML_GPM_METRIC_NVLINK_L44_RX, 'NvLink read for link 44 in bytes since reboot.') + GPM_METRIC_NVLINK_L44_TX = (NVML_GPM_METRIC_NVLINK_L44_TX, 'NvLink write for link 44 in bytes since reboot.') + GPM_METRIC_NVLINK_L45_RX = (NVML_GPM_METRIC_NVLINK_L45_RX, 'NvLink read for link 45 in bytes since reboot.') + GPM_METRIC_NVLINK_L45_TX = (NVML_GPM_METRIC_NVLINK_L45_TX, 'NvLink write for link 45 in bytes since reboot.') + GPM_METRIC_NVLINK_L46_RX = (NVML_GPM_METRIC_NVLINK_L46_RX, 'NvLink read for link 46 in bytes since reboot.') + GPM_METRIC_NVLINK_L46_TX = (NVML_GPM_METRIC_NVLINK_L46_TX, 'NvLink write for link 46 in bytes since reboot.') + GPM_METRIC_NVLINK_L47_RX = (NVML_GPM_METRIC_NVLINK_L47_RX, 'NvLink read for link 47 in bytes since reboot.') + GPM_METRIC_NVLINK_L47_TX = (NVML_GPM_METRIC_NVLINK_L47_TX, 'NvLink write for link 47 in bytes since reboot.') + GPM_METRIC_NVLINK_L48_RX = (NVML_GPM_METRIC_NVLINK_L48_RX, 'NvLink read for link 48 in bytes since reboot.') + GPM_METRIC_NVLINK_L48_TX = (NVML_GPM_METRIC_NVLINK_L48_TX, 'NvLink write for link 48 in bytes since reboot.') + GPM_METRIC_NVLINK_L49_RX = (NVML_GPM_METRIC_NVLINK_L49_RX, 'NvLink read for link 49 in bytes since reboot.') + GPM_METRIC_NVLINK_L49_TX = (NVML_GPM_METRIC_NVLINK_L49_TX, 'NvLink write for link 49 in bytes since reboot.') + GPM_METRIC_NVLINK_L50_RX = (NVML_GPM_METRIC_NVLINK_L50_RX, 'NvLink read for link 50 in bytes since reboot.') + GPM_METRIC_NVLINK_L50_TX = (NVML_GPM_METRIC_NVLINK_L50_TX, 'NvLink write for link 50 in bytes since reboot.') + GPM_METRIC_NVLINK_L51_RX = (NVML_GPM_METRIC_NVLINK_L51_RX, 'NvLink read for link 51 in bytes since reboot.') + GPM_METRIC_NVLINK_L51_TX = (NVML_GPM_METRIC_NVLINK_L51_TX, 'NvLink write for link 51 in bytes since reboot.') + GPM_METRIC_NVLINK_L52_RX = (NVML_GPM_METRIC_NVLINK_L52_RX, 'NvLink read for link 52 in bytes since reboot.') + GPM_METRIC_NVLINK_L52_TX = (NVML_GPM_METRIC_NVLINK_L52_TX, 'NvLink write for link 52 in bytes since reboot.') + GPM_METRIC_NVLINK_L53_RX = (NVML_GPM_METRIC_NVLINK_L53_RX, 'NvLink read for link 53 in bytes since reboot.') + GPM_METRIC_NVLINK_L53_TX = (NVML_GPM_METRIC_NVLINK_L53_TX, 'NvLink write for link 53 in bytes since reboot.') + GPM_METRIC_NVLINK_L54_RX = (NVML_GPM_METRIC_NVLINK_L54_RX, 'NvLink read for link 54 in bytes since reboot.') + GPM_METRIC_NVLINK_L54_TX = (NVML_GPM_METRIC_NVLINK_L54_TX, 'NvLink write for link 54 in bytes since reboot.') + GPM_METRIC_NVLINK_L55_RX = (NVML_GPM_METRIC_NVLINK_L55_RX, 'NvLink read for link 55 in bytes since reboot.') + GPM_METRIC_NVLINK_L55_TX = (NVML_GPM_METRIC_NVLINK_L55_TX, 'NvLink write for link 55 in bytes since reboot.') + GPM_METRIC_NVLINK_L56_RX = (NVML_GPM_METRIC_NVLINK_L56_RX, 'NvLink read for link 56 in bytes since reboot.') + GPM_METRIC_NVLINK_L56_TX = (NVML_GPM_METRIC_NVLINK_L56_TX, 'NvLink write for link 56 in bytes since reboot.') + GPM_METRIC_NVLINK_L57_RX = (NVML_GPM_METRIC_NVLINK_L57_RX, 'NvLink read for link 57 in bytes since reboot.') + GPM_METRIC_NVLINK_L57_TX = (NVML_GPM_METRIC_NVLINK_L57_TX, 'NvLink write for link 57 in bytes since reboot.') + GPM_METRIC_NVLINK_L58_RX = (NVML_GPM_METRIC_NVLINK_L58_RX, 'NvLink read for link 58 in bytes since reboot.') + GPM_METRIC_NVLINK_L58_TX = (NVML_GPM_METRIC_NVLINK_L58_TX, 'NvLink write for link 58 in bytes since reboot.') + GPM_METRIC_NVLINK_L59_RX = (NVML_GPM_METRIC_NVLINK_L59_RX, 'NvLink read for link 59 in bytes since reboot.') + GPM_METRIC_NVLINK_L59_TX = (NVML_GPM_METRIC_NVLINK_L59_TX, 'NvLink write for link 59 in bytes since reboot.') + GPM_METRIC_NVLINK_L60_RX = (NVML_GPM_METRIC_NVLINK_L60_RX, 'NvLink read for link 60 in bytes since reboot.') + GPM_METRIC_NVLINK_L60_TX = (NVML_GPM_METRIC_NVLINK_L60_TX, 'NvLink write for link 60 in bytes since reboot.') + GPM_METRIC_NVLINK_L61_RX = (NVML_GPM_METRIC_NVLINK_L61_RX, 'NvLink read for link 61 in bytes since reboot.') + GPM_METRIC_NVLINK_L61_TX = (NVML_GPM_METRIC_NVLINK_L61_TX, 'NvLink write for link 61 in bytes since reboot.') + GPM_METRIC_NVLINK_L62_RX = (NVML_GPM_METRIC_NVLINK_L62_RX, 'NvLink read for link 62 in bytes since reboot.') + GPM_METRIC_NVLINK_L62_TX = (NVML_GPM_METRIC_NVLINK_L62_TX, 'NvLink write for link 62 in bytes since reboot.') + GPM_METRIC_NVLINK_L63_RX = (NVML_GPM_METRIC_NVLINK_L63_RX, 'NvLink read for link 63 in bytes since reboot.') + GPM_METRIC_NVLINK_L63_TX = (NVML_GPM_METRIC_NVLINK_L63_TX, 'NvLink write for link 63 in bytes since reboot.') + GPM_METRIC_NVLINK_L64_RX = (NVML_GPM_METRIC_NVLINK_L64_RX, 'NvLink read for link 64 in bytes since reboot.') + GPM_METRIC_NVLINK_L64_TX = (NVML_GPM_METRIC_NVLINK_L64_TX, 'NvLink write for link 64 in bytes since reboot.') + GPM_METRIC_NVLINK_L65_RX = (NVML_GPM_METRIC_NVLINK_L65_RX, 'NvLink read for link 65 in bytes since reboot.') + GPM_METRIC_NVLINK_L65_TX = (NVML_GPM_METRIC_NVLINK_L65_TX, 'NvLink write for link 65 in bytes since reboot.') + GPM_METRIC_NVLINK_L66_RX = (NVML_GPM_METRIC_NVLINK_L66_RX, 'NvLink read for link 66 in bytes since reboot.') + GPM_METRIC_NVLINK_L66_TX = (NVML_GPM_METRIC_NVLINK_L66_TX, 'NvLink write for link 66 in bytes since reboot.') + GPM_METRIC_NVLINK_L67_RX = (NVML_GPM_METRIC_NVLINK_L67_RX, 'NvLink read for link 67 in bytes since reboot.') + GPM_METRIC_NVLINK_L67_TX = (NVML_GPM_METRIC_NVLINK_L67_TX, 'NvLink write for link 67 in bytes since reboot.') + GPM_METRIC_NVLINK_L68_RX = (NVML_GPM_METRIC_NVLINK_L68_RX, 'NvLink read for link 68 in bytes since reboot.') + GPM_METRIC_NVLINK_L68_TX = (NVML_GPM_METRIC_NVLINK_L68_TX, 'NvLink write for link 68 in bytes since reboot.') + GPM_METRIC_NVLINK_L69_RX = (NVML_GPM_METRIC_NVLINK_L69_RX, 'NvLink read for link 69 in bytes since reboot.') + GPM_METRIC_NVLINK_L69_TX = (NVML_GPM_METRIC_NVLINK_L69_TX, 'NvLink write for link 69 in bytes since reboot.') + GPM_METRIC_NVLINK_L70_RX = (NVML_GPM_METRIC_NVLINK_L70_RX, 'NvLink read for link 70 in bytes since reboot.') + GPM_METRIC_NVLINK_L70_TX = (NVML_GPM_METRIC_NVLINK_L70_TX, 'NvLink write for link 70 in bytes since reboot.') + GPM_METRIC_NVLINK_L71_RX = (NVML_GPM_METRIC_NVLINK_L71_RX, 'NvLink read for link 71 in bytes since reboot.') + GPM_METRIC_NVLINK_L71_TX = (NVML_GPM_METRIC_NVLINK_L71_TX, 'NvLink write for link 71 in bytes since reboot.') + GPM_METRIC_NVLINK_L36_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC, 'NvLink read bandwidth for link 36 in MiB/sec.') + GPM_METRIC_NVLINK_L36_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC, 'NvLink write bandwidth for link 36 in MiB/sec.') + GPM_METRIC_NVLINK_L37_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC, 'NvLink read bandwidth for link 37 in MiB/sec.') + GPM_METRIC_NVLINK_L37_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC, 'NvLink write bandwidth for link 37 in MiB/sec.') + GPM_METRIC_NVLINK_L38_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC, 'NvLink read bandwidth for link 38 in MiB/sec.') + GPM_METRIC_NVLINK_L38_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC, 'NvLink write bandwidth for link 38 in MiB/sec.') + GPM_METRIC_NVLINK_L39_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC, 'NvLink read bandwidth for link 39 in MiB/sec.') + GPM_METRIC_NVLINK_L39_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC, 'NvLink write bandwidth for link 39 in MiB/sec.') + GPM_METRIC_NVLINK_L40_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC, 'NvLink read bandwidth for link 40 in MiB/sec.') + GPM_METRIC_NVLINK_L40_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC, 'NvLink write bandwidth for link 40 in MiB/sec.') + GPM_METRIC_NVLINK_L41_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC, 'NvLink read bandwidth for link 41 in MiB/sec.') + GPM_METRIC_NVLINK_L41_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC, 'NvLink write bandwidth for link 41 in MiB/sec.') + GPM_METRIC_NVLINK_L42_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC, 'NvLink read bandwidth for link 42 in MiB/sec.') + GPM_METRIC_NVLINK_L42_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC, 'NvLink write bandwidth for link 42 in MiB/sec.') + GPM_METRIC_NVLINK_L43_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC, 'NvLink read bandwidth for link 43 in MiB/sec.') + GPM_METRIC_NVLINK_L43_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC, 'NvLink write bandwidth for link 43 in MiB/sec.') + GPM_METRIC_NVLINK_L44_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC, 'NvLink read bandwidth for link 44 in MiB/sec.') + GPM_METRIC_NVLINK_L44_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC, 'NvLink write bandwidth for link 44 in MiB/sec.') + GPM_METRIC_NVLINK_L45_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC, 'NvLink read bandwidth for link 45 in MiB/sec.') + GPM_METRIC_NVLINK_L45_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC, 'NvLink write bandwidth for link 45 in MiB/sec.') + GPM_METRIC_NVLINK_L46_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC, 'NvLink read bandwidth for link 46 in MiB/sec.') + GPM_METRIC_NVLINK_L46_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC, 'NvLink write bandwidth for link 46 in MiB/sec.') + GPM_METRIC_NVLINK_L47_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC, 'NvLink read bandwidth for link 47 in MiB/sec.') + GPM_METRIC_NVLINK_L47_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC, 'NvLink write bandwidth for link 47 in MiB/sec.') + GPM_METRIC_NVLINK_L48_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC, 'NvLink read bandwidth for link 48 in MiB/sec.') + GPM_METRIC_NVLINK_L48_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC, 'NvLink write bandwidth for link 48 in MiB/sec.') + GPM_METRIC_NVLINK_L49_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC, 'NvLink read bandwidth for link 49 in MiB/sec.') + GPM_METRIC_NVLINK_L49_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC, 'NvLink write bandwidth for link 49 in MiB/sec.') + GPM_METRIC_NVLINK_L50_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC, 'NvLink read bandwidth for link 50 in MiB/sec.') + GPM_METRIC_NVLINK_L50_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC, 'NvLink write bandwidth for link 50 in MiB/sec.') + GPM_METRIC_NVLINK_L51_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC, 'NvLink read bandwidth for link 51 in MiB/sec.') + GPM_METRIC_NVLINK_L51_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC, 'NvLink write bandwidth for link 51 in MiB/sec.') + GPM_METRIC_NVLINK_L52_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC, 'NvLink read bandwidth for link 52 in MiB/sec.') + GPM_METRIC_NVLINK_L52_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC, 'NvLink write bandwidth for link 52 in MiB/sec.') + GPM_METRIC_NVLINK_L53_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC, 'NvLink read bandwidth for link 53 in MiB/sec.') + GPM_METRIC_NVLINK_L53_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC, 'NvLink write bandwidth for link 53 in MiB/sec.') + GPM_METRIC_NVLINK_L54_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC, 'NvLink read bandwidth for link 54 in MiB/sec.') + GPM_METRIC_NVLINK_L54_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC, 'NvLink write bandwidth for link 54 in MiB/sec.') + GPM_METRIC_NVLINK_L55_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC, 'NvLink read bandwidth for link 55 in MiB/sec.') + GPM_METRIC_NVLINK_L55_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC, 'NvLink write bandwidth for link 55 in MiB/sec.') + GPM_METRIC_NVLINK_L56_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC, 'NvLink read bandwidth for link 56 in MiB/sec.') + GPM_METRIC_NVLINK_L56_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC, 'NvLink write bandwidth for link 56 in MiB/sec.') + GPM_METRIC_NVLINK_L57_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC, 'NvLink read bandwidth for link 57 in MiB/sec.') + GPM_METRIC_NVLINK_L57_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC, 'NvLink write bandwidth for link 57 in MiB/sec.') + GPM_METRIC_NVLINK_L58_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC, 'NvLink read bandwidth for link 58 in MiB/sec.') + GPM_METRIC_NVLINK_L58_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC, 'NvLink write bandwidth for link 58 in MiB/sec.') + GPM_METRIC_NVLINK_L59_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC, 'NvLink read bandwidth for link 59 in MiB/sec.') + GPM_METRIC_NVLINK_L59_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC, 'NvLink write bandwidth for link 59 in MiB/sec.') + GPM_METRIC_NVLINK_L60_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC, 'NvLink read bandwidth for link 60 in MiB/sec.') + GPM_METRIC_NVLINK_L60_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC, 'NvLink write bandwidth for link 60 in MiB/sec.') + GPM_METRIC_NVLINK_L61_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC, 'NvLink read bandwidth for link 61 in MiB/sec.') + GPM_METRIC_NVLINK_L61_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC, 'NvLink write bandwidth for link 61 in MiB/sec.') + GPM_METRIC_NVLINK_L62_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC, 'NvLink read bandwidth for link 62 in MiB/sec.') + GPM_METRIC_NVLINK_L62_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC, 'NvLink write bandwidth for link 62 in MiB/sec.') + GPM_METRIC_NVLINK_L63_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC, 'NvLink read bandwidth for link 63 in MiB/sec.') + GPM_METRIC_NVLINK_L63_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC, 'NvLink write bandwidth for link 63 in MiB/sec.') + GPM_METRIC_NVLINK_L64_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC, 'NvLink read bandwidth for link 64 in MiB/sec.') + GPM_METRIC_NVLINK_L64_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC, 'NvLink write bandwidth for link 64 in MiB/sec.') + GPM_METRIC_NVLINK_L65_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC, 'NvLink read bandwidth for link 65 in MiB/sec.') + GPM_METRIC_NVLINK_L65_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC, 'NvLink write bandwidth for link 65 in MiB/sec.') + GPM_METRIC_NVLINK_L66_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC, 'NvLink read bandwidth for link 66 in MiB/sec.') + GPM_METRIC_NVLINK_L66_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC, 'NvLink write bandwidth for link 66 in MiB/sec.') + GPM_METRIC_NVLINK_L67_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC, 'NvLink read bandwidth for link 67 in MiB/sec.') + GPM_METRIC_NVLINK_L67_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC, 'NvLink write bandwidth for link 67 in MiB/sec.') + GPM_METRIC_NVLINK_L68_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC, 'NvLink read bandwidth for link 68 in MiB/sec.') + GPM_METRIC_NVLINK_L68_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC, 'NvLink write bandwidth for link 68 in MiB/sec.') + GPM_METRIC_NVLINK_L69_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC, 'NvLink read bandwidth for link 69 in MiB/sec.') + GPM_METRIC_NVLINK_L69_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC, 'NvLink write bandwidth for link 69 in MiB/sec.') + GPM_METRIC_NVLINK_L70_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC, 'NvLink read bandwidth for link 70 in MiB/sec.') + GPM_METRIC_NVLINK_L70_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC, 'NvLink write bandwidth for link 70 in MiB/sec.') + GPM_METRIC_NVLINK_L71_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC, 'NvLink read bandwidth for link 71 in MiB/sec.') + GPM_METRIC_NVLINK_L71_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC, 'NvLink write bandwidth for link 71 in MiB/sec.') GPM_METRIC_MAX = (NVML_GPM_METRIC_MAX, 'Maximum value above +1.') -class PowerProfileType(_FastEnum): +class PowerProfileType(_cyb_FastEnum): """ See `nvmlPowerProfileType_t`. """ @@ -1139,9 +1300,19 @@ class PowerProfileType(_FastEnum): POWER_PROFILE_SYNC_BALANCED = NVML_POWER_PROFILE_SYNC_BALANCED POWER_PROFILE_HPC = NVML_POWER_PROFILE_HPC POWER_PROFILE_MIG = NVML_POWER_PROFILE_MIG + POWER_PROFILE_MAX_Q_1 = NVML_POWER_PROFILE_MAX_Q_1 + POWER_PROFILE_NETWORK_BOUND = NVML_POWER_PROFILE_NETWORK_BOUND + POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE = NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE + POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE = NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE + POWER_PROFILE_LOW_LATENCY_INFERENCE = NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE + POWER_PROFILE_TRAINING = NVML_POWER_PROFILE_TRAINING + POWER_PROFILE_INFERENCE = NVML_POWER_PROFILE_INFERENCE + POWER_PROFILE_MAX_Q_2 = NVML_POWER_PROFILE_MAX_Q_2 + POWER_PROFILE_MAX_Q_3 = NVML_POWER_PROFILE_MAX_Q_3 + POWER_PROFILE_LOW_PRIORITY_BACKGROUND = NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND POWER_PROFILE_MAX = NVML_POWER_PROFILE_MAX -class DeviceAddressingModeType(_FastEnum): +class DeviceAddressingModeType(_cyb_FastEnum): """ Enum to represent device addressing mode values @@ -1151,29 +1322,37 @@ class DeviceAddressingModeType(_FastEnum): DEVICE_ADDRESSING_MODE_HMM = (NVML_DEVICE_ADDRESSING_MODE_HMM, 'Heterogeneous Memory Management mode.') DEVICE_ADDRESSING_MODE_ATS = (NVML_DEVICE_ADDRESSING_MODE_ATS, 'Address Translation Services mode.') -class PRMCounterId(_FastEnum): +class PRMCounterId(_cyb_FastEnum): """ PRM Counter IDs See `nvmlPRMCounterId_t`. """ - NONE = NVML_PRM_COUNTER_ID_NONE - PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS - PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS - PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS - PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY = NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY - PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES = NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES - PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT = NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT - PPCNT_PLR_RCV_CODES = NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES - PPCNT_PLR_RCV_CODE_ERR = NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR - PPCNT_PLR_RCV_UNCORRECTABLE_CODE = NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE - PPCNT_PLR_XMIT_CODES = NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES - PPCNT_PLR_XMIT_RETRY_CODES = NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES - PPCNT_PLR_XMIT_RETRY_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS - PPCNT_PLR_SYNC_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS - PPRM_OPER_RECOVERY = NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY - -class PowerProfileOperation(_FastEnum): + NONE = (NVML_PRM_COUNTER_ID_NONE, 'Sentinel.') + PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS, 'PPCNT group 0x12, link_down_events.') + PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS, 'PPCNT group 0x12, successful_recovery_events.') + PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS, 'PPCNT group 0x1A, total_successful_recovery_events.') + PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY, 'PPCNT group 0x1A, time_since_last_recovery.') + PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES, 'PPCNT group 0x1A, time_between_last_two_recoveries.') + PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY, 'PPCNT group 0x1A, time_in_last_host_serdes_feq_recovery.') + PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY, 'PPCNT group 0x1A, total_time_in_host_serdes_feq_recovery.') + PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT, 'PPCNT group 0x1A, total_host_serdes_feq_recovery_count.') + PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT, 'PPCNT group 0x1A, total_host_serdes_feq_successful_recovery_count.') + PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT, 'PPCNT group 0x1A, last_host_serdes_feq_attempts_count.') + PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS, 'PPCNT group 0x1A, last_successful_recovery_step_attempts.') + PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME, 'PPCNT group 0x1A, last_successful_recovery_time.') + PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME, 'PPCNT group 0x1A, total_successful_recovery_time.') + PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT = (NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT, 'PPCNT group 0x20, port_xmit_wait.') + PPCNT_PLR_RCV_CODES = (NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES, 'PPCNT group 0x22, plr_rcv_codes.') + PPCNT_PLR_RCV_CODE_ERR = (NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR, 'PPCNT group 0x22, plr_rcv_code_err.') + PPCNT_PLR_RCV_UNCORRECTABLE_CODE = (NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE, 'PPCNT group 0x22, plr_rcv_uncorrectable_code.') + PPCNT_PLR_XMIT_CODES = (NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES, 'PPCNT group 0x22, plr_xmit_codes.') + PPCNT_PLR_XMIT_RETRY_CODES = (NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES, 'PPCNT group 0x22, plr_xmit_retry_codes.') + PPCNT_PLR_XMIT_RETRY_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS, 'PPCNT group 0x22, plr_xmit_retry_events.') + PPCNT_PLR_SYNC_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS, 'PPCNT group 0x22, plr_sync_events.') + PPRM_OPER_RECOVERY = (NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY, 'PPRM, oper_recovery.') + +class PowerProfileOperation(_cyb_FastEnum): """ Enum for operation to perform on the requested profiles @@ -1184,7 +1363,7 @@ class PowerProfileOperation(_FastEnum): SET_AND_OVERWRITE = (NVML_POWER_PROFILE_OPERATION_SET_AND_OVERWRITE, 'Overwrite the existing list of requested profiles with just the requested profiles.') MAX = (NVML_POWER_PROFILE_OPERATION_MAX, 'Max value above +1.') -class ProcessMode(_FastEnum): +class ProcessMode(_cyb_FastEnum): """ Enum to represent process mode. @@ -1196,7 +1375,7 @@ class ProcessMode(_FastEnum): ALL = (NVML_PROCESS_MODE_ALL, 'All processes running on the GPU (compute, graphics, MPS, and other types).') MAX = (NVML_PROCESS_MODE_MAX, 'Maximum value for bounds checking.') -class CPERType(_FastEnum): +class CPERType(_cyb_FastEnum): """ Bitmask of CPER record types. Multiple values may be combined to request records from several sources in one call. @@ -1205,6 +1384,64 @@ class CPERType(_FastEnum): """ CPER_ACCESS_TYPE_GPU = (NVML_CPER_ACCESS_TYPE_GPU, 'Access GPU CPER records.') +class GpuOperationalEventLogLevel(_cyb_FastEnum): + """ + Log-level values used by GPU Operational Events.These values are used + both for event reporting in `nvmlEventData_v2_t` and for subscription + filtering in `nvmlGpuOperationalEventConfig_v1_t`. Higher numeric + values represent more selective log levels. + `NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL` disables log-level filtering + when used as a subscription threshold. Event data may contain newer + log-level values that are not named in this header; clients should + handle unrecognized numeric values. + + See `nvmlGpuOperationalEventLogLevel_t`. + """ + ALL = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL, 'Matches all GPU Operational Event log levels.') + TELEMETRY = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY, 'High-volume telemetry events.') + DIAG = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG, 'Diagnostic events.') + NOTICE = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE, 'Notable operational events.') + WARNING = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING, 'Warning events.') + ERROR = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR, 'Error events.') + +class OperationalEventSeverity(_cyb_FastEnum): + """ + Severity values used by Operational Events.These values are used both + for event reporting in `nvmlEventData_v2_t` and for subscription + filtering in `nvmlGpuOperationalEventConfig_v1_t`. Higher numeric + values represent more selective severities. + `NVML_OPERATIONAL_EVENT_SEVERITY_ALL` disables severity filtering when + used as a subscription threshold. Event data may contain newer severity + values that are not named in this header; clients should handle + unrecognized numeric values. + + See `nvmlOperationalEventSeverity_t`. + """ + ALL = (NVML_OPERATIONAL_EVENT_SEVERITY_ALL, 'Matches all Operational Event severities.') + INFORMATIONAL = (NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL, 'Informational event.') + CORRECTED = (NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED, 'Corrected error event.') + RECOVERABLE = (NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE, 'Recoverable error event.') + FATAL = (NVML_OPERATIONAL_EVENT_SEVERITY_FATAL, 'Fatal error event.') + +class EventDataType(_cyb_FastEnum): + """ + Event data formats returned by `nvmlEventSetWait_v3`. + + See `nvmlEventDataType_t`. + """ + EVENT = (NVML_EVENT_DATA_TYPE_NVML_EVENT, 'NVML event-bit data. `eventType` contains an NVML event bit.') + GPU_OPERATIONAL_EVENT = (NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT, 'Structured GPU Operational Event data.') + +class NvlinkTelemetrySampleType(_cyb_FastEnum): + """ + Per-link NVLink telemetry sample types. + + See `nvmlNvlinkTelemetrySampleType_t`. + """ + THROUGHPUT_RAW_TX = (NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX, 'Raw TX flit counter for a single link.') + THROUGHPUT_RAW_RX = (NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX, 'Raw RX flit counter for a single link.') + COUNT = (NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT, 'Number of valid sample types.') + class AffinityScope(_FastEnum): NODE = (0, "Scope of NUMA node for affinity queries") @@ -1788,6 +2025,8 @@ class ClocksEventReasons(_FastEnum): THROTTLE_REASON_HW_THERMAL_SLOWDOWN = 0x0000000000000040 THROTTLE_REASON_HW_POWER_BRAKE_SLOWDOWN = 0x0000000000000080 EVENT_REASON_DISPLAY_CLOCK_SETTING = 0x0000000000000100 + EVENT_REASON_BOARD_LIMIT = 0x0000000000000200 + EVENT_REASON_RELIABILITY = 0x0000000000000400 EVENT_REASON_NONE = 0x0000000000000000 @@ -2180,7 +2419,7 @@ cdef class PciInfoExt_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") self._owner = None @@ -2192,7 +2431,7 @@ cdef class PciInfoExt_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PciInfoExt_v1 object at {hex(id(self))}>" @@ -2213,20 +2452,20 @@ cdef class PciInfoExt_v1: if not isinstance(other, PciInfoExt_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2324,7 +2563,7 @@ cdef class PciInfoExt_v1: @property def bus_id(self): """~_numpy.int8: (array of length 32).The tuple domain:bus:device.function PCI identifier (& NULL terminator).""" - return cpython.PyUnicode_FromString(self._ptr[0].busId) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2334,12 +2573,12 @@ cdef class PciInfoExt_v1: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - memcpy((self._ptr[0].busId), ptr, 32) + _cyb_memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfoExt_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) @staticmethod def from_data(data): @@ -2348,7 +2587,7 @@ cdef class PciInfoExt_v1: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_ext_v1_dtype` holding the data. """ - return __from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) + return _cyb_from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2363,10 +2602,10 @@ cdef class PciInfoExt_v1: raise ValueError("ptr must not be null (0)") cdef PciInfoExt_v1 obj = PciInfoExt_v1.__new__(PciInfoExt_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) obj._owner = None obj._owned = True else: @@ -2409,7 +2648,7 @@ cdef class PciInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPciInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") self._owner = None @@ -2421,7 +2660,7 @@ cdef class PciInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PciInfo object at {hex(id(self))}>" @@ -2442,20 +2681,20 @@ cdef class PciInfo: if not isinstance(other, PciInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPciInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2465,7 +2704,7 @@ cdef class PciInfo: @property def bus_id_legacy(self): """~_numpy.int8: (array of length 16).""" - return cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) @bus_id_legacy.setter def bus_id_legacy(self, val): @@ -2475,7 +2714,7 @@ cdef class PciInfo: if len(buf) >= 16: raise ValueError("String too long for field bus_id_legacy, max length is 15") cdef char *ptr = buf - memcpy((self._ptr[0].busIdLegacy), ptr, 16) + _cyb_memcpy((self._ptr[0].busIdLegacy), ptr, 16) @property def domain(self): @@ -2535,7 +2774,7 @@ cdef class PciInfo: @property def bus_id(self): """~_numpy.int8: (array of length 32).""" - return cpython.PyUnicode_FromString(self._ptr[0].busId) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2545,12 +2784,12 @@ cdef class PciInfo: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - memcpy((self._ptr[0].busId), ptr, 32) + _cyb_memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) @staticmethod def from_data(data): @@ -2559,7 +2798,7 @@ cdef class PciInfo: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_dtype` holding the data. """ - return __from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) + return _cyb_from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2574,10 +2813,10 @@ cdef class PciInfo: raise ValueError("ptr must not be null (0)") cdef PciInfo obj = PciInfo.__new__(PciInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlPciInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) obj._owner = None obj._owned = True else: @@ -2615,7 +2854,7 @@ cdef class Utilization: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlUtilization_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") self._owner = None @@ -2627,7 +2866,7 @@ cdef class Utilization: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Utilization object at {hex(id(self))}>" @@ -2648,20 +2887,20 @@ cdef class Utilization: if not isinstance(other, Utilization): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlUtilization_t)) + self._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2693,7 +2932,7 @@ cdef class Utilization: @staticmethod def from_buffer(buffer): """Create an Utilization instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) + return _cyb_from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) @staticmethod def from_data(data): @@ -2702,7 +2941,7 @@ cdef class Utilization: Args: data (_numpy.ndarray): a single-element array of dtype `utilization_dtype` holding the data. """ - return __from_data(data, "utilization_dtype", utilization_dtype, Utilization) + return _cyb_from_data(data, "utilization_dtype", utilization_dtype, Utilization) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2717,10 +2956,10 @@ cdef class Utilization: raise ValueError("ptr must not be null (0)") cdef Utilization obj = Utilization.__new__(Utilization) if owner is None: - obj._ptr = malloc(sizeof(nvmlUtilization_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Utilization") - memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) obj._owner = None obj._owned = True else: @@ -2759,7 +2998,7 @@ cdef class Memory: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlMemory_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") self._owner = None @@ -2771,7 +3010,7 @@ cdef class Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Memory object at {hex(id(self))}>" @@ -2792,20 +3031,20 @@ cdef class Memory: if not isinstance(other, Memory): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlMemory_t)) + self._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2848,7 +3087,7 @@ cdef class Memory: @staticmethod def from_buffer(buffer): """Create an Memory instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlMemory_t), Memory) + return _cyb_from_buffer(buffer, sizeof(nvmlMemory_t), Memory) @staticmethod def from_data(data): @@ -2857,7 +3096,7 @@ cdef class Memory: Args: data (_numpy.ndarray): a single-element array of dtype `memory_dtype` holding the data. """ - return __from_data(data, "memory_dtype", memory_dtype, Memory) + return _cyb_from_data(data, "memory_dtype", memory_dtype, Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2872,10 +3111,10 @@ cdef class Memory: raise ValueError("ptr must not be null (0)") cdef Memory obj = Memory.__new__(Memory) if owner is None: - obj._ptr = malloc(sizeof(nvmlMemory_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory") - memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) obj._owner = None obj._owned = True else: @@ -2916,7 +3155,7 @@ cdef class Memory_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlMemory_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") self._owner = None @@ -2928,7 +3167,7 @@ cdef class Memory_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Memory_v2 object at {hex(id(self))}>" @@ -2949,20 +3188,20 @@ cdef class Memory_v2: if not isinstance(other, Memory_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlMemory_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3027,7 +3266,7 @@ cdef class Memory_v2: @staticmethod def from_buffer(buffer): """Create an Memory_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) @staticmethod def from_data(data): @@ -3036,7 +3275,7 @@ cdef class Memory_v2: Args: data (_numpy.ndarray): a single-element array of dtype `memory_v2_dtype` holding the data. """ - return __from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) + return _cyb_from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3051,10 +3290,10 @@ cdef class Memory_v2: raise ValueError("ptr must not be null (0)") cdef Memory_v2 obj = Memory_v2.__new__(Memory_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlMemory_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) obj._owner = None obj._owned = True else: @@ -3093,7 +3332,7 @@ cdef class BAR1Memory: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlBAR1Memory_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") self._owner = None @@ -3105,7 +3344,7 @@ cdef class BAR1Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.BAR1Memory object at {hex(id(self))}>" @@ -3126,20 +3365,20 @@ cdef class BAR1Memory: if not isinstance(other, BAR1Memory): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlBAR1Memory_t)) + self._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3182,7 +3421,7 @@ cdef class BAR1Memory: @staticmethod def from_buffer(buffer): """Create an BAR1Memory instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) + return _cyb_from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) @staticmethod def from_data(data): @@ -3191,7 +3430,7 @@ cdef class BAR1Memory: Args: data (_numpy.ndarray): a single-element array of dtype `ba_r1memory_dtype` holding the data. """ - return __from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) + return _cyb_from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3206,10 +3445,10 @@ cdef class BAR1Memory: raise ValueError("ptr must not be null (0)") cdef BAR1Memory obj = BAR1Memory.__new__(BAR1Memory) if owner is None: - obj._ptr = malloc(sizeof(nvmlBAR1Memory_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) obj._owner = None obj._owned = True else: @@ -3285,10 +3524,10 @@ cdef class ProcessInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3388,8 +3627,8 @@ cdef class ProcessInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessInfo obj = ProcessInfo.__new__(ProcessInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_info_dtype) obj._data = data.view(_numpy.recarray) @@ -3463,10 +3702,10 @@ cdef class ProcessDetail_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3577,8 +3816,8 @@ cdef class ProcessDetail_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessDetail_v1 obj = ProcessDetail_v1.__new__(ProcessDetail_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessDetail_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_detail_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -3620,7 +3859,7 @@ cdef class DeviceAttributes: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlDeviceAttributes_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") self._owner = None @@ -3632,7 +3871,7 @@ cdef class DeviceAttributes: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DeviceAttributes object at {hex(id(self))}>" @@ -3653,20 +3892,20 @@ cdef class DeviceAttributes: if not isinstance(other, DeviceAttributes): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) + self._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3775,7 +4014,7 @@ cdef class DeviceAttributes: @staticmethod def from_buffer(buffer): """Create an DeviceAttributes instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) + return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) @staticmethod def from_data(data): @@ -3784,7 +4023,7 @@ cdef class DeviceAttributes: Args: data (_numpy.ndarray): a single-element array of dtype `device_attributes_dtype` holding the data. """ - return __from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) + return _cyb_from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3799,10 +4038,10 @@ cdef class DeviceAttributes: raise ValueError("ptr must not be null (0)") cdef DeviceAttributes obj = DeviceAttributes.__new__(DeviceAttributes) if owner is None: - obj._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) obj._owner = None obj._owned = True else: @@ -3839,7 +4078,7 @@ cdef class C2cModeInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") self._owner = None @@ -3851,7 +4090,7 @@ cdef class C2cModeInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.C2cModeInfo_v1 object at {hex(id(self))}>" @@ -3872,20 +4111,20 @@ cdef class C2cModeInfo_v1: if not isinstance(other, C2cModeInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3906,7 +4145,7 @@ cdef class C2cModeInfo_v1: @staticmethod def from_buffer(buffer): """Create an C2cModeInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) @staticmethod def from_data(data): @@ -3915,7 +4154,7 @@ cdef class C2cModeInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `c2c_mode_info_v1_dtype` holding the data. """ - return __from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) + return _cyb_from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3930,10 +4169,10 @@ cdef class C2cModeInfo_v1: raise ValueError("ptr must not be null (0)") cdef C2cModeInfo_v1 obj = C2cModeInfo_v1.__new__(C2cModeInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -3974,7 +4213,7 @@ cdef class RowRemapperHistogramValues: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") self._owner = None @@ -3986,7 +4225,7 @@ cdef class RowRemapperHistogramValues: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.RowRemapperHistogramValues object at {hex(id(self))}>" @@ -4007,20 +4246,20 @@ cdef class RowRemapperHistogramValues: if not isinstance(other, RowRemapperHistogramValues): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4085,7 +4324,7 @@ cdef class RowRemapperHistogramValues: @staticmethod def from_buffer(buffer): """Create an RowRemapperHistogramValues instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) + return _cyb_from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) @staticmethod def from_data(data): @@ -4094,7 +4333,7 @@ cdef class RowRemapperHistogramValues: Args: data (_numpy.ndarray): a single-element array of dtype `row_remapper_histogram_values_dtype` holding the data. """ - return __from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) + return _cyb_from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4109,10 +4348,10 @@ cdef class RowRemapperHistogramValues: raise ValueError("ptr must not be null (0)") cdef RowRemapperHistogramValues obj = RowRemapperHistogramValues.__new__(RowRemapperHistogramValues) if owner is None: - obj._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) obj._owner = None obj._owned = True else: @@ -4186,10 +4425,10 @@ cdef class BridgeChipInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def type(self): @@ -4267,8 +4506,8 @@ cdef class BridgeChipInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef BridgeChipInfo obj = BridgeChipInfo.__new__(BridgeChipInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlBridgeChipInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=bridge_chip_info_dtype) obj._data = data.view(_numpy.recarray) @@ -4302,7 +4541,7 @@ cdef class Value: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlValue_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") self._owner = None @@ -4314,7 +4553,7 @@ cdef class Value: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Value object at {hex(id(self))}>" @@ -4335,20 +4574,20 @@ cdef class Value: if not isinstance(other, Value): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlValue_t)) + self._ptr = _cyb_malloc(sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4435,7 +4674,7 @@ cdef class Value: @staticmethod def from_buffer(buffer): """Create an Value instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlValue_t), Value) + return _cyb_from_buffer(buffer, sizeof(nvmlValue_t), Value) @staticmethod def from_data(data): @@ -4444,7 +4683,7 @@ cdef class Value: Args: data (_numpy.ndarray): a single-element array of dtype `value_dtype` holding the data. """ - return __from_data(data, "value_dtype", value_dtype, Value) + return _cyb_from_data(data, "value_dtype", value_dtype, Value) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4459,10 +4698,10 @@ cdef class Value: raise ValueError("ptr must not be null (0)") cdef Value obj = Value.__new__(Value) if owner is None: - obj._ptr = malloc(sizeof(nvmlValue_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlValue_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Value") - memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) obj._owner = None obj._owned = True else: @@ -4503,7 +4742,7 @@ cdef class _py_anon_pod0: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod0)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod0)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") self._owner = None @@ -4515,7 +4754,7 @@ cdef class _py_anon_pod0: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod0 object at {hex(id(self))}>" @@ -4536,20 +4775,20 @@ cdef class _py_anon_pod0: if not isinstance(other, _py_anon_pod0): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod0), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod0)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod0)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4614,7 +4853,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(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) @staticmethod def from_data(data): @@ -4623,7 +4862,7 @@ cdef class _py_anon_pod0: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod0_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) + return _cyb_from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4638,10 +4877,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) obj._owner = None obj._owned = True else: @@ -4681,7 +4920,7 @@ cdef class CoolerInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") self._owner = None @@ -4693,7 +4932,7 @@ cdef class CoolerInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.CoolerInfo_v1 object at {hex(id(self))}>" @@ -4714,20 +4953,20 @@ cdef class CoolerInfo_v1: if not isinstance(other, CoolerInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4781,7 +5020,7 @@ cdef class CoolerInfo_v1: @staticmethod def from_buffer(buffer): """Create an CoolerInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) @staticmethod def from_data(data): @@ -4790,7 +5029,7 @@ cdef class CoolerInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `cooler_info_v1_dtype` holding the data. """ - return __from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) + return _cyb_from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4805,10 +5044,10 @@ cdef class CoolerInfo_v1: raise ValueError("ptr must not be null (0)") cdef CoolerInfo_v1 obj = CoolerInfo_v1.__new__(CoolerInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -4882,10 +5121,10 @@ cdef class ClkMonFaultInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def clk_api_domain(self): @@ -4963,8 +5202,8 @@ cdef class ClkMonFaultInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ClkMonFaultInfo obj = ClkMonFaultInfo.__new__(ClkMonFaultInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlClkMonFaultInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=clk_mon_fault_info_dtype) obj._data = data.view(_numpy.recarray) @@ -5003,7 +5242,7 @@ cdef class ClockOffset_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlClockOffset_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") self._owner = None @@ -5015,7 +5254,7 @@ cdef class ClockOffset_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ClockOffset_v1 object at {hex(id(self))}>" @@ -5036,20 +5275,20 @@ cdef class ClockOffset_v1: if not isinstance(other, ClockOffset_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5125,7 +5364,7 @@ cdef class ClockOffset_v1: @staticmethod def from_buffer(buffer): """Create an ClockOffset_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) @staticmethod def from_data(data): @@ -5134,7 +5373,7 @@ cdef class ClockOffset_v1: Args: data (_numpy.ndarray): a single-element array of dtype `clock_offset_v1_dtype` holding the data. """ - return __from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) + return _cyb_from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5149,10 +5388,10 @@ cdef class ClockOffset_v1: raise ValueError("ptr must not be null (0)") cdef ClockOffset_v1 obj = ClockOffset_v1.__new__(ClockOffset_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) obj._owner = None obj._owned = True else: @@ -5230,10 +5469,10 @@ cdef class ProcessUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -5355,8 +5594,8 @@ cdef class ProcessUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationSample obj = ProcessUtilizationSample.__new__(ProcessUtilizationSample) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -5433,10 +5672,10 @@ cdef class ProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -5580,8 +5819,8 @@ cdef class ProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationInfo_v1 obj = ProcessUtilizationInfo_v1.__new__(ProcessUtilizationInfo_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -5627,7 +5866,7 @@ cdef class EccSramErrorStatus_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") self._owner = None @@ -5639,7 +5878,7 @@ cdef class EccSramErrorStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.EccSramErrorStatus_v1 object at {hex(id(self))}>" @@ -5660,20 +5899,20 @@ cdef class EccSramErrorStatus_v1: if not isinstance(other, EccSramErrorStatus_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5826,7 +6065,7 @@ cdef class EccSramErrorStatus_v1: @staticmethod def from_buffer(buffer): """Create an EccSramErrorStatus_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) @staticmethod def from_data(data): @@ -5835,7 +6074,7 @@ cdef class EccSramErrorStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_error_status_v1_dtype` holding the data. """ - return __from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) + return _cyb_from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5850,10 +6089,10 @@ cdef class EccSramErrorStatus_v1: raise ValueError("ptr must not be null (0)") cdef EccSramErrorStatus_v1 obj = EccSramErrorStatus_v1.__new__(EccSramErrorStatus_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -5897,7 +6136,7 @@ cdef class PlatformInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") self._owner = None @@ -5909,7 +6148,7 @@ cdef class PlatformInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v1 object at {hex(id(self))}>" @@ -5930,20 +6169,20 @@ cdef class PlatformInfo_v1: if not isinstance(other, PlatformInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5964,7 +6203,7 @@ cdef class PlatformInfo_v1: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -5974,14 +6213,14 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def rack_guid(self): """~_numpy.uint8: (array of length 16).GUID of the rack containing this GPU (for Blackwell rackGuid is 13 bytes so indices 13-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].rackGuid)) return _numpy.asarray(arr) @@ -5991,9 +6230,9 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field rack_guid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_physical_slot_number(self): @@ -6053,7 +6292,7 @@ cdef class PlatformInfo_v1: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) @staticmethod def from_data(data): @@ -6062,7 +6301,7 @@ cdef class PlatformInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v1_dtype` holding the data. """ - return __from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) + return _cyb_from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6077,10 +6316,10 @@ cdef class PlatformInfo_v1: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v1 obj = PlatformInfo_v1.__new__(PlatformInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -6124,7 +6363,7 @@ cdef class PlatformInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") self._owner = None @@ -6136,7 +6375,7 @@ cdef class PlatformInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v2 object at {hex(id(self))}>" @@ -6157,20 +6396,20 @@ cdef class PlatformInfo_v2: if not isinstance(other, PlatformInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6191,7 +6430,7 @@ cdef class PlatformInfo_v2: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -6201,14 +6440,14 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_serial_number(self): """~_numpy.uint8: (array of length 16).Serial number of the chassis containing this GPU (for Blackwell it is 13 bytes so indices 13-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].chassisSerialNumber)) return _numpy.asarray(arr) @@ -6218,9 +6457,9 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field chassis_serial_number, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) @property def slot_number(self): @@ -6280,7 +6519,7 @@ cdef class PlatformInfo_v2: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) @staticmethod def from_data(data): @@ -6289,7 +6528,7 @@ cdef class PlatformInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v2_dtype` holding the data. """ - return __from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) + return _cyb_from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6304,10 +6543,10 @@ cdef class PlatformInfo_v2: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v2 obj = PlatformInfo_v2.__new__(PlatformInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -6347,7 +6586,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod1)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod1)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") self._owner = None @@ -6359,7 +6598,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -6380,20 +6619,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod1), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod1)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod1)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6447,7 +6686,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(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) @staticmethod def from_data(data): @@ -6456,7 +6695,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6471,10 +6710,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) obj._owner = None obj._owned = True else: @@ -6516,7 +6755,7 @@ cdef class VgpuPlacementList_v2: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") self._owner = None @@ -6529,7 +6768,7 @@ cdef class VgpuPlacementList_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuPlacementList_v2 object at {hex(id(self))}>" @@ -6550,20 +6789,20 @@ cdef class VgpuPlacementList_v2: if not isinstance(other, VgpuPlacementList_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6597,7 +6836,7 @@ cdef class VgpuPlacementList_v2: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -6605,7 +6844,7 @@ cdef class VgpuPlacementList_v2: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuPlacementList_v2 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].count = len(val) @@ -6625,7 +6864,7 @@ cdef class VgpuPlacementList_v2: @staticmethod def from_buffer(buffer): """Create an VgpuPlacementList_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) @staticmethod def from_data(data): @@ -6634,7 +6873,7 @@ cdef class VgpuPlacementList_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_placement_list_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) + return _cyb_from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6649,10 +6888,10 @@ cdef class VgpuPlacementList_v2: raise ValueError("ptr must not be null (0)") cdef VgpuPlacementList_v2 obj = VgpuPlacementList_v2.__new__(VgpuPlacementList_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) obj._owner = None obj._owned = True else: @@ -6691,7 +6930,7 @@ cdef class VgpuTypeBar1Info_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") self._owner = None @@ -6703,7 +6942,7 @@ cdef class VgpuTypeBar1Info_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeBar1Info_v1 object at {hex(id(self))}>" @@ -6724,20 +6963,20 @@ cdef class VgpuTypeBar1Info_v1: if not isinstance(other, VgpuTypeBar1Info_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6769,7 +7008,7 @@ cdef class VgpuTypeBar1Info_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeBar1Info_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) @staticmethod def from_data(data): @@ -6778,7 +7017,7 @@ cdef class VgpuTypeBar1Info_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_bar1info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) + return _cyb_from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6793,10 +7032,10 @@ cdef class VgpuTypeBar1Info_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeBar1Info_v1 obj = VgpuTypeBar1Info_v1.__new__(VgpuTypeBar1Info_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) obj._owner = None obj._owned = True else: @@ -6878,10 +7117,10 @@ cdef class VgpuProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def process_name(self): @@ -7045,8 +7284,8 @@ cdef class VgpuProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuProcessUtilizationInfo_v1 obj = VgpuProcessUtilizationInfo_v1.__new__(VgpuProcessUtilizationInfo_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -7081,7 +7320,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod2)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod2)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") self._owner = None @@ -7093,7 +7332,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -7114,20 +7353,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod2), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod2)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod2)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7159,7 +7398,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(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) @staticmethod def from_data(data): @@ -7168,7 +7407,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7183,10 +7422,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) obj._owner = None obj._owned = True else: @@ -7223,7 +7462,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod3)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod3)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") self._owner = None @@ -7235,7 +7474,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -7256,20 +7495,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod3), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod3)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod3)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7290,7 +7529,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(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) @staticmethod def from_data(data): @@ -7299,7 +7538,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7314,10 +7553,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) obj._owner = None obj._owned = True else: @@ -7395,10 +7634,10 @@ cdef class VgpuSchedulerLogEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -7520,8 +7759,8 @@ cdef class VgpuSchedulerLogEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry obj = VgpuSchedulerLogEntry.__new__(VgpuSchedulerLogEntry) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -7556,7 +7795,7 @@ cdef class _py_anon_pod4: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod4)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod4)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") self._owner = None @@ -7568,7 +7807,7 @@ cdef class _py_anon_pod4: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod4 object at {hex(id(self))}>" @@ -7589,20 +7828,20 @@ cdef class _py_anon_pod4: if not isinstance(other, _py_anon_pod4): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod4), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod4)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod4)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7634,7 +7873,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(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) @staticmethod def from_data(data): @@ -7643,7 +7882,7 @@ cdef class _py_anon_pod4: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod4_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) + return _cyb_from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7658,10 +7897,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) obj._owner = None obj._owned = True else: @@ -7698,7 +7937,7 @@ cdef class _py_anon_pod5: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod5)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod5)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") self._owner = None @@ -7710,7 +7949,7 @@ cdef class _py_anon_pod5: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod5 object at {hex(id(self))}>" @@ -7731,20 +7970,20 @@ cdef class _py_anon_pod5: if not isinstance(other, _py_anon_pod5): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod5), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod5)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod5)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7765,7 +8004,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(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) @staticmethod def from_data(data): @@ -7774,7 +8013,7 @@ cdef class _py_anon_pod5: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod5_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) + return _cyb_from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7789,10 +8028,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) obj._owner = None obj._owned = True else: @@ -7836,7 +8075,7 @@ cdef class VgpuSchedulerCapabilities: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") self._owner = None @@ -7848,7 +8087,7 @@ cdef class VgpuSchedulerCapabilities: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerCapabilities object at {hex(id(self))}>" @@ -7869,20 +8108,20 @@ cdef class VgpuSchedulerCapabilities: if not isinstance(other, VgpuSchedulerCapabilities): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7892,7 +8131,7 @@ cdef class VgpuSchedulerCapabilities: @property def supported_schedulers(self): """~_numpy.uint32: (array of length 3).""" - cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].supportedSchedulers)) return _numpy.asarray(arr) @@ -7902,9 +8141,9 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("This VgpuSchedulerCapabilities instance is read-only") if len(val) != 3: raise ValueError(f"Expected length { 3 } for field supported_schedulers, got {len(val)}") - cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) + _cyb_memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) @property def max_timeslice(self): @@ -7986,7 +8225,7 @@ cdef class VgpuSchedulerCapabilities: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerCapabilities instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) @staticmethod def from_data(data): @@ -7995,7 +8234,7 @@ cdef class VgpuSchedulerCapabilities: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_capabilities_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) + return _cyb_from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8010,10 +8249,10 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerCapabilities obj = VgpuSchedulerCapabilities.__new__(VgpuSchedulerCapabilities) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) obj._owner = None obj._owned = True else: @@ -8056,7 +8295,7 @@ cdef class VgpuLicenseExpiry: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") self._owner = None @@ -8068,7 +8307,7 @@ cdef class VgpuLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseExpiry object at {hex(id(self))}>" @@ -8089,20 +8328,20 @@ cdef class VgpuLicenseExpiry: if not isinstance(other, VgpuLicenseExpiry): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8189,7 +8428,7 @@ cdef class VgpuLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseExpiry instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) @staticmethod def from_data(data): @@ -8198,7 +8437,7 @@ cdef class VgpuLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_expiry_dtype` holding the data. """ - return __from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) + return _cyb_from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8213,10 +8452,10 @@ cdef class VgpuLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseExpiry obj = VgpuLicenseExpiry.__new__(VgpuLicenseExpiry) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8259,7 +8498,7 @@ cdef class GridLicenseExpiry: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") self._owner = None @@ -8271,7 +8510,7 @@ cdef class GridLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GridLicenseExpiry object at {hex(id(self))}>" @@ -8292,20 +8531,20 @@ cdef class GridLicenseExpiry: if not isinstance(other, GridLicenseExpiry): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8392,7 +8631,7 @@ cdef class GridLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an GridLicenseExpiry instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) + return _cyb_from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) @staticmethod def from_data(data): @@ -8401,7 +8640,7 @@ cdef class GridLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `grid_license_expiry_dtype` holding the data. """ - return __from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) + return _cyb_from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8416,10 +8655,10 @@ cdef class GridLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef GridLicenseExpiry obj = GridLicenseExpiry.__new__(GridLicenseExpiry) if owner is None: - obj._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8459,7 +8698,7 @@ cdef class VgpuTypeIdInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") self._owner = None @@ -8472,7 +8711,7 @@ cdef class VgpuTypeIdInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeIdInfo_v1 object at {hex(id(self))}>" @@ -8493,20 +8732,20 @@ cdef class VgpuTypeIdInfo_v1: if not isinstance(other, VgpuTypeIdInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8529,7 +8768,7 @@ cdef class VgpuTypeIdInfo_v1: """int: OUT: List of vGPU type IDs.""" if self._ptr[0].vgpuTypeIds == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuTypeIds) return _numpy.asarray(arr) @@ -8537,7 +8776,7 @@ cdef class VgpuTypeIdInfo_v1: def vgpu_type_ids(self, val): if self._readonly: raise ValueError("This VgpuTypeIdInfo_v1 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuTypeIds = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8546,7 +8785,7 @@ cdef class VgpuTypeIdInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeIdInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) @staticmethod def from_data(data): @@ -8555,7 +8794,7 @@ cdef class VgpuTypeIdInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_id_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) + return _cyb_from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8570,10 +8809,10 @@ cdef class VgpuTypeIdInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeIdInfo_v1 obj = VgpuTypeIdInfo_v1.__new__(VgpuTypeIdInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8614,7 +8853,7 @@ cdef class ActiveVgpuInstanceInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") self._owner = None @@ -8627,7 +8866,7 @@ cdef class ActiveVgpuInstanceInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ActiveVgpuInstanceInfo_v1 object at {hex(id(self))}>" @@ -8648,20 +8887,20 @@ cdef class ActiveVgpuInstanceInfo_v1: if not isinstance(other, ActiveVgpuInstanceInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8684,7 +8923,7 @@ cdef class ActiveVgpuInstanceInfo_v1: """int: IN/OUT: list of active vGPU instances.""" if self._ptr[0].vgpuInstances == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuInstances) return _numpy.asarray(arr) @@ -8692,7 +8931,7 @@ cdef class ActiveVgpuInstanceInfo_v1: def vgpu_instances(self, val): if self._readonly: raise ValueError("This ActiveVgpuInstanceInfo_v1 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuInstances = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8701,7 +8940,7 @@ cdef class ActiveVgpuInstanceInfo_v1: @staticmethod def from_buffer(buffer): """Create an ActiveVgpuInstanceInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) @staticmethod def from_data(data): @@ -8710,7 +8949,7 @@ cdef class ActiveVgpuInstanceInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `active_vgpu_instance_info_v1_dtype` holding the data. """ - return __from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) + return _cyb_from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8725,10 +8964,10 @@ cdef class ActiveVgpuInstanceInfo_v1: raise ValueError("ptr must not be null (0)") cdef ActiveVgpuInstanceInfo_v1 obj = ActiveVgpuInstanceInfo_v1.__new__(ActiveVgpuInstanceInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8771,7 +9010,7 @@ cdef class VgpuCreatablePlacementInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") self._owner = None @@ -8784,7 +9023,7 @@ cdef class VgpuCreatablePlacementInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuCreatablePlacementInfo_v1 object at {hex(id(self))}>" @@ -8805,20 +9044,20 @@ cdef class VgpuCreatablePlacementInfo_v1: if not isinstance(other, VgpuCreatablePlacementInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8863,7 +9102,7 @@ cdef class VgpuCreatablePlacementInfo_v1: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -8871,7 +9110,7 @@ cdef class VgpuCreatablePlacementInfo_v1: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuCreatablePlacementInfo_v1 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].placementSize = len(val) @@ -8880,7 +9119,7 @@ cdef class VgpuCreatablePlacementInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuCreatablePlacementInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) @staticmethod def from_data(data): @@ -8889,7 +9128,7 @@ cdef class VgpuCreatablePlacementInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_creatable_placement_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) + return _cyb_from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8904,10 +9143,10 @@ cdef class VgpuCreatablePlacementInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuCreatablePlacementInfo_v1 obj = VgpuCreatablePlacementInfo_v1.__new__(VgpuCreatablePlacementInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8982,10 +9221,10 @@ cdef class HwbcEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def hwbc_id(self): @@ -9061,8 +9300,8 @@ cdef class HwbcEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef HwbcEntry obj = HwbcEntry.__new__(HwbcEntry) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlHwbcEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=hwbc_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -9097,7 +9336,7 @@ cdef class LedState: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlLedState_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") self._owner = None @@ -9109,7 +9348,7 @@ cdef class LedState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.LedState object at {hex(id(self))}>" @@ -9130,20 +9369,20 @@ cdef class LedState: if not isinstance(other, LedState): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlLedState_t)) + self._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9153,7 +9392,7 @@ cdef class LedState: @property def cause(self): """~_numpy.int8: (array of length 256).""" - return cpython.PyUnicode_FromString(self._ptr[0].cause) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].cause) @cause.setter def cause(self, val): @@ -9163,7 +9402,7 @@ cdef class LedState: if len(buf) >= 256: raise ValueError("String too long for field cause, max length is 255") cdef char *ptr = buf - memcpy((self._ptr[0].cause), ptr, 256) + _cyb_memcpy((self._ptr[0].cause), ptr, 256) @property def color(self): @@ -9179,7 +9418,7 @@ cdef class LedState: @staticmethod def from_buffer(buffer): """Create an LedState instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlLedState_t), LedState) + return _cyb_from_buffer(buffer, sizeof(nvmlLedState_t), LedState) @staticmethod def from_data(data): @@ -9188,7 +9427,7 @@ cdef class LedState: Args: data (_numpy.ndarray): a single-element array of dtype `led_state_dtype` holding the data. """ - return __from_data(data, "led_state_dtype", led_state_dtype, LedState) + return _cyb_from_data(data, "led_state_dtype", led_state_dtype, LedState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9203,10 +9442,10 @@ cdef class LedState: raise ValueError("ptr must not be null (0)") cdef LedState obj = LedState.__new__(LedState) if owner is None: - obj._ptr = malloc(sizeof(nvmlLedState_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating LedState") - memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) obj._owner = None obj._owned = True else: @@ -9246,7 +9485,7 @@ cdef class UnitInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlUnitInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") self._owner = None @@ -9258,7 +9497,7 @@ cdef class UnitInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.UnitInfo object at {hex(id(self))}>" @@ -9279,20 +9518,20 @@ cdef class UnitInfo: if not isinstance(other, UnitInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlUnitInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9302,7 +9541,7 @@ cdef class UnitInfo: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -9312,12 +9551,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @property def id(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].id) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].id) @id.setter def id(self, val): @@ -9327,12 +9566,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field id, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].id), ptr, 96) + _cyb_memcpy((self._ptr[0].id), ptr, 96) @property def serial(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].serial) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].serial) @serial.setter def serial(self, val): @@ -9342,12 +9581,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field serial, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].serial), ptr, 96) + _cyb_memcpy((self._ptr[0].serial), ptr, 96) @property def firmware_version(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) @firmware_version.setter def firmware_version(self, val): @@ -9357,12 +9596,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field firmware_version, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].firmwareVersion), ptr, 96) + _cyb_memcpy((self._ptr[0].firmwareVersion), ptr, 96) @staticmethod def from_buffer(buffer): """Create an UnitInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) @staticmethod def from_data(data): @@ -9371,7 +9610,7 @@ cdef class UnitInfo: Args: data (_numpy.ndarray): a single-element array of dtype `unit_info_dtype` holding the data. """ - return __from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) + return _cyb_from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9386,10 +9625,10 @@ cdef class UnitInfo: raise ValueError("ptr must not be null (0)") cdef UnitInfo obj = UnitInfo.__new__(UnitInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlUnitInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) obj._owner = None obj._owned = True else: @@ -9429,7 +9668,7 @@ cdef class PSUInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPSUInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") self._owner = None @@ -9441,7 +9680,7 @@ cdef class PSUInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PSUInfo object at {hex(id(self))}>" @@ -9462,20 +9701,20 @@ cdef class PSUInfo: if not isinstance(other, PSUInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPSUInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9485,7 +9724,7 @@ cdef class PSUInfo: @property def state(self): """~_numpy.int8: (array of length 256).""" - return cpython.PyUnicode_FromString(self._ptr[0].state) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].state) @state.setter def state(self, val): @@ -9495,7 +9734,7 @@ cdef class PSUInfo: if len(buf) >= 256: raise ValueError("String too long for field state, max length is 255") cdef char *ptr = buf - memcpy((self._ptr[0].state), ptr, 256) + _cyb_memcpy((self._ptr[0].state), ptr, 256) @property def current(self): @@ -9533,7 +9772,7 @@ cdef class PSUInfo: @staticmethod def from_buffer(buffer): """Create an PSUInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) @staticmethod def from_data(data): @@ -9542,7 +9781,7 @@ cdef class PSUInfo: Args: data (_numpy.ndarray): a single-element array of dtype `psu_info_dtype` holding the data. """ - return __from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) + return _cyb_from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9557,10 +9796,10 @@ cdef class PSUInfo: raise ValueError("ptr must not be null (0)") cdef PSUInfo obj = PSUInfo.__new__(PSUInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlPSUInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) obj._owner = None obj._owned = True else: @@ -9634,10 +9873,10 @@ cdef class UnitFanInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def speed(self): @@ -9715,8 +9954,8 @@ cdef class UnitFanInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef UnitFanInfo obj = UnitFanInfo.__new__(UnitFanInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlUnitFanInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=unit_fan_info_dtype) obj._data = data.view(_numpy.recarray) @@ -9754,7 +9993,7 @@ cdef class EventData: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlEventData_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") self._owner = None @@ -9766,7 +10005,7 @@ cdef class EventData: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.EventData object at {hex(id(self))}>" @@ -9787,20 +10026,20 @@ cdef class EventData: if not isinstance(other, EventData): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlEventData_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9865,7 +10104,7 @@ cdef class EventData: @staticmethod def from_buffer(buffer): """Create an EventData instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlEventData_t), EventData) + return _cyb_from_buffer(buffer, sizeof(nvmlEventData_t), EventData) @staticmethod def from_data(data): @@ -9874,7 +10113,7 @@ cdef class EventData: Args: data (_numpy.ndarray): a single-element array of dtype `event_data_dtype` holding the data. """ - return __from_data(data, "event_data_dtype", event_data_dtype, EventData) + return _cyb_from_data(data, "event_data_dtype", event_data_dtype, EventData) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9889,10 +10128,10 @@ cdef class EventData: raise ValueError("ptr must not be null (0)") cdef EventData obj = EventData.__new__(EventData) if owner is None: - obj._ptr = malloc(sizeof(nvmlEventData_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EventData") - memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) obj._owner = None obj._owned = True else: @@ -9966,10 +10205,10 @@ cdef class SystemEventData_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def event_type(self): @@ -10047,8 +10286,8 @@ cdef class SystemEventData_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef SystemEventData_v1 obj = SystemEventData_v1.__new__(SystemEventData_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSystemEventData_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=system_event_data_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -10088,7 +10327,7 @@ cdef class AccountingStats: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlAccountingStats_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") self._owner = None @@ -10100,7 +10339,7 @@ cdef class AccountingStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.AccountingStats object at {hex(id(self))}>" @@ -10121,20 +10360,20 @@ cdef class AccountingStats: if not isinstance(other, AccountingStats): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlAccountingStats_t)) + self._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10210,7 +10449,7 @@ cdef class AccountingStats: @staticmethod def from_buffer(buffer): """Create an AccountingStats instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) + return _cyb_from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) @staticmethod def from_data(data): @@ -10219,7 +10458,7 @@ cdef class AccountingStats: Args: data (_numpy.ndarray): a single-element array of dtype `accounting_stats_dtype` holding the data. """ - return __from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) + return _cyb_from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10234,10 +10473,10 @@ cdef class AccountingStats: raise ValueError("ptr must not be null (0)") cdef AccountingStats obj = AccountingStats.__new__(AccountingStats) if owner is None: - obj._ptr = malloc(sizeof(nvmlAccountingStats_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) obj._owner = None obj._owned = True else: @@ -10317,10 +10556,10 @@ cdef class EncoderSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10464,8 +10703,8 @@ cdef class EncoderSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EncoderSessionInfo obj = EncoderSessionInfo.__new__(EncoderSessionInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEncoderSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=encoder_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10501,7 +10740,7 @@ cdef class FBCStats: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlFBCStats_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") self._owner = None @@ -10513,7 +10752,7 @@ cdef class FBCStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.FBCStats object at {hex(id(self))}>" @@ -10534,20 +10773,20 @@ cdef class FBCStats: if not isinstance(other, FBCStats): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlFBCStats_t)) + self._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10590,7 +10829,7 @@ cdef class FBCStats: @staticmethod def from_buffer(buffer): """Create an FBCStats instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) + return _cyb_from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) @staticmethod def from_data(data): @@ -10599,7 +10838,7 @@ cdef class FBCStats: Args: data (_numpy.ndarray): a single-element array of dtype `fbc_stats_dtype` holding the data. """ - return __from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) + return _cyb_from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10614,10 +10853,10 @@ cdef class FBCStats: raise ValueError("ptr must not be null (0)") cdef FBCStats obj = FBCStats.__new__(FBCStats) if owner is None: - obj._ptr = malloc(sizeof(nvmlFBCStats_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating FBCStats") - memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) obj._owner = None obj._owned = True else: @@ -10701,10 +10940,10 @@ cdef class FBCSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10892,8 +11131,8 @@ cdef class FBCSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FBCSessionInfo obj = FBCSessionInfo.__new__(FBCSessionInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFBCSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=fbc_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10928,7 +11167,7 @@ cdef class ConfComputeSystemCaps: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") self._owner = None @@ -10940,7 +11179,7 @@ cdef class ConfComputeSystemCaps: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemCaps object at {hex(id(self))}>" @@ -10961,20 +11200,20 @@ cdef class ConfComputeSystemCaps: if not isinstance(other, ConfComputeSystemCaps): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11006,7 +11245,7 @@ cdef class ConfComputeSystemCaps: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemCaps instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) @staticmethod def from_data(data): @@ -11015,7 +11254,7 @@ cdef class ConfComputeSystemCaps: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_caps_dtype` holding the data. """ - return __from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) + return _cyb_from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11030,10 +11269,10 @@ cdef class ConfComputeSystemCaps: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemCaps obj = ConfComputeSystemCaps.__new__(ConfComputeSystemCaps) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) obj._owner = None obj._owned = True else: @@ -11072,7 +11311,7 @@ cdef class ConfComputeSystemState: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeSystemState_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") self._owner = None @@ -11084,7 +11323,7 @@ cdef class ConfComputeSystemState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemState object at {hex(id(self))}>" @@ -11105,20 +11344,20 @@ cdef class ConfComputeSystemState: if not isinstance(other, ConfComputeSystemState): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11161,7 +11400,7 @@ cdef class ConfComputeSystemState: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemState instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) @staticmethod def from_data(data): @@ -11170,7 +11409,7 @@ cdef class ConfComputeSystemState: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_state_dtype` holding the data. """ - return __from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) + return _cyb_from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11185,10 +11424,10 @@ cdef class ConfComputeSystemState: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemState obj = ConfComputeSystemState.__new__(ConfComputeSystemState) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) obj._owner = None obj._owned = True else: @@ -11229,7 +11468,7 @@ cdef class SystemConfComputeSettings_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") self._owner = None @@ -11241,7 +11480,7 @@ cdef class SystemConfComputeSettings_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.SystemConfComputeSettings_v1 object at {hex(id(self))}>" @@ -11262,20 +11501,20 @@ cdef class SystemConfComputeSettings_v1: if not isinstance(other, SystemConfComputeSettings_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11340,7 +11579,7 @@ cdef class SystemConfComputeSettings_v1: @staticmethod def from_buffer(buffer): """Create an SystemConfComputeSettings_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) @staticmethod def from_data(data): @@ -11349,7 +11588,7 @@ cdef class SystemConfComputeSettings_v1: Args: data (_numpy.ndarray): a single-element array of dtype `system_conf_compute_settings_v1_dtype` holding the data. """ - return __from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) + return _cyb_from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11364,10 +11603,10 @@ cdef class SystemConfComputeSettings_v1: raise ValueError("ptr must not be null (0)") cdef SystemConfComputeSettings_v1 obj = SystemConfComputeSettings_v1.__new__(SystemConfComputeSettings_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) obj._owner = None obj._owned = True else: @@ -11405,7 +11644,7 @@ cdef class ConfComputeMemSizeInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") self._owner = None @@ -11417,7 +11656,7 @@ cdef class ConfComputeMemSizeInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeMemSizeInfo object at {hex(id(self))}>" @@ -11438,20 +11677,20 @@ cdef class ConfComputeMemSizeInfo: if not isinstance(other, ConfComputeMemSizeInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11483,7 +11722,7 @@ cdef class ConfComputeMemSizeInfo: @staticmethod def from_buffer(buffer): """Create an ConfComputeMemSizeInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) @staticmethod def from_data(data): @@ -11492,7 +11731,7 @@ cdef class ConfComputeMemSizeInfo: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_mem_size_info_dtype` holding the data. """ - return __from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) + return _cyb_from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11507,10 +11746,10 @@ cdef class ConfComputeMemSizeInfo: raise ValueError("ptr must not be null (0)") cdef ConfComputeMemSizeInfo obj = ConfComputeMemSizeInfo.__new__(ConfComputeMemSizeInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) obj._owner = None obj._owned = True else: @@ -11550,7 +11789,7 @@ cdef class ConfComputeGpuCertificate: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") self._owner = None @@ -11562,7 +11801,7 @@ cdef class ConfComputeGpuCertificate: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuCertificate object at {hex(id(self))}>" @@ -11583,20 +11822,20 @@ cdef class ConfComputeGpuCertificate: if not isinstance(other, ConfComputeGpuCertificate): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11608,7 +11847,7 @@ cdef class ConfComputeGpuCertificate: """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].certChainSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].certChain)) return _numpy.asarray(arr) @@ -11621,16 +11860,16 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].certChainSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_cert_chain(self): """~_numpy.uint8: (array of length 5120).""" if self._ptr[0].attestationCertChainSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationCertChain)) return _numpy.asarray(arr) @@ -11643,14 +11882,14 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].attestationCertChainSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuCertificate instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) @staticmethod def from_data(data): @@ -11659,7 +11898,7 @@ cdef class ConfComputeGpuCertificate: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_certificate_dtype` holding the data. """ - return __from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) + return _cyb_from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11674,10 +11913,10 @@ cdef class ConfComputeGpuCertificate: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuCertificate obj = ConfComputeGpuCertificate.__new__(ConfComputeGpuCertificate) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) obj._owner = None obj._owned = True else: @@ -11719,7 +11958,7 @@ cdef class ConfComputeGpuAttestationReport: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") self._owner = None @@ -11731,7 +11970,7 @@ cdef class ConfComputeGpuAttestationReport: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuAttestationReport object at {hex(id(self))}>" @@ -11752,20 +11991,20 @@ cdef class ConfComputeGpuAttestationReport: if not isinstance(other, ConfComputeGpuAttestationReport): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11786,7 +12025,7 @@ cdef class ConfComputeGpuAttestationReport: @property def nonce(self): """~_numpy.uint8: (array of length 32).""" - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].nonce)) return _numpy.asarray(arr) @@ -11796,16 +12035,16 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("This ConfComputeGpuAttestationReport instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field nonce, got {len(val)}") - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_report(self): """~_numpy.uint8: (array of length 8192).""" if self._ptr[0].attestationReportSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationReport)) return _numpy.asarray(arr) @@ -11818,16 +12057,16 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].attestationReportSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @property def cec_attestation_report(self): """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].cecAttestationReportSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].cecAttestationReport)) return _numpy.asarray(arr) @@ -11840,14 +12079,14 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].cecAttestationReportSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuAttestationReport instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) @staticmethod def from_data(data): @@ -11856,7 +12095,7 @@ cdef class ConfComputeGpuAttestationReport: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_attestation_report_dtype` holding the data. """ - return __from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) + return _cyb_from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11871,10 +12110,10 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuAttestationReport obj = ConfComputeGpuAttestationReport.__new__(ConfComputeGpuAttestationReport) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) obj._owner = None obj._owned = True else: @@ -11916,7 +12155,7 @@ cdef class GpuFabricInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") self._owner = None @@ -11928,7 +12167,7 @@ cdef class GpuFabricInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v2 object at {hex(id(self))}>" @@ -11949,20 +12188,20 @@ cdef class GpuFabricInfo_v2: if not isinstance(other, GpuFabricInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11983,7 +12222,7 @@ cdef class GpuFabricInfo_v2: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -11993,9 +12232,9 @@ cdef class GpuFabricInfo_v2: raise ValueError("This GpuFabricInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -12044,7 +12283,7 @@ cdef class GpuFabricInfo_v2: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) @staticmethod def from_data(data): @@ -12053,7 +12292,7 @@ cdef class GpuFabricInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v2_dtype` holding the data. """ - return __from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) + return _cyb_from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12068,10 +12307,10 @@ cdef class GpuFabricInfo_v2: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v2 obj = GpuFabricInfo_v2.__new__(GpuFabricInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -12110,7 +12349,7 @@ cdef class NvlinkSupportedBwModes_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") self._owner = None @@ -12122,7 +12361,7 @@ cdef class NvlinkSupportedBwModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSupportedBwModes_v1 object at {hex(id(self))}>" @@ -12143,20 +12382,20 @@ cdef class NvlinkSupportedBwModes_v1: if not isinstance(other, NvlinkSupportedBwModes_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12179,7 +12418,7 @@ cdef class NvlinkSupportedBwModes_v1: """~_numpy.uint8: (array of length 23).""" if self._ptr[0].totalBwModes == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].bwModes)) return _numpy.asarray(arr) @@ -12192,14 +12431,14 @@ cdef class NvlinkSupportedBwModes_v1: self._ptr[0].totalBwModes = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an NvlinkSupportedBwModes_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) @staticmethod def from_data(data): @@ -12208,7 +12447,7 @@ cdef class NvlinkSupportedBwModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_supported_bw_modes_v1_dtype` holding the data. """ - return __from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) + return _cyb_from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12223,10 +12462,10 @@ cdef class NvlinkSupportedBwModes_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSupportedBwModes_v1 obj = NvlinkSupportedBwModes_v1.__new__(NvlinkSupportedBwModes_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) obj._owner = None obj._owned = True else: @@ -12265,7 +12504,7 @@ cdef class NvlinkGetBwMode_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") self._owner = None @@ -12277,7 +12516,7 @@ cdef class NvlinkGetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkGetBwMode_v1 object at {hex(id(self))}>" @@ -12298,20 +12537,20 @@ cdef class NvlinkGetBwMode_v1: if not isinstance(other, NvlinkGetBwMode_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12354,7 +12593,7 @@ cdef class NvlinkGetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkGetBwMode_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) @staticmethod def from_data(data): @@ -12363,7 +12602,7 @@ cdef class NvlinkGetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_get_bw_mode_v1_dtype` holding the data. """ - return __from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) + return _cyb_from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12378,10 +12617,10 @@ cdef class NvlinkGetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkGetBwMode_v1 obj = NvlinkGetBwMode_v1.__new__(NvlinkGetBwMode_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12420,7 +12659,7 @@ cdef class NvlinkSetBwMode_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") self._owner = None @@ -12432,7 +12671,7 @@ cdef class NvlinkSetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSetBwMode_v1 object at {hex(id(self))}>" @@ -12453,20 +12692,20 @@ cdef class NvlinkSetBwMode_v1: if not isinstance(other, NvlinkSetBwMode_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12509,7 +12748,7 @@ cdef class NvlinkSetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkSetBwMode_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) @staticmethod def from_data(data): @@ -12518,7 +12757,7 @@ cdef class NvlinkSetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_set_bw_mode_v1_dtype` holding the data. """ - return __from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) + return _cyb_from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12533,10 +12772,10 @@ cdef class NvlinkSetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSetBwMode_v1 obj = NvlinkSetBwMode_v1.__new__(NvlinkSetBwMode_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12574,7 +12813,7 @@ cdef class VgpuVersion: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuVersion_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") self._owner = None @@ -12586,7 +12825,7 @@ cdef class VgpuVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuVersion object at {hex(id(self))}>" @@ -12607,20 +12846,20 @@ cdef class VgpuVersion: if not isinstance(other, VgpuVersion): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuVersion_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12652,7 +12891,7 @@ cdef class VgpuVersion: @staticmethod def from_buffer(buffer): """Create an VgpuVersion instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) @staticmethod def from_data(data): @@ -12661,7 +12900,7 @@ cdef class VgpuVersion: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_version_dtype` holding the data. """ - return __from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) + return _cyb_from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12676,10 +12915,10 @@ cdef class VgpuVersion: raise ValueError("ptr must not be null (0)") cdef VgpuVersion obj = VgpuVersion.__new__(VgpuVersion) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuVersion_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) obj._owner = None obj._owned = True else: @@ -12725,7 +12964,7 @@ cdef class VgpuMetadata: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuMetadata_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") self._owner = None @@ -12737,7 +12976,7 @@ cdef class VgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuMetadata object at {hex(id(self))}>" @@ -12758,20 +12997,20 @@ cdef class VgpuMetadata: if not isinstance(other, VgpuMetadata): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12814,7 +13053,7 @@ cdef class VgpuMetadata: @property def guest_driver_version(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) @guest_driver_version.setter def guest_driver_version(self, val): @@ -12824,12 +13063,12 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field guest_driver_version, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].guestDriverVersion), ptr, 80) + _cyb_memcpy((self._ptr[0].guestDriverVersion), ptr, 80) @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -12839,7 +13078,7 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def vgpu_virtualization_caps(self): @@ -12877,7 +13116,7 @@ cdef class VgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -12887,12 +13126,12 @@ cdef class VgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - memcpy((self._ptr[0].opaqueData), ptr, 4) + _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuMetadata instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) @staticmethod def from_data(data): @@ -12901,7 +13140,7 @@ cdef class VgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_metadata_dtype` holding the data. """ - return __from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) + return _cyb_from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12916,10 +13155,10 @@ cdef class VgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuMetadata obj = VgpuMetadata.__new__(VgpuMetadata) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -12957,7 +13196,7 @@ cdef class VgpuPgpuCompatibility: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") self._owner = None @@ -12969,7 +13208,7 @@ cdef class VgpuPgpuCompatibility: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuCompatibility object at {hex(id(self))}>" @@ -12990,20 +13229,20 @@ cdef class VgpuPgpuCompatibility: if not isinstance(other, VgpuPgpuCompatibility): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13035,7 +13274,7 @@ cdef class VgpuPgpuCompatibility: @staticmethod def from_buffer(buffer): """Create an VgpuPgpuCompatibility instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) @staticmethod def from_data(data): @@ -13044,7 +13283,7 @@ cdef class VgpuPgpuCompatibility: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_compatibility_dtype` holding the data. """ - return __from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) + return _cyb_from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13059,10 +13298,10 @@ cdef class VgpuPgpuCompatibility: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuCompatibility obj = VgpuPgpuCompatibility.__new__(VgpuPgpuCompatibility) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) obj._owner = None obj._owned = True else: @@ -13136,10 +13375,10 @@ cdef class GpuInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13217,8 +13456,8 @@ cdef class GpuInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GpuInstancePlacement obj = GpuInstancePlacement.__new__(GpuInstancePlacement) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGpuInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=gpu_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13264,7 +13503,7 @@ cdef class GpuInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") self._owner = None @@ -13276,7 +13515,7 @@ cdef class GpuInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13297,20 +13536,20 @@ cdef class GpuInstanceProfileInfo_v3: if not isinstance(other, GpuInstanceProfileInfo_v3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13441,7 +13680,7 @@ cdef class GpuInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13451,7 +13690,7 @@ cdef class GpuInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -13467,7 +13706,7 @@ cdef class GpuInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -13476,7 +13715,7 @@ cdef class GpuInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_profile_info_v3_dtype` holding the data. """ - return __from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) + return _cyb_from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13491,10 +13730,10 @@ cdef class GpuInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuInstanceProfileInfo_v3 obj = GpuInstanceProfileInfo_v3.__new__(GpuInstanceProfileInfo_v3) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -13568,10 +13807,10 @@ cdef class ComputeInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13649,8 +13888,8 @@ cdef class ComputeInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ComputeInstancePlacement obj = ComputeInstancePlacement.__new__(ComputeInstancePlacement) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlComputeInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=compute_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13694,7 +13933,7 @@ cdef class ComputeInstanceProfileInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") self._owner = None @@ -13706,7 +13945,7 @@ cdef class ComputeInstanceProfileInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v2 object at {hex(id(self))}>" @@ -13727,20 +13966,20 @@ cdef class ComputeInstanceProfileInfo_v2: if not isinstance(other, ComputeInstanceProfileInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13860,7 +14099,7 @@ cdef class ComputeInstanceProfileInfo_v2: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13870,12 +14109,12 @@ cdef class ComputeInstanceProfileInfo_v2: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) @staticmethod def from_data(data): @@ -13884,7 +14123,7 @@ cdef class ComputeInstanceProfileInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v2_dtype` holding the data. """ - return __from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) + return _cyb_from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13899,10 +14138,10 @@ cdef class ComputeInstanceProfileInfo_v2: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v2 obj = ComputeInstanceProfileInfo_v2.__new__(ComputeInstanceProfileInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -13950,7 +14189,7 @@ cdef class ComputeInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") self._owner = None @@ -13962,7 +14201,7 @@ cdef class ComputeInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13983,20 +14222,20 @@ cdef class ComputeInstanceProfileInfo_v3: if not isinstance(other, ComputeInstanceProfileInfo_v3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14116,7 +14355,7 @@ cdef class ComputeInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -14126,7 +14365,7 @@ cdef class ComputeInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -14142,7 +14381,7 @@ cdef class ComputeInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) + return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -14151,7 +14390,7 @@ cdef class ComputeInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v3_dtype` holding the data. """ - return __from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) + return _cyb_from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14166,10 +14405,10 @@ cdef class ComputeInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v3 obj = ComputeInstanceProfileInfo_v3.__new__(ComputeInstanceProfileInfo_v3) if owner is None: - obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -14207,7 +14446,7 @@ cdef class DeviceAddressingMode_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") self._owner = None @@ -14219,7 +14458,7 @@ cdef class DeviceAddressingMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DeviceAddressingMode_v1 object at {hex(id(self))}>" @@ -14240,20 +14479,20 @@ cdef class DeviceAddressingMode_v1: if not isinstance(other, DeviceAddressingMode_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14285,7 +14524,7 @@ cdef class DeviceAddressingMode_v1: @staticmethod def from_buffer(buffer): """Create an DeviceAddressingMode_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) @staticmethod def from_data(data): @@ -14294,7 +14533,7 @@ cdef class DeviceAddressingMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_addressing_mode_v1_dtype` holding the data. """ - return __from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) + return _cyb_from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14309,10 +14548,10 @@ cdef class DeviceAddressingMode_v1: raise ValueError("ptr must not be null (0)") cdef DeviceAddressingMode_v1 obj = DeviceAddressingMode_v1.__new__(DeviceAddressingMode_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) obj._owner = None obj._owned = True else: @@ -14351,7 +14590,7 @@ cdef class RepairStatus_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlRepairStatus_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") self._owner = None @@ -14363,7 +14602,7 @@ cdef class RepairStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.RepairStatus_v1 object at {hex(id(self))}>" @@ -14384,20 +14623,20 @@ cdef class RepairStatus_v1: if not isinstance(other, RepairStatus_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14440,7 +14679,7 @@ cdef class RepairStatus_v1: @staticmethod def from_buffer(buffer): """Create an RepairStatus_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) @staticmethod def from_data(data): @@ -14449,7 +14688,7 @@ cdef class RepairStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `repair_status_v1_dtype` holding the data. """ - return __from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) + return _cyb_from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14464,10 +14703,10 @@ cdef class RepairStatus_v1: raise ValueError("ptr must not be null (0)") cdef RepairStatus_v1 obj = RepairStatus_v1.__new__(RepairStatus_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -14506,7 +14745,7 @@ cdef class DevicePowerMizerModes_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") self._owner = None @@ -14518,7 +14757,7 @@ cdef class DevicePowerMizerModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DevicePowerMizerModes_v1 object at {hex(id(self))}>" @@ -14539,20 +14778,20 @@ cdef class DevicePowerMizerModes_v1: if not isinstance(other, DevicePowerMizerModes_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14595,7 +14834,7 @@ cdef class DevicePowerMizerModes_v1: @staticmethod def from_buffer(buffer): """Create an DevicePowerMizerModes_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) @staticmethod def from_data(data): @@ -14604,7 +14843,7 @@ cdef class DevicePowerMizerModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_power_mizer_modes_v1_dtype` holding the data. """ - return __from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) + return _cyb_from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14619,10 +14858,10 @@ cdef class DevicePowerMizerModes_v1: raise ValueError("ptr must not be null (0)") cdef DevicePowerMizerModes_v1 obj = DevicePowerMizerModes_v1.__new__(DevicePowerMizerModes_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) obj._owner = None obj._owned = True else: @@ -14701,10 +14940,10 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def unit(self): @@ -14837,8 +15076,8 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorEntry_v1 obj = EccSramUniqueUncorrectedErrorEntry_v1.__new__(EccSramUniqueUncorrectedErrorEntry_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorEntry_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=ecc_sram_unique_uncorrected_error_entry_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -14878,7 +15117,7 @@ cdef class GpuFabricInfo_v3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") self._owner = None @@ -14890,7 +15129,7 @@ cdef class GpuFabricInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v3 object at {hex(id(self))}>" @@ -14911,20 +15150,20 @@ cdef class GpuFabricInfo_v3: if not isinstance(other, GpuFabricInfo_v3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14933,7 +15172,7 @@ cdef class GpuFabricInfo_v3: @property def version(self): - """int: Structure version identifier (set to nvmlGpuFabricInfo_v2).""" + """int: Structure version identifier (set to nvmlGpuFabricInfo_v3).""" return self._ptr[0].version @version.setter @@ -14945,7 +15184,7 @@ cdef class GpuFabricInfo_v3: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -14955,9 +15194,9 @@ cdef class GpuFabricInfo_v3: raise ValueError("This GpuFabricInfo_v3 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -15017,7 +15256,7 @@ cdef class GpuFabricInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) @staticmethod def from_data(data): @@ -15026,7 +15265,7 @@ cdef class GpuFabricInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v3_dtype` holding the data. """ - return __from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) + return _cyb_from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15041,10 +15280,10 @@ cdef class GpuFabricInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v3 obj = GpuFabricInfo_v3.__new__(GpuFabricInfo_v3) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -15082,7 +15321,7 @@ cdef class NvLinkInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") self._owner = None @@ -15094,7 +15333,7 @@ cdef class NvLinkInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v1 object at {hex(id(self))}>" @@ -15115,20 +15354,20 @@ cdef class NvLinkInfo_v1: if not isinstance(other, NvLinkInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15160,7 +15399,7 @@ cdef class NvLinkInfo_v1: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) @staticmethod def from_data(data): @@ -15169,7 +15408,7 @@ cdef class NvLinkInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v1_dtype` holding the data. """ - return __from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) + return _cyb_from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15184,10 +15423,10 @@ cdef class NvLinkInfo_v1: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v1 obj = NvLinkInfo_v1.__new__(NvLinkInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -15227,7 +15466,7 @@ cdef class NvlinkFirmwareVersion: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") self._owner = None @@ -15239,7 +15478,7 @@ cdef class NvlinkFirmwareVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareVersion object at {hex(id(self))}>" @@ -15260,20 +15499,20 @@ cdef class NvlinkFirmwareVersion: if not isinstance(other, NvlinkFirmwareVersion): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15327,7 +15566,7 @@ cdef class NvlinkFirmwareVersion: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareVersion instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) @staticmethod def from_data(data): @@ -15336,7 +15575,7 @@ cdef class NvlinkFirmwareVersion: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_version_dtype` holding the data. """ - return __from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) + return _cyb_from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15351,10 +15590,10 @@ cdef class NvlinkFirmwareVersion: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareVersion obj = NvlinkFirmwareVersion.__new__(NvlinkFirmwareVersion) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) obj._owner = None obj._owned = True else: @@ -15391,7 +15630,7 @@ cdef class PRMCounterInput_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") self._owner = None @@ -15403,7 +15642,7 @@ cdef class PRMCounterInput_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterInput_v1 object at {hex(id(self))}>" @@ -15424,20 +15663,20 @@ cdef class PRMCounterInput_v1: if not isinstance(other, PRMCounterInput_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15458,7 +15697,7 @@ cdef class PRMCounterInput_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterInput_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) @staticmethod def from_data(data): @@ -15467,7 +15706,7 @@ cdef class PRMCounterInput_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_input_v1_dtype` holding the data. """ - return __from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) + return _cyb_from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15482,10 +15721,10 @@ cdef class PRMCounterInput_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterInput_v1 obj = PRMCounterInput_v1.__new__(PRMCounterInput_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) obj._owner = None obj._owned = True else: @@ -15525,7 +15764,7 @@ cdef class VgpuSchedulerStateInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") self._owner = None @@ -15537,7 +15776,7 @@ cdef class VgpuSchedulerStateInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v2 object at {hex(id(self))}>" @@ -15558,20 +15797,20 @@ cdef class VgpuSchedulerStateInfo_v2: if not isinstance(other, VgpuSchedulerStateInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15625,7 +15864,7 @@ cdef class VgpuSchedulerStateInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) @staticmethod def from_data(data): @@ -15634,7 +15873,7 @@ cdef class VgpuSchedulerStateInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) + return _cyb_from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15649,10 +15888,10 @@ cdef class VgpuSchedulerStateInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v2 obj = VgpuSchedulerStateInfo_v2.__new__(VgpuSchedulerStateInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -15731,10 +15970,10 @@ cdef class VgpuSchedulerLogEntry_v2: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -15867,8 +16106,8 @@ cdef class VgpuSchedulerLogEntry_v2: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry_v2 obj = VgpuSchedulerLogEntry_v2.__new__(VgpuSchedulerLogEntry_v2) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_v2_dtype) obj._data = data.view(_numpy.recarray) @@ -15905,7 +16144,7 @@ cdef class VgpuSchedulerState_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") self._owner = None @@ -15917,7 +16156,7 @@ cdef class VgpuSchedulerState_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v2 object at {hex(id(self))}>" @@ -15938,20 +16177,20 @@ cdef class VgpuSchedulerState_v2: if not isinstance(other, VgpuSchedulerState_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16005,7 +16244,7 @@ cdef class VgpuSchedulerState_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) @staticmethod def from_data(data): @@ -16014,7 +16253,7 @@ cdef class VgpuSchedulerState_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) + return _cyb_from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16029,10 +16268,10 @@ cdef class VgpuSchedulerState_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v2 obj = VgpuSchedulerState_v2.__new__(VgpuSchedulerState_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) obj._owner = None obj._owned = True else: @@ -16070,7 +16309,7 @@ cdef class ExcludedDeviceInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") self._owner = None @@ -16082,7 +16321,7 @@ cdef class ExcludedDeviceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ExcludedDeviceInfo object at {hex(id(self))}>" @@ -16103,20 +16342,20 @@ cdef class ExcludedDeviceInfo: if not isinstance(other, ExcludedDeviceInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16133,12 +16372,12 @@ cdef class ExcludedDeviceInfo: if self._readonly: raise ValueError("This ExcludedDeviceInfo instance is read-only") cdef PciInfo val_ = val - memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) + _cyb_memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) @property def uuid(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].uuid) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].uuid) @uuid.setter def uuid(self, val): @@ -16148,12 +16387,12 @@ cdef class ExcludedDeviceInfo: if len(buf) >= 80: raise ValueError("String too long for field uuid, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].uuid), ptr, 80) + _cyb_memcpy((self._ptr[0].uuid), ptr, 80) @staticmethod def from_buffer(buffer): """Create an ExcludedDeviceInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) @staticmethod def from_data(data): @@ -16162,7 +16401,7 @@ cdef class ExcludedDeviceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `excluded_device_info_dtype` holding the data. """ - return __from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) + return _cyb_from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16177,10 +16416,10 @@ cdef class ExcludedDeviceInfo: raise ValueError("ptr must not be null (0)") cdef ExcludedDeviceInfo obj = ExcludedDeviceInfo.__new__(ExcludedDeviceInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) obj._owner = None obj._owned = True else: @@ -16221,7 +16460,7 @@ cdef class ProcessDetailList_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") self._owner = None @@ -16234,7 +16473,7 @@ cdef class ProcessDetailList_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ProcessDetailList_v1 object at {hex(id(self))}>" @@ -16255,20 +16494,20 @@ cdef class ProcessDetailList_v1: if not isinstance(other, ProcessDetailList_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16316,7 +16555,7 @@ cdef class ProcessDetailList_v1: @staticmethod def from_buffer(buffer): """Create an ProcessDetailList_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) @staticmethod def from_data(data): @@ -16325,7 +16564,7 @@ cdef class ProcessDetailList_v1: Args: data (_numpy.ndarray): a single-element array of dtype `process_detail_list_v1_dtype` holding the data. """ - return __from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) + return _cyb_from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16340,10 +16579,10 @@ cdef class ProcessDetailList_v1: raise ValueError("ptr must not be null (0)") cdef ProcessDetailList_v1 obj = ProcessDetailList_v1.__new__(ProcessDetailList_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) obj._owner = None obj._owned = True else: @@ -16382,7 +16621,7 @@ cdef class BridgeChipHierarchy: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") self._owner = None @@ -16394,7 +16633,7 @@ cdef class BridgeChipHierarchy: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.BridgeChipHierarchy object at {hex(id(self))}>" @@ -16415,20 +16654,20 @@ cdef class BridgeChipHierarchy: if not isinstance(other, BridgeChipHierarchy): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16450,12 +16689,12 @@ cdef class BridgeChipHierarchy: self._ptr[0].bridgeCount = len(val) if len(val) == 0: return - memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) + _cyb_memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) @staticmethod def from_buffer(buffer): """Create an BridgeChipHierarchy instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) + return _cyb_from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) @staticmethod def from_data(data): @@ -16464,7 +16703,7 @@ cdef class BridgeChipHierarchy: Args: data (_numpy.ndarray): a single-element array of dtype `bridge_chip_hierarchy_dtype` holding the data. """ - return __from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) + return _cyb_from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16479,10 +16718,10 @@ cdef class BridgeChipHierarchy: raise ValueError("ptr must not be null (0)") cdef BridgeChipHierarchy obj = BridgeChipHierarchy.__new__(BridgeChipHierarchy) if owner is None: - obj._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) obj._owner = None obj._owned = True else: @@ -16556,10 +16795,10 @@ cdef class Sample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -16635,8 +16874,8 @@ cdef class Sample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Sample obj = Sample.__new__(Sample) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16711,10 +16950,10 @@ cdef class VgpuInstanceUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def vgpu_instance(self): @@ -16828,8 +17067,8 @@ cdef class VgpuInstanceUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationSample obj = VgpuInstanceUtilizationSample.__new__(VgpuInstanceUtilizationSample) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16906,10 +17145,10 @@ cdef class VgpuInstanceUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -17041,8 +17280,8 @@ cdef class VgpuInstanceUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationInfo_v1 obj = VgpuInstanceUtilizationInfo_v1.__new__(VgpuInstanceUtilizationInfo_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -17118,10 +17357,10 @@ cdef class FieldValue: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def field_id(self): @@ -17252,8 +17491,8 @@ cdef class FieldValue: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FieldValue obj = FieldValue.__new__(FieldValue) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFieldValue_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=field_value_dtype) obj._data = data.view(_numpy.recarray) @@ -17289,7 +17528,7 @@ cdef class PRMCounterValue_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") self._owner = None @@ -17301,7 +17540,7 @@ cdef class PRMCounterValue_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterValue_v1 object at {hex(id(self))}>" @@ -17322,20 +17561,20 @@ cdef class PRMCounterValue_v1: if not isinstance(other, PRMCounterValue_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17352,7 +17591,7 @@ cdef class PRMCounterValue_v1: if self._readonly: raise ValueError("This PRMCounterValue_v1 instance is read-only") cdef Value val_ = val - memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) + _cyb_memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) @property def status(self): @@ -17379,7 +17618,7 @@ cdef class PRMCounterValue_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterValue_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) @staticmethod def from_data(data): @@ -17388,7 +17627,7 @@ cdef class PRMCounterValue_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_value_v1_dtype` holding the data. """ - return __from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) + return _cyb_from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17403,10 +17642,10 @@ cdef class PRMCounterValue_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterValue_v1 obj = PRMCounterValue_v1.__new__(PRMCounterValue_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) obj._owner = None obj._owned = True else: @@ -17444,7 +17683,7 @@ cdef class GpuThermalSettings: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuThermalSettings_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") self._owner = None @@ -17456,7 +17695,7 @@ cdef class GpuThermalSettings: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuThermalSettings object at {hex(id(self))}>" @@ -17477,20 +17716,20 @@ cdef class GpuThermalSettings: if not isinstance(other, GpuThermalSettings): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17509,7 +17748,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(cuda_bindings_nvml__anon_pod0) * 3) + _cyb_memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) @property def count(self): @@ -17525,7 +17764,7 @@ cdef class GpuThermalSettings: @staticmethod def from_buffer(buffer): """Create an GpuThermalSettings instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) @staticmethod def from_data(data): @@ -17534,7 +17773,7 @@ cdef class GpuThermalSettings: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_thermal_settings_dtype` holding the data. """ - return __from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) + return _cyb_from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17549,10 +17788,10 @@ cdef class GpuThermalSettings: raise ValueError("ptr must not be null (0)") cdef GpuThermalSettings obj = GpuThermalSettings.__new__(GpuThermalSettings) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) obj._owner = None obj._owned = True else: @@ -17591,7 +17830,7 @@ cdef class ClkMonStatus: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlClkMonStatus_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") self._owner = None @@ -17603,7 +17842,7 @@ cdef class ClkMonStatus: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ClkMonStatus object at {hex(id(self))}>" @@ -17624,20 +17863,20 @@ cdef class ClkMonStatus: if not isinstance(other, ClkMonStatus): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlClkMonStatus_t)) + self._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17659,7 +17898,7 @@ cdef class ClkMonStatus: self._ptr[0].clkMonListSize = len(val) if len(val) == 0: return - memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) + _cyb_memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) @property def b_global_status(self): @@ -17675,7 +17914,7 @@ cdef class ClkMonStatus: @staticmethod def from_buffer(buffer): """Create an ClkMonStatus instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) + return _cyb_from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) @staticmethod def from_data(data): @@ -17684,7 +17923,7 @@ cdef class ClkMonStatus: Args: data (_numpy.ndarray): a single-element array of dtype `clk_mon_status_dtype` holding the data. """ - return __from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) + return _cyb_from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17699,10 +17938,10 @@ cdef class ClkMonStatus: raise ValueError("ptr must not be null (0)") cdef ClkMonStatus obj = ClkMonStatus.__new__(ClkMonStatus) if owner is None: - obj._ptr = malloc(sizeof(nvmlClkMonStatus_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) obj._owner = None obj._owned = True else: @@ -17743,7 +17982,7 @@ cdef class ProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") self._owner = None @@ -17756,7 +17995,7 @@ cdef class ProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -17777,20 +18016,20 @@ cdef class ProcessesUtilizationInfo_v1: if not isinstance(other, ProcessesUtilizationInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17838,7 +18077,7 @@ cdef class ProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an ProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -17847,7 +18086,7 @@ cdef class ProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `processes_utilization_info_v1_dtype` holding the data. """ - return __from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) + return _cyb_from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17862,10 +18101,10 @@ cdef class ProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef ProcessesUtilizationInfo_v1 obj = ProcessesUtilizationInfo_v1.__new__(ProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -17904,7 +18143,7 @@ cdef class GpuDynamicPstatesInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") self._owner = None @@ -17916,7 +18155,7 @@ cdef class GpuDynamicPstatesInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuDynamicPstatesInfo object at {hex(id(self))}>" @@ -17937,20 +18176,20 @@ cdef class GpuDynamicPstatesInfo: if not isinstance(other, GpuDynamicPstatesInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17969,7 +18208,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(cuda_bindings_nvml__anon_pod1) * 8) + _cyb_memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) @property def flags_(self): @@ -17985,7 +18224,7 @@ cdef class GpuDynamicPstatesInfo: @staticmethod def from_buffer(buffer): """Create an GpuDynamicPstatesInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) @staticmethod def from_data(data): @@ -17994,7 +18233,7 @@ cdef class GpuDynamicPstatesInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_dynamic_pstates_info_dtype` holding the data. """ - return __from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) + return _cyb_from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18009,10 +18248,10 @@ cdef class GpuDynamicPstatesInfo: raise ValueError("ptr must not be null (0)") cdef GpuDynamicPstatesInfo obj = GpuDynamicPstatesInfo.__new__(GpuDynamicPstatesInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) obj._owner = None obj._owned = True else: @@ -18053,7 +18292,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") self._owner = None @@ -18066,7 +18305,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -18087,20 +18326,20 @@ cdef class VgpuProcessesUtilizationInfo_v1: if not isinstance(other, VgpuProcessesUtilizationInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18148,7 +18387,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -18157,7 +18396,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_processes_utilization_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) + return _cyb_from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18172,10 +18411,10 @@ cdef class VgpuProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuProcessesUtilizationInfo_v1 obj = VgpuProcessesUtilizationInfo_v1.__new__(VgpuProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -18208,7 +18447,7 @@ cdef class VgpuSchedulerParams: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") self._owner = None @@ -18220,7 +18459,7 @@ cdef class VgpuSchedulerParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerParams object at {hex(id(self))}>" @@ -18241,20 +18480,20 @@ cdef class VgpuSchedulerParams: if not isinstance(other, VgpuSchedulerParams): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18271,7 +18510,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(cuda_bindings_nvml__anon_pod2) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) @property def vgpu_sched_data(self): @@ -18283,12 +18522,12 @@ 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(cuda_bindings_nvml__anon_pod3) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerParams instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) @staticmethod def from_data(data): @@ -18297,7 +18536,7 @@ cdef class VgpuSchedulerParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_params_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) + return _cyb_from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18312,10 +18551,10 @@ cdef class VgpuSchedulerParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerParams obj = VgpuSchedulerParams.__new__(VgpuSchedulerParams) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) obj._owner = None obj._owned = True else: @@ -18347,7 +18586,7 @@ cdef class VgpuSchedulerSetParams: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") self._owner = None @@ -18359,7 +18598,7 @@ cdef class VgpuSchedulerSetParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerSetParams object at {hex(id(self))}>" @@ -18380,20 +18619,20 @@ cdef class VgpuSchedulerSetParams: if not isinstance(other, VgpuSchedulerSetParams): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18410,7 +18649,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(cuda_bindings_nvml__anon_pod4) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) @property def vgpu_sched_data(self): @@ -18422,12 +18661,12 @@ 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(cuda_bindings_nvml__anon_pod5) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerSetParams instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) @staticmethod def from_data(data): @@ -18436,7 +18675,7 @@ cdef class VgpuSchedulerSetParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_set_params_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) + return _cyb_from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18451,10 +18690,10 @@ cdef class VgpuSchedulerSetParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerSetParams obj = VgpuSchedulerSetParams.__new__(VgpuSchedulerSetParams) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) obj._owner = None obj._owned = True else: @@ -18493,7 +18732,7 @@ cdef class VgpuLicenseInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") self._owner = None @@ -18505,7 +18744,7 @@ cdef class VgpuLicenseInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseInfo object at {hex(id(self))}>" @@ -18526,20 +18765,20 @@ cdef class VgpuLicenseInfo: if not isinstance(other, VgpuLicenseInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18556,7 +18795,7 @@ cdef class VgpuLicenseInfo: if self._readonly: raise ValueError("This VgpuLicenseInfo instance is read-only") cdef VgpuLicenseExpiry val_ = val - memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) + _cyb_memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) @property def is_licensed(self): @@ -18583,7 +18822,7 @@ cdef class VgpuLicenseInfo: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) @staticmethod def from_data(data): @@ -18592,7 +18831,7 @@ cdef class VgpuLicenseInfo: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_info_dtype` holding the data. """ - return __from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) + return _cyb_from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18607,10 +18846,10 @@ cdef class VgpuLicenseInfo: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseInfo obj = VgpuLicenseInfo.__new__(VgpuLicenseInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) obj._owner = None obj._owned = True else: @@ -18688,10 +18927,10 @@ cdef class GridLicensableFeature: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def feature_code(self): @@ -18807,8 +19046,8 @@ cdef class GridLicensableFeature: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeature obj = GridLicensableFeature.__new__(GridLicensableFeature) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGridLicensableFeature_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=grid_licensable_feature_dtype) obj._data = data.view(_numpy.recarray) @@ -18843,7 +19082,7 @@ cdef class UnitFanSpeeds: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") self._owner = None @@ -18855,7 +19094,7 @@ cdef class UnitFanSpeeds: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.UnitFanSpeeds object at {hex(id(self))}>" @@ -18876,20 +19115,20 @@ cdef class UnitFanSpeeds: if not isinstance(other, UnitFanSpeeds): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18908,7 +19147,7 @@ cdef class UnitFanSpeeds: cdef UnitFanInfo val_ = val if len(val) != 24: raise ValueError(f"Expected length { 24 } for field fans, got {len(val)}") - memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) + _cyb_memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) @property def count(self): @@ -18924,7 +19163,7 @@ cdef class UnitFanSpeeds: @staticmethod def from_buffer(buffer): """Create an UnitFanSpeeds instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) + return _cyb_from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) @staticmethod def from_data(data): @@ -18933,7 +19172,7 @@ cdef class UnitFanSpeeds: Args: data (_numpy.ndarray): a single-element array of dtype `unit_fan_speeds_dtype` holding the data. """ - return __from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) + return _cyb_from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18948,10 +19187,10 @@ cdef class UnitFanSpeeds: raise ValueError("ptr must not be null (0)") cdef UnitFanSpeeds obj = UnitFanSpeeds.__new__(UnitFanSpeeds) if owner is None: - obj._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) obj._owner = None obj._owned = True else: @@ -18995,7 +19234,7 @@ cdef class VgpuPgpuMetadata: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") self._owner = None @@ -19007,7 +19246,7 @@ cdef class VgpuPgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuMetadata object at {hex(id(self))}>" @@ -19028,20 +19267,20 @@ cdef class VgpuPgpuMetadata: if not isinstance(other, VgpuPgpuMetadata): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19058,7 +19297,7 @@ cdef class VgpuPgpuMetadata: if self._readonly: raise ValueError("This VgpuPgpuMetadata instance is read-only") cdef VgpuVersion val_ = val - memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) + _cyb_memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) @property def version(self): @@ -19085,7 +19324,7 @@ cdef class VgpuPgpuMetadata: @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -19095,7 +19334,7 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def pgpu_virtualization_caps(self): @@ -19122,7 +19361,7 @@ cdef class VgpuPgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -19132,12 +19371,12 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - memcpy((self._ptr[0].opaqueData), ptr, 4) + _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuPgpuMetadata instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) @staticmethod def from_data(data): @@ -19146,7 +19385,7 @@ cdef class VgpuPgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_metadata_dtype` holding the data. """ - return __from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) + return _cyb_from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19161,10 +19400,10 @@ cdef class VgpuPgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuMetadata obj = VgpuPgpuMetadata.__new__(VgpuPgpuMetadata) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -19204,7 +19443,7 @@ cdef class GpuInstanceInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") self._owner = None @@ -19216,7 +19455,7 @@ cdef class GpuInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceInfo object at {hex(id(self))}>" @@ -19237,20 +19476,20 @@ cdef class GpuInstanceInfo: if not isinstance(other, GpuInstanceInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19267,7 +19506,7 @@ cdef class GpuInstanceInfo: if self._readonly: raise ValueError("This GpuInstanceInfo instance is read-only") cdef GpuInstancePlacement val_ = val - memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) + _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) @property def device_(self): @@ -19305,7 +19544,7 @@ cdef class GpuInstanceInfo: @staticmethod def from_buffer(buffer): """Create an GpuInstanceInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) @staticmethod def from_data(data): @@ -19314,7 +19553,7 @@ cdef class GpuInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_info_dtype` holding the data. """ - return __from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) + return _cyb_from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19329,10 +19568,10 @@ cdef class GpuInstanceInfo: raise ValueError("ptr must not be null (0)") cdef GpuInstanceInfo obj = GpuInstanceInfo.__new__(GpuInstanceInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19373,7 +19612,7 @@ cdef class ComputeInstanceInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") self._owner = None @@ -19385,7 +19624,7 @@ cdef class ComputeInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceInfo object at {hex(id(self))}>" @@ -19406,20 +19645,20 @@ cdef class ComputeInstanceInfo: if not isinstance(other, ComputeInstanceInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19436,7 +19675,7 @@ cdef class ComputeInstanceInfo: if self._readonly: raise ValueError("This ComputeInstanceInfo instance is read-only") cdef ComputeInstancePlacement val_ = val - memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) + _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) @property def device_(self): @@ -19485,7 +19724,7 @@ cdef class ComputeInstanceInfo: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) @staticmethod def from_data(data): @@ -19494,7 +19733,7 @@ cdef class ComputeInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_info_dtype` holding the data. """ - return __from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) + return _cyb_from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19509,10 +19748,10 @@ cdef class ComputeInstanceInfo: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceInfo obj = ComputeInstanceInfo.__new__(ComputeInstanceInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19552,7 +19791,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") self._owner = None @@ -19565,7 +19804,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.EccSramUniqueUncorrectedErrorCounts_v1 object at {hex(id(self))}>" @@ -19586,20 +19825,20 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if not isinstance(other, EccSramUniqueUncorrectedErrorCounts_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19636,7 +19875,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: @staticmethod def from_buffer(buffer): """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_data(data): @@ -19645,7 +19884,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_unique_uncorrected_error_counts_v1_dtype` holding the data. """ - return __from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) + return _cyb_from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19660,10 +19899,10 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorCounts_v1 obj = EccSramUniqueUncorrectedErrorCounts_v1.__new__(EccSramUniqueUncorrectedErrorCounts_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) obj._owner = None obj._owned = True else: @@ -19702,7 +19941,7 @@ cdef class NvlinkFirmwareInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") self._owner = None @@ -19714,7 +19953,7 @@ cdef class NvlinkFirmwareInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareInfo object at {hex(id(self))}>" @@ -19735,20 +19974,20 @@ cdef class NvlinkFirmwareInfo: if not isinstance(other, NvlinkFirmwareInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19767,7 +20006,7 @@ cdef class NvlinkFirmwareInfo: cdef NvlinkFirmwareVersion val_ = val if len(val) != 100: raise ValueError(f"Expected length { 100 } for field firmware_version, got {len(val)}") - memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) + _cyb_memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) @property def num_valid_entries(self): @@ -19783,7 +20022,7 @@ cdef class NvlinkFirmwareInfo: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) @staticmethod def from_data(data): @@ -19792,7 +20031,7 @@ cdef class NvlinkFirmwareInfo: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_info_dtype` holding the data. """ - return __from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) + return _cyb_from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19807,10 +20046,10 @@ cdef class NvlinkFirmwareInfo: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareInfo obj = NvlinkFirmwareInfo.__new__(NvlinkFirmwareInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) obj._owner = None obj._owned = True else: @@ -19852,7 +20091,7 @@ cdef class VgpuSchedulerLogInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") self._owner = None @@ -19864,7 +20103,7 @@ cdef class VgpuSchedulerLogInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v2 object at {hex(id(self))}>" @@ -19885,20 +20124,20 @@ cdef class VgpuSchedulerLogInfo_v2: if not isinstance(other, VgpuSchedulerLogInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19917,7 +20156,7 @@ cdef class VgpuSchedulerLogInfo_v2: cdef VgpuSchedulerLogEntry_v2 val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) @property def engine_id(self): @@ -19977,7 +20216,7 @@ cdef class VgpuSchedulerLogInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) @staticmethod def from_data(data): @@ -19986,7 +20225,7 @@ cdef class VgpuSchedulerLogInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) + return _cyb_from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20001,10 +20240,10 @@ cdef class VgpuSchedulerLogInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v2 obj = VgpuSchedulerLogInfo_v2.__new__(VgpuSchedulerLogInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -20046,7 +20285,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") self._owner = None @@ -20059,7 +20298,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuInstancesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -20080,20 +20319,20 @@ cdef class VgpuInstancesUtilizationInfo_v1: if not isinstance(other, VgpuInstancesUtilizationInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20152,7 +20391,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuInstancesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -20161,7 +20400,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_instances_utilization_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) + return _cyb_from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20176,10 +20415,10 @@ cdef class VgpuInstancesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuInstancesUtilizationInfo_v1 obj = VgpuInstancesUtilizationInfo_v1.__new__(VgpuInstancesUtilizationInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20255,10 +20494,10 @@ cdef class PRMCounter_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def counter_id(self): @@ -20343,8 +20582,8 @@ cdef class PRMCounter_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PRMCounter_v1 obj = PRMCounter_v1.__new__(PRMCounter_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlPRMCounter_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=prm_counter_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -20383,7 +20622,7 @@ cdef class VgpuSchedulerLog: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") self._owner = None @@ -20395,7 +20634,7 @@ cdef class VgpuSchedulerLog: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLog object at {hex(id(self))}>" @@ -20416,20 +20655,20 @@ cdef class VgpuSchedulerLog: if not isinstance(other, VgpuSchedulerLog): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20446,7 +20685,7 @@ cdef class VgpuSchedulerLog: if self._readonly: raise ValueError("This VgpuSchedulerLog instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -20460,7 +20699,7 @@ cdef class VgpuSchedulerLog: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def engine_id(self): @@ -20509,7 +20748,7 @@ cdef class VgpuSchedulerLog: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLog instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) @staticmethod def from_data(data): @@ -20518,7 +20757,7 @@ cdef class VgpuSchedulerLog: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) + return _cyb_from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20533,10 +20772,10 @@ cdef class VgpuSchedulerLog: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLog obj = VgpuSchedulerLog.__new__(VgpuSchedulerLog) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) obj._owner = None obj._owned = True else: @@ -20575,7 +20814,7 @@ cdef class VgpuSchedulerGetState: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") self._owner = None @@ -20587,7 +20826,7 @@ cdef class VgpuSchedulerGetState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerGetState object at {hex(id(self))}>" @@ -20608,20 +20847,20 @@ cdef class VgpuSchedulerGetState: if not isinstance(other, VgpuSchedulerGetState): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20638,7 +20877,7 @@ cdef class VgpuSchedulerGetState: if self._readonly: raise ValueError("This VgpuSchedulerGetState instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def scheduler_policy(self): @@ -20665,7 +20904,7 @@ cdef class VgpuSchedulerGetState: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerGetState instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) @staticmethod def from_data(data): @@ -20674,7 +20913,7 @@ cdef class VgpuSchedulerGetState: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_get_state_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) + return _cyb_from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20689,10 +20928,10 @@ cdef class VgpuSchedulerGetState: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerGetState obj = VgpuSchedulerGetState.__new__(VgpuSchedulerGetState) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) obj._owner = None obj._owned = True else: @@ -20733,7 +20972,7 @@ cdef class VgpuSchedulerStateInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") self._owner = None @@ -20745,7 +20984,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v1 object at {hex(id(self))}>" @@ -20766,20 +21005,20 @@ cdef class VgpuSchedulerStateInfo_v1: if not isinstance(other, VgpuSchedulerStateInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20796,7 +21035,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def version(self): @@ -20845,7 +21084,7 @@ cdef class VgpuSchedulerStateInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) @staticmethod def from_data(data): @@ -20854,7 +21093,7 @@ cdef class VgpuSchedulerStateInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) + return _cyb_from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20869,10 +21108,10 @@ cdef class VgpuSchedulerStateInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v1 obj = VgpuSchedulerStateInfo_v1.__new__(VgpuSchedulerStateInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20915,7 +21154,7 @@ cdef class VgpuSchedulerLogInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") self._owner = None @@ -20927,7 +21166,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v1 object at {hex(id(self))}>" @@ -20948,20 +21187,20 @@ cdef class VgpuSchedulerLogInfo_v1: if not isinstance(other, VgpuSchedulerLogInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20978,7 +21217,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -20992,7 +21231,7 @@ cdef class VgpuSchedulerLogInfo_v1: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def version(self): @@ -21052,7 +21291,7 @@ cdef class VgpuSchedulerLogInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) @staticmethod def from_data(data): @@ -21061,7 +21300,7 @@ cdef class VgpuSchedulerLogInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) + return _cyb_from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21076,10 +21315,10 @@ cdef class VgpuSchedulerLogInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v1 obj = VgpuSchedulerLogInfo_v1.__new__(VgpuSchedulerLogInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -21120,7 +21359,7 @@ cdef class VgpuSchedulerState_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") self._owner = None @@ -21132,7 +21371,7 @@ cdef class VgpuSchedulerState_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v1 object at {hex(id(self))}>" @@ -21153,20 +21392,20 @@ cdef class VgpuSchedulerState_v1: if not isinstance(other, VgpuSchedulerState_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21183,7 +21422,7 @@ cdef class VgpuSchedulerState_v1: if self._readonly: raise ValueError("This VgpuSchedulerState_v1 instance is read-only") cdef VgpuSchedulerSetParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) @property def version(self): @@ -21232,7 +21471,7 @@ cdef class VgpuSchedulerState_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) @staticmethod def from_data(data): @@ -21241,7 +21480,7 @@ cdef class VgpuSchedulerState_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) + return _cyb_from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21256,10 +21495,10 @@ cdef class VgpuSchedulerState_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v1 obj = VgpuSchedulerState_v1.__new__(VgpuSchedulerState_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) obj._owner = None obj._owned = True else: @@ -21298,7 +21537,7 @@ cdef class GridLicensableFeatures: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") self._owner = None @@ -21310,7 +21549,7 @@ cdef class GridLicensableFeatures: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GridLicensableFeatures object at {hex(id(self))}>" @@ -21331,20 +21570,20 @@ cdef class GridLicensableFeatures: if not isinstance(other, GridLicensableFeatures): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21366,7 +21605,7 @@ cdef class GridLicensableFeatures: self._ptr[0].licensableFeaturesCount = len(val) if len(val) == 0: return - memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) + _cyb_memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) @property def is_grid_license_supported(self): @@ -21382,7 +21621,7 @@ cdef class GridLicensableFeatures: @staticmethod def from_buffer(buffer): """Create an GridLicensableFeatures instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) + return _cyb_from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) @staticmethod def from_data(data): @@ -21391,7 +21630,7 @@ cdef class GridLicensableFeatures: Args: data (_numpy.ndarray): a single-element array of dtype `grid_licensable_features_dtype` holding the data. """ - return __from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) + return _cyb_from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21406,10 +21645,10 @@ cdef class GridLicensableFeatures: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeatures obj = GridLicensableFeatures.__new__(GridLicensableFeatures) if owner is None: - obj._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) obj._owner = None obj._owned = True else: @@ -21448,7 +21687,7 @@ cdef class NvLinkInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") self._owner = None @@ -21460,7 +21699,7 @@ cdef class NvLinkInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v2 object at {hex(id(self))}>" @@ -21481,20 +21720,20 @@ cdef class NvLinkInfo_v2: if not isinstance(other, NvLinkInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21511,7 +21750,7 @@ cdef class NvLinkInfo_v2: if self._readonly: raise ValueError("This NvLinkInfo_v2 instance is read-only") cdef NvlinkFirmwareInfo val_ = val - memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) + _cyb_memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) @property def version(self): @@ -21538,7 +21777,7 @@ cdef class NvLinkInfo_v2: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) @staticmethod def from_data(data): @@ -21547,7 +21786,7 @@ cdef class NvLinkInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v2_dtype` holding the data. """ - return __from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) + return _cyb_from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21562,10 +21801,10 @@ cdef class NvLinkInfo_v2: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v2 obj = NvLinkInfo_v2.__new__(NvLinkInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -21577,7 +21816,7 @@ cdef class NvLinkInfo_v2: cpdef init_v2(): - """Initialize NVML, but don't initialize any GPUs yet. + """Initialize the NVML Library lazily, without allocating any device state. .. seealso:: `nvmlInit_v2` """ @@ -21587,10 +21826,10 @@ cpdef init_v2(): cpdef init_with_flags(unsigned int flags): - """nvmlInitWithFlags is a variant of ``nvmlInit()``, that allows passing a set of boolean values modifying the behaviour of ``nvmlInit()``. Other than the "flags" parameter it is completely similar to ``nvmlInit_v2``. + """Initialize the NVML Library lazily, without allocating any device state, with additional init flags. Args: - flags (unsigned int): behaviour modifier flags. + flags (unsigned int): NVML_INIT_FLAG_* flags that can modify NVML Init behavior. .. seealso:: `nvmlInitWithFlags` """ @@ -21600,7 +21839,7 @@ cpdef init_with_flags(unsigned int flags): cpdef shutdown(): - """Shut down NVML by releasing all GPU resources previously allocated with :func:`init_v2`. + """Shut down and cleanup NVML Library state. .. seealso:: `nvmlShutdown` """ @@ -21635,7 +21874,7 @@ cpdef str system_get_driver_version(): with nogil: __status__ = nvmlSystemGetDriverVersion(version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef str system_get_nvml_version(): @@ -21651,7 +21890,7 @@ cpdef str system_get_nvml_version(): with nogil: __status__ = nvmlSystemGetNVMLVersion(version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef int system_get_cuda_driver_version() except *: @@ -21700,7 +21939,7 @@ cpdef str system_get_process_name(unsigned int pid): with nogil: __status__ = nvmlSystemGetProcessName(pid, name, length) check_status(__status__) - return cpython.PyUnicode_FromString(name) + return _cyb_cpython.PyUnicode_FromString(name) cpdef object system_get_hic_version(): @@ -21987,7 +22226,7 @@ cpdef str device_get_name(intptr_t device): with nogil: __status__ = nvmlDeviceGetName(device, name, length) check_status(__status__) - return cpython.PyUnicode_FromString(name) + return _cyb_cpython.PyUnicode_FromString(name) cpdef int device_get_brand(intptr_t device) except? -1: @@ -22042,7 +22281,7 @@ cpdef str device_get_serial(intptr_t device): with nogil: __status__ = nvmlDeviceGetSerial(device, serial, length) check_status(__status__) - return cpython.PyUnicode_FromString(serial) + return _cyb_cpython.PyUnicode_FromString(serial) cpdef unsigned int device_get_module_id(intptr_t device) except? 0: @@ -22096,8 +22335,8 @@ cpdef object device_get_memory_affinity(intptr_t device, unsigned int node_set_s .. seealso:: `nvmlDeviceGetMemoryAffinity` """ if node_set_size == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef view.array node_set = view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef _cyb_view.array node_set = _cyb_view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *node_set_ptr = (node_set.data) with nogil: __status__ = nvmlDeviceGetMemoryAffinity(device, node_set_size, node_set_ptr, scope) @@ -22119,8 +22358,8 @@ cpdef object device_get_cpu_affinity_within_scope(intptr_t device, unsigned int .. seealso:: `nvmlDeviceGetCpuAffinityWithinScope` """ if cpu_set_size == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinityWithinScope(device, cpu_set_size, cpu_set_ptr, scope) @@ -22141,8 +22380,8 @@ cpdef object device_get_cpu_affinity(intptr_t device, unsigned int cpu_set_size) .. seealso:: `nvmlDeviceGetCpuAffinity` """ if cpu_set_size == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinity(device, cpu_set_size, cpu_set_ptr) @@ -22249,7 +22488,7 @@ cpdef str device_get_uuid(intptr_t device): with nogil: __status__ = nvmlDeviceGetUUID(device, uuid, length) check_status(__status__) - return cpython.PyUnicode_FromString(uuid) + return _cyb_cpython.PyUnicode_FromString(uuid) cpdef unsigned int device_get_minor_number(intptr_t device) except? 0: @@ -22286,7 +22525,7 @@ cpdef str device_get_board_part_number(intptr_t device): with nogil: __status__ = nvmlDeviceGetBoardPartNumber(device, part_number, length) check_status(__status__) - return cpython.PyUnicode_FromString(part_number) + return _cyb_cpython.PyUnicode_FromString(part_number) cpdef str device_get_inforom_version(intptr_t device, int object): @@ -22306,7 +22545,7 @@ cpdef str device_get_inforom_version(intptr_t device, int object): with nogil: __status__ = nvmlDeviceGetInforomVersion(device, <_InforomObject>object, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef str device_get_inforom_image_version(intptr_t device): @@ -22325,7 +22564,7 @@ cpdef str device_get_inforom_image_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetInforomImageVersion(device, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef unsigned int device_get_inforom_configuration_checksum(intptr_t device) except? 0: @@ -22712,8 +22951,8 @@ cpdef object device_get_supported_memory_clocks(intptr_t device): __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, clocks_m_hz_ptr) @@ -22738,8 +22977,8 @@ cpdef object device_get_supported_graphics_clocks(intptr_t device, unsigned int __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, clocks_m_hz_ptr) @@ -23702,7 +23941,7 @@ cpdef str device_get_vbios_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetVbiosVersion(device, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef object device_get_bridge_chip_info(intptr_t device): @@ -24262,8 +24501,8 @@ cpdef object device_get_accounting_pids(intptr_t device): __status__ = nvmlDeviceGetAccountingPids(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlDeviceGetAccountingPids(device, count, pids_ptr) @@ -24306,8 +24545,8 @@ cpdef object device_get_retired_pages(intptr_t device, int cause): __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, NULL) check_status_size(__status__) if page_count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] - cdef view.array addresses = view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] + cdef _cyb_view.array addresses = _cyb_view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") cdef unsigned long long *addresses_ptr = (addresses.data) with nogil: __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, addresses_ptr) @@ -25245,7 +25484,7 @@ cpdef str vgpu_type_get_class(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetClass(vgpu_type_id, vgpu_type_class, size) check_status(__status__) - return cpython.PyUnicode_FromString(vgpu_type_class) + return _cyb_cpython.PyUnicode_FromString(vgpu_type_class) cpdef unsigned int vgpu_type_get_gpu_instance_profile_id(unsigned int vgpu_type_id) except? 0: @@ -25363,7 +25602,7 @@ cpdef str vgpu_type_get_license(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetLicense(vgpu_type_id, vgpu_type_license_string, size) check_status(__status__) - return cpython.PyUnicode_FromString(vgpu_type_license_string) + return _cyb_cpython.PyUnicode_FromString(vgpu_type_license_string) cpdef unsigned int vgpu_type_get_frame_rate_limit(unsigned int vgpu_type_id) except? 0: @@ -25457,7 +25696,7 @@ cpdef str vgpu_instance_get_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetUUID(vgpu_instance, uuid, size) check_status(__status__) - return cpython.PyUnicode_FromString(uuid) + return _cyb_cpython.PyUnicode_FromString(uuid) cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): @@ -25476,7 +25715,7 @@ cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetVmDriverVersion(vgpu_instance, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef unsigned long long vgpu_instance_get_fb_usage(unsigned int vgpu_instance) except? 0: @@ -25734,7 +25973,7 @@ cpdef str vgpu_instance_get_gpu_pci_id(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetGpuPciId(vgpu_instance, vgpu_pci_id, length) check_status(__status__) - return cpython.PyUnicode_FromString(vgpu_pci_id) + return _cyb_cpython.PyUnicode_FromString(vgpu_pci_id) cpdef unsigned int vgpu_type_get_capabilities(unsigned int vgpu_type_id, int capability) except? 0: @@ -25772,7 +26011,7 @@ cpdef str vgpu_instance_get_mdev_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetMdevUUID(vgpu_instance, mdev_uuid, size) check_status(__status__) - return cpython.PyUnicode_FromString(mdev_uuid) + return _cyb_cpython.PyUnicode_FromString(mdev_uuid) cpdef gpu_instance_set_vgpu_scheduler_state(intptr_t gpu_instance, intptr_t p_scheduler): @@ -25852,7 +26091,7 @@ cpdef str device_get_pgpu_metadata_string(intptr_t device): with nogil: __status__ = nvmlDeviceGetPgpuMetadataString(device, pgpu_metadata, buffer_size) check_status(__status__) - return cpython.PyUnicode_FromString(pgpu_metadata) + return _cyb_cpython.PyUnicode_FromString(pgpu_metadata) cpdef object device_get_vgpu_scheduler_log(intptr_t device): @@ -25996,8 +26235,8 @@ cpdef object vgpu_instance_get_accounting_pids(unsigned int vgpu_instance): __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, pids_ptr) @@ -28452,3 +28691,4 @@ cpdef str vgpu_type_get_name(unsigned int vgpu_type_id): device_get_virtualization_mode.__doc__ = device_get_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") device_set_virtualization_mode.__doc__ = device_set_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") GpmMetricId.GPM_METRIC_DRAM_BW_UTIL.__doc__ = "Percentage of DRAM bw used vs theoretical maximum. ``0.0 - 100.0 *\u200d/``." +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvvm.pxd b/cuda_bindings/cuda/bindings/nvvm.pxd index ee2a3b8da3b..420716e052c 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/nvvm.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=836bcb954d3db4313e3476bfd2e80f1318724c478a277e2d0194f4ad714e02ef # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index b269bb5366f..f7039477374 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -1,22 +1,28 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=db95fcc56a4df8bfa32ac08d8cadcaf2a7b3c69fd989f600673f3c48818d90b6 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum + +# <<<< END OF PREAMBLE CONTENT >>>> + cimport cython # NOQA from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, nested_resource) -from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum - ############################################################################### # Enum ############################################################################### -class Result(_IntEnum): +class Result(_cyb_FastEnum): """ NVVM API call result code. @@ -321,3 +327,4 @@ cpdef int llvm_version(arch) except? 0: __status__ = nvvmLLVMVersion(_arch_, &major) check_status(__status__) return major +del _cyb_FastEnum From 8526c0e3ce7c3339f5133dec51c24ba2b5993d5a Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 5 Jul 2026 22:07:00 -0700 Subject: [PATCH 09/22] Check cybind-generated file seals in pre-commit --- .pre-commit-config.yaml | 7 + toolshed/check_cybind-generated_file_seals.py | 129 ++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 toolshed/check_cybind-generated_file_seals.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f8d2a2731ed..6013502bfc4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,6 +35,13 @@ repos: exclude: '(.*pixi\.lock)|(\.git_archival\.txt)|(.*\.patch$)|(^cuda_core/cuda/core/_vendored/)' args: ["--fix"] + - id: check-cybind-generated-file-seals + name: Check cybind-generated file seals + entry: python ./toolshed/check_cybind-generated_file_seals.py + language: python + files: ^cuda_bindings/ + types: [text] + - id: no-markdown-in-docs-source name: Prevent markdown files in docs/source directories entry: bash -c diff --git a/toolshed/check_cybind-generated_file_seals.py b/toolshed/check_cybind-generated_file_seals.py new file mode 100644 index 00000000000..400b6bda049 --- /dev/null +++ b/toolshed/check_cybind-generated_file_seals.py @@ -0,0 +1,129 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import hashlib +import os +import re +import subprocess +import sys +from pathlib import Path, PureWindowsPath + +GENERATED_FILE_SEAL_TOKEN = "CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE:" # noqa: S105 +SUPPORTED_GENERATED_FILE_SEAL_FORMATS = frozenset({1}) + +_TOKEN_BYTES = GENERATED_FILE_SEAL_TOKEN.encode("ascii") +_MARKER_REGEX = re.compile( + rb"^(?P#|\.\.) " + + re.escape(_TOKEN_BYTES) + + rb" format=(?P[0-9]+); content-sha256=(?P[0-9a-f]{64})\n$" +) +_SOURCE_SUFFIXES = frozenset({".py", ".pxd", ".pxi", ".pyx"}) + + +def normalize_repo_path(filepath): + return PureWindowsPath(filepath).as_posix() + + +def expected_comment_prefix(filepath): + suffixes = Path(normalize_repo_path(filepath)).suffixes + if suffixes and suffixes[-1] == ".in": + suffixes = suffixes[:-1] + suffix = suffixes[-1] if suffixes else "" + if suffix in _SOURCE_SUFFIXES: + return b"#" + if suffix == ".rst": + return b".." + return None + + +def load_previously_sealed_paths(): + process = subprocess.run( # noqa: S603 + ["git", "grep", "-l", "-I", "-F", GENERATED_FILE_SEAL_TOKEN, "HEAD", "--"], # noqa: S607 + capture_output=True, + text=True, + ) + if process.returncode not in (0, 1): + detail = process.stderr.strip() or f"git grep exited with status {process.returncode}" + raise RuntimeError(f"could not inspect previously sealed files: {detail}") + + head_prefix = "HEAD:" + return { + normalize_repo_path(line.removeprefix(head_prefix)) + for line in process.stdout.splitlines() + if line.startswith(head_prefix) + } + + +def validate_generated_file_seal(filepath, previously_sealed_paths): + normalized_path = normalize_repo_path(filepath) + try: + blob = Path(filepath).read_bytes() + except OSError as error: + print(f"ERROR reading {filepath!r}: {error}") + return False + + lines = blob.splitlines(keepends=True) + marker_indexes = [index for index, line in enumerate(lines) if _TOKEN_BYTES in line] + + if not marker_indexes: + if normalized_path in previously_sealed_paths: + print(f"MISSING cybind-generated file seal in {filepath!r}") + return False + return True + + if len(marker_indexes) != 1: + print(f"INVALID cybind-generated file seal count in {filepath!r}: found {len(marker_indexes)}, expected 1") + return False + + marker_index = marker_indexes[0] + match = _MARKER_REGEX.fullmatch(lines[marker_index]) + if match is None: + print(f"MALFORMED cybind-generated file seal in {filepath!r}") + return False + + seal_format = int(match.group("format")) + if seal_format not in SUPPORTED_GENERATED_FILE_SEAL_FORMATS: + print(f"UNSUPPORTED cybind-generated file seal format {seal_format} in {filepath!r}") + return False + + expected_prefix = expected_comment_prefix(filepath) + if expected_prefix is None: + print(f"UNSUPPORTED sealed generated-file extension in {filepath!r}") + return False + if match.group("prefix") != expected_prefix: + print(f"INVALID cybind-generated file seal comment prefix in {filepath!r}") + return False + + unsealed_blob = b"".join(lines[:marker_index] + lines[marker_index + 1 :]) + computed_digest = hashlib.sha256(unsealed_blob).hexdigest().encode("ascii") + recorded_digest = match.group("digest") + if recorded_digest != computed_digest: + print( + f"MISMATCHED cybind-generated file seal in {filepath!r}: " + f"recorded {recorded_digest.decode()}, computed {computed_digest.decode()}" + ) + return False + + return True + + +def main(args): + assert args, "filepaths expected to be passed from pre-commit" + + try: + previously_sealed_paths = load_previously_sealed_paths() + except RuntimeError as error: + print(f"ERROR: {error}") + return 2 + + returncode = 0 + for filepath in args: + if not os.path.isfile(filepath): + continue + if not validate_generated_file_seal(filepath, previously_sealed_paths): + returncode = 1 + return returncode + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) From 2d586f3f3e14b1c70c564894ae96ae471eba9103 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 08:03:37 -0700 Subject: [PATCH 10/22] Revert "run_cybind_native 13.3.0 ../cuda-python" This reverts commit 0338189c4bbbcc53e122e3a110910902b15d3f4a. --- .../cuda/bindings/_internal/cudla.pxd | 3 +- .../cuda/bindings/_internal/cudla_linux.pyx | 3 +- .../cuda/bindings/_internal/cufile.pxd | 3 +- .../cuda/bindings/_internal/cufile_linux.pyx | 3 +- .../cuda/bindings/_internal/nvfatbin.pxd | 3 +- .../bindings/_internal/nvfatbin_linux.pyx | 3 +- .../bindings/_internal/nvfatbin_windows.pyx | 3 +- .../cuda/bindings/_internal/nvjitlink.pxd | 3 +- .../bindings/_internal/nvjitlink_linux.pyx | 3 +- .../bindings/_internal/nvjitlink_windows.pyx | 3 +- .../cuda/bindings/_internal/nvml.pxd | 3 +- .../cuda/bindings/_internal/nvml_linux.pyx | 3 +- .../cuda/bindings/_internal/nvml_windows.pyx | 3 +- .../cuda/bindings/_internal/nvvm.pxd | 3 +- .../cuda/bindings/_internal/nvvm_linux.pyx | 3 +- .../cuda/bindings/_internal/nvvm_windows.pyx | 3 +- cuda_bindings/cuda/bindings/cudla.pxd | 3 +- cuda_bindings/cuda/bindings/cudla.pyx | 333 +- cuda_bindings/cuda/bindings/cufile.pxd | 4 +- cuda_bindings/cuda/bindings/cufile.pyx | 527 +-- cuda_bindings/cuda/bindings/cycudla.pxd | 3 +- cuda_bindings/cuda/bindings/cycudla.pyx | 3 +- cuda_bindings/cuda/bindings/cycufile.pxd | 25 +- cuda_bindings/cuda/bindings/cycufile.pyx | 3 +- cuda_bindings/cuda/bindings/cynvfatbin.pxd | 3 +- cuda_bindings/cuda/bindings/cynvfatbin.pyx | 3 +- cuda_bindings/cuda/bindings/cynvjitlink.pxd | 3 +- cuda_bindings/cuda/bindings/cynvjitlink.pyx | 3 +- cuda_bindings/cuda/bindings/cynvml.pxd | 368 +- cuda_bindings/cuda/bindings/cynvml.pyx | 3 +- cuda_bindings/cuda/bindings/cynvvm.pxd | 3 +- cuda_bindings/cuda/bindings/cynvvm.pyx | 3 +- cuda_bindings/cuda/bindings/nvfatbin.pxd | 3 +- cuda_bindings/cuda/bindings/nvfatbin.pyx | 14 +- cuda_bindings/cuda/bindings/nvjitlink.pxd | 3 +- cuda_bindings/cuda/bindings/nvjitlink.pyx | 16 +- cuda_bindings/cuda/bindings/nvml.pxd | 36 +- cuda_bindings/cuda/bindings/nvml.pyx | 3186 ++++++++--------- cuda_bindings/cuda/bindings/nvvm.pxd | 3 +- cuda_bindings/cuda/bindings/nvvm.pyx | 15 +- 40 files changed, 1869 insertions(+), 2745 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_internal/cudla.pxd b/cuda_bindings/cuda/bindings/_internal/cudla.pxd index d190d99d5c8..00bf3adc074 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cudla.pxd @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f3212e34d88cc1609b3591895240db7535db0e72b1b831484f3adfb84267c5ee -# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. from ..cycudla cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx index 966dcb10450..229681244ad 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b5839e4430988ab39a4801a78157ca92b1a19762a84eaddbcc119ebf221404ce -# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/cufile.pxd b/cuda_bindings/cuda/bindings/_internal/cufile.pxd index fc8d567f09b..7d0ace32466 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cufile.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8ec753d4ca195381b47f65f499c71dfa8303bd237629acc38892084925a085b3 # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. 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 48b674c6cf6..7d92fc8ec46 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4f44e77dc91cbadeb20311ef6af8fa51206cf0995c4d5c13c8ff115eb60b6c55 # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd index edbb9c3defa..958e06e18af 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=afaced5906c73026774e7cd3de8a623e1618db376b162cbb078de34b8eafe176 # -# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from ..cynvfatbin cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx index 54287d1a325..99a50ff9e82 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d937bfae6078e5fffffab19d3fa1d76fc7e2e9d79729e89a724dd812b7f0c35c # -# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx index e132cace0c5..0a20389e291 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8e31f878e7fb2e594d5a30ae19969cd260947b456c9efc1173fd4c10836e4b22 # -# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd index 217e17ae92a..a6488994777 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4348359af43e92708e5103fd54a007741dfc00b0069bacaaca8ea3efe1541e64 # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. 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 97c1851bffb..0a399b244c7 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=649adcb704527598d678cc3e05d7552dc72c90f3891f96509a7cf0147b222985 # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. 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 5d0793e1a2b..ba6f1c8d2df 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ed08995551e262e3ff0d918762c5dcbd989f9659decbba2cb1446555efa80460 # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. 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 797088a8624..84a90694c0c 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvml.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2fae6a910dd39a9368a1a1b4b3f91a332ea17da118e66bf0ec379f6b348961d0 # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. 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 84b92fcc121..c61a2d7e22f 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4aad961fd49a71119afe66c91bd16c32be2c774ae85a6efb11fe7a89390d8966 # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. 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 ca57af03723..7697b60af9d 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fd4f527b2128d54476d15a11200cd3f9fef718f89a1ca4d3bc89cf7d3679acde # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. 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 ea477dbc7d2..f265943dda4 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ce69df610fcc5a59167bd1e25b56f1ca2a11fd8e6f051c5406b60c69d81d963b # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from ..cynvvm cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx index a4ead22d3af..f82a058cfb7 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=23d1297da51171de90660f1868669fa1c70b332b0c3b5ecacd59537f864e1cae # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx index 83ec4679885..27d31f96257 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3d5f2fe63d5a684bfbcaba4400d19d0d4195f07798af36a886bbf7df620c27fd # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cudla.pxd b/cuda_bindings/cuda/bindings/cudla.pxd index df0688e3ccf..6126d868893 100644 --- a/cuda_bindings/cuda/bindings/cudla.pxd +++ b/cuda_bindings/cuda/bindings/cudla.pxd @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6926a47842405dc3cc107d5ebed45297790b1edbd6c30017655e1796c5502bc3 -# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index a6a84168fcd..f1b0938f108 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -1,51 +1,25 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=40f5ad9bcc83d4739f48b902a84307f3af06c90c32d53528d4c2d4087743caf9 - -# <<<< PREAMBLE CONTENT >>>> - -cimport cpython as _cyb_cpython -cimport cpython.buffer as _cyb_cpython_buffer -from cython cimport view as _cyb_view -from libc.stdlib cimport ( - calloc as _cyb_calloc, - free as _cyb_free, - malloc as _cyb_malloc, -) -from libc.string cimport ( - memcmp as _cyb_memcmp, - memcpy as _cyb_memcpy, -) -from enum import IntEnum as _cyb_IntEnum -import numpy as _numpy -cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. -cdef _cyb_from_buffer(buffer, size, lowpp_type): - cdef _cyb_cpython.Py_buffer view - if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - _cyb_cpython.PyBuffer_Release(&view) +cimport cython # NOQA +from libc.stdint cimport intptr_t, uintptr_t + +from ._internal.utils cimport get_buffer_pointer + +from enum import IntEnum as _IntEnum -cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): +from libc.stdlib cimport calloc, free, malloc +from cython cimport view +cimport cpython.buffer +cimport cpython.memoryview +cimport cpython +from libc.string cimport memcmp, memcpy +import numpy as _numpy + + +cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -57,16 +31,34 @@ cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) -# <<<< END OF PREAMBLE CONTENT >>>> +cdef __from_buffer(buffer, size, lowpp_type): + cdef Py_buffer view + if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + cpython.PyBuffer_Release(&view) -# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. -cimport cython # NOQA -from libc.stdint cimport intptr_t, uintptr_t -from libc.stdlib cimport malloc, free +cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -from ._internal.utils cimport get_buffer_pointer @@ -102,7 +94,7 @@ cdef class ExternalMemoryHandleDesc: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") self._owner = None @@ -114,7 +106,7 @@ cdef class ExternalMemoryHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ExternalMemoryHandleDesc object at {hex(id(self))}>" @@ -135,20 +127,20 @@ cdef class ExternalMemoryHandleDesc: if not isinstance(other, ExternalMemoryHandleDesc): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -180,7 +172,7 @@ cdef class ExternalMemoryHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalMemoryHandleDesc instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) + return __from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) @staticmethod def from_data(data): @@ -189,7 +181,7 @@ cdef class ExternalMemoryHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_memory_handle_desc_dtype` holding the data. """ - return _cyb_from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) + return __from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -204,10 +196,10 @@ cdef class ExternalMemoryHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalMemoryHandleDesc obj = ExternalMemoryHandleDesc.__new__(ExternalMemoryHandleDesc) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + obj._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) + memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -244,7 +236,7 @@ cdef class ExternalSemaphoreHandleDesc: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") self._owner = None @@ -256,7 +248,7 @@ cdef class ExternalSemaphoreHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ExternalSemaphoreHandleDesc object at {hex(id(self))}>" @@ -277,20 +269,20 @@ cdef class ExternalSemaphoreHandleDesc: if not isinstance(other, ExternalSemaphoreHandleDesc): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -311,7 +303,7 @@ cdef class ExternalSemaphoreHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalSemaphoreHandleDesc instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) + return __from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) @staticmethod def from_data(data): @@ -320,7 +312,7 @@ cdef class ExternalSemaphoreHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_semaphore_handle_desc_dtype` holding the data. """ - return _cyb_from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) + return __from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -335,10 +327,10 @@ cdef class ExternalSemaphoreHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalSemaphoreHandleDesc obj = ExternalSemaphoreHandleDesc.__new__(ExternalSemaphoreHandleDesc) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + obj._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -386,7 +378,7 @@ cdef class ModuleTensorDescriptor: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaModuleTensorDescriptor)) + self._ptr = calloc(1, sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") self._owner = None @@ -398,7 +390,7 @@ cdef class ModuleTensorDescriptor: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ModuleTensorDescriptor object at {hex(id(self))}>" @@ -419,20 +411,20 @@ cdef class ModuleTensorDescriptor: if not isinstance(other, ModuleTensorDescriptor): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) + self._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -442,7 +434,7 @@ cdef class ModuleTensorDescriptor: @property def name(self): """~_numpy.int8: (array of length 81).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -452,7 +444,7 @@ cdef class ModuleTensorDescriptor: if len(buf) >= 81: raise ValueError("String too long for field name, max length is 80") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 81) + memcpy((self._ptr[0].name), ptr, 81) @property def size_(self): @@ -567,7 +559,7 @@ cdef class ModuleTensorDescriptor: @property def stride(self): """~_numpy.uint32: (array of length 8).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].stride)) return _numpy.asarray(arr) @@ -577,14 +569,14 @@ cdef class ModuleTensorDescriptor: raise ValueError("This ModuleTensorDescriptor instance is read-only") if len(val) != 8: raise ValueError(f"Expected length { 8 } for field stride, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") + cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - _cyb_memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) + memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an ModuleTensorDescriptor instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) + return __from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) @staticmethod def from_data(data): @@ -593,7 +585,7 @@ cdef class ModuleTensorDescriptor: Args: data (_numpy.ndarray): a single-element array of dtype `module_tensor_descriptor_dtype` holding the data. """ - return _cyb_from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) + return __from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -608,10 +600,10 @@ cdef class ModuleTensorDescriptor: raise ValueError("ptr must not be null (0)") cdef ModuleTensorDescriptor obj = ModuleTensorDescriptor.__new__(ModuleTensorDescriptor) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) + obj._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) + memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) obj._owner = None obj._owned = True else: @@ -649,7 +641,7 @@ cdef class Fence: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CudlaFence)) + self._ptr = calloc(1, sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") self._owner = None @@ -661,7 +653,7 @@ cdef class Fence: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Fence object at {hex(id(self))}>" @@ -682,20 +674,20 @@ cdef class Fence: if not isinstance(other, Fence): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CudlaFence)) + self._ptr = malloc(sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) + memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -727,7 +719,7 @@ cdef class Fence: @staticmethod def from_buffer(buffer): """Create an Fence instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CudlaFence), Fence) + return __from_buffer(buffer, sizeof(CudlaFence), Fence) @staticmethod def from_data(data): @@ -736,7 +728,7 @@ cdef class Fence: Args: data (_numpy.ndarray): a single-element array of dtype `fence_dtype` holding the data. """ - return _cyb_from_data(data, "fence_dtype", fence_dtype, Fence) + return __from_data(data, "fence_dtype", fence_dtype, Fence) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -751,10 +743,10 @@ cdef class Fence: raise ValueError("ptr must not be null (0)") cdef Fence obj = Fence.__new__(Fence) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CudlaFence)) + obj._ptr = malloc(sizeof(CudlaFence)) if obj._ptr == NULL: raise MemoryError("Error allocating Fence") - _cyb_memcpy((obj._ptr), ptr, sizeof(CudlaFence)) + memcpy((obj._ptr), ptr, sizeof(CudlaFence)) obj._owner = None obj._owned = True else: @@ -786,7 +778,7 @@ cdef class DevAttribute: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaDevAttribute)) + self._ptr = calloc(1, sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") self._owner = None @@ -798,7 +790,7 @@ cdef class DevAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DevAttribute object at {hex(id(self))}>" @@ -819,20 +811,20 @@ cdef class DevAttribute: if not isinstance(other, DevAttribute): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) + self._ptr = malloc(sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -864,7 +856,7 @@ cdef class DevAttribute: @staticmethod def from_buffer(buffer): """Create an DevAttribute instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) + return __from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) @staticmethod def from_data(data): @@ -873,7 +865,7 @@ cdef class DevAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `dev_attribute_dtype` holding the data. """ - return _cyb_from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) + return __from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -888,10 +880,10 @@ cdef class DevAttribute: raise ValueError("ptr must not be null (0)") cdef DevAttribute obj = DevAttribute.__new__(DevAttribute) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) + obj._ptr = malloc(sizeof(cudlaDevAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) + memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) obj._owner = None obj._owned = True else: @@ -925,7 +917,7 @@ cdef class ModuleAttribute: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaModuleAttribute)) + self._ptr = calloc(1, sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") self._owner = None @@ -937,7 +929,7 @@ cdef class ModuleAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ModuleAttribute object at {hex(id(self))}>" @@ -958,20 +950,20 @@ cdef class ModuleAttribute: if not isinstance(other, ModuleAttribute): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) + self._ptr = malloc(sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1025,7 +1017,7 @@ cdef class ModuleAttribute: @staticmethod def from_buffer(buffer): """Create an ModuleAttribute instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) + return __from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) @staticmethod def from_data(data): @@ -1034,7 +1026,7 @@ cdef class ModuleAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `module_attribute_dtype` holding the data. """ - return _cyb_from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) + return __from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1049,10 +1041,10 @@ cdef class ModuleAttribute: raise ValueError("ptr must not be null (0)") cdef ModuleAttribute obj = ModuleAttribute.__new__(ModuleAttribute) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) + obj._ptr = malloc(sizeof(cudlaModuleAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) + memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) obj._owner = None obj._owned = True else: @@ -1091,7 +1083,7 @@ cdef class WaitEvents: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaWaitEvents)) + self._ptr = calloc(1, sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") self._owner = None @@ -1104,7 +1096,7 @@ cdef class WaitEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.WaitEvents object at {hex(id(self))}>" @@ -1125,20 +1117,20 @@ cdef class WaitEvents: if not isinstance(other, WaitEvents): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) + self._ptr = malloc(sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1164,7 +1156,7 @@ cdef class WaitEvents: @staticmethod def from_buffer(buffer): """Create an WaitEvents instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) + return __from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) @staticmethod def from_data(data): @@ -1173,7 +1165,7 @@ cdef class WaitEvents: Args: data (_numpy.ndarray): a single-element array of dtype `wait_events_dtype` holding the data. """ - return _cyb_from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) + return __from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1188,10 +1180,10 @@ cdef class WaitEvents: raise ValueError("ptr must not be null (0)") cdef WaitEvents obj = WaitEvents.__new__(WaitEvents) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) + obj._ptr = malloc(sizeof(cudlaWaitEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) + memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) obj._owner = None obj._owned = True else: @@ -1232,7 +1224,7 @@ cdef class SignalEvents: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaSignalEvents)) + self._ptr = calloc(1, sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") self._owner = None @@ -1245,7 +1237,7 @@ cdef class SignalEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.SignalEvents object at {hex(id(self))}>" @@ -1266,20 +1258,20 @@ cdef class SignalEvents: if not isinstance(other, SignalEvents): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) + self._ptr = malloc(sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1290,8 +1282,8 @@ cdef class SignalEvents: def dev_ptrs(self): """int: """ if self._ptr[0].devPtrs == NULL or self._ptr[0].numEvents == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef view.array arr = view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].devPtrs) return arr @@ -1303,7 +1295,7 @@ cdef class SignalEvents: self._ptr[0].numEvents = _n if _n == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1330,7 +1322,7 @@ cdef class SignalEvents: @staticmethod def from_buffer(buffer): """Create an SignalEvents instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) + return __from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) @staticmethod def from_data(data): @@ -1339,7 +1331,7 @@ cdef class SignalEvents: Args: data (_numpy.ndarray): a single-element array of dtype `signal_events_dtype` holding the data. """ - return _cyb_from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) + return __from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1354,10 +1346,10 @@ cdef class SignalEvents: raise ValueError("ptr must not be null (0)") cdef SignalEvents obj = SignalEvents.__new__(SignalEvents) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) + obj._ptr = malloc(sizeof(cudlaSignalEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) + memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) obj._owner = None obj._owned = True else: @@ -1402,7 +1394,7 @@ cdef class Task: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaTask)) + self._ptr = calloc(1, sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") self._owner = None @@ -1415,7 +1407,7 @@ cdef class Task: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Task object at {hex(id(self))}>" @@ -1436,20 +1428,20 @@ cdef class Task: if not isinstance(other, Task): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaTask)) + self._ptr = malloc(sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1471,8 +1463,8 @@ cdef class Task: def output_tensor(self): """int: """ if self._ptr[0].outputTensor == NULL or self._ptr[0].numOutputTensors == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef view.array arr = view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].outputTensor) return arr @@ -1484,7 +1476,7 @@ cdef class Task: self._ptr[0].numOutputTensors = _n if _n == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1496,8 +1488,8 @@ cdef class Task: def input_tensor(self): """int: """ if self._ptr[0].inputTensor == NULL or self._ptr[0].numInputTensors == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef view.array arr = view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].inputTensor) return arr @@ -1509,7 +1501,7 @@ cdef class Task: self._ptr[0].numInputTensors = _n if _n == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1542,7 +1534,7 @@ cdef class Task: @staticmethod def from_buffer(buffer): """Create an Task instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaTask), Task) + return __from_buffer(buffer, sizeof(cudlaTask), Task) @staticmethod def from_data(data): @@ -1551,7 +1543,7 @@ cdef class Task: Args: data (_numpy.ndarray): a single-element array of dtype `task_dtype` holding the data. """ - return _cyb_from_data(data, "task_dtype", task_dtype, Task) + return __from_data(data, "task_dtype", task_dtype, Task) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1566,10 +1558,10 @@ cdef class Task: raise ValueError("ptr must not be null (0)") cdef Task obj = Task.__new__(Task) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaTask)) + obj._ptr = malloc(sizeof(cudlaTask)) if obj._ptr == NULL: raise MemoryError("Error allocating Task") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaTask)) + memcpy((obj._ptr), ptr, sizeof(cudlaTask)) obj._owner = None obj._owned = True else: @@ -1585,7 +1577,7 @@ cdef class Task: # Enum ############################################################################### -class Status(_cyb_IntEnum): +class Status(_IntEnum): """ See `cudlaStatus`. """ @@ -1614,14 +1606,14 @@ class Status(_cyb_IntEnum): ErrorDlaErrDataMismatch = cudlaErrorDlaErrDataMismatch ErrorUnknown = cudlaErrorUnknown -class Mode(_cyb_IntEnum): +class Mode(_IntEnum): """ See `cudlaMode`. """ CUDA_DLA = CUDLA_CUDA_DLA STANDALONE = CUDLA_STANDALONE -class ModuleAttributeType(_cyb_IntEnum): +class ModuleAttributeType(_IntEnum): """ See `cudlaModuleAttributeType`. """ @@ -1632,21 +1624,21 @@ class ModuleAttributeType(_cyb_IntEnum): NUM_OUTPUT_TASK_STATISTICS = CUDLA_NUM_OUTPUT_TASK_STATISTICS OUTPUT_TASK_STATISTICS_DESCRIPTORS = CUDLA_OUTPUT_TASK_STATISTICS_DESCRIPTORS -class FenceType(_cyb_IntEnum): +class FenceType(_IntEnum): """ See `cudlaFenceType`. """ NVSCISYNC_FENCE = CUDLA_NVSCISYNC_FENCE NVSCISYNC_FENCE_SOF = CUDLA_NVSCISYNC_FENCE_SOF -class ModuleLoadFlags(_cyb_IntEnum): +class ModuleLoadFlags(_IntEnum): """ See `cudlaModuleLoadFlags`. """ MODULE_DEFAULT = CUDLA_MODULE_DEFAULT MODULE_ENABLE_FAULT_DIAGNOSTICS = CUDLA_MODULE_ENABLE_FAULT_DIAGNOSTICS -class SubmissionFlags(_cyb_IntEnum): +class SubmissionFlags(_IntEnum): """ See `cudlaSubmissionFlags`. """ @@ -1654,7 +1646,7 @@ class SubmissionFlags(_cyb_IntEnum): SUBMIT_SKIP_LOCK_ACQUIRE = CUDLA_SUBMIT_SKIP_LOCK_ACQUIRE SUBMIT_DIAGNOSTICS_TASK = CUDLA_SUBMIT_DIAGNOSTICS_TASK -class AccessPermissionFlags(_cyb_IntEnum): +class AccessPermissionFlags(_IntEnum): """ See `cudlaAccessPermissionFlags`. """ @@ -1662,7 +1654,7 @@ class AccessPermissionFlags(_cyb_IntEnum): READ_ONLY_PERM = CUDLA_READ_ONLY_PERM TASK_STATISTICS = CUDLA_TASK_STATISTICS -class DevAttributeType(_cyb_IntEnum): +class DevAttributeType(_IntEnum): """ See `cudlaDevAttributeType`. """ @@ -1834,4 +1826,3 @@ cpdef module_get_attributes(intptr_t h_module, int attr_type) except *: free(desc_buf) else: raise ValueError(f"Unknown attribute type: {attr_type}") -del _cyb_IntEnum diff --git a/cuda_bindings/cuda/bindings/cufile.pxd b/cuda_bindings/cuda/bindings/cufile.pxd index 8b0adcd9df2..1803837a4ce 100644 --- a/cuda_bindings/cuda/bindings/cufile.pxd +++ b/cuda_bindings/cuda/bindings/cufile.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=16358579761023a22e6e7e3d8cf9ce9977dbd34fd15c9c86609ac2b34022da9c # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1568+g289771de9.d20260413. Do not modify it directly. from libc.stdint cimport intptr_t @@ -19,7 +18,6 @@ ctypedef CUfileBatchHandle_t BatchHandle ctypedef CUfileError_t Error ctypedef cufileRDMAInfo_t RDMAInfo ctypedef CUfileFSOps_t FSOps -ctypedef CUfileIOVec_t IOVec ctypedef CUfileDrvProps_t DrvProps diff --git a/cuda_bindings/cuda/bindings/cufile.pyx b/cuda_bindings/cuda/bindings/cufile.pyx index 150aad269c0..2798a65cb3f 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -1,55 +1,29 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=416e6a31ac5ac1ba2e219ffa1c8455e145c762f295e4183bfa25db6359704846 # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -cimport cpython as _cyb_cpython -cimport cpython.buffer as _cyb_cpython_buffer -cimport cpython.memoryview as _cyb_cpython_memoryview -from cython cimport view as _cyb_view -from libc.stdlib cimport ( - calloc as _cyb_calloc, - free as _cyb_free, - malloc as _cyb_malloc, -) -from libc.string cimport ( - memcmp as _cyb_memcmp, - memcpy as _cyb_memcpy, -) -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum -import numpy as _numpy +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. -cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +cimport cython # NOQA +from libc cimport errno +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum -cdef _cyb_from_buffer(buffer, size, lowpp_type): - cdef _cyb_cpython.Py_buffer view - if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - _cyb_cpython.PyBuffer_Release(&view) +import cython -cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): +from cuda.bindings.driver import CUresult as pyCUresult + +from libc.stdlib cimport calloc, free, malloc +from cython cimport view +cimport cpython.buffer +cimport cpython.memoryview +cimport cpython +from libc.string cimport memcmp, memcpy +import numpy as _numpy + + +cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -61,17 +35,34 @@ cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) -# <<<< END OF PREAMBLE CONTENT >>>> +cdef __from_buffer(buffer, size, lowpp_type): + cdef Py_buffer view + if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + cpython.PyBuffer_Release(&view) -cimport cython # NOQA -from libc cimport errno -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) -import cython +cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -from cuda.bindings.driver import CUresult as pyCUresult ############################################################################### # POD @@ -98,7 +89,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = _cyb_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 @@ -110,7 +101,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -131,20 +122,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof((NULL).handle)) + self._ptr = malloc(sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) + memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -176,7 +167,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 _cyb_from_buffer(buffer, sizeof((NULL).handle), _py_anon_pod1) + return __from_buffer(buffer, sizeof((NULL).handle), _py_anon_pod1) @staticmethod def from_data(data): @@ -185,7 +176,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -200,10 +191,10 @@ 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 = _cyb_malloc(sizeof((NULL).handle)) + obj._ptr = malloc(sizeof((NULL).handle)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).handle)) + memcpy((obj._ptr), ptr, sizeof((NULL).handle)) obj._owner = None obj._owned = True else: @@ -243,7 +234,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = _cyb_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 @@ -255,7 +246,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -276,20 +267,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof((NULL).u.batch)) + self._ptr = malloc(sizeof((NULL).u.batch)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u.batch)) + memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u.batch)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -343,7 +334,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 _cyb_from_buffer(buffer, sizeof((NULL).u.batch), _py_anon_pod3) + return __from_buffer(buffer, sizeof((NULL).u.batch), _py_anon_pod3) @staticmethod def from_data(data): @@ -352,7 +343,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -367,10 +358,10 @@ 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 = _cyb_malloc(sizeof((NULL).u.batch)) + obj._ptr = malloc(sizeof((NULL).u.batch)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) + memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) obj._owner = None obj._owned = True else: @@ -445,10 +436,10 @@ cdef class IOEvents: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def cookie(self): @@ -537,8 +528,8 @@ cdef class IOEvents: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOEvents obj = IOEvents.__new__(IOEvents) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOEvents_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_events_dtype) obj._data = data.view(_numpy.recarray) @@ -573,7 +564,7 @@ cdef class OpCounter: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileOpCounter_t)) + self._ptr = calloc(1, sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") self._owner = None @@ -585,7 +576,7 @@ cdef class OpCounter: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.OpCounter object at {hex(id(self))}>" @@ -606,20 +597,20 @@ cdef class OpCounter: if not isinstance(other, OpCounter): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) + self._ptr = malloc(sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -651,7 +642,7 @@ cdef class OpCounter: @staticmethod def from_buffer(buffer): """Create an OpCounter instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) + return __from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) @staticmethod def from_data(data): @@ -660,7 +651,7 @@ cdef class OpCounter: Args: data (_numpy.ndarray): a single-element array of dtype `op_counter_dtype` holding the data. """ - return _cyb_from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) + return __from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -675,10 +666,10 @@ cdef class OpCounter: raise ValueError("ptr must not be null (0)") cdef OpCounter obj = OpCounter.__new__(OpCounter) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) + obj._ptr = malloc(sizeof(CUfileOpCounter_t)) if obj._ptr == NULL: raise MemoryError("Error allocating OpCounter") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) obj._owner = None obj._owned = True else: @@ -780,10 +771,10 @@ cdef class PerGpuStats: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def uuid(self): @@ -1167,8 +1158,8 @@ cdef class PerGpuStats: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PerGpuStats obj = PerGpuStats.__new__(PerGpuStats) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfilePerGpuStats_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=per_gpu_stats_dtype) obj._data = data.view(_numpy.recarray) @@ -1240,10 +1231,10 @@ cdef class Descr: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def type(self): @@ -1330,8 +1321,8 @@ cdef class Descr: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Descr obj = Descr.__new__(Descr) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileDescr_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=descr_dtype) obj._data = data.view(_numpy.recarray) @@ -1359,7 +1350,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = _cyb_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 +1362,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -1392,20 +1383,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof((NULL).u)) + self._ptr = malloc(sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) + memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1422,12 +1413,12 @@ cdef class _py_anon_pod2: if self._readonly: raise ValueError("This _py_anon_pod2 instance is read-only") cdef _py_anon_pod3 val_ = val - _cyb_memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(cuda_bindings_cufile__anon_pod3) * 1) + memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(cuda_bindings_cufile__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an _py_anon_pod2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) + return __from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) @staticmethod def from_data(data): @@ -1436,7 +1427,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1451,10 +1442,10 @@ 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 = _cyb_malloc(sizeof((NULL).u)) + obj._ptr = malloc(sizeof((NULL).u)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u)) + memcpy((obj._ptr), ptr, sizeof((NULL).u)) obj._owner = None obj._owned = True else: @@ -1468,8 +1459,8 @@ cdef class _py_anon_pod2: cdef _get_stats_level1_dtype_offsets(): cdef CUfileStatsLevel1_t pod return _numpy.dtype({ - 'names': ['read_ops', 'write_ops', 'hdl_register_ops', 'hdl_deregister_ops', 'buf_register_ops', 'buf_deregister_ops', 'read_bytes', 'write_bytes', 'read_bw_bytes_per_sec', 'write_bw_bytes_per_sec', 'read_lat_avg_us', 'write_lat_avg_us', 'read_ops_per_sec', 'write_ops_per_sec', 'read_lat_sum_us', 'write_lat_sum_us', 'batch_submit_ops', 'batch_complete_ops', 'batch_setup_ops', 'batch_cancel_ops', 'batch_destroy_ops', 'batch_enqueued_ops', 'batch_posix_enqueued_ops', 'batch_processed_ops', 'batch_posix_processed_ops', 'batch_nvfs_submit_ops', 'batch_p2p_submit_ops', 'batch_aio_submit_ops', 'batch_iouring_submit_ops', 'batch_mixed_io_submit_ops', 'batch_total_submit_ops', 'batch_read_bytes', 'batch_write_bytes', 'batch_read_bw_bytes', 'batch_write_bw_bytes', 'batch_submit_lat_avg_us', 'batch_completion_lat_avg_us', 'batch_submit_ops_per_sec', 'batch_complete_ops_per_sec', 'batch_submit_lat_sum_us', 'batch_completion_lat_sum_us', 'last_batch_read_bytes', 'last_batch_write_bytes', 'readv_ops', 'writev_ops', 'readv_bytes', 'writev_bytes', 'readv_bw_bytes_per_sec', 'writev_bw_bytes_per_sec', 'readv_lat_avg_us', 'writev_lat_avg_us', 'readv_ops_per_sec', 'writev_ops_per_sec', 'readv_lat_sum_us', 'writev_lat_sum_us'], - 'formats': [op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64], + 'names': ['read_ops', 'write_ops', 'hdl_register_ops', 'hdl_deregister_ops', 'buf_register_ops', 'buf_deregister_ops', 'read_bytes', 'write_bytes', 'read_bw_bytes_per_sec', 'write_bw_bytes_per_sec', 'read_lat_avg_us', 'write_lat_avg_us', 'read_ops_per_sec', 'write_ops_per_sec', 'read_lat_sum_us', 'write_lat_sum_us', 'batch_submit_ops', 'batch_complete_ops', 'batch_setup_ops', 'batch_cancel_ops', 'batch_destroy_ops', 'batch_enqueued_ops', 'batch_posix_enqueued_ops', 'batch_processed_ops', 'batch_posix_processed_ops', 'batch_nvfs_submit_ops', 'batch_p2p_submit_ops', 'batch_aio_submit_ops', 'batch_iouring_submit_ops', 'batch_mixed_io_submit_ops', 'batch_total_submit_ops', 'batch_read_bytes', 'batch_write_bytes', 'batch_read_bw_bytes', 'batch_write_bw_bytes', 'batch_submit_lat_avg_us', 'batch_completion_lat_avg_us', 'batch_submit_ops_per_sec', 'batch_complete_ops_per_sec', 'batch_submit_lat_sum_us', 'batch_completion_lat_sum_us', 'last_batch_read_bytes', 'last_batch_write_bytes'], + 'formats': [op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64], 'offsets': [ (&(pod.read_ops)) - (&pod), (&(pod.write_ops)) - (&pod), @@ -1514,18 +1505,6 @@ cdef _get_stats_level1_dtype_offsets(): (&(pod.batch_completion_lat_sum_us)) - (&pod), (&(pod.last_batch_read_bytes)) - (&pod), (&(pod.last_batch_write_bytes)) - (&pod), - (&(pod.readv_ops)) - (&pod), - (&(pod.writev_ops)) - (&pod), - (&(pod.readv_bytes)) - (&pod), - (&(pod.writev_bytes)) - (&pod), - (&(pod.readv_bw_bytes_per_sec)) - (&pod), - (&(pod.writev_bw_bytes_per_sec)) - (&pod), - (&(pod.readv_lat_avg_us)) - (&pod), - (&(pod.writev_lat_avg_us)) - (&pod), - (&(pod.readv_ops_per_sec)) - (&pod), - (&(pod.writev_ops_per_sec)) - (&pod), - (&(pod.readv_lat_sum_us)) - (&pod), - (&(pod.writev_lat_sum_us)) - (&pod), ], 'itemsize': sizeof(CUfileStatsLevel1_t), }) @@ -1545,7 +1524,7 @@ cdef class StatsLevel1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel1_t)) + self._ptr = calloc(1, sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") self._owner = None @@ -1557,7 +1536,7 @@ cdef class StatsLevel1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel1 object at {hex(id(self))}>" @@ -1578,20 +1557,20 @@ cdef class StatsLevel1: if not isinstance(other, StatsLevel1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) + self._ptr = malloc(sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1608,7 +1587,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def write_ops(self): @@ -1620,7 +1599,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_register_ops(self): @@ -1632,7 +1611,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_deregister_ops(self): @@ -1644,7 +1623,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_register_ops(self): @@ -1656,7 +1635,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_deregister_ops(self): @@ -1668,7 +1647,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_submit_ops(self): @@ -1680,7 +1659,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_complete_ops(self): @@ -1692,7 +1671,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_setup_ops(self): @@ -1704,7 +1683,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_cancel_ops(self): @@ -1716,7 +1695,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_destroy_ops(self): @@ -1728,7 +1707,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_enqueued_ops(self): @@ -1740,7 +1719,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_enqueued_ops(self): @@ -1752,7 +1731,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_processed_ops(self): @@ -1764,7 +1743,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_processed_ops(self): @@ -1776,7 +1755,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_nvfs_submit_ops(self): @@ -1788,7 +1767,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_p2p_submit_ops(self): @@ -1800,7 +1779,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_aio_submit_ops(self): @@ -1812,7 +1791,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_iouring_submit_ops(self): @@ -1824,7 +1803,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_mixed_io_submit_ops(self): @@ -1836,7 +1815,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_total_submit_ops(self): @@ -1848,31 +1827,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) - - @property - def readv_ops(self): - """OpCounter: """ - return OpCounter.from_ptr(&(self._ptr[0].readv_ops), self._readonly, self) - - @readv_ops.setter - def readv_ops(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].readv_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) - - @property - def writev_ops(self): - """OpCounter: """ - return OpCounter.from_ptr(&(self._ptr[0].writev_ops), self._readonly, self) - - @writev_ops.setter - def writev_ops(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].writev_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def read_bytes(self): @@ -2116,120 +2071,10 @@ cdef class StatsLevel1: raise ValueError("This StatsLevel1 instance is read-only") self._ptr[0].last_batch_write_bytes = val - @property - def readv_bytes(self): - """int: """ - return self._ptr[0].readv_bytes - - @readv_bytes.setter - def readv_bytes(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - self._ptr[0].readv_bytes = val - - @property - def writev_bytes(self): - """int: """ - return self._ptr[0].writev_bytes - - @writev_bytes.setter - def writev_bytes(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - self._ptr[0].writev_bytes = val - - @property - def readv_bw_bytes_per_sec(self): - """int: """ - return self._ptr[0].readv_bw_bytes_per_sec - - @readv_bw_bytes_per_sec.setter - def readv_bw_bytes_per_sec(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - self._ptr[0].readv_bw_bytes_per_sec = val - - @property - def writev_bw_bytes_per_sec(self): - """int: """ - return self._ptr[0].writev_bw_bytes_per_sec - - @writev_bw_bytes_per_sec.setter - def writev_bw_bytes_per_sec(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - self._ptr[0].writev_bw_bytes_per_sec = val - - @property - def readv_lat_avg_us(self): - """int: """ - return self._ptr[0].readv_lat_avg_us - - @readv_lat_avg_us.setter - def readv_lat_avg_us(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - self._ptr[0].readv_lat_avg_us = val - - @property - def writev_lat_avg_us(self): - """int: """ - return self._ptr[0].writev_lat_avg_us - - @writev_lat_avg_us.setter - def writev_lat_avg_us(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - self._ptr[0].writev_lat_avg_us = val - - @property - def readv_ops_per_sec(self): - """int: """ - return self._ptr[0].readv_ops_per_sec - - @readv_ops_per_sec.setter - def readv_ops_per_sec(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - self._ptr[0].readv_ops_per_sec = val - - @property - def writev_ops_per_sec(self): - """int: """ - return self._ptr[0].writev_ops_per_sec - - @writev_ops_per_sec.setter - def writev_ops_per_sec(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - self._ptr[0].writev_ops_per_sec = val - - @property - def readv_lat_sum_us(self): - """int: """ - return self._ptr[0].readv_lat_sum_us - - @readv_lat_sum_us.setter - def readv_lat_sum_us(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - self._ptr[0].readv_lat_sum_us = val - - @property - def writev_lat_sum_us(self): - """int: """ - return self._ptr[0].writev_lat_sum_us - - @writev_lat_sum_us.setter - def writev_lat_sum_us(self, val): - if self._readonly: - raise ValueError("This StatsLevel1 instance is read-only") - self._ptr[0].writev_lat_sum_us = val - @staticmethod def from_buffer(buffer): """Create an StatsLevel1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) + return __from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) @staticmethod def from_data(data): @@ -2238,7 +2083,7 @@ cdef class StatsLevel1: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level1_dtype` holding the data. """ - return _cyb_from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) + return __from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2253,10 +2098,10 @@ cdef class StatsLevel1: raise ValueError("ptr must not be null (0)") cdef StatsLevel1 obj = StatsLevel1.__new__(StatsLevel1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) + obj._ptr = malloc(sizeof(CUfileStatsLevel1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) obj._owner = None obj._owned = True else: @@ -2333,10 +2178,10 @@ cdef class IOParams: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def mode(self): @@ -2445,8 +2290,8 @@ cdef class IOParams: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOParams obj = IOParams.__new__(IOParams) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOParams_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_params_dtype) obj._data = data.view(_numpy.recarray) @@ -2482,7 +2327,7 @@ cdef class StatsLevel2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel2_t)) + self._ptr = calloc(1, sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") self._owner = None @@ -2494,7 +2339,7 @@ cdef class StatsLevel2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel2 object at {hex(id(self))}>" @@ -2515,20 +2360,20 @@ cdef class StatsLevel2: if not isinstance(other, StatsLevel2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) + self._ptr = malloc(sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2545,12 +2390,12 @@ cdef class StatsLevel2: if self._readonly: raise ValueError("This StatsLevel2 instance is read-only") cdef StatsLevel1 val_ = val - _cyb_memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) + memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) @property def read_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].read_size_kb_hist)) return _numpy.asarray(arr) @@ -2560,14 +2405,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field read_size_kb_hist, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - _cyb_memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @property def write_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].write_size_kb_hist)) return _numpy.asarray(arr) @@ -2577,14 +2422,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field write_size_kb_hist, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - _cyb_memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an StatsLevel2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) + return __from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) @staticmethod def from_data(data): @@ -2593,7 +2438,7 @@ cdef class StatsLevel2: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level2_dtype` holding the data. """ - return _cyb_from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) + return __from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2608,10 +2453,10 @@ cdef class StatsLevel2: raise ValueError("ptr must not be null (0)") cdef StatsLevel2 obj = StatsLevel2.__new__(StatsLevel2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) + obj._ptr = malloc(sizeof(CUfileStatsLevel2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) obj._owner = None obj._owned = True else: @@ -2650,7 +2495,7 @@ cdef class StatsLevel3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel3_t)) + self._ptr = calloc(1, sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") self._owner = None @@ -2662,7 +2507,7 @@ cdef class StatsLevel3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel3 object at {hex(id(self))}>" @@ -2683,20 +2528,20 @@ cdef class StatsLevel3: if not isinstance(other, StatsLevel3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) + self._ptr = malloc(sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2713,7 +2558,7 @@ cdef class StatsLevel3: if self._readonly: raise ValueError("This StatsLevel3 instance is read-only") cdef StatsLevel2 val_ = val - _cyb_memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) + memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) @property def per_gpu_stats(self): @@ -2727,7 +2572,7 @@ cdef class StatsLevel3: cdef PerGpuStats val_ = val if len(val) != 16: raise ValueError(f"Expected length { 16 } for field per_gpu_stats, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) + memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) @property def num_gpus(self): @@ -2743,7 +2588,7 @@ cdef class StatsLevel3: @staticmethod def from_buffer(buffer): """Create an StatsLevel3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) + return __from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) @staticmethod def from_data(data): @@ -2752,7 +2597,7 @@ cdef class StatsLevel3: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level3_dtype` holding the data. """ - return _cyb_from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) + return __from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2767,10 +2612,10 @@ cdef class StatsLevel3: raise ValueError("ptr must not be null (0)") cdef StatsLevel3 obj = StatsLevel3.__new__(StatsLevel3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) + obj._ptr = malloc(sizeof(CUfileStatsLevel3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) obj._owner = None obj._owned = True else: @@ -2785,7 +2630,7 @@ cdef class StatsLevel3: # Enum ############################################################################### -class OpError(_cyb_FastEnum): +class OpError(_FastEnum): """ See `CUfileOpError`. """ @@ -2839,7 +2684,7 @@ class OpError(_cyb_FastEnum): BATCH_NOCOMPAT_ERROR = CU_FILE_BATCH_NOCOMPAT_ERROR IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR -class DriverStatusFlags(_cyb_FastEnum): +class DriverStatusFlags(_FastEnum): """ See `CUfileDriverStatusFlags_t`. """ @@ -2858,16 +2703,16 @@ class DriverStatusFlags(_cyb_FastEnum): VIRTIOFS_SUPPORTED = (CU_FILE_VIRTIOFS_SUPPORTED, 'Support for VirtioFS') MAX_TARGET_TYPES = (CU_FILE_MAX_TARGET_TYPES, 'Maximum FS supported') -class DriverControlFlags(_cyb_FastEnum): +class DriverControlFlags(_FastEnum): """ See `CUfileDriverControlFlags_t`. """ USE_POLL_MODE = (CU_FILE_USE_POLL_MODE, 'use POLL mode. properties.use_poll_mode') ALLOW_COMPAT_MODE = (CU_FILE_ALLOW_COMPAT_MODE, 'allow COMPATIBILITY mode. properties.allow_compat_mode') - VANILLA_POSIX_IO_MODE = (CU_FILE_VANILLA_POSIX_IO_MODE, 'Vanilla posix io mode. properties.vanilla_posix_io_mode') + POSIX_IO_MODE = (CU_FILE_POSIX_IO_MODE, 'Vanilla posix io mode. properties.posix_io_mode') FALLBACK_IO_MODE = (CU_FILE_FALLBACK_IO_MODE, 'Fallback io mode. properties.gds_fallback_io') -class FeatureFlags(_cyb_FastEnum): +class FeatureFlags(_FastEnum): """ See `CUfileFeatureFlags_t`. """ @@ -2877,7 +2722,7 @@ class FeatureFlags(_cyb_FastEnum): PARALLEL_IO_SUPPORTED = (CU_FILE_PARALLEL_IO_SUPPORTED, 'Supported') P2P_SUPPORTED = (CU_FILE_P2P_SUPPORTED, 'Support for PCI P2PDMA') -class FileHandleType(_cyb_FastEnum): +class FileHandleType(_FastEnum): """ See `CUfileFileHandleType`. """ @@ -2885,14 +2730,14 @@ class FileHandleType(_cyb_FastEnum): OPAQUE_WIN32 = (CU_FILE_HANDLE_TYPE_OPAQUE_WIN32, 'Windows based handle (unsupported)') USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS -class Opcode(_cyb_FastEnum): +class Opcode(_FastEnum): """ See `CUfileOpcode_t`. """ READ = CUFILE_READ WRITE = CUFILE_WRITE -class Status(_cyb_FastEnum): +class Status(_FastEnum): """ See `CUfileStatus_t`. """ @@ -2904,13 +2749,13 @@ class Status(_cyb_FastEnum): TIMEOUT = CUFILE_TIMEOUT FAILED = CUFILE_FAILED -class BatchMode(_cyb_FastEnum): +class BatchMode(_FastEnum): """ See `CUfileBatchMode_t`. """ BATCH = CUFILE_BATCH -class SizeTConfigParameter(_cyb_FastEnum): +class SizeTConfigParameter(_FastEnum): """ See `CUFileSizeTConfigParameter_t`. """ @@ -2927,7 +2772,7 @@ class SizeTConfigParameter(_cyb_FastEnum): POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS -class BoolConfigParameter(_cyb_FastEnum): +class BoolConfigParameter(_FastEnum): """ See `CUFileBoolConfigParameter_t`. """ @@ -2943,19 +2788,16 @@ class BoolConfigParameter(_cyb_FastEnum): FORCE_ODIRECT_MODE = CUFILE_PARAM_FORCE_ODIRECT_MODE SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS - PROPERTIES_POSIX_IO_MODE = CUFILE_PARAM_PROPERTIES_POSIX_IO_MODE - GDS_FALLBACK_IO = CUFILE_PARAM_GDS_FALLBACK_IO -class StringConfigParameter(_cyb_FastEnum): +class StringConfigParameter(_FastEnum): """ See `CUFileStringConfigParameter_t`. """ LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH LOG_DIR = CUFILE_PARAM_LOG_DIR - RDMA_TRANSPORT = CUFILE_PARAM_RDMA_TRANSPORT -class ArrayConfigParameter(_cyb_FastEnum): +class ArrayConfigParameter(_FastEnum): """ See `CUFileArrayConfigParameter_t`. """ @@ -2964,7 +2806,7 @@ class ArrayConfigParameter(_cyb_FastEnum): GPU_BOUNCE_BUFFER_SLAB_SIZE_KB = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_SIZE_KB GPU_BOUNCE_BUFFER_SLAB_COUNT = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_COUNT -class P2PFlags(_cyb_FastEnum): +class P2PFlags(_FastEnum): """ See `CUfileP2PFlags_t`. """ @@ -3252,7 +3094,7 @@ cpdef str get_parameter_string(int param, int len): with nogil: __status__ = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(desc_str) + return cpython.PyUnicode_FromString(desc_str) cpdef set_parameter_size_t(int param, size_t value): @@ -3490,4 +3332,3 @@ cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) check_status(status) return status -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/cycudla.pxd b/cuda_bindings/cuda/bindings/cycudla.pxd index 899767c126e..8a90dd964a7 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pxd +++ b/cuda_bindings/cuda/bindings/cycudla.pxd @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c79dd127cb646ad3fb363a6c047f50b85f498dbedd071da77510c81b022cc7e6 -# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. # This layer exposes the C header to Cython as-is. from libc.stdint cimport int8_t, int16_t, int32_t, int64_t diff --git a/cuda_bindings/cuda/bindings/cycudla.pyx b/cuda_bindings/cuda/bindings/cycudla.pyx index 74fbf5bf8d1..198ffb308a7 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pyx +++ b/cuda_bindings/cuda/bindings/cycudla.pyx @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8e4bad343784bf256d5190c2aa8cd40fde47ab2bc886486fbcb7c0c1e4c0275d -# This code was automatically generated across versions from 1.5.0 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. from ._internal cimport cudla as _cudla diff --git a/cuda_bindings/cuda/bindings/cycufile.pxd b/cuda_bindings/cuda/bindings/cycufile.pxd index 185735e516c..96c93f1a54e 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pxd +++ b/cuda_bindings/cuda/bindings/cycufile.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e5fd438113697ffd1e5864701bcfc25a0efc8ec9500708429ed3b9b525a5302b # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t from libc.time cimport time_t @@ -107,7 +106,7 @@ cdef extern from 'cufile.h': ctypedef enum CUfileDriverControlFlags_t: CU_FILE_USE_POLL_MODE CU_FILE_ALLOW_COMPAT_MODE - CU_FILE_VANILLA_POSIX_IO_MODE + CU_FILE_POSIX_IO_MODE CU_FILE_FALLBACK_IO_MODE cdef extern from 'cufile.h': @@ -172,15 +171,12 @@ cdef extern from 'cufile.h': CUFILE_PARAM_FORCE_ODIRECT_MODE CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION CUFILE_PARAM_STREAM_MEMOPS_BYPASS - CUFILE_PARAM_PROPERTIES_POSIX_IO_MODE - CUFILE_PARAM_GDS_FALLBACK_IO cdef extern from 'cufile.h': ctypedef enum CUFileStringConfigParameter_t: CUFILE_PARAM_LOGGING_LEVEL CUFILE_PARAM_ENV_LOGFILE_PATH CUFILE_PARAM_LOG_DIR - CUFILE_PARAM_RDMA_TRANSPORT cdef extern from 'cufile.h': ctypedef enum CUFileArrayConfigParameter_t: @@ -288,11 +284,6 @@ cdef extern from 'cufile.h': uint64_t n_mmap_free uint64_t reg_bytes -cdef extern from 'cufile.h': - ctypedef struct CUfileIOVec_t 'CUfileIOVec_t': - void* base - size_t len - cdef extern from 'cufile.h': ctypedef struct CUfileDrvProps_t 'CUfileDrvProps_t': cuda_bindings_cufile__anon_pod0 nvfs @@ -357,18 +348,6 @@ cdef extern from 'cufile.h': uint64_t batch_completion_lat_sum_us uint64_t last_batch_read_bytes uint64_t last_batch_write_bytes - CUfileOpCounter_t readv_ops - CUfileOpCounter_t writev_ops - uint64_t readv_bytes - uint64_t writev_bytes - uint64_t readv_bw_bytes_per_sec - uint64_t writev_bw_bytes_per_sec - uint64_t readv_lat_avg_us - uint64_t writev_lat_avg_us - uint64_t readv_ops_per_sec - uint64_t writev_ops_per_sec - uint64_t readv_lat_sum_us - uint64_t writev_lat_sum_us cdef extern from 'cufile.h': ctypedef struct CUfileIOParams_t 'CUfileIOParams_t': diff --git a/cuda_bindings/cuda/bindings/cycufile.pyx b/cuda_bindings/cuda/bindings/cycufile.pyx index 5ea5927d067..32b0614be24 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pyx +++ b/cuda_bindings/cuda/bindings/cycufile.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4ca4a099a14408433ad4896ffe04c88588a0c0bad943384b39ef89ce1277af86 # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from ._internal cimport cufile as _cufile diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pxd b/cuda_bindings/cuda/bindings/cynvfatbin.pxd index aaa8e4c425b..f810e5e0077 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5fc20d5790fdbc8d11cdf26bc5ef03030c98a0af2199f86ddb45fcf684fe2aaa # -# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pyx b/cuda_bindings/cuda/bindings/cynvfatbin.pyx index 01100a7a023..bac18e05a70 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0d405302d916b2c8d2c6db393723eaf1e87451ca4f0b0b184b6f5723eee9ee66 # -# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from ._internal cimport nvfatbin as _nvfatbin diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pxd b/cuda_bindings/cuda/bindings/cynvjitlink.pxd index 763635b0cb9..8f8a249acb3 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=dd9f43cff55f8c973e93ba17e1c76a7827f809c20a6197667a960a8c720b9dd6 # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. 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 ba97ede1e48..a44fedf196e 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0bf841aee683edaafa51851fe371cee7bcb3af972337090e0006839e43ab6cd8 # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. 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 830d25d7f63..21c2ca0c180 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pxd +++ b/cuda_bindings/cuda/bindings/cynvml.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c30b5bc9a547d7ddc5fd02faa80bc540c899f35b33816b63c13d11bedd2f9b20 # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport int64_t @@ -198,10 +197,7 @@ ctypedef enum nvmlBrandType_t "nvmlBrandType_t": NVML_BRAND_NVIDIA "NVML_BRAND_NVIDIA" = 14 NVML_BRAND_GEFORCE_RTX "NVML_BRAND_GEFORCE_RTX" = 15 NVML_BRAND_TITAN_RTX "NVML_BRAND_TITAN_RTX" = 16 - NVML_BRAND_NVIDIA_DLA "NVML_BRAND_NVIDIA_DLA" = 17 - NVML_BRAND_NVIDIA_VGAMEDEV "NVML_BRAND_NVIDIA_VGAMEDEV" = 18 - NVML_BRAND_NVIDIA_NPU "NVML_BRAND_NVIDIA_NPU" = 19 - NVML_BRAND_COUNT "NVML_BRAND_COUNT" = 20 + NVML_BRAND_COUNT "NVML_BRAND_COUNT" = 18 ctypedef enum nvmlTemperatureThresholds_t "nvmlTemperatureThresholds_t": NVML_TEMPERATURE_THRESHOLD_SHUTDOWN "NVML_TEMPERATURE_THRESHOLD_SHUTDOWN" = 0 @@ -216,7 +212,6 @@ ctypedef enum nvmlTemperatureThresholds_t "nvmlTemperatureThresholds_t": ctypedef enum nvmlTemperatureSensors_t "nvmlTemperatureSensors_t": NVML_TEMPERATURE_GPU "NVML_TEMPERATURE_GPU" = 0 - NVML_TEMPERATURE_GPU_MAX "NVML_TEMPERATURE_GPU_MAX" = 1 NVML_TEMPERATURE_COUNT "NVML_TEMPERATURE_COUNT" ctypedef enum nvmlComputeMode_t "nvmlComputeMode_t": @@ -386,7 +381,6 @@ ctypedef enum nvmlGridLicenseFeatureCode_t "nvmlGridLicenseFeatureCode_t": NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION "NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION" = NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX NVML_GRID_LICENSE_FEATURE_CODE_GAMING "NVML_GRID_LICENSE_FEATURE_CODE_GAMING" = 3 NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE "NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE" = 4 - NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV "NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV" = 5 ctypedef enum nvmlVgpuCapability_t "nvmlVgpuCapability_t": NVML_VGPU_CAP_NVLINK_P2P "NVML_VGPU_CAP_NVLINK_P2P" = 0 @@ -775,151 +769,7 @@ ctypedef enum nvmlGpmMetricId_t "nvmlGpmMetricId_t": NVML_GPM_METRIC_NVLINK_L34_TX "NVML_GPM_METRIC_NVLINK_L34_TX" = 330 NVML_GPM_METRIC_NVLINK_L35_RX "NVML_GPM_METRIC_NVLINK_L35_RX" = 331 NVML_GPM_METRIC_NVLINK_L35_TX "NVML_GPM_METRIC_NVLINK_L35_TX" = 332 - NVML_GPM_METRIC_NVLINK_L36_RX "NVML_GPM_METRIC_NVLINK_L36_RX" = 333 - NVML_GPM_METRIC_NVLINK_L36_TX "NVML_GPM_METRIC_NVLINK_L36_TX" = 334 - NVML_GPM_METRIC_NVLINK_L37_RX "NVML_GPM_METRIC_NVLINK_L37_RX" = 335 - NVML_GPM_METRIC_NVLINK_L37_TX "NVML_GPM_METRIC_NVLINK_L37_TX" = 336 - NVML_GPM_METRIC_NVLINK_L38_RX "NVML_GPM_METRIC_NVLINK_L38_RX" = 337 - NVML_GPM_METRIC_NVLINK_L38_TX "NVML_GPM_METRIC_NVLINK_L38_TX" = 338 - NVML_GPM_METRIC_NVLINK_L39_RX "NVML_GPM_METRIC_NVLINK_L39_RX" = 339 - NVML_GPM_METRIC_NVLINK_L39_TX "NVML_GPM_METRIC_NVLINK_L39_TX" = 340 - NVML_GPM_METRIC_NVLINK_L40_RX "NVML_GPM_METRIC_NVLINK_L40_RX" = 341 - NVML_GPM_METRIC_NVLINK_L40_TX "NVML_GPM_METRIC_NVLINK_L40_TX" = 342 - NVML_GPM_METRIC_NVLINK_L41_RX "NVML_GPM_METRIC_NVLINK_L41_RX" = 343 - NVML_GPM_METRIC_NVLINK_L41_TX "NVML_GPM_METRIC_NVLINK_L41_TX" = 344 - NVML_GPM_METRIC_NVLINK_L42_RX "NVML_GPM_METRIC_NVLINK_L42_RX" = 345 - NVML_GPM_METRIC_NVLINK_L42_TX "NVML_GPM_METRIC_NVLINK_L42_TX" = 346 - NVML_GPM_METRIC_NVLINK_L43_RX "NVML_GPM_METRIC_NVLINK_L43_RX" = 347 - NVML_GPM_METRIC_NVLINK_L43_TX "NVML_GPM_METRIC_NVLINK_L43_TX" = 348 - NVML_GPM_METRIC_NVLINK_L44_RX "NVML_GPM_METRIC_NVLINK_L44_RX" = 349 - NVML_GPM_METRIC_NVLINK_L44_TX "NVML_GPM_METRIC_NVLINK_L44_TX" = 350 - NVML_GPM_METRIC_NVLINK_L45_RX "NVML_GPM_METRIC_NVLINK_L45_RX" = 351 - NVML_GPM_METRIC_NVLINK_L45_TX "NVML_GPM_METRIC_NVLINK_L45_TX" = 352 - NVML_GPM_METRIC_NVLINK_L46_RX "NVML_GPM_METRIC_NVLINK_L46_RX" = 353 - NVML_GPM_METRIC_NVLINK_L46_TX "NVML_GPM_METRIC_NVLINK_L46_TX" = 354 - NVML_GPM_METRIC_NVLINK_L47_RX "NVML_GPM_METRIC_NVLINK_L47_RX" = 355 - NVML_GPM_METRIC_NVLINK_L47_TX "NVML_GPM_METRIC_NVLINK_L47_TX" = 356 - NVML_GPM_METRIC_NVLINK_L48_RX "NVML_GPM_METRIC_NVLINK_L48_RX" = 357 - NVML_GPM_METRIC_NVLINK_L48_TX "NVML_GPM_METRIC_NVLINK_L48_TX" = 358 - NVML_GPM_METRIC_NVLINK_L49_RX "NVML_GPM_METRIC_NVLINK_L49_RX" = 359 - NVML_GPM_METRIC_NVLINK_L49_TX "NVML_GPM_METRIC_NVLINK_L49_TX" = 360 - NVML_GPM_METRIC_NVLINK_L50_RX "NVML_GPM_METRIC_NVLINK_L50_RX" = 361 - NVML_GPM_METRIC_NVLINK_L50_TX "NVML_GPM_METRIC_NVLINK_L50_TX" = 362 - NVML_GPM_METRIC_NVLINK_L51_RX "NVML_GPM_METRIC_NVLINK_L51_RX" = 363 - NVML_GPM_METRIC_NVLINK_L51_TX "NVML_GPM_METRIC_NVLINK_L51_TX" = 364 - NVML_GPM_METRIC_NVLINK_L52_RX "NVML_GPM_METRIC_NVLINK_L52_RX" = 365 - NVML_GPM_METRIC_NVLINK_L52_TX "NVML_GPM_METRIC_NVLINK_L52_TX" = 366 - NVML_GPM_METRIC_NVLINK_L53_RX "NVML_GPM_METRIC_NVLINK_L53_RX" = 367 - NVML_GPM_METRIC_NVLINK_L53_TX "NVML_GPM_METRIC_NVLINK_L53_TX" = 368 - NVML_GPM_METRIC_NVLINK_L54_RX "NVML_GPM_METRIC_NVLINK_L54_RX" = 369 - NVML_GPM_METRIC_NVLINK_L54_TX "NVML_GPM_METRIC_NVLINK_L54_TX" = 370 - NVML_GPM_METRIC_NVLINK_L55_RX "NVML_GPM_METRIC_NVLINK_L55_RX" = 371 - NVML_GPM_METRIC_NVLINK_L55_TX "NVML_GPM_METRIC_NVLINK_L55_TX" = 372 - NVML_GPM_METRIC_NVLINK_L56_RX "NVML_GPM_METRIC_NVLINK_L56_RX" = 373 - NVML_GPM_METRIC_NVLINK_L56_TX "NVML_GPM_METRIC_NVLINK_L56_TX" = 374 - NVML_GPM_METRIC_NVLINK_L57_RX "NVML_GPM_METRIC_NVLINK_L57_RX" = 375 - NVML_GPM_METRIC_NVLINK_L57_TX "NVML_GPM_METRIC_NVLINK_L57_TX" = 376 - NVML_GPM_METRIC_NVLINK_L58_RX "NVML_GPM_METRIC_NVLINK_L58_RX" = 377 - NVML_GPM_METRIC_NVLINK_L58_TX "NVML_GPM_METRIC_NVLINK_L58_TX" = 378 - NVML_GPM_METRIC_NVLINK_L59_RX "NVML_GPM_METRIC_NVLINK_L59_RX" = 379 - NVML_GPM_METRIC_NVLINK_L59_TX "NVML_GPM_METRIC_NVLINK_L59_TX" = 380 - NVML_GPM_METRIC_NVLINK_L60_RX "NVML_GPM_METRIC_NVLINK_L60_RX" = 381 - NVML_GPM_METRIC_NVLINK_L60_TX "NVML_GPM_METRIC_NVLINK_L60_TX" = 382 - NVML_GPM_METRIC_NVLINK_L61_RX "NVML_GPM_METRIC_NVLINK_L61_RX" = 383 - NVML_GPM_METRIC_NVLINK_L61_TX "NVML_GPM_METRIC_NVLINK_L61_TX" = 384 - NVML_GPM_METRIC_NVLINK_L62_RX "NVML_GPM_METRIC_NVLINK_L62_RX" = 385 - NVML_GPM_METRIC_NVLINK_L62_TX "NVML_GPM_METRIC_NVLINK_L62_TX" = 386 - NVML_GPM_METRIC_NVLINK_L63_RX "NVML_GPM_METRIC_NVLINK_L63_RX" = 387 - NVML_GPM_METRIC_NVLINK_L63_TX "NVML_GPM_METRIC_NVLINK_L63_TX" = 388 - NVML_GPM_METRIC_NVLINK_L64_RX "NVML_GPM_METRIC_NVLINK_L64_RX" = 389 - NVML_GPM_METRIC_NVLINK_L64_TX "NVML_GPM_METRIC_NVLINK_L64_TX" = 390 - NVML_GPM_METRIC_NVLINK_L65_RX "NVML_GPM_METRIC_NVLINK_L65_RX" = 391 - NVML_GPM_METRIC_NVLINK_L65_TX "NVML_GPM_METRIC_NVLINK_L65_TX" = 392 - NVML_GPM_METRIC_NVLINK_L66_RX "NVML_GPM_METRIC_NVLINK_L66_RX" = 393 - NVML_GPM_METRIC_NVLINK_L66_TX "NVML_GPM_METRIC_NVLINK_L66_TX" = 394 - NVML_GPM_METRIC_NVLINK_L67_RX "NVML_GPM_METRIC_NVLINK_L67_RX" = 395 - NVML_GPM_METRIC_NVLINK_L67_TX "NVML_GPM_METRIC_NVLINK_L67_TX" = 396 - NVML_GPM_METRIC_NVLINK_L68_RX "NVML_GPM_METRIC_NVLINK_L68_RX" = 397 - NVML_GPM_METRIC_NVLINK_L68_TX "NVML_GPM_METRIC_NVLINK_L68_TX" = 398 - NVML_GPM_METRIC_NVLINK_L69_RX "NVML_GPM_METRIC_NVLINK_L69_RX" = 399 - NVML_GPM_METRIC_NVLINK_L69_TX "NVML_GPM_METRIC_NVLINK_L69_TX" = 400 - NVML_GPM_METRIC_NVLINK_L70_RX "NVML_GPM_METRIC_NVLINK_L70_RX" = 401 - NVML_GPM_METRIC_NVLINK_L70_TX "NVML_GPM_METRIC_NVLINK_L70_TX" = 402 - NVML_GPM_METRIC_NVLINK_L71_RX "NVML_GPM_METRIC_NVLINK_L71_RX" = 403 - NVML_GPM_METRIC_NVLINK_L71_TX "NVML_GPM_METRIC_NVLINK_L71_TX" = 404 - NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC" = 405 - NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC" = 406 - NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC" = 407 - NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC" = 408 - NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC" = 409 - NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC" = 410 - NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC" = 411 - NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC" = 412 - NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC" = 413 - NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC" = 414 - NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC" = 415 - NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC" = 416 - NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC" = 417 - NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC" = 418 - NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC" = 419 - NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC" = 420 - NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC" = 421 - NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC" = 422 - NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC" = 423 - NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC" = 424 - NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC" = 425 - NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC" = 426 - NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC" = 427 - NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC" = 428 - NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC" = 429 - NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC" = 430 - NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC" = 431 - NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC" = 432 - NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC" = 433 - NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC" = 434 - NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC" = 435 - NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC" = 436 - NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC" = 437 - NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC" = 438 - NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC" = 439 - NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC" = 440 - NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC" = 441 - NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC" = 442 - NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC" = 443 - NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC" = 444 - NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC" = 445 - NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC" = 446 - NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC" = 447 - NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC" = 448 - NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC" = 449 - NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC" = 450 - NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC" = 451 - NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC" = 452 - NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC" = 453 - NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC" = 454 - NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC" = 455 - NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC" = 456 - NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC" = 457 - NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC" = 458 - NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC" = 459 - NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC" = 460 - NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC" = 461 - NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC" = 462 - NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC" = 463 - NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC" = 464 - NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC" = 465 - NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC" = 466 - NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC" = 467 - NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC" = 468 - NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC" = 469 - NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC" = 470 - NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC" = 471 - NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC" = 472 - NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC" = 473 - NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC" = 474 - NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC" = 475 - NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC" = 476 - NVML_GPM_METRIC_MAX "NVML_GPM_METRIC_MAX" = 477 + NVML_GPM_METRIC_MAX "NVML_GPM_METRIC_MAX" = 333 ctypedef enum nvmlPowerProfileType_t "nvmlPowerProfileType_t": NVML_POWER_PROFILE_MAX_P "NVML_POWER_PROFILE_MAX_P" = 0 @@ -937,17 +787,7 @@ ctypedef enum nvmlPowerProfileType_t "nvmlPowerProfileType_t": NVML_POWER_PROFILE_SYNC_BALANCED "NVML_POWER_PROFILE_SYNC_BALANCED" = 12 NVML_POWER_PROFILE_HPC "NVML_POWER_PROFILE_HPC" = 13 NVML_POWER_PROFILE_MIG "NVML_POWER_PROFILE_MIG" = 14 - NVML_POWER_PROFILE_MAX_Q_1 "NVML_POWER_PROFILE_MAX_Q_1" = 15 - NVML_POWER_PROFILE_NETWORK_BOUND "NVML_POWER_PROFILE_NETWORK_BOUND" = 16 - NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE "NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE" = 17 - NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE "NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE" = 18 - NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE "NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE" = 19 - NVML_POWER_PROFILE_TRAINING "NVML_POWER_PROFILE_TRAINING" = 20 - NVML_POWER_PROFILE_INFERENCE "NVML_POWER_PROFILE_INFERENCE" = 21 - NVML_POWER_PROFILE_MAX_Q_2 "NVML_POWER_PROFILE_MAX_Q_2" = 22 - NVML_POWER_PROFILE_MAX_Q_3 "NVML_POWER_PROFILE_MAX_Q_3" = 23 - NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND "NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND" = 24 - NVML_POWER_PROFILE_MAX "NVML_POWER_PROFILE_MAX" = 25 + NVML_POWER_PROFILE_MAX "NVML_POWER_PROFILE_MAX" = 15 ctypedef enum nvmlDeviceAddressingModeType_t "nvmlDeviceAddressingModeType_t": NVML_DEVICE_ADDRESSING_MODE_NONE "NVML_DEVICE_ADDRESSING_MODE_NONE" = 0 @@ -961,14 +801,6 @@ ctypedef enum nvmlPRMCounterId_t "nvmlPRMCounterId_t": NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS" = 101 NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY" = 102 NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES" = 103 - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY" = 104 - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY" = 105 - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT" = 106 - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT" = 107 - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT" = 108 - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS" = 109 - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME" = 110 - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME" = 111 NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT "NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT" = 201 NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES "NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES" = 301 NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR "NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR" = 302 @@ -995,30 +827,6 @@ ctypedef enum nvmlProcessMode_t "nvmlProcessMode_t": ctypedef enum nvmlCPERType_t "nvmlCPERType_t": NVML_CPER_ACCESS_TYPE_GPU "NVML_CPER_ACCESS_TYPE_GPU" = (1 << 0) -ctypedef enum nvmlGpuOperationalEventLogLevel_t "nvmlGpuOperationalEventLogLevel_t": - NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL" = 0 - NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY" = 10 - NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG" = 20 - NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE" = 30 - NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING" = 40 - NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR" = 50 - -ctypedef enum nvmlOperationalEventSeverity_t "nvmlOperationalEventSeverity_t": - NVML_OPERATIONAL_EVENT_SEVERITY_ALL "NVML_OPERATIONAL_EVENT_SEVERITY_ALL" = 0 - NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL "NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL" = 10 - NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED "NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED" = 20 - NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE "NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE" = 30 - NVML_OPERATIONAL_EVENT_SEVERITY_FATAL "NVML_OPERATIONAL_EVENT_SEVERITY_FATAL" = 40 - -ctypedef enum nvmlEventDataType_t "nvmlEventDataType_t": - NVML_EVENT_DATA_TYPE_NVML_EVENT "NVML_EVENT_DATA_TYPE_NVML_EVENT" = 0 - NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT "NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT" = 1 - -ctypedef enum nvmlNvlinkTelemetrySampleType_t "nvmlNvlinkTelemetrySampleType_t": - NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX" = 0 - NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX" = 1 - NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT" = 2 - # types ctypedef struct nvmlPciInfoExt_v1_t 'nvmlPciInfoExt_v1_t': @@ -1699,101 +1507,6 @@ ctypedef struct nvmlAccountingStats_v2_t 'nvmlAccountingStats_v2_t': unsigned long long time unsigned long long startTime -ctypedef struct nvmlDeviceSetMemoryLimits_v1_t 'nvmlDeviceSetMemoryLimits_v1_t': - char* nameSpace - unsigned long long softLimit - unsigned long long hardLimit - -ctypedef struct nvmlDeviceGetMemoryLimits_v1_t 'nvmlDeviceGetMemoryLimits_v1_t': - char* nameSpace - unsigned long long softLimit - unsigned long long hardLimit - unsigned long long currentUsed - -ctypedef struct nvmlPmgrPwrTuple_t 'nvmlPmgrPwrTuple_t': - unsigned int pwrmW - -ctypedef struct nvmlRailMetrics_t 'nvmlRailMetrics_t': - unsigned int freqkHz - unsigned long long utilPct - -ctypedef struct nvmlPwrModelMetricsDlppm1xPerf_t 'nvmlPwrModelMetricsDlppm1xPerf_t': - unsigned int perfms - -ctypedef struct nvmlPwrModelMetricsSamplePfpp1x_t 'nvmlPwrModelMetricsSamplePfpp1x_t': - unsigned int freqkHz[16] - unsigned int estTgpPwrmW - -ctypedef struct nvmlPwrModelOperatingPointPfpp1x_t 'nvmlPwrModelOperatingPointPfpp1x_t': - unsigned int freqkHz - unsigned int pwrmW - -ctypedef struct nvmlAdaptiveTgpModeInfo_v1_t 'nvmlAdaptiveTgpModeInfo_v1_t': - nvmlEnableState_t inBandEnableRequest - nvmlEnableState_t featureAllowedByAdmin - nvmlEnableState_t adminOverrideEnabled - nvmlEnableState_t enablementStatus - unsigned int adjustedLimitMw - -ctypedef struct nvmlOperationalEventContextInfo_v1_t 'nvmlOperationalEventContextInfo_v1_t': - unsigned int contextType - unsigned int dataSize - unsigned short dataFormatVersion - -ctypedef struct nvmlGpuOperationalEventContextLegacyXid_v1_t 'nvmlGpuOperationalEventContextLegacyXid_v1_t': - unsigned int xidCode - -ctypedef struct nvmlGpuFabricClique_v1_t 'nvmlGpuFabricClique_v1_t': - unsigned char type - unsigned int id - -ctypedef struct nvmlGpuOperationalEventConfig_v1_t 'nvmlGpuOperationalEventConfig_v1_t': - char uuid[96] - unsigned int minLogLevel - unsigned int minSeverity - -ctypedef struct nvmlEventData_v2_t 'nvmlEventData_v2_t': - char uuid[96] - char sourceModule[16] - unsigned long long eventType - unsigned long long eventData - unsigned long long groupCursor - unsigned long long instanceId - unsigned long long timestampUsec - unsigned long long traceId - unsigned int dataType - unsigned int gpuInstanceId - unsigned int computeInstanceId - unsigned int severity - unsigned int categoryId - unsigned int moduleEventCode - unsigned int scope - unsigned int originator - unsigned int moduleInstance - unsigned int chipletId - unsigned int logLevel - unsigned int attributes - unsigned int groupCperSize - unsigned int groupAttributes - unsigned char groupSize - unsigned char groupIndex - -ctypedef struct nvmlNvlinkSetBwModeAsync_v1_t 'nvmlNvlinkSetBwModeAsync_v1_t': - unsigned int bSetBest - unsigned int bwMode - unsigned int asyncPollTimeoutMs - -ctypedef struct nvmlNvlinkTelemetrySample_v1_t 'nvmlNvlinkTelemetrySample_v1_t': - unsigned int linkId - unsigned int sampleType - unsigned int sampleCount - unsigned long long* samples - nvmlReturn_t nvmlReturn - -ctypedef struct nvmlEccBankRemapperHistogram_v1_t 'nvmlEccBankRemapperHistogram_v1_t': - unsigned int maxSpareGroupCount - unsigned int noSpareGroupCount - ctypedef nvmlPciInfoExt_v1_t nvmlPciInfoExt_t 'nvmlPciInfoExt_t' ctypedef nvmlCoolerInfo_v1_t nvmlCoolerInfo_t 'nvmlCoolerInfo_t' @@ -2151,36 +1864,6 @@ ctypedef struct nvmlVgpuSchedulerLogInfo_v2_t 'nvmlVgpuSchedulerLogInfo_v2_t': unsigned int entriesCount nvmlVgpuSchedulerLogEntry_v2_t logEntries[200] -ctypedef struct nvmlCoreRailMetrics_t 'nvmlCoreRailMetrics_t': - nvmlRailMetrics_t rails[2] - -ctypedef struct nvmlPwrModelMetricsPfpp1x_t 'nvmlPwrModelMetricsPfpp1x_t': - unsigned char numVfPoints - nvmlPwrModelMetricsSamplePfpp1x_t estimatedMetrics[32] - unsigned char bValid - nvmlPwrModelOperatingPointPfpp1x_t maxPerfPerWattPoint - nvmlPwrModelOperatingPointPfpp1x_t fmaxAtVmaxPoint - unsigned int tgpHeadroommW - -ctypedef struct nvmlGpuFabricInfo_v4_t 'nvmlGpuFabricInfo_v4_t': - unsigned char clusterUuid[16] - nvmlReturn_t status - nvmlGpuFabricClique_v1_t cliques[64] - unsigned int numCliques - nvmlGpuFabricState_t state - unsigned int healthMask - unsigned char healthSummary - -ctypedef struct nvmlNvlinkTelemetrySamples_v1_t 'nvmlNvlinkTelemetrySamples_v1_t': - unsigned int telemetryCount - nvmlNvlinkTelemetrySample_v1_t* telemetrySamples - -ctypedef struct nvmlEccBankRemapperStatus_v1_t 'nvmlEccBankRemapperStatus_v1_t': - unsigned int activeRemappings - unsigned int inactiveRemappings - unsigned int bPending - nvmlEccBankRemapperHistogram_v1_t histogram - ctypedef nvmlVgpuTypeIdInfo_v1_t nvmlVgpuTypeIdInfo_t 'nvmlVgpuTypeIdInfo_t' ctypedef nvmlVgpuTypeMaxInstance_v1_t nvmlVgpuTypeMaxInstance_t 'nvmlVgpuTypeMaxInstance_t' @@ -2279,7 +1962,7 @@ ctypedef struct nvmlGpmMetricsGet_t 'nvmlGpmMetricsGet_t': unsigned int numMetrics nvmlGpmSample_t sample1 nvmlGpmSample_t sample2 - nvmlGpmMetric_t metrics[477] + nvmlGpmMetric_t metrics[333] ctypedef nvmlWorkloadPowerProfileInfo_v1_t nvmlWorkloadPowerProfileInfo_t 'nvmlWorkloadPowerProfileInfo_t' @@ -2294,16 +1977,6 @@ ctypedef struct nvmlNvLinkInfo_v2_t 'nvmlNvLinkInfo_v2_t': unsigned int isNvleEnabled nvmlNvlinkFirmwareInfo_t firmwareInfo -ctypedef struct nvmlPwrModelMetricsDlppm1x_t 'nvmlPwrModelMetricsDlppm1x_t': - unsigned char bValid - nvmlCoreRailMetrics_t coreRail - nvmlRailMetrics_t fbRail - nvmlPmgrPwrTuple_t tgpPwrTuple - nvmlPwrModelMetricsDlppm1xPerf_t perfMetrics - -ctypedef struct nvmlPerfMetricsPfpp1xSample_t 'nvmlPerfMetricsPfpp1xSample_t': - nvmlPwrModelMetricsPfpp1x_t estimatedMetrics - ctypedef nvmlVgpuProcessesUtilizationInfo_v1_t nvmlVgpuProcessesUtilizationInfo_t 'nvmlVgpuProcessesUtilizationInfo_t' ctypedef nvmlVgpuInstancesUtilizationInfo_v1_t nvmlVgpuInstancesUtilizationInfo_t 'nvmlVgpuInstancesUtilizationInfo_t' @@ -2325,39 +1998,8 @@ ctypedef struct nvmlWorkloadPowerProfileProfilesInfo_v1_t 'nvmlWorkloadPowerProf ctypedef nvmlNvLinkInfo_v2_t nvmlNvLinkInfo_t 'nvmlNvLinkInfo_t' -ctypedef struct nvmlPwrModelMetricsDlppm1xDramclkEstimates_t 'nvmlPwrModelMetricsDlppm1xDramclkEstimates_t': - nvmlPwrModelMetricsDlppm1x_t estimatedMetrics[8] - unsigned char numEstimatedMetrics - ctypedef nvmlWorkloadPowerProfileProfilesInfo_v1_t nvmlWorkloadPowerProfileProfilesInfo_t 'nvmlWorkloadPowerProfileProfilesInfo_t' -ctypedef struct nvmlObservedMetrics_t 'nvmlObservedMetrics_t': - nvmlPwrModelMetricsDlppm1xDramclkEstimates_t initialDramclkEst[3] - unsigned char bValid - nvmlCoreRailMetrics_t coreRail - nvmlRailMetrics_t fbRail - nvmlPmgrPwrTuple_t tgpPwrTuple - nvmlPwrModelMetricsDlppm1xPerf_t perfMetrics - -ctypedef struct nvmlPerfMetricsDlppc2xSample_t 'nvmlPerfMetricsDlppc2xSample_t': - nvmlObservedMetrics_t observedMetrics - -ctypedef union cuda_bindings_nvml__anon_pod8: - nvmlPerfMetricsDlppc2xSample_t dlppc2x - nvmlPerfMetricsPfpp1xSample_t pfpp1x - -ctypedef struct nvmlPerfMetricControllerSample_t 'nvmlPerfMetricControllerSample_t': - unsigned int controllerType - cuda_bindings_nvml__anon_pod8 data - -ctypedef struct nvmlPerfMetricsSample_t 'nvmlPerfMetricsSample_t': - unsigned char numControllerData - nvmlPerfMetricControllerSample_t controllerData[4] - -ctypedef struct nvmlPerfMetricsSamples_v1_t 'nvmlPerfMetricsSamples_v1_t': - unsigned int numSamples - nvmlPerfMetricsSample_t samples[13] - ############################################################################### # Functions diff --git a/cuda_bindings/cuda/bindings/cynvml.pyx b/cuda_bindings/cuda/bindings/cynvml.pyx index 04972f4a13a..09ee2601a5b 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pyx +++ b/cuda_bindings/cuda/bindings/cynvml.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fcdd98e73e212e2f1d347d54c34500537c06c41e725d752a3f270a61ed5ccc34 # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. 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 b29e8bf4648..e1f89be12cf 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pxd +++ b/cuda_bindings/cuda/bindings/cynvvm.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=60ee5f67901992be12113c74ccb0663b480a93de668f6e4de73f5ab531add037 # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. ############################################################################### diff --git a/cuda_bindings/cuda/bindings/cynvvm.pyx b/cuda_bindings/cuda/bindings/cynvvm.pyx index bbefbc2222c..4e4b4fe5a74 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pyx +++ b/cuda_bindings/cuda/bindings/cynvvm.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=99d604d3ec58e8e283b26258260a65ac499b39c98fe0bdc3bec03defa3cda74f # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from ._internal cimport nvvm as _nvvm diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pxd b/cuda_bindings/cuda/bindings/nvfatbin.pxd index b4de4d437ad..dbfb587b7f2 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/nvfatbin.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=cc7e8a62c3096b4555d022e957f958c97aa912deb241359b4f47d5d331035382 # -# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index 8d7a3ddea16..8367cd14e83 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -1,22 +1,15 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2d78d001ac0a2ad76abea4a1c0ca5cae6b0494a84d17ee384ccda7a28547d985 # -# This code was automatically generated across versions from 12.4.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum - -# <<<< END OF PREAMBLE CONTENT >>>> - +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) +from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum from libcpp.vector cimport vector @@ -24,7 +17,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_cyb_FastEnum): +class Result(_IntEnum): """ The enumerated type `nvFatbinResult` defines API call result codes. nvFatbin APIs return `nvFatbinResult` codes to indicate the result. @@ -330,4 +323,3 @@ cpdef add_tile_ir(intptr_t handle, code, size_t size, identifier, options_cmd_li with nogil: __status__ = nvFatbinAddTileIR(handle, _code_, size, _identifier_, _options_cmd_line_) check_status(__status__) -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pxd b/cuda_bindings/cuda/bindings/nvjitlink.pxd index d02407e0e9a..8c568cbc1b6 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/nvjitlink.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=679e46cfd685c708f5ea57e8063e088710420cf92d6f98c53aa3edef1bd8cfac # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. 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 b112dd5d166..0f36b3afe1e 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -1,22 +1,15 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d83af37032cfdc59cb39737b87b22bb0d53a32a5d414cbc445539311a42154b6 # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum - -# <<<< END OF PREAMBLE CONTENT >>>> - +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum from libcpp.vector cimport vector @@ -24,7 +17,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_cyb_FastEnum): +class Result(_FastEnum): """ The enumerated type `nvJitLinkResult` defines API call result codes. nvJitLink APIs return `nvJitLinkResult` codes to indicate the result. @@ -51,7 +44,7 @@ class Result(_cyb_FastEnum): ERROR_UNSUPPORTED_ARCH = (NVJITLINK_ERROR_UNSUPPORTED_ARCH, 'Unsupported -arch value') ERROR_LTO_NOT_ENABLED = (NVJITLINK_ERROR_LTO_NOT_ENABLED, 'Requires -lto') -class InputType(_cyb_FastEnum): +class InputType(_FastEnum): """ The enumerated type `nvJitLinkInputType` defines the kind of inputs that can be passed to nvJitLinkAdd* APIs. @@ -374,4 +367,3 @@ cpdef get_linked_ltoir(intptr_t handle, ltoir): with nogil: __status__ = nvJitLinkGetLinkedLTOIR(handle, _ltoir_) check_status(__status__) -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvml.pxd b/cuda_bindings/cuda/bindings/nvml.pxd index fd8351bb97c..9c0dd62d8d5 100644 --- a/cuda_bindings/cuda/bindings/nvml.pxd +++ b/cuda_bindings/cuda/bindings/nvml.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=eb0da1438c796d46204369eaa083d50f9d16700caf3d27dcf06c48a79544b887 # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport intptr_t @@ -56,22 +55,6 @@ ctypedef nvmlRusdSettings_v1_t RusdSettings_v1 ctypedef nvmlBBXTimeData_v1_t BBXTimeData_v1 ctypedef nvmlRemappedRowsInfo_v2_t RemappedRowsInfo_v2 ctypedef nvmlAccountingStats_v2_t AccountingStats_v2 -ctypedef nvmlDeviceSetMemoryLimits_v1_t DeviceSetMemoryLimits_v1 -ctypedef nvmlDeviceGetMemoryLimits_v1_t DeviceGetMemoryLimits_v1 -ctypedef nvmlPmgrPwrTuple_t PmgrPwrTuple -ctypedef nvmlRailMetrics_t RailMetrics -ctypedef nvmlPwrModelMetricsDlppm1xPerf_t PwrModelMetricsDlppm1xPerf -ctypedef nvmlPwrModelMetricsSamplePfpp1x_t PwrModelMetricsSamplePfpp1x -ctypedef nvmlPwrModelOperatingPointPfpp1x_t PwrModelOperatingPointPfpp1x -ctypedef nvmlAdaptiveTgpModeInfo_v1_t AdaptiveTgpModeInfo_v1 -ctypedef nvmlOperationalEventContextInfo_v1_t OperationalEventContextInfo_v1 -ctypedef nvmlGpuOperationalEventContextLegacyXid_v1_t GpuOperationalEventContextLegacyXid_v1 -ctypedef nvmlGpuFabricClique_v1_t GpuFabricClique_v1 -ctypedef nvmlGpuOperationalEventConfig_v1_t GpuOperationalEventConfig_v1 -ctypedef nvmlEventData_v2_t EventData_v2 -ctypedef nvmlNvlinkSetBwModeAsync_v1_t NvlinkSetBwModeAsync_v1 -ctypedef nvmlNvlinkTelemetrySample_v1_t NvlinkTelemetrySample_v1 -ctypedef nvmlEccBankRemapperHistogram_v1_t EccBankRemapperHistogram_v1 ctypedef nvmlPowerValue_v2_t PowerValue_v2 ctypedef nvmlVgpuTypeMaxInstance_v1_t VgpuTypeMaxInstance_v1 ctypedef nvmlVgpuProcessUtilizationSample_t VgpuProcessUtilizationSample @@ -88,24 +71,11 @@ ctypedef nvmlWorkloadPowerProfileCurrentProfiles_v1_t WorkloadPowerProfileCurren ctypedef nvmlWorkloadPowerProfileRequestedProfiles_v1_t WorkloadPowerProfileRequestedProfiles_v1 ctypedef nvmlWorkloadPowerProfileUpdateProfiles_v1_t WorkloadPowerProfileUpdateProfiles_v1 ctypedef nvmlPRMTLV_v1_t PRMTLV_v1 -ctypedef nvmlCoreRailMetrics_t CoreRailMetrics -ctypedef nvmlPwrModelMetricsPfpp1x_t PwrModelMetricsPfpp1x -ctypedef nvmlGpuFabricInfo_v4_t GpuFabricInfo_v4 -ctypedef nvmlNvlinkTelemetrySamples_v1_t NvlinkTelemetrySamples_v1 -ctypedef nvmlEccBankRemapperStatus_v1_t EccBankRemapperStatus_v1 ctypedef nvmlGetCPER_v1_t GetCPER_v1 ctypedef nvmlVgpuSchedulerSetState_t VgpuSchedulerSetState ctypedef nvmlGpmMetricsGet_t GpmMetricsGet -ctypedef nvmlPwrModelMetricsDlppm1x_t PwrModelMetricsDlppm1x -ctypedef nvmlPerfMetricsPfpp1xSample_t PerfMetricsPfpp1xSample ctypedef nvmlPRMCounterList_v1_t PRMCounterList_v1 ctypedef nvmlWorkloadPowerProfileProfilesInfo_v1_t WorkloadPowerProfileProfilesInfo_v1 -ctypedef nvmlPwrModelMetricsDlppm1xDramclkEstimates_t PwrModelMetricsDlppm1xDramclkEstimates -ctypedef nvmlObservedMetrics_t ObservedMetrics -ctypedef nvmlPerfMetricsDlppc2xSample_t PerfMetricsDlppc2xSample -ctypedef nvmlPerfMetricControllerSample_t PerfMetricControllerSample -ctypedef nvmlPerfMetricsSample_t PerfMetricsSample -ctypedef nvmlPerfMetricsSamples_v1_t PerfMetricsSamples_v1 ############################################################################### @@ -174,10 +144,6 @@ ctypedef nvmlPRMCounterId_t _PRMCounterId ctypedef nvmlPowerProfileOperation_t _PowerProfileOperation ctypedef nvmlProcessMode_t _ProcessMode ctypedef nvmlCPERType_t _CPERType -ctypedef nvmlGpuOperationalEventLogLevel_t _GpuOperationalEventLogLevel -ctypedef nvmlOperationalEventSeverity_t _OperationalEventSeverity -ctypedef nvmlEventDataType_t _EventDataType -ctypedef nvmlNvlinkTelemetrySampleType_t _NvlinkTelemetrySampleType ############################################################################### diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index a3042207603..52fefd94e32 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -1,55 +1,29 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=31bde24373116b0cc22916078af47ba61d0e885695fc25557b13265ee6befd94 # -# This code was automatically generated across versions from 12.9.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -cimport cpython as _cyb_cpython -cimport cpython.buffer as _cyb_cpython_buffer -cimport cpython.memoryview as _cyb_cpython_memoryview -from cython cimport view as _cyb_view -from libc.stdlib cimport ( - calloc as _cyb_calloc, - free as _cyb_free, - malloc as _cyb_malloc, -) -from libc.string cimport ( - memcmp as _cyb_memcmp, - memcpy as _cyb_memcpy, -) -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum -import numpy as _numpy +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. -cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +cimport cython # NOQA + +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) + +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum + +from cuda.bindings.cydriver cimport CUDA_VERSION + + +from libc.stdlib cimport calloc, free, malloc +from cython cimport view +cimport cpython.buffer +cimport cpython.memoryview +cimport cpython +from libc.string cimport memcmp, memcpy +import numpy as _numpy -cdef _cyb_from_buffer(buffer, size, lowpp_type): - cdef _cyb_cpython.Py_buffer view - if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - _cyb_cpython.PyBuffer_Release(&view) -cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): +cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -61,20 +35,34 @@ cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) -# <<<< END OF PREAMBLE CONTENT >>>> +cdef __from_buffer(buffer, size, lowpp_type): + cdef Py_buffer view + if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + cpython.PyBuffer_Release(&view) -cimport cython # NOQA -from cython cimport view -cimport cpython -from libc.string cimport memcpy - -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum +cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -from cuda.bindings.cydriver cimport CUDA_VERSION cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsigned int ver) nogil: @@ -85,7 +73,7 @@ cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsi # Enum ############################################################################### -class BridgeChipType(_cyb_FastEnum): +class BridgeChipType(_FastEnum): """ Enum to represent type of bridge chip @@ -94,7 +82,7 @@ class BridgeChipType(_cyb_FastEnum): BRIDGE_CHIP_PLX = NVML_BRIDGE_CHIP_PLX BRIDGE_CHIP_BRO4 = NVML_BRIDGE_CHIP_BRO4 -class NvLinkUtilizationCountUnits(_cyb_FastEnum): +class NvLinkUtilizationCountUnits(_FastEnum): """ Enum to represent the NvLink utilization counter packet units @@ -106,7 +94,7 @@ class NvLinkUtilizationCountUnits(_cyb_FastEnum): NVLINK_COUNTER_UNIT_RESERVED = NVML_NVLINK_COUNTER_UNIT_RESERVED NVLINK_COUNTER_UNIT_COUNT = NVML_NVLINK_COUNTER_UNIT_COUNT -class NvLinkUtilizationCountPktTypes(_cyb_FastEnum): +class NvLinkUtilizationCountPktTypes(_FastEnum): """ Enum to represent the NvLink utilization counter packet types to count ** this is ONLY applicable with the units as packets or bytes ** as @@ -125,7 +113,7 @@ class NvLinkUtilizationCountPktTypes(_cyb_FastEnum): NVLINK_COUNTER_PKTFILTER_RESPNODATA = NVML_NVLINK_COUNTER_PKTFILTER_RESPNODATA NVLINK_COUNTER_PKTFILTER_ALL = NVML_NVLINK_COUNTER_PKTFILTER_ALL -class NvLinkCapability(_cyb_FastEnum): +class NvLinkCapability(_FastEnum): """ Enum to represent NvLink queryable capabilities @@ -139,7 +127,7 @@ class NvLinkCapability(_cyb_FastEnum): NVLINK_CAP_VALID = NVML_NVLINK_CAP_VALID NVLINK_CAP_COUNT = NVML_NVLINK_CAP_COUNT -class NvLinkErrorCounter(_cyb_FastEnum): +class NvLinkErrorCounter(_FastEnum): """ Enum to represent NvLink queryable error counters @@ -152,7 +140,7 @@ class NvLinkErrorCounter(_cyb_FastEnum): NVLINK_ERROR_DL_ECC_DATA = NVML_NVLINK_ERROR_DL_ECC_DATA NVLINK_ERROR_COUNT = NVML_NVLINK_ERROR_COUNT -class IntNvLinkDeviceType(_cyb_FastEnum): +class IntNvLinkDeviceType(_FastEnum): """ Enum to represent NvLink's remote device type @@ -163,7 +151,7 @@ class IntNvLinkDeviceType(_cyb_FastEnum): NVLINK_DEVICE_TYPE_SWITCH = NVML_NVLINK_DEVICE_TYPE_SWITCH NVLINK_DEVICE_TYPE_UNKNOWN = NVML_NVLINK_DEVICE_TYPE_UNKNOWN -class GpuTopologyLevel(_cyb_FastEnum): +class GpuTopologyLevel(_FastEnum): """ Represents level relationships within a system between two GPUs The enums are spaced to allow for future relationships @@ -177,7 +165,7 @@ class GpuTopologyLevel(_cyb_FastEnum): TOPOLOGY_NODE = NVML_TOPOLOGY_NODE TOPOLOGY_SYSTEM = NVML_TOPOLOGY_SYSTEM -class GpuP2PStatus(_cyb_FastEnum): +class GpuP2PStatus(_FastEnum): """ See `nvmlGpuP2PStatus_t`. """ @@ -190,7 +178,7 @@ class GpuP2PStatus(_cyb_FastEnum): P2P_STATUS_NOT_SUPPORTED = NVML_P2P_STATUS_NOT_SUPPORTED P2P_STATUS_UNKNOWN = NVML_P2P_STATUS_UNKNOWN -class GpuP2PCapsIndex(_cyb_FastEnum): +class GpuP2PCapsIndex(_FastEnum): """ See `nvmlGpuP2PCapsIndex_t`. """ @@ -202,7 +190,7 @@ class GpuP2PCapsIndex(_cyb_FastEnum): P2P_CAPS_INDEX_PROP = NVML_P2P_CAPS_INDEX_PROP P2P_CAPS_INDEX_UNKNOWN = NVML_P2P_CAPS_INDEX_UNKNOWN -class SamplingType(_cyb_FastEnum): +class SamplingType(_FastEnum): """ Represents Type of Sampling Event @@ -220,7 +208,7 @@ class SamplingType(_cyb_FastEnum): OFA_UTILIZATION_SAMPLES = (NVML_OFA_UTILIZATION_SAMPLES, 'To represent percent of time during which NVOFA remains busy.') SAMPLINGTYPE_COUNT = NVML_SAMPLINGTYPE_COUNT -class PcieUtilCounter(_cyb_FastEnum): +class PcieUtilCounter(_FastEnum): """ Represents the queryable PCIe utilization counters @@ -230,7 +218,7 @@ class PcieUtilCounter(_cyb_FastEnum): PCIE_UTIL_RX_BYTES = NVML_PCIE_UTIL_RX_BYTES PCIE_UTIL_COUNT = NVML_PCIE_UTIL_COUNT -class ValueType(_cyb_FastEnum): +class ValueType(_FastEnum): """ Represents the type for sample value returned @@ -245,7 +233,7 @@ class ValueType(_cyb_FastEnum): UNSIGNED_SHORT = NVML_VALUE_TYPE_UNSIGNED_SHORT COUNT = NVML_VALUE_TYPE_COUNT -class PerfPolicyType(_cyb_FastEnum): +class PerfPolicyType(_FastEnum): """ Represents type of perf policy for which violation times can be queried @@ -261,7 +249,7 @@ class PerfPolicyType(_cyb_FastEnum): PERF_POLICY_TOTAL_BASE_CLOCKS = (NVML_PERF_POLICY_TOTAL_BASE_CLOCKS, 'Total time the GPU was held below base clocks.') PERF_POLICY_COUNT = NVML_PERF_POLICY_COUNT -class ThermalTarget(_cyb_FastEnum): +class ThermalTarget(_FastEnum): """ Represents the thermal sensor targets @@ -278,7 +266,7 @@ class ThermalTarget(_cyb_FastEnum): ALL = NVML_THERMAL_TARGET_ALL UNKNOWN = NVML_THERMAL_TARGET_UNKNOWN -class ThermalController(_cyb_FastEnum): +class ThermalController(_FastEnum): """ Represents the thermal sensor controllers @@ -304,7 +292,7 @@ class ThermalController(_cyb_FastEnum): ADT7473S = NVML_THERMAL_CONTROLLER_ADT7473S UNKNOWN = NVML_THERMAL_CONTROLLER_UNKNOWN -class CoolerControl(_cyb_FastEnum): +class CoolerControl(_FastEnum): """ Cooler control type @@ -315,7 +303,7 @@ class CoolerControl(_cyb_FastEnum): THERMAL_COOLER_SIGNAL_VARIABLE = (NVML_THERMAL_COOLER_SIGNAL_VARIABLE, "This cooler's level can be adjusted from some minimum to some maximum (eg a knob).") THERMAL_COOLER_SIGNAL_COUNT = NVML_THERMAL_COOLER_SIGNAL_COUNT -class CoolerTarget(_cyb_FastEnum): +class CoolerTarget(_FastEnum): """ Cooler's target @@ -327,7 +315,7 @@ class CoolerTarget(_cyb_FastEnum): THERMAL_POWER_SUPPLY = (NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY, 'This cooler can cool the power supply.') THERMAL_GPU_RELATED = (NVML_THERMAL_COOLER_TARGET_GPU_RELATED, 'This cooler cools all of the components related to its target gpu. GPU_RELATED = GPU | MEMORY | POWER_SUPPLY.') -class UUIDType(_cyb_FastEnum): +class UUIDType(_FastEnum): """ Enum to represent different UUID types @@ -337,7 +325,7 @@ class UUIDType(_cyb_FastEnum): ASCII = (NVML_UUID_TYPE_ASCII, 'ASCII format type.') BINARY = (NVML_UUID_TYPE_BINARY, 'Binary format type.') -class EnableState(_cyb_FastEnum): +class EnableState(_FastEnum): """ Generic enable/disable enum. @@ -346,7 +334,7 @@ class EnableState(_cyb_FastEnum): FEATURE_DISABLED = (NVML_FEATURE_DISABLED, 'Feature disabled.') FEATURE_ENABLED = (NVML_FEATURE_ENABLED, 'Feature enabled.') -class BrandType(_cyb_FastEnum): +class BrandType(_FastEnum): """ - The Brand of the GPU @@ -370,38 +358,34 @@ class BrandType(_cyb_FastEnum): BRAND_NVIDIA = NVML_BRAND_NVIDIA BRAND_GEFORCE_RTX = NVML_BRAND_GEFORCE_RTX BRAND_TITAN_RTX = NVML_BRAND_TITAN_RTX - BRAND_NVIDIA_DLA = NVML_BRAND_NVIDIA_DLA - BRAND_NVIDIA_VGAMEDEV = NVML_BRAND_NVIDIA_VGAMEDEV - BRAND_NVIDIA_NPU = NVML_BRAND_NVIDIA_NPU BRAND_COUNT = NVML_BRAND_COUNT -class TemperatureThresholds(_cyb_FastEnum): +class TemperatureThresholds(_FastEnum): """ Temperature thresholds. See `nvmlTemperatureThresholds_t`. """ - TEMPERATURE_THRESHOLD_SHUTDOWN = (NVML_TEMPERATURE_THRESHOLD_SHUTDOWN, 'Temperature at which the GPU will shut down for HW protection') - TEMPERATURE_THRESHOLD_SLOWDOWN = (NVML_TEMPERATURE_THRESHOLD_SLOWDOWN, 'Temperature at which the GPU will begin HW slowdown') - TEMPERATURE_THRESHOLD_MEM_MAX = (NVML_TEMPERATURE_THRESHOLD_MEM_MAX, 'Memory Temperature at which the GPU will begin SW slowdown') - TEMPERATURE_THRESHOLD_GPU_MAX = (NVML_TEMPERATURE_THRESHOLD_GPU_MAX, 'GPU Temperature at which the GPU can be throttled below base clock') - TEMPERATURE_THRESHOLD_ACOUSTIC_MIN = (NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MIN, 'Minimum GPU Temperature that can be set as acoustic threshold') - TEMPERATURE_THRESHOLD_ACOUSTIC_CURR = (NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_CURR, 'Current temperature that is set as acoustic threshold.') - TEMPERATURE_THRESHOLD_ACOUSTIC_MAX = (NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MAX, 'Maximum GPU temperature that can be set as acoustic threshold.') - TEMPERATURE_THRESHOLD_GPS_CURR = (NVML_TEMPERATURE_THRESHOLD_GPS_CURR, 'Current temperature that is set as gps threshold.') + TEMPERATURE_THRESHOLD_SHUTDOWN = NVML_TEMPERATURE_THRESHOLD_SHUTDOWN + TEMPERATURE_THRESHOLD_SLOWDOWN = NVML_TEMPERATURE_THRESHOLD_SLOWDOWN + TEMPERATURE_THRESHOLD_MEM_MAX = NVML_TEMPERATURE_THRESHOLD_MEM_MAX + TEMPERATURE_THRESHOLD_GPU_MAX = NVML_TEMPERATURE_THRESHOLD_GPU_MAX + TEMPERATURE_THRESHOLD_ACOUSTIC_MIN = NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MIN + TEMPERATURE_THRESHOLD_ACOUSTIC_CURR = NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_CURR + TEMPERATURE_THRESHOLD_ACOUSTIC_MAX = NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MAX + TEMPERATURE_THRESHOLD_GPS_CURR = NVML_TEMPERATURE_THRESHOLD_GPS_CURR TEMPERATURE_THRESHOLD_COUNT = NVML_TEMPERATURE_THRESHOLD_COUNT -class TemperatureSensors(_cyb_FastEnum): +class TemperatureSensors(_FastEnum): """ Temperature sensors. See `nvmlTemperatureSensors_t`. """ TEMPERATURE_GPU = (NVML_TEMPERATURE_GPU, 'Temperature sensor for the GPU die.') - TEMPERATURE_GPU_MAX = (NVML_TEMPERATURE_GPU_MAX, 'Temperature from the hottest part of the GPU die.') TEMPERATURE_COUNT = NVML_TEMPERATURE_COUNT -class ComputeMode(_cyb_FastEnum): +class ComputeMode(_FastEnum): """ Compute mode. NVML_COMPUTEMODE_EXCLUSIVE_PROCESS was added in CUDA 4.0. Earlier CUDA versions supported a single exclusive mode, which is @@ -415,7 +399,7 @@ class ComputeMode(_cyb_FastEnum): COMPUTEMODE_EXCLUSIVE_PROCESS = (NVML_COMPUTEMODE_EXCLUSIVE_PROCESS, 'Compute-exclusive-process mode -- only one context per device, usable from multiple threads at a time.') COMPUTEMODE_COUNT = NVML_COMPUTEMODE_COUNT -class MemoryErrorType(_cyb_FastEnum): +class MemoryErrorType(_FastEnum): """ Memory error types @@ -425,7 +409,7 @@ class MemoryErrorType(_cyb_FastEnum): UNCORRECTED = (NVML_MEMORY_ERROR_TYPE_UNCORRECTED, 'A memory error that was not corrected For ECC errors, these are double bit errors For Texture memory, these are errors where the resend fails') COUNT = (NVML_MEMORY_ERROR_TYPE_COUNT, 'Count of memory error types.') -class NvlinkVersion(_cyb_FastEnum): +class NvlinkVersion(_FastEnum): """ Represents Nvlink Version @@ -441,7 +425,7 @@ class NvlinkVersion(_cyb_FastEnum): VERSION_5_0 = (NVML_NVLINK_VERSION_5_0, 'NVLink Version 5.0.') VERSION_6_0 = (NVML_NVLINK_VERSION_6_0, 'NVLink Version 6.0.') -class EccCounterType(_cyb_FastEnum): +class EccCounterType(_FastEnum): """ ECC counter types. Note: Volatile counts are reset each time the driver loads. On Windows this is once per boot. On Linux this can be @@ -456,7 +440,7 @@ class EccCounterType(_cyb_FastEnum): AGGREGATE_ECC = (NVML_AGGREGATE_ECC, 'Aggregate counts persist across reboots (i.e. for the lifetime of the device).') COUNT = (NVML_ECC_COUNTER_TYPE_COUNT, 'Count of memory counter types.') -class ClockType(_cyb_FastEnum): +class ClockType(_FastEnum): """ Clock types. All speeds are in Mhz. @@ -468,7 +452,7 @@ class ClockType(_cyb_FastEnum): CLOCK_VIDEO = (NVML_CLOCK_VIDEO, 'Video encoder/decoder clock domain.') CLOCK_COUNT = (NVML_CLOCK_COUNT, 'Count of clock types.') -class ClockId(_cyb_FastEnum): +class ClockId(_FastEnum): """ Clock Ids. These are used in combination with `nvmlClockType_t` to specify a single clock value. @@ -481,7 +465,7 @@ class ClockId(_cyb_FastEnum): CUSTOMER_BOOST_MAX = (NVML_CLOCK_ID_CUSTOMER_BOOST_MAX, 'OEM-defined maximum clock rate.') COUNT = (NVML_CLOCK_ID_COUNT, 'Count of Clock Ids.') -class DriverModel(_cyb_FastEnum): +class DriverModel(_FastEnum): """ Driver models. Windows only. @@ -491,7 +475,7 @@ class DriverModel(_cyb_FastEnum): DRIVER_WDM = (NVML_DRIVER_WDM, 'WDM (TCC) model (deprecated) -- GPU treated as a generic compute device.') DRIVER_MCDM = (NVML_DRIVER_MCDM, 'MCDM driver model -- GPU treated as a Microsoft compute device.') -class Pstates(_cyb_FastEnum): +class Pstates(_FastEnum): """ Allowed PStates. @@ -515,7 +499,7 @@ class Pstates(_cyb_FastEnum): PSTATE_15 = (NVML_PSTATE_15, 'Performance state 15 -- Minimum Performance.') PSTATE_UNKNOWN = (NVML_PSTATE_UNKNOWN, 'Unknown performance state.') -class GpuOperationMode(_cyb_FastEnum): +class GpuOperationMode(_FastEnum): """ GPU Operation Mode GOM allows to reduce power usage and optimize GPU throughput by disabling GPU features. Each GOM is designed to meet @@ -527,7 +511,7 @@ class GpuOperationMode(_cyb_FastEnum): GOM_COMPUTE = (NVML_GOM_COMPUTE, 'Designed for running only compute tasks. Graphics operations are not allowed') GOM_LOW_DP = (NVML_GOM_LOW_DP, "Designed for running graphics applications that don't require high bandwidth double precision") -class InforomObject(_cyb_FastEnum): +class InforomObject(_FastEnum): """ Available infoROM objects. @@ -539,7 +523,7 @@ class InforomObject(_cyb_FastEnum): INFOROM_DEN = (NVML_INFOROM_DEN, 'DRAM Encryption object.') INFOROM_COUNT = (NVML_INFOROM_COUNT, 'This counts the number of infoROM objects the driver knows about.') -class Return(_cyb_FastEnum): +class Return(_FastEnum): """ Return values for NVML API calls. @@ -578,7 +562,7 @@ class Return(_cyb_FastEnum): ERROR_RESET_TYPE_NOT_SUPPORTED = (NVML_ERROR_RESET_TYPE_NOT_SUPPORTED, 'Reset not supported for given device/parameters.') ERROR_UNKNOWN = (NVML_ERROR_UNKNOWN, 'An internal driver error occurred.') -class MemoryLocation(_cyb_FastEnum): +class MemoryLocation(_FastEnum): """ See `nvmlDeviceGetMemoryErrorCounter` @@ -595,7 +579,7 @@ class MemoryLocation(_cyb_FastEnum): SRAM = (NVML_MEMORY_LOCATION_SRAM, 'Turing+ SRAM.') COUNT = (NVML_MEMORY_LOCATION_COUNT, 'This counts the number of memory locations the driver knows about.') -class PageRetirementCause(_cyb_FastEnum): +class PageRetirementCause(_FastEnum): """ Causes for page retirement @@ -605,7 +589,7 @@ class PageRetirementCause(_cyb_FastEnum): DOUBLE_BIT_ECC_ERROR = (NVML_PAGE_RETIREMENT_CAUSE_DOUBLE_BIT_ECC_ERROR, 'Page was retired due to double bit ECC error.') COUNT = NVML_PAGE_RETIREMENT_CAUSE_COUNT -class RestrictedAPI(_cyb_FastEnum): +class RestrictedAPI(_FastEnum): """ API types that allow changes to default permission restrictions @@ -615,7 +599,7 @@ class RestrictedAPI(_cyb_FastEnum): SET_AUTO_BOOSTED_CLOCKS = (NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS, 'APIs that enable/disable Auto Boosted clocks see nvmlDeviceSetAutoBoostedClocksEnabled') COUNT = NVML_RESTRICTED_API_COUNT -class GpuUtilizationDomainId(_cyb_FastEnum): +class GpuUtilizationDomainId(_FastEnum): """ Represents the GPU utilization domains @@ -626,7 +610,7 @@ class GpuUtilizationDomainId(_cyb_FastEnum): GPU_UTILIZATION_DOMAIN_VID = (NVML_GPU_UTILIZATION_DOMAIN_VID, 'Video engine domain.') GPU_UTILIZATION_DOMAIN_BUS = (NVML_GPU_UTILIZATION_DOMAIN_BUS, 'Bus interface domain.') -class GpuVirtualizationMode(_cyb_FastEnum): +class GpuVirtualizationMode(_FastEnum): """ GPU virtualization mode types. @@ -638,7 +622,7 @@ class GpuVirtualizationMode(_cyb_FastEnum): HOST_VGPU = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU, 'Device is associated with VGX hypervisor in vGPU mode.') HOST_VSGA = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA, 'Device is associated with VGX hypervisor in vSGA mode.') -class HostVgpuMode(_cyb_FastEnum): +class HostVgpuMode(_FastEnum): """ Host vGPU modes @@ -647,7 +631,7 @@ class HostVgpuMode(_cyb_FastEnum): NON_SRIOV = (NVML_HOST_VGPU_MODE_NON_SRIOV, 'Non SR-IOV mode.') SRIOV = (NVML_HOST_VGPU_MODE_SRIOV, 'SR-IOV mode.') -class VgpuVmIdType(_cyb_FastEnum): +class VgpuVmIdType(_FastEnum): """ Types of VM identifiers @@ -656,7 +640,7 @@ class VgpuVmIdType(_cyb_FastEnum): VGPU_VM_ID_DOMAIN_ID = (NVML_VGPU_VM_ID_DOMAIN_ID, 'VM ID represents DOMAIN ID.') VGPU_VM_ID_UUID = (NVML_VGPU_VM_ID_UUID, 'VM ID represents UUID.') -class VgpuGuestInfoState(_cyb_FastEnum): +class VgpuGuestInfoState(_FastEnum): """ vGPU GUEST info state @@ -665,7 +649,7 @@ class VgpuGuestInfoState(_cyb_FastEnum): VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED, 'Guest-dependent fields uninitialized.') VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED, 'Guest-dependent fields initialized.') -class GridLicenseFeatureCode(_cyb_FastEnum): +class GridLicenseFeatureCode(_FastEnum): """ vGPU software licensable features @@ -677,9 +661,8 @@ class GridLicenseFeatureCode(_cyb_FastEnum): VWORKSTATION = (NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION, 'Deprecated, do not use.') GAMING = (NVML_GRID_LICENSE_FEATURE_CODE_GAMING, 'Gaming.') COMPUTE = (NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE, 'Compute.') - VGAMEDEV = (NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV, 'vGameDev') -class VgpuCapability(_cyb_FastEnum): +class VgpuCapability(_FastEnum): """ vGPU queryable capabilities @@ -692,7 +675,7 @@ class VgpuCapability(_cyb_FastEnum): VGPU_CAP_EXCLUSIVE_SIZE = (NVML_VGPU_CAP_EXCLUSIVE_SIZE, 'vGPU profile cannot run on a GPU alongside other profiles of different size') VGPU_CAP_COUNT = NVML_VGPU_CAP_COUNT -class VgpuDriverCapability(_cyb_FastEnum): +class VgpuDriverCapability(_FastEnum): """ vGPU driver queryable capabilities @@ -702,7 +685,7 @@ class VgpuDriverCapability(_cyb_FastEnum): VGPU_DRIVER_CAP_WARM_UPDATE = (NVML_VGPU_DRIVER_CAP_WARM_UPDATE, 'Supports FSR and warm update of vGPU host driver without terminating the running guest VM.') VGPU_DRIVER_CAP_COUNT = NVML_VGPU_DRIVER_CAP_COUNT -class DeviceVgpuCapability(_cyb_FastEnum): +class DeviceVgpuCapability(_FastEnum): """ Device vGPU queryable capabilities @@ -722,7 +705,7 @@ class DeviceVgpuCapability(_cyb_FastEnum): DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = (NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED, 'Set/Get MIG timesliced mode reporting, without impacting the underlying functionality.') DEVICE_VGPU_CAP_COUNT = NVML_DEVICE_VGPU_CAP_COUNT -class DeviceGpuRecoveryAction(_cyb_FastEnum): +class DeviceGpuRecoveryAction(_FastEnum): """ Enum describing the GPU Recovery Action @@ -735,7 +718,7 @@ class DeviceGpuRecoveryAction(_cyb_FastEnum): GPU_RECOVERY_ACTION_DRAIN_AND_RESET = (NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET, 'Drain P2P and Reset Gpu.') GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN = (NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN, 'Recover IMEX Domain.') -class FanState(_cyb_FastEnum): +class FanState(_FastEnum): """ Fan state enum. @@ -744,7 +727,7 @@ class FanState(_cyb_FastEnum): FAN_NORMAL = (NVML_FAN_NORMAL, 'Fan is working properly.') FAN_FAILED = (NVML_FAN_FAILED, 'Fan has failed.') -class LedColor(_cyb_FastEnum): +class LedColor(_FastEnum): """ Led color enum. @@ -753,7 +736,7 @@ class LedColor(_cyb_FastEnum): GREEN = (NVML_LED_COLOR_GREEN, 'GREEN, indicates good health.') AMBER = (NVML_LED_COLOR_AMBER, 'AMBER, indicates problem.') -class EncoderType(_cyb_FastEnum): +class EncoderType(_FastEnum): """ Represents type of encoder for capacity can be queried @@ -764,7 +747,7 @@ class EncoderType(_cyb_FastEnum): ENCODER_QUERY_AV1 = (NVML_ENCODER_QUERY_AV1, 'AV1 encoder.') ENCODER_QUERY_UNKNOWN = (NVML_ENCODER_QUERY_UNKNOWN, 'Unknown encoder.') -class FBCSessionType(_cyb_FastEnum): +class FBCSessionType(_FastEnum): """ Represents frame buffer capture session type @@ -776,7 +759,7 @@ class FBCSessionType(_cyb_FastEnum): VID = (NVML_FBC_SESSION_TYPE_VID, 'Vid.') HWENC = (NVML_FBC_SESSION_TYPE_HWENC, 'HEnc.') -class DetachGpuState(_cyb_FastEnum): +class DetachGpuState(_FastEnum): """ Is the GPU device to be removed from the kernel by `nvmlDeviceRemoveGpu()` @@ -786,7 +769,7 @@ class DetachGpuState(_cyb_FastEnum): DETACH_GPU_KEEP = NVML_DETACH_GPU_KEEP DETACH_GPU_REMOVE = NVML_DETACH_GPU_REMOVE -class PcieLinkState(_cyb_FastEnum): +class PcieLinkState(_FastEnum): """ Parent bridge PCIe link state requested by `nvmlDeviceRemoveGpu()` @@ -795,7 +778,7 @@ class PcieLinkState(_cyb_FastEnum): PCIE_LINK_KEEP = NVML_PCIE_LINK_KEEP PCIE_LINK_SHUT_DOWN = NVML_PCIE_LINK_SHUT_DOWN -class ClockLimitId(_cyb_FastEnum): +class ClockLimitId(_FastEnum): """ See `nvmlClockLimitId_t`. """ @@ -803,7 +786,7 @@ class ClockLimitId(_cyb_FastEnum): TDP = NVML_CLOCK_LIMIT_ID_TDP UNLIMITED = NVML_CLOCK_LIMIT_ID_UNLIMITED -class VgpuVmCompatibility(_cyb_FastEnum): +class VgpuVmCompatibility(_FastEnum): """ vGPU VM compatibility codes @@ -815,7 +798,7 @@ class VgpuVmCompatibility(_cyb_FastEnum): SLEEP = (NVML_VGPU_VM_COMPATIBILITY_SLEEP, 'vGPU is runnable from a sleeped state (ACPI S3)') LIVE = (NVML_VGPU_VM_COMPATIBILITY_LIVE, 'vGPU is runnable from a live/paused (ACPI S0)') -class VgpuPgpuCompatibilityLimitCode(_cyb_FastEnum): +class VgpuPgpuCompatibilityLimitCode(_FastEnum): """ vGPU-pGPU compatibility limit codes @@ -827,7 +810,7 @@ class VgpuPgpuCompatibilityLimitCode(_cyb_FastEnum): VGPU_COMPATIBILITY_LIMIT_GPU = (NVML_VGPU_COMPATIBILITY_LIMIT_GPU, 'Compatibility is limited by GPU hardware.') VGPU_COMPATIBILITY_LIMIT_OTHER = (NVML_VGPU_COMPATIBILITY_LIMIT_OTHER, 'Compatibility is limited by an undefined factor.') -class GpmMetricId(_cyb_FastEnum): +class GpmMetricId(_FastEnum): """ GPM Metric Identifiers @@ -904,152 +887,152 @@ class GpmMetricId(_cyb_FastEnum): GPM_METRIC_NVLINK_L16_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L16_TX_PER_SEC, 'NvLink write bandwidth for link 16 in MiB/sec.') GPM_METRIC_NVLINK_L17_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L17_RX_PER_SEC, 'NvLink read bandwidth for link 17 in MiB/sec.') GPM_METRIC_NVLINK_L17_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L17_TX_PER_SEC, 'NvLink write bandwidth for link 17 in MiB/sec.') - GPM_METRIC_C2C_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC, 'C2C total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC, 'C2C total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC, 'C2C data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC, 'C2C data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC, 'C2C link 0 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC, 'C2C link 0 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC, 'C2C link 0 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC, 'C2C link 0 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC, 'C2C link 1 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC, 'C2C link 1 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC, 'C2C link 1 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC, 'C2C link 1 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC, 'C2C link 2 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC, 'C2C link 2 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC, 'C2C link 2 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC, 'C2C link 2 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC, 'C2C link 3 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC, 'C2C link 3 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC, 'C2C link 3 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC, 'C2C link 3 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC, 'C2C link 4 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC, 'C2C link 4 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC, 'C2C link 4 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC, 'C2C link 4 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC, 'C2C link 5 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC, 'C2C link 5 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC, 'C2C link 5 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC, 'C2C link 5 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC, 'C2C link 6 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC, 'C2C link 6 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC, 'C2C link 6 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC, 'C2C link 6 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC, 'C2C link 7 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC, 'C2C link 7 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC, 'C2C link 7 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC, 'C2C link 7 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC, 'C2C link 8 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC, 'C2C link 8 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC, 'C2C link 8 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC, 'C2C link 8 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC, 'C2C link 9 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC, 'C2C link 9 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC, 'C2C link 9 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC, 'C2C link 9 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC, 'C2C link 10 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC, 'C2C link 10 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC, 'C2C link 10 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC, 'C2C link 10 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC, 'C2C link 11 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC, 'C2C link 11 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC, 'C2C link 11 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC, 'C2C link 11 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC, 'C2C link 12 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC, 'C2C link 12 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC, 'C2C link 12 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC, 'C2C link 12 data receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC, 'C2C link 13 total transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC, 'C2C link 13 total receive bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC, 'C2C link 13 data transmit bandwidth in MiB/sec.') - GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC, 'C2C link 13 data receive bandwidth in MiB/sec.') - GPM_METRIC_HOSTMEM_CACHE_HIT = (NVML_GPM_METRIC_HOSTMEM_CACHE_HIT, 'Percentage of host memory cache hits. 0.0 - 100.0.') - GPM_METRIC_HOSTMEM_CACHE_MISS = (NVML_GPM_METRIC_HOSTMEM_CACHE_MISS, 'Percentage of host memory cache misses. 0.0 - 100.0.') - GPM_METRIC_PEERMEM_CACHE_HIT = (NVML_GPM_METRIC_PEERMEM_CACHE_HIT, 'Percentage of peer memory cache hits. 0.0 - 100.0.') - GPM_METRIC_PEERMEM_CACHE_MISS = (NVML_GPM_METRIC_PEERMEM_CACHE_MISS, 'Percentage of peer memory cache misses. 0.0 - 100.0.') - GPM_METRIC_DRAM_CACHE_HIT = (NVML_GPM_METRIC_DRAM_CACHE_HIT, 'Percentage of DRAM cache hits. 0.0 - 100.0.') - GPM_METRIC_DRAM_CACHE_MISS = (NVML_GPM_METRIC_DRAM_CACHE_MISS, 'Percentage of DRAM cache misses. 0.0 - 100.0.') - GPM_METRIC_NVENC_0_UTIL = (NVML_GPM_METRIC_NVENC_0_UTIL, 'Percent utilization of NVENC 0. 0.0 - 100.0.') - GPM_METRIC_NVENC_1_UTIL = (NVML_GPM_METRIC_NVENC_1_UTIL, 'Percent utilization of NVENC 1. 0.0 - 100.0.') - GPM_METRIC_NVENC_2_UTIL = (NVML_GPM_METRIC_NVENC_2_UTIL, 'Percent utilization of NVENC 2. 0.0 - 100.0.') - GPM_METRIC_NVENC_3_UTIL = (NVML_GPM_METRIC_NVENC_3_UTIL, 'Percent utilization of NVENC 3. 0.0 - 100.0.') - GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 0.') - GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 0.') - GPM_METRIC_GR0_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR0_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 0.') - GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 0.') - GPM_METRIC_GR0_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 0 context switches were active. 0.0 - 100.0.') - GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 1.') - GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 1.') - GPM_METRIC_GR1_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR1_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 1.') - GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 1.') - GPM_METRIC_GR1_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 1 context switches were active. 0.0 - 100.0.') - GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 2.') - GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 2.') - GPM_METRIC_GR2_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR2_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 2.') - GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 2.') - GPM_METRIC_GR2_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 2 context switches were active. 0.0 - 100.0.') - GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 3.') - GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 3.') - GPM_METRIC_GR3_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR3_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 3.') - GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 3.') - GPM_METRIC_GR3_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 3 context switches were active. 0.0 - 100.0.') - GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 4.') - GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 4.') - GPM_METRIC_GR4_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR4_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 4.') - GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 4.') - GPM_METRIC_GR4_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 4 context switches were active. 0.0 - 100.0.') - GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 5.') - GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 5.') - GPM_METRIC_GR5_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR5_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 5.') - GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 5.') - GPM_METRIC_GR5_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 5 context switches were active. 0.0 - 100.0.') - GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 6.') - GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 6.') - GPM_METRIC_GR6_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR6_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 6.') - GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 6.') - GPM_METRIC_GR6_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 6 context switches were active. 0.0 - 100.0.') - GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 7.') - GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 7.') - GPM_METRIC_GR7_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR7_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 7.') - GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 7.') - GPM_METRIC_GR7_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 7 context switches were active. 0.0 - 100.0.') - GPM_METRIC_NVLINK_L18_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L18_RX_PER_SEC, 'NvLink read bandwidth for link 18 in MiB/sec.') - GPM_METRIC_NVLINK_L18_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L18_TX_PER_SEC, 'NvLink write bandwidth for link 18 in MiB/sec.') - GPM_METRIC_NVLINK_L19_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L19_RX_PER_SEC, 'NvLink read bandwidth for link 19 in MiB/sec.') - GPM_METRIC_NVLINK_L19_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L19_TX_PER_SEC, 'NvLink write bandwidth for link 19 in MiB/sec.') - GPM_METRIC_NVLINK_L20_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L20_RX_PER_SEC, 'NvLink read bandwidth for link 20 in MiB/sec.') - GPM_METRIC_NVLINK_L20_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L20_TX_PER_SEC, 'NvLink write bandwidth for link 20 in MiB/sec.') - GPM_METRIC_NVLINK_L21_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L21_RX_PER_SEC, 'NvLink read bandwidth for link 21 in MiB/sec.') - GPM_METRIC_NVLINK_L21_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L21_TX_PER_SEC, 'NvLink write bandwidth for link 21 in MiB/sec.') - GPM_METRIC_NVLINK_L22_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L22_RX_PER_SEC, 'NvLink read bandwidth for link 22 in MiB/sec.') - GPM_METRIC_NVLINK_L22_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L22_TX_PER_SEC, 'NvLink write bandwidth for link 22 in MiB/sec.') - GPM_METRIC_NVLINK_L23_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L23_RX_PER_SEC, 'NvLink read bandwidth for link 23 in MiB/sec.') - GPM_METRIC_NVLINK_L23_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L23_TX_PER_SEC, 'NvLink write bandwidth for link 23 in MiB/sec.') - GPM_METRIC_NVLINK_L24_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L24_RX_PER_SEC, 'NvLink read bandwidth for link 24 in MiB/sec.') - GPM_METRIC_NVLINK_L24_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L24_TX_PER_SEC, 'NvLink write bandwidth for link 24 in MiB/sec.') - GPM_METRIC_NVLINK_L25_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L25_RX_PER_SEC, 'NvLink read bandwidth for link 25 in MiB/sec.') - GPM_METRIC_NVLINK_L25_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L25_TX_PER_SEC, 'NvLink write bandwidth for link 25 in MiB/sec.') - GPM_METRIC_NVLINK_L26_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L26_RX_PER_SEC, 'NvLink read bandwidth for link 26 in MiB/sec.') - GPM_METRIC_NVLINK_L26_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L26_TX_PER_SEC, 'NvLink write bandwidth for link 26 in MiB/sec.') - GPM_METRIC_NVLINK_L27_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L27_RX_PER_SEC, 'NvLink read bandwidth for link 27 in MiB/sec.') - GPM_METRIC_NVLINK_L27_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L27_TX_PER_SEC, 'NvLink write bandwidth for link 27 in MiB/sec.') - GPM_METRIC_NVLINK_L28_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L28_RX_PER_SEC, 'NvLink read bandwidth for link 28 in MiB/sec.') - GPM_METRIC_NVLINK_L28_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L28_TX_PER_SEC, 'NvLink write bandwidth for link 28 in MiB/sec.') - GPM_METRIC_NVLINK_L29_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L29_RX_PER_SEC, 'NvLink read bandwidth for link 29 in MiB/sec.') - GPM_METRIC_NVLINK_L29_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L29_TX_PER_SEC, 'NvLink write bandwidth for link 29 in MiB/sec.') - GPM_METRIC_NVLINK_L30_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L30_RX_PER_SEC, 'NvLink read bandwidth for link 30 in MiB/sec.') - GPM_METRIC_NVLINK_L30_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L30_TX_PER_SEC, 'NvLink write bandwidth for link 30 in MiB/sec.') - GPM_METRIC_NVLINK_L31_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L31_RX_PER_SEC, 'NvLink read bandwidth for link 31 in MiB/sec.') - GPM_METRIC_NVLINK_L31_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L31_TX_PER_SEC, 'NvLink write bandwidth for link 31 in MiB/sec.') - GPM_METRIC_NVLINK_L32_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L32_RX_PER_SEC, 'NvLink read bandwidth for link 32 in MiB/sec.') - GPM_METRIC_NVLINK_L32_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L32_TX_PER_SEC, 'NvLink write bandwidth for link 32 in MiB/sec.') - GPM_METRIC_NVLINK_L33_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L33_RX_PER_SEC, 'NvLink read bandwidth for link 33 in MiB/sec.') - GPM_METRIC_NVLINK_L33_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L33_TX_PER_SEC, 'NvLink write bandwidth for link 33 in MiB/sec.') - GPM_METRIC_NVLINK_L34_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L34_RX_PER_SEC, 'NvLink read bandwidth for link 34 in MiB/sec.') - GPM_METRIC_NVLINK_L34_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L34_TX_PER_SEC, 'NvLink write bandwidth for link 34 in MiB/sec.') - GPM_METRIC_NVLINK_L35_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L35_RX_PER_SEC, 'NvLink read bandwidth for link 35 in MiB/sec.') - GPM_METRIC_NVLINK_L35_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L35_TX_PER_SEC, 'NvLink write bandwidth for link 35 in MiB/sec.') + GPM_METRIC_C2C_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC + GPM_METRIC_C2C_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC + GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC + GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC + GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC + GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC + GPM_METRIC_HOSTMEM_CACHE_HIT = NVML_GPM_METRIC_HOSTMEM_CACHE_HIT + GPM_METRIC_HOSTMEM_CACHE_MISS = NVML_GPM_METRIC_HOSTMEM_CACHE_MISS + GPM_METRIC_PEERMEM_CACHE_HIT = NVML_GPM_METRIC_PEERMEM_CACHE_HIT + GPM_METRIC_PEERMEM_CACHE_MISS = NVML_GPM_METRIC_PEERMEM_CACHE_MISS + GPM_METRIC_DRAM_CACHE_HIT = NVML_GPM_METRIC_DRAM_CACHE_HIT + GPM_METRIC_DRAM_CACHE_MISS = NVML_GPM_METRIC_DRAM_CACHE_MISS + GPM_METRIC_NVENC_0_UTIL = NVML_GPM_METRIC_NVENC_0_UTIL + GPM_METRIC_NVENC_1_UTIL = NVML_GPM_METRIC_NVENC_1_UTIL + GPM_METRIC_NVENC_2_UTIL = NVML_GPM_METRIC_NVENC_2_UTIL + GPM_METRIC_NVENC_3_UTIL = NVML_GPM_METRIC_NVENC_3_UTIL + GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED + GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE + GPM_METRIC_GR0_CTXSW_REQUESTS = NVML_GPM_METRIC_GR0_CTXSW_REQUESTS + GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ + GPM_METRIC_GR0_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT + GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED + GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE + GPM_METRIC_GR1_CTXSW_REQUESTS = NVML_GPM_METRIC_GR1_CTXSW_REQUESTS + GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ + GPM_METRIC_GR1_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT + GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED + GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE + GPM_METRIC_GR2_CTXSW_REQUESTS = NVML_GPM_METRIC_GR2_CTXSW_REQUESTS + GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ + GPM_METRIC_GR2_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT + GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED + GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE + GPM_METRIC_GR3_CTXSW_REQUESTS = NVML_GPM_METRIC_GR3_CTXSW_REQUESTS + GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ + GPM_METRIC_GR3_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT + GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED + GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE + GPM_METRIC_GR4_CTXSW_REQUESTS = NVML_GPM_METRIC_GR4_CTXSW_REQUESTS + GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ + GPM_METRIC_GR4_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT + GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED + GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE + GPM_METRIC_GR5_CTXSW_REQUESTS = NVML_GPM_METRIC_GR5_CTXSW_REQUESTS + GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ + GPM_METRIC_GR5_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT + GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED + GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE + GPM_METRIC_GR6_CTXSW_REQUESTS = NVML_GPM_METRIC_GR6_CTXSW_REQUESTS + GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ + GPM_METRIC_GR6_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT + GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED + GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE + GPM_METRIC_GR7_CTXSW_REQUESTS = NVML_GPM_METRIC_GR7_CTXSW_REQUESTS + GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ + GPM_METRIC_GR7_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT + GPM_METRIC_NVLINK_L18_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L18_RX_PER_SEC + GPM_METRIC_NVLINK_L18_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L18_TX_PER_SEC + GPM_METRIC_NVLINK_L19_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L19_RX_PER_SEC + GPM_METRIC_NVLINK_L19_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L19_TX_PER_SEC + GPM_METRIC_NVLINK_L20_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L20_RX_PER_SEC + GPM_METRIC_NVLINK_L20_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L20_TX_PER_SEC + GPM_METRIC_NVLINK_L21_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L21_RX_PER_SEC + GPM_METRIC_NVLINK_L21_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L21_TX_PER_SEC + GPM_METRIC_NVLINK_L22_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L22_RX_PER_SEC + GPM_METRIC_NVLINK_L22_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L22_TX_PER_SEC + GPM_METRIC_NVLINK_L23_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L23_RX_PER_SEC + GPM_METRIC_NVLINK_L23_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L23_TX_PER_SEC + GPM_METRIC_NVLINK_L24_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L24_RX_PER_SEC + GPM_METRIC_NVLINK_L24_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L24_TX_PER_SEC + GPM_METRIC_NVLINK_L25_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L25_RX_PER_SEC + GPM_METRIC_NVLINK_L25_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L25_TX_PER_SEC + GPM_METRIC_NVLINK_L26_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L26_RX_PER_SEC + GPM_METRIC_NVLINK_L26_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L26_TX_PER_SEC + GPM_METRIC_NVLINK_L27_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L27_RX_PER_SEC + GPM_METRIC_NVLINK_L27_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L27_TX_PER_SEC + GPM_METRIC_NVLINK_L28_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L28_RX_PER_SEC + GPM_METRIC_NVLINK_L28_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L28_TX_PER_SEC + GPM_METRIC_NVLINK_L29_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L29_RX_PER_SEC + GPM_METRIC_NVLINK_L29_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L29_TX_PER_SEC + GPM_METRIC_NVLINK_L30_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L30_RX_PER_SEC + GPM_METRIC_NVLINK_L30_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L30_TX_PER_SEC + GPM_METRIC_NVLINK_L31_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L31_RX_PER_SEC + GPM_METRIC_NVLINK_L31_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L31_TX_PER_SEC + GPM_METRIC_NVLINK_L32_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L32_RX_PER_SEC + GPM_METRIC_NVLINK_L32_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L32_TX_PER_SEC + GPM_METRIC_NVLINK_L33_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L33_RX_PER_SEC + GPM_METRIC_NVLINK_L33_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L33_TX_PER_SEC + GPM_METRIC_NVLINK_L34_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L34_RX_PER_SEC + GPM_METRIC_NVLINK_L34_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L34_TX_PER_SEC + GPM_METRIC_NVLINK_L35_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L35_RX_PER_SEC + GPM_METRIC_NVLINK_L35_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L35_TX_PER_SEC GPM_METRIC_SM_CYCLES_ELAPSED = (NVML_GPM_METRIC_SM_CYCLES_ELAPSED, "The GPU's SM cycles elapsed since reboot.") GPM_METRIC_SM_CYCLES_ACTIVE = (NVML_GPM_METRIC_SM_CYCLES_ACTIVE, "The GPU's SM activity since reboot.") GPM_METRIC_MMA_CYCLES_ACTIVE = (NVML_GPM_METRIC_MMA_CYCLES_ACTIVE, "The GPU's SM MMA tensor activity since reboot.") @@ -1061,8 +1044,8 @@ class GpmMetricId(_cyb_FastEnum): GPM_METRIC_PCIE_RX = (NVML_GPM_METRIC_PCIE_RX, 'The PCIe RX traffic since reboot.') GPM_METRIC_INTEGER_CYCLES_ACTIVE = (NVML_GPM_METRIC_INTEGER_CYCLES_ACTIVE, "The GPU's SM integer activity since reboot.") GPM_METRIC_FP64_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP64_CYCLES_ACTIVE, "The GPU's SM FP64 activity since reboot.") - GPM_METRIC_FP32_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP32_CYCLES_ACTIVE, "The GPU's SM FP32 activity since reboot.") - GPM_METRIC_FP16_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP16_CYCLES_ACTIVE, "The GPU's SM FP16 activity since reboot.") + GPM_METRIC_FP32_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP32_CYCLES_ACTIVE, "The GPU's SM FP64 activity since reboot.") + GPM_METRIC_FP16_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP16_CYCLES_ACTIVE, "The GPU's SM FP64 activity since reboot.") GPM_METRIC_NVLINK_L0_RX = (NVML_GPM_METRIC_NVLINK_L0_RX, 'NvLink read for link 0 in bytes since reboot.') GPM_METRIC_NVLINK_L0_TX = (NVML_GPM_METRIC_NVLINK_L0_TX, 'NvLink write for link 0 in bytes since reboot.') GPM_METRIC_NVLINK_L1_RX = (NVML_GPM_METRIC_NVLINK_L1_RX, 'NvLink read for link 1 in bytes since reboot.') @@ -1135,153 +1118,9 @@ class GpmMetricId(_cyb_FastEnum): GPM_METRIC_NVLINK_L34_TX = (NVML_GPM_METRIC_NVLINK_L34_TX, 'NvLink write for link 34 in bytes since reboot.') GPM_METRIC_NVLINK_L35_RX = (NVML_GPM_METRIC_NVLINK_L35_RX, 'NvLink read for link 35 in bytes since reboot.') GPM_METRIC_NVLINK_L35_TX = (NVML_GPM_METRIC_NVLINK_L35_TX, 'NvLink write for link 35 in bytes since reboot.') - GPM_METRIC_NVLINK_L36_RX = (NVML_GPM_METRIC_NVLINK_L36_RX, 'NvLink read for link 36 in bytes since reboot.') - GPM_METRIC_NVLINK_L36_TX = (NVML_GPM_METRIC_NVLINK_L36_TX, 'NvLink write for link 36 in bytes since reboot.') - GPM_METRIC_NVLINK_L37_RX = (NVML_GPM_METRIC_NVLINK_L37_RX, 'NvLink read for link 37 in bytes since reboot.') - GPM_METRIC_NVLINK_L37_TX = (NVML_GPM_METRIC_NVLINK_L37_TX, 'NvLink write for link 37 in bytes since reboot.') - GPM_METRIC_NVLINK_L38_RX = (NVML_GPM_METRIC_NVLINK_L38_RX, 'NvLink read for link 38 in bytes since reboot.') - GPM_METRIC_NVLINK_L38_TX = (NVML_GPM_METRIC_NVLINK_L38_TX, 'NvLink write for link 38 in bytes since reboot.') - GPM_METRIC_NVLINK_L39_RX = (NVML_GPM_METRIC_NVLINK_L39_RX, 'NvLink read for link 39 in bytes since reboot.') - GPM_METRIC_NVLINK_L39_TX = (NVML_GPM_METRIC_NVLINK_L39_TX, 'NvLink write for link 39 in bytes since reboot.') - GPM_METRIC_NVLINK_L40_RX = (NVML_GPM_METRIC_NVLINK_L40_RX, 'NvLink read for link 40 in bytes since reboot.') - GPM_METRIC_NVLINK_L40_TX = (NVML_GPM_METRIC_NVLINK_L40_TX, 'NvLink write for link 40 in bytes since reboot.') - GPM_METRIC_NVLINK_L41_RX = (NVML_GPM_METRIC_NVLINK_L41_RX, 'NvLink read for link 41 in bytes since reboot.') - GPM_METRIC_NVLINK_L41_TX = (NVML_GPM_METRIC_NVLINK_L41_TX, 'NvLink write for link 41 in bytes since reboot.') - GPM_METRIC_NVLINK_L42_RX = (NVML_GPM_METRIC_NVLINK_L42_RX, 'NvLink read for link 42 in bytes since reboot.') - GPM_METRIC_NVLINK_L42_TX = (NVML_GPM_METRIC_NVLINK_L42_TX, 'NvLink write for link 42 in bytes since reboot.') - GPM_METRIC_NVLINK_L43_RX = (NVML_GPM_METRIC_NVLINK_L43_RX, 'NvLink read for link 43 in bytes since reboot.') - GPM_METRIC_NVLINK_L43_TX = (NVML_GPM_METRIC_NVLINK_L43_TX, 'NvLink write for link 43 in bytes since reboot.') - GPM_METRIC_NVLINK_L44_RX = (NVML_GPM_METRIC_NVLINK_L44_RX, 'NvLink read for link 44 in bytes since reboot.') - GPM_METRIC_NVLINK_L44_TX = (NVML_GPM_METRIC_NVLINK_L44_TX, 'NvLink write for link 44 in bytes since reboot.') - GPM_METRIC_NVLINK_L45_RX = (NVML_GPM_METRIC_NVLINK_L45_RX, 'NvLink read for link 45 in bytes since reboot.') - GPM_METRIC_NVLINK_L45_TX = (NVML_GPM_METRIC_NVLINK_L45_TX, 'NvLink write for link 45 in bytes since reboot.') - GPM_METRIC_NVLINK_L46_RX = (NVML_GPM_METRIC_NVLINK_L46_RX, 'NvLink read for link 46 in bytes since reboot.') - GPM_METRIC_NVLINK_L46_TX = (NVML_GPM_METRIC_NVLINK_L46_TX, 'NvLink write for link 46 in bytes since reboot.') - GPM_METRIC_NVLINK_L47_RX = (NVML_GPM_METRIC_NVLINK_L47_RX, 'NvLink read for link 47 in bytes since reboot.') - GPM_METRIC_NVLINK_L47_TX = (NVML_GPM_METRIC_NVLINK_L47_TX, 'NvLink write for link 47 in bytes since reboot.') - GPM_METRIC_NVLINK_L48_RX = (NVML_GPM_METRIC_NVLINK_L48_RX, 'NvLink read for link 48 in bytes since reboot.') - GPM_METRIC_NVLINK_L48_TX = (NVML_GPM_METRIC_NVLINK_L48_TX, 'NvLink write for link 48 in bytes since reboot.') - GPM_METRIC_NVLINK_L49_RX = (NVML_GPM_METRIC_NVLINK_L49_RX, 'NvLink read for link 49 in bytes since reboot.') - GPM_METRIC_NVLINK_L49_TX = (NVML_GPM_METRIC_NVLINK_L49_TX, 'NvLink write for link 49 in bytes since reboot.') - GPM_METRIC_NVLINK_L50_RX = (NVML_GPM_METRIC_NVLINK_L50_RX, 'NvLink read for link 50 in bytes since reboot.') - GPM_METRIC_NVLINK_L50_TX = (NVML_GPM_METRIC_NVLINK_L50_TX, 'NvLink write for link 50 in bytes since reboot.') - GPM_METRIC_NVLINK_L51_RX = (NVML_GPM_METRIC_NVLINK_L51_RX, 'NvLink read for link 51 in bytes since reboot.') - GPM_METRIC_NVLINK_L51_TX = (NVML_GPM_METRIC_NVLINK_L51_TX, 'NvLink write for link 51 in bytes since reboot.') - GPM_METRIC_NVLINK_L52_RX = (NVML_GPM_METRIC_NVLINK_L52_RX, 'NvLink read for link 52 in bytes since reboot.') - GPM_METRIC_NVLINK_L52_TX = (NVML_GPM_METRIC_NVLINK_L52_TX, 'NvLink write for link 52 in bytes since reboot.') - GPM_METRIC_NVLINK_L53_RX = (NVML_GPM_METRIC_NVLINK_L53_RX, 'NvLink read for link 53 in bytes since reboot.') - GPM_METRIC_NVLINK_L53_TX = (NVML_GPM_METRIC_NVLINK_L53_TX, 'NvLink write for link 53 in bytes since reboot.') - GPM_METRIC_NVLINK_L54_RX = (NVML_GPM_METRIC_NVLINK_L54_RX, 'NvLink read for link 54 in bytes since reboot.') - GPM_METRIC_NVLINK_L54_TX = (NVML_GPM_METRIC_NVLINK_L54_TX, 'NvLink write for link 54 in bytes since reboot.') - GPM_METRIC_NVLINK_L55_RX = (NVML_GPM_METRIC_NVLINK_L55_RX, 'NvLink read for link 55 in bytes since reboot.') - GPM_METRIC_NVLINK_L55_TX = (NVML_GPM_METRIC_NVLINK_L55_TX, 'NvLink write for link 55 in bytes since reboot.') - GPM_METRIC_NVLINK_L56_RX = (NVML_GPM_METRIC_NVLINK_L56_RX, 'NvLink read for link 56 in bytes since reboot.') - GPM_METRIC_NVLINK_L56_TX = (NVML_GPM_METRIC_NVLINK_L56_TX, 'NvLink write for link 56 in bytes since reboot.') - GPM_METRIC_NVLINK_L57_RX = (NVML_GPM_METRIC_NVLINK_L57_RX, 'NvLink read for link 57 in bytes since reboot.') - GPM_METRIC_NVLINK_L57_TX = (NVML_GPM_METRIC_NVLINK_L57_TX, 'NvLink write for link 57 in bytes since reboot.') - GPM_METRIC_NVLINK_L58_RX = (NVML_GPM_METRIC_NVLINK_L58_RX, 'NvLink read for link 58 in bytes since reboot.') - GPM_METRIC_NVLINK_L58_TX = (NVML_GPM_METRIC_NVLINK_L58_TX, 'NvLink write for link 58 in bytes since reboot.') - GPM_METRIC_NVLINK_L59_RX = (NVML_GPM_METRIC_NVLINK_L59_RX, 'NvLink read for link 59 in bytes since reboot.') - GPM_METRIC_NVLINK_L59_TX = (NVML_GPM_METRIC_NVLINK_L59_TX, 'NvLink write for link 59 in bytes since reboot.') - GPM_METRIC_NVLINK_L60_RX = (NVML_GPM_METRIC_NVLINK_L60_RX, 'NvLink read for link 60 in bytes since reboot.') - GPM_METRIC_NVLINK_L60_TX = (NVML_GPM_METRIC_NVLINK_L60_TX, 'NvLink write for link 60 in bytes since reboot.') - GPM_METRIC_NVLINK_L61_RX = (NVML_GPM_METRIC_NVLINK_L61_RX, 'NvLink read for link 61 in bytes since reboot.') - GPM_METRIC_NVLINK_L61_TX = (NVML_GPM_METRIC_NVLINK_L61_TX, 'NvLink write for link 61 in bytes since reboot.') - GPM_METRIC_NVLINK_L62_RX = (NVML_GPM_METRIC_NVLINK_L62_RX, 'NvLink read for link 62 in bytes since reboot.') - GPM_METRIC_NVLINK_L62_TX = (NVML_GPM_METRIC_NVLINK_L62_TX, 'NvLink write for link 62 in bytes since reboot.') - GPM_METRIC_NVLINK_L63_RX = (NVML_GPM_METRIC_NVLINK_L63_RX, 'NvLink read for link 63 in bytes since reboot.') - GPM_METRIC_NVLINK_L63_TX = (NVML_GPM_METRIC_NVLINK_L63_TX, 'NvLink write for link 63 in bytes since reboot.') - GPM_METRIC_NVLINK_L64_RX = (NVML_GPM_METRIC_NVLINK_L64_RX, 'NvLink read for link 64 in bytes since reboot.') - GPM_METRIC_NVLINK_L64_TX = (NVML_GPM_METRIC_NVLINK_L64_TX, 'NvLink write for link 64 in bytes since reboot.') - GPM_METRIC_NVLINK_L65_RX = (NVML_GPM_METRIC_NVLINK_L65_RX, 'NvLink read for link 65 in bytes since reboot.') - GPM_METRIC_NVLINK_L65_TX = (NVML_GPM_METRIC_NVLINK_L65_TX, 'NvLink write for link 65 in bytes since reboot.') - GPM_METRIC_NVLINK_L66_RX = (NVML_GPM_METRIC_NVLINK_L66_RX, 'NvLink read for link 66 in bytes since reboot.') - GPM_METRIC_NVLINK_L66_TX = (NVML_GPM_METRIC_NVLINK_L66_TX, 'NvLink write for link 66 in bytes since reboot.') - GPM_METRIC_NVLINK_L67_RX = (NVML_GPM_METRIC_NVLINK_L67_RX, 'NvLink read for link 67 in bytes since reboot.') - GPM_METRIC_NVLINK_L67_TX = (NVML_GPM_METRIC_NVLINK_L67_TX, 'NvLink write for link 67 in bytes since reboot.') - GPM_METRIC_NVLINK_L68_RX = (NVML_GPM_METRIC_NVLINK_L68_RX, 'NvLink read for link 68 in bytes since reboot.') - GPM_METRIC_NVLINK_L68_TX = (NVML_GPM_METRIC_NVLINK_L68_TX, 'NvLink write for link 68 in bytes since reboot.') - GPM_METRIC_NVLINK_L69_RX = (NVML_GPM_METRIC_NVLINK_L69_RX, 'NvLink read for link 69 in bytes since reboot.') - GPM_METRIC_NVLINK_L69_TX = (NVML_GPM_METRIC_NVLINK_L69_TX, 'NvLink write for link 69 in bytes since reboot.') - GPM_METRIC_NVLINK_L70_RX = (NVML_GPM_METRIC_NVLINK_L70_RX, 'NvLink read for link 70 in bytes since reboot.') - GPM_METRIC_NVLINK_L70_TX = (NVML_GPM_METRIC_NVLINK_L70_TX, 'NvLink write for link 70 in bytes since reboot.') - GPM_METRIC_NVLINK_L71_RX = (NVML_GPM_METRIC_NVLINK_L71_RX, 'NvLink read for link 71 in bytes since reboot.') - GPM_METRIC_NVLINK_L71_TX = (NVML_GPM_METRIC_NVLINK_L71_TX, 'NvLink write for link 71 in bytes since reboot.') - GPM_METRIC_NVLINK_L36_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC, 'NvLink read bandwidth for link 36 in MiB/sec.') - GPM_METRIC_NVLINK_L36_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC, 'NvLink write bandwidth for link 36 in MiB/sec.') - GPM_METRIC_NVLINK_L37_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC, 'NvLink read bandwidth for link 37 in MiB/sec.') - GPM_METRIC_NVLINK_L37_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC, 'NvLink write bandwidth for link 37 in MiB/sec.') - GPM_METRIC_NVLINK_L38_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC, 'NvLink read bandwidth for link 38 in MiB/sec.') - GPM_METRIC_NVLINK_L38_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC, 'NvLink write bandwidth for link 38 in MiB/sec.') - GPM_METRIC_NVLINK_L39_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC, 'NvLink read bandwidth for link 39 in MiB/sec.') - GPM_METRIC_NVLINK_L39_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC, 'NvLink write bandwidth for link 39 in MiB/sec.') - GPM_METRIC_NVLINK_L40_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC, 'NvLink read bandwidth for link 40 in MiB/sec.') - GPM_METRIC_NVLINK_L40_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC, 'NvLink write bandwidth for link 40 in MiB/sec.') - GPM_METRIC_NVLINK_L41_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC, 'NvLink read bandwidth for link 41 in MiB/sec.') - GPM_METRIC_NVLINK_L41_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC, 'NvLink write bandwidth for link 41 in MiB/sec.') - GPM_METRIC_NVLINK_L42_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC, 'NvLink read bandwidth for link 42 in MiB/sec.') - GPM_METRIC_NVLINK_L42_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC, 'NvLink write bandwidth for link 42 in MiB/sec.') - GPM_METRIC_NVLINK_L43_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC, 'NvLink read bandwidth for link 43 in MiB/sec.') - GPM_METRIC_NVLINK_L43_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC, 'NvLink write bandwidth for link 43 in MiB/sec.') - GPM_METRIC_NVLINK_L44_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC, 'NvLink read bandwidth for link 44 in MiB/sec.') - GPM_METRIC_NVLINK_L44_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC, 'NvLink write bandwidth for link 44 in MiB/sec.') - GPM_METRIC_NVLINK_L45_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC, 'NvLink read bandwidth for link 45 in MiB/sec.') - GPM_METRIC_NVLINK_L45_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC, 'NvLink write bandwidth for link 45 in MiB/sec.') - GPM_METRIC_NVLINK_L46_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC, 'NvLink read bandwidth for link 46 in MiB/sec.') - GPM_METRIC_NVLINK_L46_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC, 'NvLink write bandwidth for link 46 in MiB/sec.') - GPM_METRIC_NVLINK_L47_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC, 'NvLink read bandwidth for link 47 in MiB/sec.') - GPM_METRIC_NVLINK_L47_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC, 'NvLink write bandwidth for link 47 in MiB/sec.') - GPM_METRIC_NVLINK_L48_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC, 'NvLink read bandwidth for link 48 in MiB/sec.') - GPM_METRIC_NVLINK_L48_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC, 'NvLink write bandwidth for link 48 in MiB/sec.') - GPM_METRIC_NVLINK_L49_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC, 'NvLink read bandwidth for link 49 in MiB/sec.') - GPM_METRIC_NVLINK_L49_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC, 'NvLink write bandwidth for link 49 in MiB/sec.') - GPM_METRIC_NVLINK_L50_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC, 'NvLink read bandwidth for link 50 in MiB/sec.') - GPM_METRIC_NVLINK_L50_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC, 'NvLink write bandwidth for link 50 in MiB/sec.') - GPM_METRIC_NVLINK_L51_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC, 'NvLink read bandwidth for link 51 in MiB/sec.') - GPM_METRIC_NVLINK_L51_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC, 'NvLink write bandwidth for link 51 in MiB/sec.') - GPM_METRIC_NVLINK_L52_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC, 'NvLink read bandwidth for link 52 in MiB/sec.') - GPM_METRIC_NVLINK_L52_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC, 'NvLink write bandwidth for link 52 in MiB/sec.') - GPM_METRIC_NVLINK_L53_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC, 'NvLink read bandwidth for link 53 in MiB/sec.') - GPM_METRIC_NVLINK_L53_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC, 'NvLink write bandwidth for link 53 in MiB/sec.') - GPM_METRIC_NVLINK_L54_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC, 'NvLink read bandwidth for link 54 in MiB/sec.') - GPM_METRIC_NVLINK_L54_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC, 'NvLink write bandwidth for link 54 in MiB/sec.') - GPM_METRIC_NVLINK_L55_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC, 'NvLink read bandwidth for link 55 in MiB/sec.') - GPM_METRIC_NVLINK_L55_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC, 'NvLink write bandwidth for link 55 in MiB/sec.') - GPM_METRIC_NVLINK_L56_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC, 'NvLink read bandwidth for link 56 in MiB/sec.') - GPM_METRIC_NVLINK_L56_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC, 'NvLink write bandwidth for link 56 in MiB/sec.') - GPM_METRIC_NVLINK_L57_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC, 'NvLink read bandwidth for link 57 in MiB/sec.') - GPM_METRIC_NVLINK_L57_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC, 'NvLink write bandwidth for link 57 in MiB/sec.') - GPM_METRIC_NVLINK_L58_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC, 'NvLink read bandwidth for link 58 in MiB/sec.') - GPM_METRIC_NVLINK_L58_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC, 'NvLink write bandwidth for link 58 in MiB/sec.') - GPM_METRIC_NVLINK_L59_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC, 'NvLink read bandwidth for link 59 in MiB/sec.') - GPM_METRIC_NVLINK_L59_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC, 'NvLink write bandwidth for link 59 in MiB/sec.') - GPM_METRIC_NVLINK_L60_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC, 'NvLink read bandwidth for link 60 in MiB/sec.') - GPM_METRIC_NVLINK_L60_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC, 'NvLink write bandwidth for link 60 in MiB/sec.') - GPM_METRIC_NVLINK_L61_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC, 'NvLink read bandwidth for link 61 in MiB/sec.') - GPM_METRIC_NVLINK_L61_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC, 'NvLink write bandwidth for link 61 in MiB/sec.') - GPM_METRIC_NVLINK_L62_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC, 'NvLink read bandwidth for link 62 in MiB/sec.') - GPM_METRIC_NVLINK_L62_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC, 'NvLink write bandwidth for link 62 in MiB/sec.') - GPM_METRIC_NVLINK_L63_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC, 'NvLink read bandwidth for link 63 in MiB/sec.') - GPM_METRIC_NVLINK_L63_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC, 'NvLink write bandwidth for link 63 in MiB/sec.') - GPM_METRIC_NVLINK_L64_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC, 'NvLink read bandwidth for link 64 in MiB/sec.') - GPM_METRIC_NVLINK_L64_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC, 'NvLink write bandwidth for link 64 in MiB/sec.') - GPM_METRIC_NVLINK_L65_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC, 'NvLink read bandwidth for link 65 in MiB/sec.') - GPM_METRIC_NVLINK_L65_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC, 'NvLink write bandwidth for link 65 in MiB/sec.') - GPM_METRIC_NVLINK_L66_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC, 'NvLink read bandwidth for link 66 in MiB/sec.') - GPM_METRIC_NVLINK_L66_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC, 'NvLink write bandwidth for link 66 in MiB/sec.') - GPM_METRIC_NVLINK_L67_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC, 'NvLink read bandwidth for link 67 in MiB/sec.') - GPM_METRIC_NVLINK_L67_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC, 'NvLink write bandwidth for link 67 in MiB/sec.') - GPM_METRIC_NVLINK_L68_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC, 'NvLink read bandwidth for link 68 in MiB/sec.') - GPM_METRIC_NVLINK_L68_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC, 'NvLink write bandwidth for link 68 in MiB/sec.') - GPM_METRIC_NVLINK_L69_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC, 'NvLink read bandwidth for link 69 in MiB/sec.') - GPM_METRIC_NVLINK_L69_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC, 'NvLink write bandwidth for link 69 in MiB/sec.') - GPM_METRIC_NVLINK_L70_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC, 'NvLink read bandwidth for link 70 in MiB/sec.') - GPM_METRIC_NVLINK_L70_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC, 'NvLink write bandwidth for link 70 in MiB/sec.') - GPM_METRIC_NVLINK_L71_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC, 'NvLink read bandwidth for link 71 in MiB/sec.') - GPM_METRIC_NVLINK_L71_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC, 'NvLink write bandwidth for link 71 in MiB/sec.') GPM_METRIC_MAX = (NVML_GPM_METRIC_MAX, 'Maximum value above +1.') -class PowerProfileType(_cyb_FastEnum): +class PowerProfileType(_FastEnum): """ See `nvmlPowerProfileType_t`. """ @@ -1300,19 +1139,9 @@ class PowerProfileType(_cyb_FastEnum): POWER_PROFILE_SYNC_BALANCED = NVML_POWER_PROFILE_SYNC_BALANCED POWER_PROFILE_HPC = NVML_POWER_PROFILE_HPC POWER_PROFILE_MIG = NVML_POWER_PROFILE_MIG - POWER_PROFILE_MAX_Q_1 = NVML_POWER_PROFILE_MAX_Q_1 - POWER_PROFILE_NETWORK_BOUND = NVML_POWER_PROFILE_NETWORK_BOUND - POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE = NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE - POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE = NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE - POWER_PROFILE_LOW_LATENCY_INFERENCE = NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE - POWER_PROFILE_TRAINING = NVML_POWER_PROFILE_TRAINING - POWER_PROFILE_INFERENCE = NVML_POWER_PROFILE_INFERENCE - POWER_PROFILE_MAX_Q_2 = NVML_POWER_PROFILE_MAX_Q_2 - POWER_PROFILE_MAX_Q_3 = NVML_POWER_PROFILE_MAX_Q_3 - POWER_PROFILE_LOW_PRIORITY_BACKGROUND = NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND POWER_PROFILE_MAX = NVML_POWER_PROFILE_MAX -class DeviceAddressingModeType(_cyb_FastEnum): +class DeviceAddressingModeType(_FastEnum): """ Enum to represent device addressing mode values @@ -1322,37 +1151,29 @@ class DeviceAddressingModeType(_cyb_FastEnum): DEVICE_ADDRESSING_MODE_HMM = (NVML_DEVICE_ADDRESSING_MODE_HMM, 'Heterogeneous Memory Management mode.') DEVICE_ADDRESSING_MODE_ATS = (NVML_DEVICE_ADDRESSING_MODE_ATS, 'Address Translation Services mode.') -class PRMCounterId(_cyb_FastEnum): +class PRMCounterId(_FastEnum): """ PRM Counter IDs See `nvmlPRMCounterId_t`. """ - NONE = (NVML_PRM_COUNTER_ID_NONE, 'Sentinel.') - PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS, 'PPCNT group 0x12, link_down_events.') - PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS, 'PPCNT group 0x12, successful_recovery_events.') - PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS, 'PPCNT group 0x1A, total_successful_recovery_events.') - PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY, 'PPCNT group 0x1A, time_since_last_recovery.') - PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES, 'PPCNT group 0x1A, time_between_last_two_recoveries.') - PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY, 'PPCNT group 0x1A, time_in_last_host_serdes_feq_recovery.') - PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY, 'PPCNT group 0x1A, total_time_in_host_serdes_feq_recovery.') - PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT, 'PPCNT group 0x1A, total_host_serdes_feq_recovery_count.') - PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT, 'PPCNT group 0x1A, total_host_serdes_feq_successful_recovery_count.') - PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT, 'PPCNT group 0x1A, last_host_serdes_feq_attempts_count.') - PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS, 'PPCNT group 0x1A, last_successful_recovery_step_attempts.') - PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME, 'PPCNT group 0x1A, last_successful_recovery_time.') - PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME, 'PPCNT group 0x1A, total_successful_recovery_time.') - PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT = (NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT, 'PPCNT group 0x20, port_xmit_wait.') - PPCNT_PLR_RCV_CODES = (NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES, 'PPCNT group 0x22, plr_rcv_codes.') - PPCNT_PLR_RCV_CODE_ERR = (NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR, 'PPCNT group 0x22, plr_rcv_code_err.') - PPCNT_PLR_RCV_UNCORRECTABLE_CODE = (NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE, 'PPCNT group 0x22, plr_rcv_uncorrectable_code.') - PPCNT_PLR_XMIT_CODES = (NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES, 'PPCNT group 0x22, plr_xmit_codes.') - PPCNT_PLR_XMIT_RETRY_CODES = (NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES, 'PPCNT group 0x22, plr_xmit_retry_codes.') - PPCNT_PLR_XMIT_RETRY_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS, 'PPCNT group 0x22, plr_xmit_retry_events.') - PPCNT_PLR_SYNC_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS, 'PPCNT group 0x22, plr_sync_events.') - PPRM_OPER_RECOVERY = (NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY, 'PPRM, oper_recovery.') - -class PowerProfileOperation(_cyb_FastEnum): + NONE = NVML_PRM_COUNTER_ID_NONE + PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS + PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS + PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS + PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY = NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY + PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES = NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES + PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT = NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT + PPCNT_PLR_RCV_CODES = NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES + PPCNT_PLR_RCV_CODE_ERR = NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR + PPCNT_PLR_RCV_UNCORRECTABLE_CODE = NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE + PPCNT_PLR_XMIT_CODES = NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES + PPCNT_PLR_XMIT_RETRY_CODES = NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES + PPCNT_PLR_XMIT_RETRY_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS + PPCNT_PLR_SYNC_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS + PPRM_OPER_RECOVERY = NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY + +class PowerProfileOperation(_FastEnum): """ Enum for operation to perform on the requested profiles @@ -1363,7 +1184,7 @@ class PowerProfileOperation(_cyb_FastEnum): SET_AND_OVERWRITE = (NVML_POWER_PROFILE_OPERATION_SET_AND_OVERWRITE, 'Overwrite the existing list of requested profiles with just the requested profiles.') MAX = (NVML_POWER_PROFILE_OPERATION_MAX, 'Max value above +1.') -class ProcessMode(_cyb_FastEnum): +class ProcessMode(_FastEnum): """ Enum to represent process mode. @@ -1375,7 +1196,7 @@ class ProcessMode(_cyb_FastEnum): ALL = (NVML_PROCESS_MODE_ALL, 'All processes running on the GPU (compute, graphics, MPS, and other types).') MAX = (NVML_PROCESS_MODE_MAX, 'Maximum value for bounds checking.') -class CPERType(_cyb_FastEnum): +class CPERType(_FastEnum): """ Bitmask of CPER record types. Multiple values may be combined to request records from several sources in one call. @@ -1384,64 +1205,6 @@ class CPERType(_cyb_FastEnum): """ CPER_ACCESS_TYPE_GPU = (NVML_CPER_ACCESS_TYPE_GPU, 'Access GPU CPER records.') -class GpuOperationalEventLogLevel(_cyb_FastEnum): - """ - Log-level values used by GPU Operational Events.These values are used - both for event reporting in `nvmlEventData_v2_t` and for subscription - filtering in `nvmlGpuOperationalEventConfig_v1_t`. Higher numeric - values represent more selective log levels. - `NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL` disables log-level filtering - when used as a subscription threshold. Event data may contain newer - log-level values that are not named in this header; clients should - handle unrecognized numeric values. - - See `nvmlGpuOperationalEventLogLevel_t`. - """ - ALL = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL, 'Matches all GPU Operational Event log levels.') - TELEMETRY = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY, 'High-volume telemetry events.') - DIAG = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG, 'Diagnostic events.') - NOTICE = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE, 'Notable operational events.') - WARNING = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING, 'Warning events.') - ERROR = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR, 'Error events.') - -class OperationalEventSeverity(_cyb_FastEnum): - """ - Severity values used by Operational Events.These values are used both - for event reporting in `nvmlEventData_v2_t` and for subscription - filtering in `nvmlGpuOperationalEventConfig_v1_t`. Higher numeric - values represent more selective severities. - `NVML_OPERATIONAL_EVENT_SEVERITY_ALL` disables severity filtering when - used as a subscription threshold. Event data may contain newer severity - values that are not named in this header; clients should handle - unrecognized numeric values. - - See `nvmlOperationalEventSeverity_t`. - """ - ALL = (NVML_OPERATIONAL_EVENT_SEVERITY_ALL, 'Matches all Operational Event severities.') - INFORMATIONAL = (NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL, 'Informational event.') - CORRECTED = (NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED, 'Corrected error event.') - RECOVERABLE = (NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE, 'Recoverable error event.') - FATAL = (NVML_OPERATIONAL_EVENT_SEVERITY_FATAL, 'Fatal error event.') - -class EventDataType(_cyb_FastEnum): - """ - Event data formats returned by `nvmlEventSetWait_v3`. - - See `nvmlEventDataType_t`. - """ - EVENT = (NVML_EVENT_DATA_TYPE_NVML_EVENT, 'NVML event-bit data. `eventType` contains an NVML event bit.') - GPU_OPERATIONAL_EVENT = (NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT, 'Structured GPU Operational Event data.') - -class NvlinkTelemetrySampleType(_cyb_FastEnum): - """ - Per-link NVLink telemetry sample types. - - See `nvmlNvlinkTelemetrySampleType_t`. - """ - THROUGHPUT_RAW_TX = (NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX, 'Raw TX flit counter for a single link.') - THROUGHPUT_RAW_RX = (NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX, 'Raw RX flit counter for a single link.') - COUNT = (NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT, 'Number of valid sample types.') - class AffinityScope(_FastEnum): NODE = (0, "Scope of NUMA node for affinity queries") @@ -2025,8 +1788,6 @@ class ClocksEventReasons(_FastEnum): THROTTLE_REASON_HW_THERMAL_SLOWDOWN = 0x0000000000000040 THROTTLE_REASON_HW_POWER_BRAKE_SLOWDOWN = 0x0000000000000080 EVENT_REASON_DISPLAY_CLOCK_SETTING = 0x0000000000000100 - EVENT_REASON_BOARD_LIMIT = 0x0000000000000200 - EVENT_REASON_RELIABILITY = 0x0000000000000400 EVENT_REASON_NONE = 0x0000000000000000 @@ -2419,7 +2180,7 @@ cdef class PciInfoExt_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") self._owner = None @@ -2431,7 +2192,7 @@ cdef class PciInfoExt_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PciInfoExt_v1 object at {hex(id(self))}>" @@ -2452,20 +2213,20 @@ cdef class PciInfoExt_v1: if not isinstance(other, PciInfoExt_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2563,7 +2324,7 @@ cdef class PciInfoExt_v1: @property def bus_id(self): """~_numpy.int8: (array of length 32).The tuple domain:bus:device.function PCI identifier (& NULL terminator).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) + return cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2573,12 +2334,12 @@ cdef class PciInfoExt_v1: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].busId), ptr, 32) + memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfoExt_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) + return __from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) @staticmethod def from_data(data): @@ -2587,7 +2348,7 @@ cdef class PciInfoExt_v1: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_ext_v1_dtype` holding the data. """ - return _cyb_from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) + return __from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2602,10 +2363,10 @@ cdef class PciInfoExt_v1: raise ValueError("ptr must not be null (0)") cdef PciInfoExt_v1 obj = PciInfoExt_v1.__new__(PciInfoExt_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) + obj._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) obj._owner = None obj._owned = True else: @@ -2648,7 +2409,7 @@ cdef class PciInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfo_t)) + self._ptr = calloc(1, sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") self._owner = None @@ -2660,7 +2421,7 @@ cdef class PciInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PciInfo object at {hex(id(self))}>" @@ -2681,20 +2442,20 @@ cdef class PciInfo: if not isinstance(other, PciInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) + self._ptr = malloc(sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2704,7 +2465,7 @@ cdef class PciInfo: @property def bus_id_legacy(self): """~_numpy.int8: (array of length 16).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) + return cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) @bus_id_legacy.setter def bus_id_legacy(self, val): @@ -2714,7 +2475,7 @@ cdef class PciInfo: if len(buf) >= 16: raise ValueError("String too long for field bus_id_legacy, max length is 15") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].busIdLegacy), ptr, 16) + memcpy((self._ptr[0].busIdLegacy), ptr, 16) @property def domain(self): @@ -2774,7 +2535,7 @@ cdef class PciInfo: @property def bus_id(self): """~_numpy.int8: (array of length 32).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) + return cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2784,12 +2545,12 @@ cdef class PciInfo: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].busId), ptr, 32) + memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) + return __from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) @staticmethod def from_data(data): @@ -2798,7 +2559,7 @@ cdef class PciInfo: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_dtype` holding the data. """ - return _cyb_from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) + return __from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2813,10 +2574,10 @@ cdef class PciInfo: raise ValueError("ptr must not be null (0)") cdef PciInfo obj = PciInfo.__new__(PciInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) + obj._ptr = malloc(sizeof(nvmlPciInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) obj._owner = None obj._owned = True else: @@ -2854,7 +2615,7 @@ cdef class Utilization: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlUtilization_t)) + self._ptr = calloc(1, sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") self._owner = None @@ -2866,7 +2627,7 @@ cdef class Utilization: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Utilization object at {hex(id(self))}>" @@ -2887,20 +2648,20 @@ cdef class Utilization: if not isinstance(other, Utilization): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) + self._ptr = malloc(sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2932,7 +2693,7 @@ cdef class Utilization: @staticmethod def from_buffer(buffer): """Create an Utilization instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) + return __from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) @staticmethod def from_data(data): @@ -2941,7 +2702,7 @@ cdef class Utilization: Args: data (_numpy.ndarray): a single-element array of dtype `utilization_dtype` holding the data. """ - return _cyb_from_data(data, "utilization_dtype", utilization_dtype, Utilization) + return __from_data(data, "utilization_dtype", utilization_dtype, Utilization) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2956,10 +2717,10 @@ cdef class Utilization: raise ValueError("ptr must not be null (0)") cdef Utilization obj = Utilization.__new__(Utilization) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) + obj._ptr = malloc(sizeof(nvmlUtilization_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Utilization") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) obj._owner = None obj._owned = True else: @@ -2998,7 +2759,7 @@ cdef class Memory: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_t)) + self._ptr = calloc(1, sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") self._owner = None @@ -3010,7 +2771,7 @@ cdef class Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Memory object at {hex(id(self))}>" @@ -3031,20 +2792,20 @@ cdef class Memory: if not isinstance(other, Memory): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) + self._ptr = malloc(sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3087,7 +2848,7 @@ cdef class Memory: @staticmethod def from_buffer(buffer): """Create an Memory instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlMemory_t), Memory) + return __from_buffer(buffer, sizeof(nvmlMemory_t), Memory) @staticmethod def from_data(data): @@ -3096,7 +2857,7 @@ cdef class Memory: Args: data (_numpy.ndarray): a single-element array of dtype `memory_dtype` holding the data. """ - return _cyb_from_data(data, "memory_dtype", memory_dtype, Memory) + return __from_data(data, "memory_dtype", memory_dtype, Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3111,10 +2872,10 @@ cdef class Memory: raise ValueError("ptr must not be null (0)") cdef Memory obj = Memory.__new__(Memory) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) + obj._ptr = malloc(sizeof(nvmlMemory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) obj._owner = None obj._owned = True else: @@ -3155,7 +2916,7 @@ cdef class Memory_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_v2_t)) + self._ptr = calloc(1, sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") self._owner = None @@ -3167,7 +2928,7 @@ cdef class Memory_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Memory_v2 object at {hex(id(self))}>" @@ -3188,20 +2949,20 @@ cdef class Memory_v2: if not isinstance(other, Memory_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) + self._ptr = malloc(sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3266,7 +3027,7 @@ cdef class Memory_v2: @staticmethod def from_buffer(buffer): """Create an Memory_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) + return __from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) @staticmethod def from_data(data): @@ -3275,7 +3036,7 @@ cdef class Memory_v2: Args: data (_numpy.ndarray): a single-element array of dtype `memory_v2_dtype` holding the data. """ - return _cyb_from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) + return __from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3290,10 +3051,10 @@ cdef class Memory_v2: raise ValueError("ptr must not be null (0)") cdef Memory_v2 obj = Memory_v2.__new__(Memory_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) + obj._ptr = malloc(sizeof(nvmlMemory_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) obj._owner = None obj._owned = True else: @@ -3332,7 +3093,7 @@ cdef class BAR1Memory: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlBAR1Memory_t)) + self._ptr = calloc(1, sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") self._owner = None @@ -3344,7 +3105,7 @@ cdef class BAR1Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.BAR1Memory object at {hex(id(self))}>" @@ -3365,20 +3126,20 @@ cdef class BAR1Memory: if not isinstance(other, BAR1Memory): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) + self._ptr = malloc(sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3421,7 +3182,7 @@ cdef class BAR1Memory: @staticmethod def from_buffer(buffer): """Create an BAR1Memory instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) + return __from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) @staticmethod def from_data(data): @@ -3430,7 +3191,7 @@ cdef class BAR1Memory: Args: data (_numpy.ndarray): a single-element array of dtype `ba_r1memory_dtype` holding the data. """ - return _cyb_from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) + return __from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3445,10 +3206,10 @@ cdef class BAR1Memory: raise ValueError("ptr must not be null (0)") cdef BAR1Memory obj = BAR1Memory.__new__(BAR1Memory) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) + obj._ptr = malloc(sizeof(nvmlBAR1Memory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) obj._owner = None obj._owned = True else: @@ -3524,10 +3285,10 @@ cdef class ProcessInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3627,8 +3388,8 @@ cdef class ProcessInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessInfo obj = ProcessInfo.__new__(ProcessInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_info_dtype) obj._data = data.view(_numpy.recarray) @@ -3702,10 +3463,10 @@ cdef class ProcessDetail_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3816,8 +3577,8 @@ cdef class ProcessDetail_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessDetail_v1 obj = ProcessDetail_v1.__new__(ProcessDetail_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessDetail_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_detail_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -3859,7 +3620,7 @@ cdef class DeviceAttributes: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAttributes_t)) + self._ptr = calloc(1, sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") self._owner = None @@ -3871,7 +3632,7 @@ cdef class DeviceAttributes: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DeviceAttributes object at {hex(id(self))}>" @@ -3892,20 +3653,20 @@ cdef class DeviceAttributes: if not isinstance(other, DeviceAttributes): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) + self._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4014,7 +3775,7 @@ cdef class DeviceAttributes: @staticmethod def from_buffer(buffer): """Create an DeviceAttributes instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) + return __from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) @staticmethod def from_data(data): @@ -4023,7 +3784,7 @@ cdef class DeviceAttributes: Args: data (_numpy.ndarray): a single-element array of dtype `device_attributes_dtype` holding the data. """ - return _cyb_from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) + return __from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4038,10 +3799,10 @@ cdef class DeviceAttributes: raise ValueError("ptr must not be null (0)") cdef DeviceAttributes obj = DeviceAttributes.__new__(DeviceAttributes) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) + obj._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) obj._owner = None obj._owned = True else: @@ -4078,7 +3839,7 @@ cdef class C2cModeInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") self._owner = None @@ -4090,7 +3851,7 @@ cdef class C2cModeInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.C2cModeInfo_v1 object at {hex(id(self))}>" @@ -4111,20 +3872,20 @@ cdef class C2cModeInfo_v1: if not isinstance(other, C2cModeInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4145,7 +3906,7 @@ cdef class C2cModeInfo_v1: @staticmethod def from_buffer(buffer): """Create an C2cModeInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) + return __from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) @staticmethod def from_data(data): @@ -4154,7 +3915,7 @@ cdef class C2cModeInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `c2c_mode_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) + return __from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4169,10 +3930,10 @@ cdef class C2cModeInfo_v1: raise ValueError("ptr must not be null (0)") cdef C2cModeInfo_v1 obj = C2cModeInfo_v1.__new__(C2cModeInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -4213,7 +3974,7 @@ cdef class RowRemapperHistogramValues: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") self._owner = None @@ -4225,7 +3986,7 @@ cdef class RowRemapperHistogramValues: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.RowRemapperHistogramValues object at {hex(id(self))}>" @@ -4246,20 +4007,20 @@ cdef class RowRemapperHistogramValues: if not isinstance(other, RowRemapperHistogramValues): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4324,7 +4085,7 @@ cdef class RowRemapperHistogramValues: @staticmethod def from_buffer(buffer): """Create an RowRemapperHistogramValues instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) + return __from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) @staticmethod def from_data(data): @@ -4333,7 +4094,7 @@ cdef class RowRemapperHistogramValues: Args: data (_numpy.ndarray): a single-element array of dtype `row_remapper_histogram_values_dtype` holding the data. """ - return _cyb_from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) + return __from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4348,10 +4109,10 @@ cdef class RowRemapperHistogramValues: raise ValueError("ptr must not be null (0)") cdef RowRemapperHistogramValues obj = RowRemapperHistogramValues.__new__(RowRemapperHistogramValues) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + obj._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) obj._owner = None obj._owned = True else: @@ -4425,10 +4186,10 @@ cdef class BridgeChipInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def type(self): @@ -4506,8 +4267,8 @@ cdef class BridgeChipInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef BridgeChipInfo obj = BridgeChipInfo.__new__(BridgeChipInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlBridgeChipInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=bridge_chip_info_dtype) obj._data = data.view(_numpy.recarray) @@ -4541,7 +4302,7 @@ cdef class Value: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlValue_t)) + self._ptr = calloc(1, sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") self._owner = None @@ -4553,7 +4314,7 @@ cdef class Value: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Value object at {hex(id(self))}>" @@ -4574,20 +4335,20 @@ cdef class Value: if not isinstance(other, Value): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlValue_t)) + self._ptr = malloc(sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4674,7 +4435,7 @@ cdef class Value: @staticmethod def from_buffer(buffer): """Create an Value instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlValue_t), Value) + return __from_buffer(buffer, sizeof(nvmlValue_t), Value) @staticmethod def from_data(data): @@ -4683,7 +4444,7 @@ cdef class Value: Args: data (_numpy.ndarray): a single-element array of dtype `value_dtype` holding the data. """ - return _cyb_from_data(data, "value_dtype", value_dtype, Value) + return __from_data(data, "value_dtype", value_dtype, Value) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4698,10 +4459,10 @@ cdef class Value: raise ValueError("ptr must not be null (0)") cdef Value obj = Value.__new__(Value) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlValue_t)) + obj._ptr = malloc(sizeof(nvmlValue_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Value") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) obj._owner = None obj._owned = True else: @@ -4742,7 +4503,7 @@ cdef class _py_anon_pod0: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -4754,7 +4515,7 @@ cdef class _py_anon_pod0: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod0 object at {hex(id(self))}>" @@ -4775,20 +4536,20 @@ cdef class _py_anon_pod0: if not isinstance(other, _py_anon_pod0): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod0), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -4853,7 +4614,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) @staticmethod def from_data(data): @@ -4862,7 +4623,7 @@ cdef class _py_anon_pod0: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod0_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) + return __from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4877,10 +4638,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) obj._owner = None obj._owned = True else: @@ -4920,7 +4681,7 @@ cdef class CoolerInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") self._owner = None @@ -4932,7 +4693,7 @@ cdef class CoolerInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.CoolerInfo_v1 object at {hex(id(self))}>" @@ -4953,20 +4714,20 @@ cdef class CoolerInfo_v1: if not isinstance(other, CoolerInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5020,7 +4781,7 @@ cdef class CoolerInfo_v1: @staticmethod def from_buffer(buffer): """Create an CoolerInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) + return __from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) @staticmethod def from_data(data): @@ -5029,7 +4790,7 @@ cdef class CoolerInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `cooler_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) + return __from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5044,10 +4805,10 @@ cdef class CoolerInfo_v1: raise ValueError("ptr must not be null (0)") cdef CoolerInfo_v1 obj = CoolerInfo_v1.__new__(CoolerInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -5121,10 +4882,10 @@ cdef class ClkMonFaultInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def clk_api_domain(self): @@ -5202,8 +4963,8 @@ cdef class ClkMonFaultInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ClkMonFaultInfo obj = ClkMonFaultInfo.__new__(ClkMonFaultInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlClkMonFaultInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=clk_mon_fault_info_dtype) obj._data = data.view(_numpy.recarray) @@ -5242,7 +5003,7 @@ cdef class ClockOffset_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlClockOffset_v1_t)) + self._ptr = calloc(1, sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") self._owner = None @@ -5254,7 +5015,7 @@ cdef class ClockOffset_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ClockOffset_v1 object at {hex(id(self))}>" @@ -5275,20 +5036,20 @@ cdef class ClockOffset_v1: if not isinstance(other, ClockOffset_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) + self._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5364,7 +5125,7 @@ cdef class ClockOffset_v1: @staticmethod def from_buffer(buffer): """Create an ClockOffset_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) + return __from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) @staticmethod def from_data(data): @@ -5373,7 +5134,7 @@ cdef class ClockOffset_v1: Args: data (_numpy.ndarray): a single-element array of dtype `clock_offset_v1_dtype` holding the data. """ - return _cyb_from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) + return __from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5388,10 +5149,10 @@ cdef class ClockOffset_v1: raise ValueError("ptr must not be null (0)") cdef ClockOffset_v1 obj = ClockOffset_v1.__new__(ClockOffset_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) + obj._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) obj._owner = None obj._owned = True else: @@ -5469,10 +5230,10 @@ cdef class ProcessUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -5594,8 +5355,8 @@ cdef class ProcessUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationSample obj = ProcessUtilizationSample.__new__(ProcessUtilizationSample) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -5672,10 +5433,10 @@ cdef class ProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -5819,8 +5580,8 @@ cdef class ProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationInfo_v1 obj = ProcessUtilizationInfo_v1.__new__(ProcessUtilizationInfo_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -5866,7 +5627,7 @@ cdef class EccSramErrorStatus_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") self._owner = None @@ -5878,7 +5639,7 @@ cdef class EccSramErrorStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.EccSramErrorStatus_v1 object at {hex(id(self))}>" @@ -5899,20 +5660,20 @@ cdef class EccSramErrorStatus_v1: if not isinstance(other, EccSramErrorStatus_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6065,7 +5826,7 @@ cdef class EccSramErrorStatus_v1: @staticmethod def from_buffer(buffer): """Create an EccSramErrorStatus_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) + return __from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) @staticmethod def from_data(data): @@ -6074,7 +5835,7 @@ cdef class EccSramErrorStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_error_status_v1_dtype` holding the data. """ - return _cyb_from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) + return __from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6089,10 +5850,10 @@ cdef class EccSramErrorStatus_v1: raise ValueError("ptr must not be null (0)") cdef EccSramErrorStatus_v1 obj = EccSramErrorStatus_v1.__new__(EccSramErrorStatus_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + obj._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -6136,7 +5897,7 @@ cdef class PlatformInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") self._owner = None @@ -6148,7 +5909,7 @@ cdef class PlatformInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v1 object at {hex(id(self))}>" @@ -6169,20 +5930,20 @@ cdef class PlatformInfo_v1: if not isinstance(other, PlatformInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6203,7 +5964,7 @@ cdef class PlatformInfo_v1: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -6213,14 +5974,14 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def rack_guid(self): """~_numpy.uint8: (array of length 16).GUID of the rack containing this GPU (for Blackwell rackGuid is 13 bytes so indices 13-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].rackGuid)) return _numpy.asarray(arr) @@ -6230,9 +5991,9 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field rack_guid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_physical_slot_number(self): @@ -6292,7 +6053,7 @@ cdef class PlatformInfo_v1: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) + return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) @staticmethod def from_data(data): @@ -6301,7 +6062,7 @@ cdef class PlatformInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) + return __from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6316,10 +6077,10 @@ cdef class PlatformInfo_v1: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v1 obj = PlatformInfo_v1.__new__(PlatformInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -6363,7 +6124,7 @@ cdef class PlatformInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") self._owner = None @@ -6375,7 +6136,7 @@ cdef class PlatformInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v2 object at {hex(id(self))}>" @@ -6396,20 +6157,20 @@ cdef class PlatformInfo_v2: if not isinstance(other, PlatformInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6430,7 +6191,7 @@ cdef class PlatformInfo_v2: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -6440,14 +6201,14 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_serial_number(self): """~_numpy.uint8: (array of length 16).Serial number of the chassis containing this GPU (for Blackwell it is 13 bytes so indices 13-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].chassisSerialNumber)) return _numpy.asarray(arr) @@ -6457,9 +6218,9 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field chassis_serial_number, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) @property def slot_number(self): @@ -6519,7 +6280,7 @@ cdef class PlatformInfo_v2: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) + return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) @staticmethod def from_data(data): @@ -6528,7 +6289,7 @@ cdef class PlatformInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) + return __from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6543,10 +6304,10 @@ cdef class PlatformInfo_v2: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v2 obj = PlatformInfo_v2.__new__(PlatformInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -6586,7 +6347,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -6598,7 +6359,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -6619,20 +6380,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod1), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -6686,7 +6447,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) @staticmethod def from_data(data): @@ -6695,7 +6456,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6710,10 +6471,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) obj._owner = None obj._owned = True else: @@ -6755,7 +6516,7 @@ cdef class VgpuPlacementList_v2: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") self._owner = None @@ -6768,7 +6529,7 @@ cdef class VgpuPlacementList_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuPlacementList_v2 object at {hex(id(self))}>" @@ -6789,20 +6550,20 @@ cdef class VgpuPlacementList_v2: if not isinstance(other, VgpuPlacementList_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6836,7 +6597,7 @@ cdef class VgpuPlacementList_v2: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -6844,7 +6605,7 @@ cdef class VgpuPlacementList_v2: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuPlacementList_v2 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].count = len(val) @@ -6864,7 +6625,7 @@ cdef class VgpuPlacementList_v2: @staticmethod def from_buffer(buffer): """Create an VgpuPlacementList_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) @staticmethod def from_data(data): @@ -6873,7 +6634,7 @@ cdef class VgpuPlacementList_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_placement_list_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) + return __from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6888,10 +6649,10 @@ cdef class VgpuPlacementList_v2: raise ValueError("ptr must not be null (0)") cdef VgpuPlacementList_v2 obj = VgpuPlacementList_v2.__new__(VgpuPlacementList_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) obj._owner = None obj._owned = True else: @@ -6930,7 +6691,7 @@ cdef class VgpuTypeBar1Info_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") self._owner = None @@ -6942,7 +6703,7 @@ cdef class VgpuTypeBar1Info_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeBar1Info_v1 object at {hex(id(self))}>" @@ -6963,20 +6724,20 @@ cdef class VgpuTypeBar1Info_v1: if not isinstance(other, VgpuTypeBar1Info_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7008,7 +6769,7 @@ cdef class VgpuTypeBar1Info_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeBar1Info_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) @staticmethod def from_data(data): @@ -7017,7 +6778,7 @@ cdef class VgpuTypeBar1Info_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_bar1info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) + return __from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7032,10 +6793,10 @@ cdef class VgpuTypeBar1Info_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeBar1Info_v1 obj = VgpuTypeBar1Info_v1.__new__(VgpuTypeBar1Info_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) obj._owner = None obj._owned = True else: @@ -7117,10 +6878,10 @@ cdef class VgpuProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def process_name(self): @@ -7284,8 +7045,8 @@ cdef class VgpuProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuProcessUtilizationInfo_v1 obj = VgpuProcessUtilizationInfo_v1.__new__(VgpuProcessUtilizationInfo_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -7320,7 +7081,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7332,7 +7093,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -7353,20 +7114,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod2), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7398,7 +7159,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) @staticmethod def from_data(data): @@ -7407,7 +7168,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7422,10 +7183,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) obj._owner = None obj._owned = True else: @@ -7462,7 +7223,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7474,7 +7235,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -7495,20 +7256,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod3), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7529,7 +7290,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) @staticmethod def from_data(data): @@ -7538,7 +7299,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7553,10 +7314,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) obj._owner = None obj._owned = True else: @@ -7634,10 +7395,10 @@ cdef class VgpuSchedulerLogEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -7759,8 +7520,8 @@ cdef class VgpuSchedulerLogEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry obj = VgpuSchedulerLogEntry.__new__(VgpuSchedulerLogEntry) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -7795,7 +7556,7 @@ cdef class _py_anon_pod4: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7807,7 +7568,7 @@ cdef class _py_anon_pod4: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod4 object at {hex(id(self))}>" @@ -7828,20 +7589,20 @@ cdef class _py_anon_pod4: if not isinstance(other, _py_anon_pod4): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod4), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7873,7 +7634,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) @staticmethod def from_data(data): @@ -7882,7 +7643,7 @@ cdef class _py_anon_pod4: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod4_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) + return __from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7897,10 +7658,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) obj._owner = None obj._owned = True else: @@ -7937,7 +7698,7 @@ cdef class _py_anon_pod5: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7949,7 +7710,7 @@ cdef class _py_anon_pod5: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod5 object at {hex(id(self))}>" @@ -7970,20 +7731,20 @@ cdef class _py_anon_pod5: if not isinstance(other, _py_anon_pod5): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod5), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -8004,7 +7765,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) @staticmethod def from_data(data): @@ -8013,7 +7774,7 @@ cdef class _py_anon_pod5: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod5_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) + return __from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8028,10 +7789,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) obj._owner = None obj._owned = True else: @@ -8075,7 +7836,7 @@ cdef class VgpuSchedulerCapabilities: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") self._owner = None @@ -8087,7 +7848,7 @@ cdef class VgpuSchedulerCapabilities: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerCapabilities object at {hex(id(self))}>" @@ -8108,20 +7869,20 @@ cdef class VgpuSchedulerCapabilities: if not isinstance(other, VgpuSchedulerCapabilities): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8131,7 +7892,7 @@ cdef class VgpuSchedulerCapabilities: @property def supported_schedulers(self): """~_numpy.uint32: (array of length 3).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].supportedSchedulers)) return _numpy.asarray(arr) @@ -8141,9 +7902,9 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("This VgpuSchedulerCapabilities instance is read-only") if len(val) != 3: raise ValueError(f"Expected length { 3 } for field supported_schedulers, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - _cyb_memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) + memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) @property def max_timeslice(self): @@ -8225,7 +7986,7 @@ cdef class VgpuSchedulerCapabilities: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerCapabilities instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) @staticmethod def from_data(data): @@ -8234,7 +7995,7 @@ cdef class VgpuSchedulerCapabilities: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_capabilities_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) + return __from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8249,10 +8010,10 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerCapabilities obj = VgpuSchedulerCapabilities.__new__(VgpuSchedulerCapabilities) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) obj._owner = None obj._owned = True else: @@ -8295,7 +8056,7 @@ cdef class VgpuLicenseExpiry: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") self._owner = None @@ -8307,7 +8068,7 @@ cdef class VgpuLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseExpiry object at {hex(id(self))}>" @@ -8328,20 +8089,20 @@ cdef class VgpuLicenseExpiry: if not isinstance(other, VgpuLicenseExpiry): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8428,7 +8189,7 @@ cdef class VgpuLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseExpiry instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) + return __from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) @staticmethod def from_data(data): @@ -8437,7 +8198,7 @@ cdef class VgpuLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_expiry_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) + return __from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8452,10 +8213,10 @@ cdef class VgpuLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseExpiry obj = VgpuLicenseExpiry.__new__(VgpuLicenseExpiry) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + obj._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8498,7 +8259,7 @@ cdef class GridLicenseExpiry: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = calloc(1, sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") self._owner = None @@ -8510,7 +8271,7 @@ cdef class GridLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GridLicenseExpiry object at {hex(id(self))}>" @@ -8531,20 +8292,20 @@ cdef class GridLicenseExpiry: if not isinstance(other, GridLicenseExpiry): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8631,7 +8392,7 @@ cdef class GridLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an GridLicenseExpiry instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) + return __from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) @staticmethod def from_data(data): @@ -8640,7 +8401,7 @@ cdef class GridLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `grid_license_expiry_dtype` holding the data. """ - return _cyb_from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) + return __from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8655,10 +8416,10 @@ cdef class GridLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef GridLicenseExpiry obj = GridLicenseExpiry.__new__(GridLicenseExpiry) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) + obj._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8698,7 +8459,7 @@ cdef class VgpuTypeIdInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") self._owner = None @@ -8711,7 +8472,7 @@ cdef class VgpuTypeIdInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeIdInfo_v1 object at {hex(id(self))}>" @@ -8732,20 +8493,20 @@ cdef class VgpuTypeIdInfo_v1: if not isinstance(other, VgpuTypeIdInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8768,7 +8529,7 @@ cdef class VgpuTypeIdInfo_v1: """int: OUT: List of vGPU type IDs.""" if self._ptr[0].vgpuTypeIds == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuTypeIds) return _numpy.asarray(arr) @@ -8776,7 +8537,7 @@ cdef class VgpuTypeIdInfo_v1: def vgpu_type_ids(self, val): if self._readonly: raise ValueError("This VgpuTypeIdInfo_v1 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuTypeIds = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8785,7 +8546,7 @@ cdef class VgpuTypeIdInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeIdInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) @staticmethod def from_data(data): @@ -8794,7 +8555,7 @@ cdef class VgpuTypeIdInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_id_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) + return __from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8809,10 +8570,10 @@ cdef class VgpuTypeIdInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeIdInfo_v1 obj = VgpuTypeIdInfo_v1.__new__(VgpuTypeIdInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8853,7 +8614,7 @@ cdef class ActiveVgpuInstanceInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") self._owner = None @@ -8866,7 +8627,7 @@ cdef class ActiveVgpuInstanceInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ActiveVgpuInstanceInfo_v1 object at {hex(id(self))}>" @@ -8887,20 +8648,20 @@ cdef class ActiveVgpuInstanceInfo_v1: if not isinstance(other, ActiveVgpuInstanceInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8923,7 +8684,7 @@ cdef class ActiveVgpuInstanceInfo_v1: """int: IN/OUT: list of active vGPU instances.""" if self._ptr[0].vgpuInstances == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuInstances) return _numpy.asarray(arr) @@ -8931,7 +8692,7 @@ cdef class ActiveVgpuInstanceInfo_v1: def vgpu_instances(self, val): if self._readonly: raise ValueError("This ActiveVgpuInstanceInfo_v1 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuInstances = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8940,7 +8701,7 @@ cdef class ActiveVgpuInstanceInfo_v1: @staticmethod def from_buffer(buffer): """Create an ActiveVgpuInstanceInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) + return __from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) @staticmethod def from_data(data): @@ -8949,7 +8710,7 @@ cdef class ActiveVgpuInstanceInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `active_vgpu_instance_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) + return __from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8964,10 +8725,10 @@ cdef class ActiveVgpuInstanceInfo_v1: raise ValueError("ptr must not be null (0)") cdef ActiveVgpuInstanceInfo_v1 obj = ActiveVgpuInstanceInfo_v1.__new__(ActiveVgpuInstanceInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -9010,7 +8771,7 @@ cdef class VgpuCreatablePlacementInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") self._owner = None @@ -9023,7 +8784,7 @@ cdef class VgpuCreatablePlacementInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuCreatablePlacementInfo_v1 object at {hex(id(self))}>" @@ -9044,20 +8805,20 @@ cdef class VgpuCreatablePlacementInfo_v1: if not isinstance(other, VgpuCreatablePlacementInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9102,7 +8863,7 @@ cdef class VgpuCreatablePlacementInfo_v1: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -9110,7 +8871,7 @@ cdef class VgpuCreatablePlacementInfo_v1: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuCreatablePlacementInfo_v1 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].placementSize = len(val) @@ -9119,7 +8880,7 @@ cdef class VgpuCreatablePlacementInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuCreatablePlacementInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) @staticmethod def from_data(data): @@ -9128,7 +8889,7 @@ cdef class VgpuCreatablePlacementInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_creatable_placement_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) + return __from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9143,10 +8904,10 @@ cdef class VgpuCreatablePlacementInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuCreatablePlacementInfo_v1 obj = VgpuCreatablePlacementInfo_v1.__new__(VgpuCreatablePlacementInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -9221,10 +8982,10 @@ cdef class HwbcEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def hwbc_id(self): @@ -9300,8 +9061,8 @@ cdef class HwbcEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef HwbcEntry obj = HwbcEntry.__new__(HwbcEntry) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlHwbcEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=hwbc_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -9336,7 +9097,7 @@ cdef class LedState: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlLedState_t)) + self._ptr = calloc(1, sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") self._owner = None @@ -9348,7 +9109,7 @@ cdef class LedState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.LedState object at {hex(id(self))}>" @@ -9369,20 +9130,20 @@ cdef class LedState: if not isinstance(other, LedState): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) + self._ptr = malloc(sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9392,7 +9153,7 @@ cdef class LedState: @property def cause(self): """~_numpy.int8: (array of length 256).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].cause) + return cpython.PyUnicode_FromString(self._ptr[0].cause) @cause.setter def cause(self, val): @@ -9402,7 +9163,7 @@ cdef class LedState: if len(buf) >= 256: raise ValueError("String too long for field cause, max length is 255") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].cause), ptr, 256) + memcpy((self._ptr[0].cause), ptr, 256) @property def color(self): @@ -9418,7 +9179,7 @@ cdef class LedState: @staticmethod def from_buffer(buffer): """Create an LedState instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlLedState_t), LedState) + return __from_buffer(buffer, sizeof(nvmlLedState_t), LedState) @staticmethod def from_data(data): @@ -9427,7 +9188,7 @@ cdef class LedState: Args: data (_numpy.ndarray): a single-element array of dtype `led_state_dtype` holding the data. """ - return _cyb_from_data(data, "led_state_dtype", led_state_dtype, LedState) + return __from_data(data, "led_state_dtype", led_state_dtype, LedState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9442,10 +9203,10 @@ cdef class LedState: raise ValueError("ptr must not be null (0)") cdef LedState obj = LedState.__new__(LedState) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) + obj._ptr = malloc(sizeof(nvmlLedState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating LedState") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) obj._owner = None obj._owned = True else: @@ -9485,7 +9246,7 @@ cdef class UnitInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlUnitInfo_t)) + self._ptr = calloc(1, sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") self._owner = None @@ -9497,7 +9258,7 @@ cdef class UnitInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.UnitInfo object at {hex(id(self))}>" @@ -9518,20 +9279,20 @@ cdef class UnitInfo: if not isinstance(other, UnitInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) + self._ptr = malloc(sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9541,7 +9302,7 @@ cdef class UnitInfo: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -9551,12 +9312,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @property def id(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].id) + return cpython.PyUnicode_FromString(self._ptr[0].id) @id.setter def id(self, val): @@ -9566,12 +9327,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field id, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].id), ptr, 96) + memcpy((self._ptr[0].id), ptr, 96) @property def serial(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].serial) + return cpython.PyUnicode_FromString(self._ptr[0].serial) @serial.setter def serial(self, val): @@ -9581,12 +9342,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field serial, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].serial), ptr, 96) + memcpy((self._ptr[0].serial), ptr, 96) @property def firmware_version(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) + return cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) @firmware_version.setter def firmware_version(self, val): @@ -9596,12 +9357,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field firmware_version, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].firmwareVersion), ptr, 96) + memcpy((self._ptr[0].firmwareVersion), ptr, 96) @staticmethod def from_buffer(buffer): """Create an UnitInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) + return __from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) @staticmethod def from_data(data): @@ -9610,7 +9371,7 @@ cdef class UnitInfo: Args: data (_numpy.ndarray): a single-element array of dtype `unit_info_dtype` holding the data. """ - return _cyb_from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) + return __from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9625,10 +9386,10 @@ cdef class UnitInfo: raise ValueError("ptr must not be null (0)") cdef UnitInfo obj = UnitInfo.__new__(UnitInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) + obj._ptr = malloc(sizeof(nvmlUnitInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) obj._owner = None obj._owned = True else: @@ -9668,7 +9429,7 @@ cdef class PSUInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPSUInfo_t)) + self._ptr = calloc(1, sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") self._owner = None @@ -9680,7 +9441,7 @@ cdef class PSUInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PSUInfo object at {hex(id(self))}>" @@ -9701,20 +9462,20 @@ cdef class PSUInfo: if not isinstance(other, PSUInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) + self._ptr = malloc(sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9724,7 +9485,7 @@ cdef class PSUInfo: @property def state(self): """~_numpy.int8: (array of length 256).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].state) + return cpython.PyUnicode_FromString(self._ptr[0].state) @state.setter def state(self, val): @@ -9734,7 +9495,7 @@ cdef class PSUInfo: if len(buf) >= 256: raise ValueError("String too long for field state, max length is 255") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].state), ptr, 256) + memcpy((self._ptr[0].state), ptr, 256) @property def current(self): @@ -9772,7 +9533,7 @@ cdef class PSUInfo: @staticmethod def from_buffer(buffer): """Create an PSUInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) + return __from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) @staticmethod def from_data(data): @@ -9781,7 +9542,7 @@ cdef class PSUInfo: Args: data (_numpy.ndarray): a single-element array of dtype `psu_info_dtype` holding the data. """ - return _cyb_from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) + return __from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9796,10 +9557,10 @@ cdef class PSUInfo: raise ValueError("ptr must not be null (0)") cdef PSUInfo obj = PSUInfo.__new__(PSUInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) + obj._ptr = malloc(sizeof(nvmlPSUInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) obj._owner = None obj._owned = True else: @@ -9873,10 +9634,10 @@ cdef class UnitFanInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def speed(self): @@ -9954,8 +9715,8 @@ cdef class UnitFanInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef UnitFanInfo obj = UnitFanInfo.__new__(UnitFanInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlUnitFanInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=unit_fan_info_dtype) obj._data = data.view(_numpy.recarray) @@ -9993,7 +9754,7 @@ cdef class EventData: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlEventData_t)) + self._ptr = calloc(1, sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") self._owner = None @@ -10005,7 +9766,7 @@ cdef class EventData: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.EventData object at {hex(id(self))}>" @@ -10026,20 +9787,20 @@ cdef class EventData: if not isinstance(other, EventData): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) + self._ptr = malloc(sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10104,7 +9865,7 @@ cdef class EventData: @staticmethod def from_buffer(buffer): """Create an EventData instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlEventData_t), EventData) + return __from_buffer(buffer, sizeof(nvmlEventData_t), EventData) @staticmethod def from_data(data): @@ -10113,7 +9874,7 @@ cdef class EventData: Args: data (_numpy.ndarray): a single-element array of dtype `event_data_dtype` holding the data. """ - return _cyb_from_data(data, "event_data_dtype", event_data_dtype, EventData) + return __from_data(data, "event_data_dtype", event_data_dtype, EventData) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10128,10 +9889,10 @@ cdef class EventData: raise ValueError("ptr must not be null (0)") cdef EventData obj = EventData.__new__(EventData) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) + obj._ptr = malloc(sizeof(nvmlEventData_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EventData") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) obj._owner = None obj._owned = True else: @@ -10205,10 +9966,10 @@ cdef class SystemEventData_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def event_type(self): @@ -10286,8 +10047,8 @@ cdef class SystemEventData_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef SystemEventData_v1 obj = SystemEventData_v1.__new__(SystemEventData_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSystemEventData_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=system_event_data_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -10327,7 +10088,7 @@ cdef class AccountingStats: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlAccountingStats_t)) + self._ptr = calloc(1, sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") self._owner = None @@ -10339,7 +10100,7 @@ cdef class AccountingStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.AccountingStats object at {hex(id(self))}>" @@ -10360,20 +10121,20 @@ cdef class AccountingStats: if not isinstance(other, AccountingStats): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) + self._ptr = malloc(sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10449,7 +10210,7 @@ cdef class AccountingStats: @staticmethod def from_buffer(buffer): """Create an AccountingStats instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) + return __from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) @staticmethod def from_data(data): @@ -10458,7 +10219,7 @@ cdef class AccountingStats: Args: data (_numpy.ndarray): a single-element array of dtype `accounting_stats_dtype` holding the data. """ - return _cyb_from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) + return __from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10473,10 +10234,10 @@ cdef class AccountingStats: raise ValueError("ptr must not be null (0)") cdef AccountingStats obj = AccountingStats.__new__(AccountingStats) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) + obj._ptr = malloc(sizeof(nvmlAccountingStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) obj._owner = None obj._owned = True else: @@ -10556,10 +10317,10 @@ cdef class EncoderSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10703,8 +10464,8 @@ cdef class EncoderSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EncoderSessionInfo obj = EncoderSessionInfo.__new__(EncoderSessionInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEncoderSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=encoder_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10740,7 +10501,7 @@ cdef class FBCStats: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlFBCStats_t)) + self._ptr = calloc(1, sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") self._owner = None @@ -10752,7 +10513,7 @@ cdef class FBCStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.FBCStats object at {hex(id(self))}>" @@ -10773,20 +10534,20 @@ cdef class FBCStats: if not isinstance(other, FBCStats): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) + self._ptr = malloc(sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10829,7 +10590,7 @@ cdef class FBCStats: @staticmethod def from_buffer(buffer): """Create an FBCStats instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) + return __from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) @staticmethod def from_data(data): @@ -10838,7 +10599,7 @@ cdef class FBCStats: Args: data (_numpy.ndarray): a single-element array of dtype `fbc_stats_dtype` holding the data. """ - return _cyb_from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) + return __from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10853,10 +10614,10 @@ cdef class FBCStats: raise ValueError("ptr must not be null (0)") cdef FBCStats obj = FBCStats.__new__(FBCStats) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) + obj._ptr = malloc(sizeof(nvmlFBCStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating FBCStats") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) obj._owner = None obj._owned = True else: @@ -10940,10 +10701,10 @@ cdef class FBCSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -11131,8 +10892,8 @@ cdef class FBCSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FBCSessionInfo obj = FBCSessionInfo.__new__(FBCSessionInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFBCSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=fbc_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -11167,7 +10928,7 @@ cdef class ConfComputeSystemCaps: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") self._owner = None @@ -11179,7 +10940,7 @@ cdef class ConfComputeSystemCaps: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemCaps object at {hex(id(self))}>" @@ -11200,20 +10961,20 @@ cdef class ConfComputeSystemCaps: if not isinstance(other, ConfComputeSystemCaps): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11245,7 +11006,7 @@ cdef class ConfComputeSystemCaps: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemCaps instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) + return __from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) @staticmethod def from_data(data): @@ -11254,7 +11015,7 @@ cdef class ConfComputeSystemCaps: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_caps_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) + return __from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11269,10 +11030,10 @@ cdef class ConfComputeSystemCaps: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemCaps obj = ConfComputeSystemCaps.__new__(ConfComputeSystemCaps) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) obj._owner = None obj._owned = True else: @@ -11311,7 +11072,7 @@ cdef class ConfComputeSystemState: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemState_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") self._owner = None @@ -11323,7 +11084,7 @@ cdef class ConfComputeSystemState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemState object at {hex(id(self))}>" @@ -11344,20 +11105,20 @@ cdef class ConfComputeSystemState: if not isinstance(other, ConfComputeSystemState): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) + self._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11400,7 +11161,7 @@ cdef class ConfComputeSystemState: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemState instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) + return __from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) @staticmethod def from_data(data): @@ -11409,7 +11170,7 @@ cdef class ConfComputeSystemState: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_state_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) + return __from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11424,10 +11185,10 @@ cdef class ConfComputeSystemState: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemState obj = ConfComputeSystemState.__new__(ConfComputeSystemState) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) obj._owner = None obj._owned = True else: @@ -11468,7 +11229,7 @@ cdef class SystemConfComputeSettings_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") self._owner = None @@ -11480,7 +11241,7 @@ cdef class SystemConfComputeSettings_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.SystemConfComputeSettings_v1 object at {hex(id(self))}>" @@ -11501,20 +11262,20 @@ cdef class SystemConfComputeSettings_v1: if not isinstance(other, SystemConfComputeSettings_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11579,7 +11340,7 @@ cdef class SystemConfComputeSettings_v1: @staticmethod def from_buffer(buffer): """Create an SystemConfComputeSettings_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) + return __from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) @staticmethod def from_data(data): @@ -11588,7 +11349,7 @@ cdef class SystemConfComputeSettings_v1: Args: data (_numpy.ndarray): a single-element array of dtype `system_conf_compute_settings_v1_dtype` holding the data. """ - return _cyb_from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) + return __from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11603,10 +11364,10 @@ cdef class SystemConfComputeSettings_v1: raise ValueError("ptr must not be null (0)") cdef SystemConfComputeSettings_v1 obj = SystemConfComputeSettings_v1.__new__(SystemConfComputeSettings_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + obj._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) obj._owner = None obj._owned = True else: @@ -11644,7 +11405,7 @@ cdef class ConfComputeMemSizeInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") self._owner = None @@ -11656,7 +11417,7 @@ cdef class ConfComputeMemSizeInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeMemSizeInfo object at {hex(id(self))}>" @@ -11677,20 +11438,20 @@ cdef class ConfComputeMemSizeInfo: if not isinstance(other, ConfComputeMemSizeInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11722,7 +11483,7 @@ cdef class ConfComputeMemSizeInfo: @staticmethod def from_buffer(buffer): """Create an ConfComputeMemSizeInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) + return __from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) @staticmethod def from_data(data): @@ -11731,7 +11492,7 @@ cdef class ConfComputeMemSizeInfo: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_mem_size_info_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) + return __from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11746,10 +11507,10 @@ cdef class ConfComputeMemSizeInfo: raise ValueError("ptr must not be null (0)") cdef ConfComputeMemSizeInfo obj = ConfComputeMemSizeInfo.__new__(ConfComputeMemSizeInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) obj._owner = None obj._owned = True else: @@ -11789,7 +11550,7 @@ cdef class ConfComputeGpuCertificate: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") self._owner = None @@ -11801,7 +11562,7 @@ cdef class ConfComputeGpuCertificate: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuCertificate object at {hex(id(self))}>" @@ -11822,20 +11583,20 @@ cdef class ConfComputeGpuCertificate: if not isinstance(other, ConfComputeGpuCertificate): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11847,7 +11608,7 @@ cdef class ConfComputeGpuCertificate: """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].certChainSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].certChain)) return _numpy.asarray(arr) @@ -11860,16 +11621,16 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].certChainSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_cert_chain(self): """~_numpy.uint8: (array of length 5120).""" if self._ptr[0].attestationCertChainSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationCertChain)) return _numpy.asarray(arr) @@ -11882,14 +11643,14 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].attestationCertChainSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuCertificate instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) + return __from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) @staticmethod def from_data(data): @@ -11898,7 +11659,7 @@ cdef class ConfComputeGpuCertificate: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_certificate_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) + return __from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11913,10 +11674,10 @@ cdef class ConfComputeGpuCertificate: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuCertificate obj = ConfComputeGpuCertificate.__new__(ConfComputeGpuCertificate) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) obj._owner = None obj._owned = True else: @@ -11958,7 +11719,7 @@ cdef class ConfComputeGpuAttestationReport: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") self._owner = None @@ -11970,7 +11731,7 @@ cdef class ConfComputeGpuAttestationReport: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuAttestationReport object at {hex(id(self))}>" @@ -11991,20 +11752,20 @@ cdef class ConfComputeGpuAttestationReport: if not isinstance(other, ConfComputeGpuAttestationReport): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12025,7 +11786,7 @@ cdef class ConfComputeGpuAttestationReport: @property def nonce(self): """~_numpy.uint8: (array of length 32).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].nonce)) return _numpy.asarray(arr) @@ -12035,16 +11796,16 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("This ConfComputeGpuAttestationReport instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field nonce, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_report(self): """~_numpy.uint8: (array of length 8192).""" if self._ptr[0].attestationReportSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationReport)) return _numpy.asarray(arr) @@ -12057,16 +11818,16 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].attestationReportSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @property def cec_attestation_report(self): """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].cecAttestationReportSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].cecAttestationReport)) return _numpy.asarray(arr) @@ -12079,14 +11840,14 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].cecAttestationReportSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuAttestationReport instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) + return __from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) @staticmethod def from_data(data): @@ -12095,7 +11856,7 @@ cdef class ConfComputeGpuAttestationReport: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_attestation_report_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) + return __from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12110,10 +11871,10 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuAttestationReport obj = ConfComputeGpuAttestationReport.__new__(ConfComputeGpuAttestationReport) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) obj._owner = None obj._owned = True else: @@ -12155,7 +11916,7 @@ cdef class GpuFabricInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") self._owner = None @@ -12167,7 +11928,7 @@ cdef class GpuFabricInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v2 object at {hex(id(self))}>" @@ -12188,20 +11949,20 @@ cdef class GpuFabricInfo_v2: if not isinstance(other, GpuFabricInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12222,7 +11983,7 @@ cdef class GpuFabricInfo_v2: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -12232,9 +11993,9 @@ cdef class GpuFabricInfo_v2: raise ValueError("This GpuFabricInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -12283,7 +12044,7 @@ cdef class GpuFabricInfo_v2: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) + return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) @staticmethod def from_data(data): @@ -12292,7 +12053,7 @@ cdef class GpuFabricInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) + return __from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12307,10 +12068,10 @@ cdef class GpuFabricInfo_v2: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v2 obj = GpuFabricInfo_v2.__new__(GpuFabricInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -12349,7 +12110,7 @@ cdef class NvlinkSupportedBwModes_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") self._owner = None @@ -12361,7 +12122,7 @@ cdef class NvlinkSupportedBwModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSupportedBwModes_v1 object at {hex(id(self))}>" @@ -12382,20 +12143,20 @@ cdef class NvlinkSupportedBwModes_v1: if not isinstance(other, NvlinkSupportedBwModes_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12418,7 +12179,7 @@ cdef class NvlinkSupportedBwModes_v1: """~_numpy.uint8: (array of length 23).""" if self._ptr[0].totalBwModes == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].bwModes)) return _numpy.asarray(arr) @@ -12431,14 +12192,14 @@ cdef class NvlinkSupportedBwModes_v1: self._ptr[0].totalBwModes = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an NvlinkSupportedBwModes_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) + return __from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) @staticmethod def from_data(data): @@ -12447,7 +12208,7 @@ cdef class NvlinkSupportedBwModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_supported_bw_modes_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) + return __from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12462,10 +12223,10 @@ cdef class NvlinkSupportedBwModes_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSupportedBwModes_v1 obj = NvlinkSupportedBwModes_v1.__new__(NvlinkSupportedBwModes_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) obj._owner = None obj._owned = True else: @@ -12504,7 +12265,7 @@ cdef class NvlinkGetBwMode_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") self._owner = None @@ -12516,7 +12277,7 @@ cdef class NvlinkGetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkGetBwMode_v1 object at {hex(id(self))}>" @@ -12537,20 +12298,20 @@ cdef class NvlinkGetBwMode_v1: if not isinstance(other, NvlinkGetBwMode_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12593,7 +12354,7 @@ cdef class NvlinkGetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkGetBwMode_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) + return __from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) @staticmethod def from_data(data): @@ -12602,7 +12363,7 @@ cdef class NvlinkGetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_get_bw_mode_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) + return __from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12617,10 +12378,10 @@ cdef class NvlinkGetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkGetBwMode_v1 obj = NvlinkGetBwMode_v1.__new__(NvlinkGetBwMode_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12659,7 +12420,7 @@ cdef class NvlinkSetBwMode_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") self._owner = None @@ -12671,7 +12432,7 @@ cdef class NvlinkSetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSetBwMode_v1 object at {hex(id(self))}>" @@ -12692,20 +12453,20 @@ cdef class NvlinkSetBwMode_v1: if not isinstance(other, NvlinkSetBwMode_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12748,7 +12509,7 @@ cdef class NvlinkSetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkSetBwMode_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) + return __from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) @staticmethod def from_data(data): @@ -12757,7 +12518,7 @@ cdef class NvlinkSetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_set_bw_mode_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) + return __from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12772,10 +12533,10 @@ cdef class NvlinkSetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSetBwMode_v1 obj = NvlinkSetBwMode_v1.__new__(NvlinkSetBwMode_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12813,7 +12574,7 @@ cdef class VgpuVersion: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuVersion_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") self._owner = None @@ -12825,7 +12586,7 @@ cdef class VgpuVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuVersion object at {hex(id(self))}>" @@ -12846,20 +12607,20 @@ cdef class VgpuVersion: if not isinstance(other, VgpuVersion): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) + self._ptr = malloc(sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12891,7 +12652,7 @@ cdef class VgpuVersion: @staticmethod def from_buffer(buffer): """Create an VgpuVersion instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) + return __from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) @staticmethod def from_data(data): @@ -12900,7 +12661,7 @@ cdef class VgpuVersion: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_version_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) + return __from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12915,10 +12676,10 @@ cdef class VgpuVersion: raise ValueError("ptr must not be null (0)") cdef VgpuVersion obj = VgpuVersion.__new__(VgpuVersion) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) + obj._ptr = malloc(sizeof(nvmlVgpuVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) obj._owner = None obj._owned = True else: @@ -12964,7 +12725,7 @@ cdef class VgpuMetadata: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuMetadata_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") self._owner = None @@ -12976,7 +12737,7 @@ cdef class VgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuMetadata object at {hex(id(self))}>" @@ -12997,20 +12758,20 @@ cdef class VgpuMetadata: if not isinstance(other, VgpuMetadata): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) + self._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13053,7 +12814,7 @@ cdef class VgpuMetadata: @property def guest_driver_version(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) + return cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) @guest_driver_version.setter def guest_driver_version(self, val): @@ -13063,12 +12824,12 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field guest_driver_version, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].guestDriverVersion), ptr, 80) + memcpy((self._ptr[0].guestDriverVersion), ptr, 80) @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -13078,7 +12839,7 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def vgpu_virtualization_caps(self): @@ -13116,7 +12877,7 @@ cdef class VgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -13126,12 +12887,12 @@ cdef class VgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) + memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuMetadata instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) + return __from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) @staticmethod def from_data(data): @@ -13140,7 +12901,7 @@ cdef class VgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_metadata_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) + return __from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13155,10 +12916,10 @@ cdef class VgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuMetadata obj = VgpuMetadata.__new__(VgpuMetadata) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) + obj._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -13196,7 +12957,7 @@ cdef class VgpuPgpuCompatibility: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") self._owner = None @@ -13208,7 +12969,7 @@ cdef class VgpuPgpuCompatibility: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuCompatibility object at {hex(id(self))}>" @@ -13229,20 +12990,20 @@ cdef class VgpuPgpuCompatibility: if not isinstance(other, VgpuPgpuCompatibility): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13274,7 +13035,7 @@ cdef class VgpuPgpuCompatibility: @staticmethod def from_buffer(buffer): """Create an VgpuPgpuCompatibility instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) + return __from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) @staticmethod def from_data(data): @@ -13283,7 +13044,7 @@ cdef class VgpuPgpuCompatibility: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_compatibility_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) + return __from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13298,10 +13059,10 @@ cdef class VgpuPgpuCompatibility: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuCompatibility obj = VgpuPgpuCompatibility.__new__(VgpuPgpuCompatibility) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + obj._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) obj._owner = None obj._owned = True else: @@ -13375,10 +13136,10 @@ cdef class GpuInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13456,8 +13217,8 @@ cdef class GpuInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GpuInstancePlacement obj = GpuInstancePlacement.__new__(GpuInstancePlacement) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGpuInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=gpu_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13503,7 +13264,7 @@ cdef class GpuInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") self._owner = None @@ -13515,7 +13276,7 @@ cdef class GpuInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13536,20 +13297,20 @@ cdef class GpuInstanceProfileInfo_v3: if not isinstance(other, GpuInstanceProfileInfo_v3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13680,7 +13441,7 @@ cdef class GpuInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13690,7 +13451,7 @@ cdef class GpuInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -13706,7 +13467,7 @@ cdef class GpuInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) + return __from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -13715,7 +13476,7 @@ cdef class GpuInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_profile_info_v3_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) + return __from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13730,10 +13491,10 @@ cdef class GpuInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuInstanceProfileInfo_v3 obj = GpuInstanceProfileInfo_v3.__new__(GpuInstanceProfileInfo_v3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + obj._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -13807,10 +13568,10 @@ cdef class ComputeInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13888,8 +13649,8 @@ cdef class ComputeInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ComputeInstancePlacement obj = ComputeInstancePlacement.__new__(ComputeInstancePlacement) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlComputeInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=compute_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13933,7 +13694,7 @@ cdef class ComputeInstanceProfileInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") self._owner = None @@ -13945,7 +13706,7 @@ cdef class ComputeInstanceProfileInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v2 object at {hex(id(self))}>" @@ -13966,20 +13727,20 @@ cdef class ComputeInstanceProfileInfo_v2: if not isinstance(other, ComputeInstanceProfileInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14099,7 +13860,7 @@ cdef class ComputeInstanceProfileInfo_v2: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -14109,12 +13870,12 @@ cdef class ComputeInstanceProfileInfo_v2: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) + return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) @staticmethod def from_data(data): @@ -14123,7 +13884,7 @@ cdef class ComputeInstanceProfileInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) + return __from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14138,10 +13899,10 @@ cdef class ComputeInstanceProfileInfo_v2: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v2 obj = ComputeInstanceProfileInfo_v2.__new__(ComputeInstanceProfileInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -14189,7 +13950,7 @@ cdef class ComputeInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") self._owner = None @@ -14201,7 +13962,7 @@ cdef class ComputeInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -14222,20 +13983,20 @@ cdef class ComputeInstanceProfileInfo_v3: if not isinstance(other, ComputeInstanceProfileInfo_v3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14355,7 +14116,7 @@ cdef class ComputeInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -14365,7 +14126,7 @@ cdef class ComputeInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -14381,7 +14142,7 @@ cdef class ComputeInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) + return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -14390,7 +14151,7 @@ cdef class ComputeInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v3_dtype` holding the data. """ - return _cyb_from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) + return __from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14405,10 +14166,10 @@ cdef class ComputeInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v3 obj = ComputeInstanceProfileInfo_v3.__new__(ComputeInstanceProfileInfo_v3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -14446,7 +14207,7 @@ cdef class DeviceAddressingMode_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") self._owner = None @@ -14458,7 +14219,7 @@ cdef class DeviceAddressingMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DeviceAddressingMode_v1 object at {hex(id(self))}>" @@ -14479,20 +14240,20 @@ cdef class DeviceAddressingMode_v1: if not isinstance(other, DeviceAddressingMode_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14524,7 +14285,7 @@ cdef class DeviceAddressingMode_v1: @staticmethod def from_buffer(buffer): """Create an DeviceAddressingMode_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) + return __from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) @staticmethod def from_data(data): @@ -14533,7 +14294,7 @@ cdef class DeviceAddressingMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_addressing_mode_v1_dtype` holding the data. """ - return _cyb_from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) + return __from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14548,10 +14309,10 @@ cdef class DeviceAddressingMode_v1: raise ValueError("ptr must not be null (0)") cdef DeviceAddressingMode_v1 obj = DeviceAddressingMode_v1.__new__(DeviceAddressingMode_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + obj._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) obj._owner = None obj._owned = True else: @@ -14590,7 +14351,7 @@ cdef class RepairStatus_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlRepairStatus_v1_t)) + self._ptr = calloc(1, sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") self._owner = None @@ -14602,7 +14363,7 @@ cdef class RepairStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.RepairStatus_v1 object at {hex(id(self))}>" @@ -14623,20 +14384,20 @@ cdef class RepairStatus_v1: if not isinstance(other, RepairStatus_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) + self._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14679,7 +14440,7 @@ cdef class RepairStatus_v1: @staticmethod def from_buffer(buffer): """Create an RepairStatus_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) + return __from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) @staticmethod def from_data(data): @@ -14688,7 +14449,7 @@ cdef class RepairStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `repair_status_v1_dtype` holding the data. """ - return _cyb_from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) + return __from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14703,10 +14464,10 @@ cdef class RepairStatus_v1: raise ValueError("ptr must not be null (0)") cdef RepairStatus_v1 obj = RepairStatus_v1.__new__(RepairStatus_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) + obj._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -14745,7 +14506,7 @@ cdef class DevicePowerMizerModes_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") self._owner = None @@ -14757,7 +14518,7 @@ cdef class DevicePowerMizerModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DevicePowerMizerModes_v1 object at {hex(id(self))}>" @@ -14778,20 +14539,20 @@ cdef class DevicePowerMizerModes_v1: if not isinstance(other, DevicePowerMizerModes_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14834,7 +14595,7 @@ cdef class DevicePowerMizerModes_v1: @staticmethod def from_buffer(buffer): """Create an DevicePowerMizerModes_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) + return __from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) @staticmethod def from_data(data): @@ -14843,7 +14604,7 @@ cdef class DevicePowerMizerModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_power_mizer_modes_v1_dtype` holding the data. """ - return _cyb_from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) + return __from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14858,10 +14619,10 @@ cdef class DevicePowerMizerModes_v1: raise ValueError("ptr must not be null (0)") cdef DevicePowerMizerModes_v1 obj = DevicePowerMizerModes_v1.__new__(DevicePowerMizerModes_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + obj._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) obj._owner = None obj._owned = True else: @@ -14940,10 +14701,10 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def unit(self): @@ -15076,8 +14837,8 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorEntry_v1 obj = EccSramUniqueUncorrectedErrorEntry_v1.__new__(EccSramUniqueUncorrectedErrorEntry_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorEntry_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=ecc_sram_unique_uncorrected_error_entry_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -15117,7 +14878,7 @@ cdef class GpuFabricInfo_v3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") self._owner = None @@ -15129,7 +14890,7 @@ cdef class GpuFabricInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v3 object at {hex(id(self))}>" @@ -15150,20 +14911,20 @@ cdef class GpuFabricInfo_v3: if not isinstance(other, GpuFabricInfo_v3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15172,7 +14933,7 @@ cdef class GpuFabricInfo_v3: @property def version(self): - """int: Structure version identifier (set to nvmlGpuFabricInfo_v3).""" + """int: Structure version identifier (set to nvmlGpuFabricInfo_v2).""" return self._ptr[0].version @version.setter @@ -15184,7 +14945,7 @@ cdef class GpuFabricInfo_v3: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -15194,9 +14955,9 @@ cdef class GpuFabricInfo_v3: raise ValueError("This GpuFabricInfo_v3 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -15256,7 +15017,7 @@ cdef class GpuFabricInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) + return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) @staticmethod def from_data(data): @@ -15265,7 +15026,7 @@ cdef class GpuFabricInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v3_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) + return __from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15280,10 +15041,10 @@ cdef class GpuFabricInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v3 obj = GpuFabricInfo_v3.__new__(GpuFabricInfo_v3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -15321,7 +15082,7 @@ cdef class NvLinkInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") self._owner = None @@ -15333,7 +15094,7 @@ cdef class NvLinkInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v1 object at {hex(id(self))}>" @@ -15354,20 +15115,20 @@ cdef class NvLinkInfo_v1: if not isinstance(other, NvLinkInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15399,7 +15160,7 @@ cdef class NvLinkInfo_v1: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) + return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) @staticmethod def from_data(data): @@ -15408,7 +15169,7 @@ cdef class NvLinkInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) + return __from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15423,10 +15184,10 @@ cdef class NvLinkInfo_v1: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v1 obj = NvLinkInfo_v1.__new__(NvLinkInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -15466,7 +15227,7 @@ cdef class NvlinkFirmwareVersion: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") self._owner = None @@ -15478,7 +15239,7 @@ cdef class NvlinkFirmwareVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareVersion object at {hex(id(self))}>" @@ -15499,20 +15260,20 @@ cdef class NvlinkFirmwareVersion: if not isinstance(other, NvlinkFirmwareVersion): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15566,7 +15327,7 @@ cdef class NvlinkFirmwareVersion: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareVersion instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) + return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) @staticmethod def from_data(data): @@ -15575,7 +15336,7 @@ cdef class NvlinkFirmwareVersion: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_version_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) + return __from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15590,10 +15351,10 @@ cdef class NvlinkFirmwareVersion: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareVersion obj = NvlinkFirmwareVersion.__new__(NvlinkFirmwareVersion) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) obj._owner = None obj._owned = True else: @@ -15630,7 +15391,7 @@ cdef class PRMCounterInput_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") self._owner = None @@ -15642,7 +15403,7 @@ cdef class PRMCounterInput_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterInput_v1 object at {hex(id(self))}>" @@ -15663,20 +15424,20 @@ cdef class PRMCounterInput_v1: if not isinstance(other, PRMCounterInput_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15697,7 +15458,7 @@ cdef class PRMCounterInput_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterInput_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) + return __from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) @staticmethod def from_data(data): @@ -15706,7 +15467,7 @@ cdef class PRMCounterInput_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_input_v1_dtype` holding the data. """ - return _cyb_from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) + return __from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15721,10 +15482,10 @@ cdef class PRMCounterInput_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterInput_v1 obj = PRMCounterInput_v1.__new__(PRMCounterInput_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) + obj._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) obj._owner = None obj._owned = True else: @@ -15764,7 +15525,7 @@ cdef class VgpuSchedulerStateInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") self._owner = None @@ -15776,7 +15537,7 @@ cdef class VgpuSchedulerStateInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v2 object at {hex(id(self))}>" @@ -15797,20 +15558,20 @@ cdef class VgpuSchedulerStateInfo_v2: if not isinstance(other, VgpuSchedulerStateInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15864,7 +15625,7 @@ cdef class VgpuSchedulerStateInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) @staticmethod def from_data(data): @@ -15873,7 +15634,7 @@ cdef class VgpuSchedulerStateInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) + return __from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15888,10 +15649,10 @@ cdef class VgpuSchedulerStateInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v2 obj = VgpuSchedulerStateInfo_v2.__new__(VgpuSchedulerStateInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -15970,10 +15731,10 @@ cdef class VgpuSchedulerLogEntry_v2: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -16106,8 +15867,8 @@ cdef class VgpuSchedulerLogEntry_v2: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry_v2 obj = VgpuSchedulerLogEntry_v2.__new__(VgpuSchedulerLogEntry_v2) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_v2_dtype) obj._data = data.view(_numpy.recarray) @@ -16144,7 +15905,7 @@ cdef class VgpuSchedulerState_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") self._owner = None @@ -16156,7 +15917,7 @@ cdef class VgpuSchedulerState_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v2 object at {hex(id(self))}>" @@ -16177,20 +15938,20 @@ cdef class VgpuSchedulerState_v2: if not isinstance(other, VgpuSchedulerState_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16244,7 +16005,7 @@ cdef class VgpuSchedulerState_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) @staticmethod def from_data(data): @@ -16253,7 +16014,7 @@ cdef class VgpuSchedulerState_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) + return __from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16268,10 +16029,10 @@ cdef class VgpuSchedulerState_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v2 obj = VgpuSchedulerState_v2.__new__(VgpuSchedulerState_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) obj._owner = None obj._owned = True else: @@ -16309,7 +16070,7 @@ cdef class ExcludedDeviceInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") self._owner = None @@ -16321,7 +16082,7 @@ cdef class ExcludedDeviceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ExcludedDeviceInfo object at {hex(id(self))}>" @@ -16342,20 +16103,20 @@ cdef class ExcludedDeviceInfo: if not isinstance(other, ExcludedDeviceInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16372,12 +16133,12 @@ cdef class ExcludedDeviceInfo: if self._readonly: raise ValueError("This ExcludedDeviceInfo instance is read-only") cdef PciInfo val_ = val - _cyb_memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) + memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) @property def uuid(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].uuid) + return cpython.PyUnicode_FromString(self._ptr[0].uuid) @uuid.setter def uuid(self, val): @@ -16387,12 +16148,12 @@ cdef class ExcludedDeviceInfo: if len(buf) >= 80: raise ValueError("String too long for field uuid, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].uuid), ptr, 80) + memcpy((self._ptr[0].uuid), ptr, 80) @staticmethod def from_buffer(buffer): """Create an ExcludedDeviceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) + return __from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) @staticmethod def from_data(data): @@ -16401,7 +16162,7 @@ cdef class ExcludedDeviceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `excluded_device_info_dtype` holding the data. """ - return _cyb_from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) + return __from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16416,10 +16177,10 @@ cdef class ExcludedDeviceInfo: raise ValueError("ptr must not be null (0)") cdef ExcludedDeviceInfo obj = ExcludedDeviceInfo.__new__(ExcludedDeviceInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) + obj._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) obj._owner = None obj._owned = True else: @@ -16460,7 +16221,7 @@ cdef class ProcessDetailList_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = calloc(1, sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") self._owner = None @@ -16473,7 +16234,7 @@ cdef class ProcessDetailList_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ProcessDetailList_v1 object at {hex(id(self))}>" @@ -16494,20 +16255,20 @@ cdef class ProcessDetailList_v1: if not isinstance(other, ProcessDetailList_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16555,7 +16316,7 @@ cdef class ProcessDetailList_v1: @staticmethod def from_buffer(buffer): """Create an ProcessDetailList_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) + return __from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) @staticmethod def from_data(data): @@ -16564,7 +16325,7 @@ cdef class ProcessDetailList_v1: Args: data (_numpy.ndarray): a single-element array of dtype `process_detail_list_v1_dtype` holding the data. """ - return _cyb_from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) + return __from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16579,10 +16340,10 @@ cdef class ProcessDetailList_v1: raise ValueError("ptr must not be null (0)") cdef ProcessDetailList_v1 obj = ProcessDetailList_v1.__new__(ProcessDetailList_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) + obj._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) obj._owner = None obj._owned = True else: @@ -16621,7 +16382,7 @@ cdef class BridgeChipHierarchy: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") self._owner = None @@ -16633,7 +16394,7 @@ cdef class BridgeChipHierarchy: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.BridgeChipHierarchy object at {hex(id(self))}>" @@ -16654,20 +16415,20 @@ cdef class BridgeChipHierarchy: if not isinstance(other, BridgeChipHierarchy): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16689,12 +16450,12 @@ cdef class BridgeChipHierarchy: self._ptr[0].bridgeCount = len(val) if len(val) == 0: return - _cyb_memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) + memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) @staticmethod def from_buffer(buffer): """Create an BridgeChipHierarchy instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) + return __from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) @staticmethod def from_data(data): @@ -16703,7 +16464,7 @@ cdef class BridgeChipHierarchy: Args: data (_numpy.ndarray): a single-element array of dtype `bridge_chip_hierarchy_dtype` holding the data. """ - return _cyb_from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) + return __from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16718,10 +16479,10 @@ cdef class BridgeChipHierarchy: raise ValueError("ptr must not be null (0)") cdef BridgeChipHierarchy obj = BridgeChipHierarchy.__new__(BridgeChipHierarchy) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) + obj._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) obj._owner = None obj._owned = True else: @@ -16795,10 +16556,10 @@ cdef class Sample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -16874,8 +16635,8 @@ cdef class Sample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Sample obj = Sample.__new__(Sample) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16950,10 +16711,10 @@ cdef class VgpuInstanceUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def vgpu_instance(self): @@ -17067,8 +16828,8 @@ cdef class VgpuInstanceUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationSample obj = VgpuInstanceUtilizationSample.__new__(VgpuInstanceUtilizationSample) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -17145,10 +16906,10 @@ cdef class VgpuInstanceUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -17280,8 +17041,8 @@ cdef class VgpuInstanceUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationInfo_v1 obj = VgpuInstanceUtilizationInfo_v1.__new__(VgpuInstanceUtilizationInfo_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -17357,10 +17118,10 @@ cdef class FieldValue: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def field_id(self): @@ -17491,8 +17252,8 @@ cdef class FieldValue: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FieldValue obj = FieldValue.__new__(FieldValue) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFieldValue_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=field_value_dtype) obj._data = data.view(_numpy.recarray) @@ -17528,7 +17289,7 @@ cdef class PRMCounterValue_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") self._owner = None @@ -17540,7 +17301,7 @@ cdef class PRMCounterValue_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterValue_v1 object at {hex(id(self))}>" @@ -17561,20 +17322,20 @@ cdef class PRMCounterValue_v1: if not isinstance(other, PRMCounterValue_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17591,7 +17352,7 @@ cdef class PRMCounterValue_v1: if self._readonly: raise ValueError("This PRMCounterValue_v1 instance is read-only") cdef Value val_ = val - _cyb_memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) + memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) @property def status(self): @@ -17618,7 +17379,7 @@ cdef class PRMCounterValue_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterValue_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) + return __from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) @staticmethod def from_data(data): @@ -17627,7 +17388,7 @@ cdef class PRMCounterValue_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_value_v1_dtype` holding the data. """ - return _cyb_from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) + return __from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17642,10 +17403,10 @@ cdef class PRMCounterValue_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterValue_v1 obj = PRMCounterValue_v1.__new__(PRMCounterValue_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) + obj._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) obj._owner = None obj._owned = True else: @@ -17683,7 +17444,7 @@ cdef class GpuThermalSettings: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuThermalSettings_t)) + self._ptr = calloc(1, sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") self._owner = None @@ -17695,7 +17456,7 @@ cdef class GpuThermalSettings: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuThermalSettings object at {hex(id(self))}>" @@ -17716,20 +17477,20 @@ cdef class GpuThermalSettings: if not isinstance(other, GpuThermalSettings): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) + self._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17748,7 +17509,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)}") - _cyb_memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) + memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) @property def count(self): @@ -17764,7 +17525,7 @@ cdef class GpuThermalSettings: @staticmethod def from_buffer(buffer): """Create an GpuThermalSettings instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) + return __from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) @staticmethod def from_data(data): @@ -17773,7 +17534,7 @@ cdef class GpuThermalSettings: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_thermal_settings_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) + return __from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17788,10 +17549,10 @@ cdef class GpuThermalSettings: raise ValueError("ptr must not be null (0)") cdef GpuThermalSettings obj = GpuThermalSettings.__new__(GpuThermalSettings) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) + obj._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) obj._owner = None obj._owned = True else: @@ -17830,7 +17591,7 @@ cdef class ClkMonStatus: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlClkMonStatus_t)) + self._ptr = calloc(1, sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") self._owner = None @@ -17842,7 +17603,7 @@ cdef class ClkMonStatus: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ClkMonStatus object at {hex(id(self))}>" @@ -17863,20 +17624,20 @@ cdef class ClkMonStatus: if not isinstance(other, ClkMonStatus): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) + self._ptr = malloc(sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17898,7 +17659,7 @@ cdef class ClkMonStatus: self._ptr[0].clkMonListSize = len(val) if len(val) == 0: return - _cyb_memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) + memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) @property def b_global_status(self): @@ -17914,7 +17675,7 @@ cdef class ClkMonStatus: @staticmethod def from_buffer(buffer): """Create an ClkMonStatus instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) + return __from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) @staticmethod def from_data(data): @@ -17923,7 +17684,7 @@ cdef class ClkMonStatus: Args: data (_numpy.ndarray): a single-element array of dtype `clk_mon_status_dtype` holding the data. """ - return _cyb_from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) + return __from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17938,10 +17699,10 @@ cdef class ClkMonStatus: raise ValueError("ptr must not be null (0)") cdef ClkMonStatus obj = ClkMonStatus.__new__(ClkMonStatus) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) + obj._ptr = malloc(sizeof(nvmlClkMonStatus_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) obj._owner = None obj._owned = True else: @@ -17982,7 +17743,7 @@ cdef class ProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") self._owner = None @@ -17995,7 +17756,7 @@ cdef class ProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -18016,20 +17777,20 @@ cdef class ProcessesUtilizationInfo_v1: if not isinstance(other, ProcessesUtilizationInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18077,7 +17838,7 @@ cdef class ProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an ProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) + return __from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -18086,7 +17847,7 @@ cdef class ProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `processes_utilization_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) + return __from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18101,10 +17862,10 @@ cdef class ProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef ProcessesUtilizationInfo_v1 obj = ProcessesUtilizationInfo_v1.__new__(ProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -18143,7 +17904,7 @@ cdef class GpuDynamicPstatesInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") self._owner = None @@ -18155,7 +17916,7 @@ cdef class GpuDynamicPstatesInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuDynamicPstatesInfo object at {hex(id(self))}>" @@ -18176,20 +17937,20 @@ cdef class GpuDynamicPstatesInfo: if not isinstance(other, GpuDynamicPstatesInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18208,7 +17969,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)}") - _cyb_memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) + memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) @property def flags_(self): @@ -18224,7 +17985,7 @@ cdef class GpuDynamicPstatesInfo: @staticmethod def from_buffer(buffer): """Create an GpuDynamicPstatesInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) + return __from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) @staticmethod def from_data(data): @@ -18233,7 +17994,7 @@ cdef class GpuDynamicPstatesInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_dynamic_pstates_info_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) + return __from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18248,10 +18009,10 @@ cdef class GpuDynamicPstatesInfo: raise ValueError("ptr must not be null (0)") cdef GpuDynamicPstatesInfo obj = GpuDynamicPstatesInfo.__new__(GpuDynamicPstatesInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + obj._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) obj._owner = None obj._owned = True else: @@ -18292,7 +18053,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") self._owner = None @@ -18305,7 +18066,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -18326,20 +18087,20 @@ cdef class VgpuProcessesUtilizationInfo_v1: if not isinstance(other, VgpuProcessesUtilizationInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18387,7 +18148,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -18396,7 +18157,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_processes_utilization_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) + return __from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18411,10 +18172,10 @@ cdef class VgpuProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuProcessesUtilizationInfo_v1 obj = VgpuProcessesUtilizationInfo_v1.__new__(VgpuProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -18447,7 +18208,7 @@ cdef class VgpuSchedulerParams: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") self._owner = None @@ -18459,7 +18220,7 @@ cdef class VgpuSchedulerParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerParams object at {hex(id(self))}>" @@ -18480,20 +18241,20 @@ cdef class VgpuSchedulerParams: if not isinstance(other, VgpuSchedulerParams): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18510,7 +18271,7 @@ cdef class VgpuSchedulerParams: if self._readonly: raise ValueError("This VgpuSchedulerParams instance is read-only") cdef _py_anon_pod2 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) + memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) @property def vgpu_sched_data(self): @@ -18522,12 +18283,12 @@ cdef class VgpuSchedulerParams: if self._readonly: raise ValueError("This VgpuSchedulerParams instance is read-only") cdef _py_anon_pod3 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) + memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerParams instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) @staticmethod def from_data(data): @@ -18536,7 +18297,7 @@ cdef class VgpuSchedulerParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_params_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) + return __from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18551,10 +18312,10 @@ cdef class VgpuSchedulerParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerParams obj = VgpuSchedulerParams.__new__(VgpuSchedulerParams) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) obj._owner = None obj._owned = True else: @@ -18586,7 +18347,7 @@ cdef class VgpuSchedulerSetParams: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") self._owner = None @@ -18598,7 +18359,7 @@ cdef class VgpuSchedulerSetParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerSetParams object at {hex(id(self))}>" @@ -18619,20 +18380,20 @@ cdef class VgpuSchedulerSetParams: if not isinstance(other, VgpuSchedulerSetParams): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18649,7 +18410,7 @@ cdef class VgpuSchedulerSetParams: if self._readonly: raise ValueError("This VgpuSchedulerSetParams instance is read-only") cdef _py_anon_pod4 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) + memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) @property def vgpu_sched_data(self): @@ -18661,12 +18422,12 @@ cdef class VgpuSchedulerSetParams: if self._readonly: raise ValueError("This VgpuSchedulerSetParams instance is read-only") cdef _py_anon_pod5 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) + memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerSetParams instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) @staticmethod def from_data(data): @@ -18675,7 +18436,7 @@ cdef class VgpuSchedulerSetParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_set_params_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) + return __from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18690,10 +18451,10 @@ cdef class VgpuSchedulerSetParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerSetParams obj = VgpuSchedulerSetParams.__new__(VgpuSchedulerSetParams) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) obj._owner = None obj._owned = True else: @@ -18732,7 +18493,7 @@ cdef class VgpuLicenseInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") self._owner = None @@ -18744,7 +18505,7 @@ cdef class VgpuLicenseInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseInfo object at {hex(id(self))}>" @@ -18765,20 +18526,20 @@ cdef class VgpuLicenseInfo: if not isinstance(other, VgpuLicenseInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18795,7 +18556,7 @@ cdef class VgpuLicenseInfo: if self._readonly: raise ValueError("This VgpuLicenseInfo instance is read-only") cdef VgpuLicenseExpiry val_ = val - _cyb_memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) + memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) @property def is_licensed(self): @@ -18822,7 +18583,7 @@ cdef class VgpuLicenseInfo: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) + return __from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) @staticmethod def from_data(data): @@ -18831,7 +18592,7 @@ cdef class VgpuLicenseInfo: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_info_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) + return __from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18846,10 +18607,10 @@ cdef class VgpuLicenseInfo: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseInfo obj = VgpuLicenseInfo.__new__(VgpuLicenseInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) + obj._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) obj._owner = None obj._owned = True else: @@ -18927,10 +18688,10 @@ cdef class GridLicensableFeature: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def feature_code(self): @@ -19046,8 +18807,8 @@ cdef class GridLicensableFeature: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeature obj = GridLicensableFeature.__new__(GridLicensableFeature) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGridLicensableFeature_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=grid_licensable_feature_dtype) obj._data = data.view(_numpy.recarray) @@ -19082,7 +18843,7 @@ cdef class UnitFanSpeeds: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = calloc(1, sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") self._owner = None @@ -19094,7 +18855,7 @@ cdef class UnitFanSpeeds: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.UnitFanSpeeds object at {hex(id(self))}>" @@ -19115,20 +18876,20 @@ cdef class UnitFanSpeeds: if not isinstance(other, UnitFanSpeeds): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19147,7 +18908,7 @@ cdef class UnitFanSpeeds: cdef UnitFanInfo val_ = val if len(val) != 24: raise ValueError(f"Expected length { 24 } for field fans, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) + memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) @property def count(self): @@ -19163,7 +18924,7 @@ cdef class UnitFanSpeeds: @staticmethod def from_buffer(buffer): """Create an UnitFanSpeeds instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) + return __from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) @staticmethod def from_data(data): @@ -19172,7 +18933,7 @@ cdef class UnitFanSpeeds: Args: data (_numpy.ndarray): a single-element array of dtype `unit_fan_speeds_dtype` holding the data. """ - return _cyb_from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) + return __from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19187,10 +18948,10 @@ cdef class UnitFanSpeeds: raise ValueError("ptr must not be null (0)") cdef UnitFanSpeeds obj = UnitFanSpeeds.__new__(UnitFanSpeeds) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) + obj._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) obj._owner = None obj._owned = True else: @@ -19234,7 +18995,7 @@ cdef class VgpuPgpuMetadata: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") self._owner = None @@ -19246,7 +19007,7 @@ cdef class VgpuPgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuMetadata object at {hex(id(self))}>" @@ -19267,20 +19028,20 @@ cdef class VgpuPgpuMetadata: if not isinstance(other, VgpuPgpuMetadata): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19297,7 +19058,7 @@ cdef class VgpuPgpuMetadata: if self._readonly: raise ValueError("This VgpuPgpuMetadata instance is read-only") cdef VgpuVersion val_ = val - _cyb_memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) + memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) @property def version(self): @@ -19324,7 +19085,7 @@ cdef class VgpuPgpuMetadata: @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -19334,7 +19095,7 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def pgpu_virtualization_caps(self): @@ -19361,7 +19122,7 @@ cdef class VgpuPgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -19371,12 +19132,12 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) + memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuPgpuMetadata instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) + return __from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) @staticmethod def from_data(data): @@ -19385,7 +19146,7 @@ cdef class VgpuPgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_metadata_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) + return __from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19400,10 +19161,10 @@ cdef class VgpuPgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuMetadata obj = VgpuPgpuMetadata.__new__(VgpuPgpuMetadata) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + obj._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -19443,7 +19204,7 @@ cdef class GpuInstanceInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = calloc(1, sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") self._owner = None @@ -19455,7 +19216,7 @@ cdef class GpuInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceInfo object at {hex(id(self))}>" @@ -19476,20 +19237,20 @@ cdef class GpuInstanceInfo: if not isinstance(other, GpuInstanceInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19506,7 +19267,7 @@ cdef class GpuInstanceInfo: if self._readonly: raise ValueError("This GpuInstanceInfo instance is read-only") cdef GpuInstancePlacement val_ = val - _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) + memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) @property def device_(self): @@ -19544,7 +19305,7 @@ cdef class GpuInstanceInfo: @staticmethod def from_buffer(buffer): """Create an GpuInstanceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) + return __from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) @staticmethod def from_data(data): @@ -19553,7 +19314,7 @@ cdef class GpuInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_info_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) + return __from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19568,10 +19329,10 @@ cdef class GpuInstanceInfo: raise ValueError("ptr must not be null (0)") cdef GpuInstanceInfo obj = GpuInstanceInfo.__new__(GpuInstanceInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) + obj._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19612,7 +19373,7 @@ cdef class ComputeInstanceInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = calloc(1, sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") self._owner = None @@ -19624,7 +19385,7 @@ cdef class ComputeInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceInfo object at {hex(id(self))}>" @@ -19645,20 +19406,20 @@ cdef class ComputeInstanceInfo: if not isinstance(other, ComputeInstanceInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19675,7 +19436,7 @@ cdef class ComputeInstanceInfo: if self._readonly: raise ValueError("This ComputeInstanceInfo instance is read-only") cdef ComputeInstancePlacement val_ = val - _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) + memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) @property def device_(self): @@ -19724,7 +19485,7 @@ cdef class ComputeInstanceInfo: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) + return __from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) @staticmethod def from_data(data): @@ -19733,7 +19494,7 @@ cdef class ComputeInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_info_dtype` holding the data. """ - return _cyb_from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) + return __from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19748,10 +19509,10 @@ cdef class ComputeInstanceInfo: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceInfo obj = ComputeInstanceInfo.__new__(ComputeInstanceInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) + obj._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19791,7 +19552,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") self._owner = None @@ -19804,7 +19565,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.EccSramUniqueUncorrectedErrorCounts_v1 object at {hex(id(self))}>" @@ -19825,20 +19586,20 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if not isinstance(other, EccSramUniqueUncorrectedErrorCounts_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19875,7 +19636,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: @staticmethod def from_buffer(buffer): """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) + return __from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_data(data): @@ -19884,7 +19645,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_unique_uncorrected_error_counts_v1_dtype` holding the data. """ - return _cyb_from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) + return __from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19899,10 +19660,10 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorCounts_v1 obj = EccSramUniqueUncorrectedErrorCounts_v1.__new__(EccSramUniqueUncorrectedErrorCounts_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + obj._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) obj._owner = None obj._owned = True else: @@ -19941,7 +19702,7 @@ cdef class NvlinkFirmwareInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") self._owner = None @@ -19953,7 +19714,7 @@ cdef class NvlinkFirmwareInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareInfo object at {hex(id(self))}>" @@ -19974,20 +19735,20 @@ cdef class NvlinkFirmwareInfo: if not isinstance(other, NvlinkFirmwareInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20006,7 +19767,7 @@ cdef class NvlinkFirmwareInfo: cdef NvlinkFirmwareVersion val_ = val if len(val) != 100: raise ValueError(f"Expected length { 100 } for field firmware_version, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) + memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) @property def num_valid_entries(self): @@ -20022,7 +19783,7 @@ cdef class NvlinkFirmwareInfo: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) + return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) @staticmethod def from_data(data): @@ -20031,7 +19792,7 @@ cdef class NvlinkFirmwareInfo: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_info_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) + return __from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20046,10 +19807,10 @@ cdef class NvlinkFirmwareInfo: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareInfo obj = NvlinkFirmwareInfo.__new__(NvlinkFirmwareInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) obj._owner = None obj._owned = True else: @@ -20091,7 +19852,7 @@ cdef class VgpuSchedulerLogInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") self._owner = None @@ -20103,7 +19864,7 @@ cdef class VgpuSchedulerLogInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v2 object at {hex(id(self))}>" @@ -20124,20 +19885,20 @@ cdef class VgpuSchedulerLogInfo_v2: if not isinstance(other, VgpuSchedulerLogInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20156,7 +19917,7 @@ cdef class VgpuSchedulerLogInfo_v2: cdef VgpuSchedulerLogEntry_v2 val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) + memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) @property def engine_id(self): @@ -20216,7 +19977,7 @@ cdef class VgpuSchedulerLogInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) @staticmethod def from_data(data): @@ -20225,7 +19986,7 @@ cdef class VgpuSchedulerLogInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) + return __from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20240,10 +20001,10 @@ cdef class VgpuSchedulerLogInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v2 obj = VgpuSchedulerLogInfo_v2.__new__(VgpuSchedulerLogInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -20285,7 +20046,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") self._owner = None @@ -20298,7 +20059,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuInstancesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -20319,20 +20080,20 @@ cdef class VgpuInstancesUtilizationInfo_v1: if not isinstance(other, VgpuInstancesUtilizationInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20391,7 +20152,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuInstancesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -20400,7 +20161,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_instances_utilization_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) + return __from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20415,10 +20176,10 @@ cdef class VgpuInstancesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuInstancesUtilizationInfo_v1 obj = VgpuInstancesUtilizationInfo_v1.__new__(VgpuInstancesUtilizationInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20494,10 +20255,10 @@ cdef class PRMCounter_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def counter_id(self): @@ -20582,8 +20343,8 @@ cdef class PRMCounter_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PRMCounter_v1 obj = PRMCounter_v1.__new__(PRMCounter_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlPRMCounter_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=prm_counter_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -20622,7 +20383,7 @@ cdef class VgpuSchedulerLog: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") self._owner = None @@ -20634,7 +20395,7 @@ cdef class VgpuSchedulerLog: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLog object at {hex(id(self))}>" @@ -20655,20 +20416,20 @@ cdef class VgpuSchedulerLog: if not isinstance(other, VgpuSchedulerLog): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20685,7 +20446,7 @@ cdef class VgpuSchedulerLog: if self._readonly: raise ValueError("This VgpuSchedulerLog instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -20699,7 +20460,7 @@ cdef class VgpuSchedulerLog: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def engine_id(self): @@ -20748,7 +20509,7 @@ cdef class VgpuSchedulerLog: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLog instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) @staticmethod def from_data(data): @@ -20757,7 +20518,7 @@ cdef class VgpuSchedulerLog: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) + return __from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20772,10 +20533,10 @@ cdef class VgpuSchedulerLog: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLog obj = VgpuSchedulerLog.__new__(VgpuSchedulerLog) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) obj._owner = None obj._owned = True else: @@ -20814,7 +20575,7 @@ cdef class VgpuSchedulerGetState: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") self._owner = None @@ -20826,7 +20587,7 @@ cdef class VgpuSchedulerGetState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerGetState object at {hex(id(self))}>" @@ -20847,20 +20608,20 @@ cdef class VgpuSchedulerGetState: if not isinstance(other, VgpuSchedulerGetState): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20877,7 +20638,7 @@ cdef class VgpuSchedulerGetState: if self._readonly: raise ValueError("This VgpuSchedulerGetState instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def scheduler_policy(self): @@ -20904,7 +20665,7 @@ cdef class VgpuSchedulerGetState: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerGetState instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) @staticmethod def from_data(data): @@ -20913,7 +20674,7 @@ cdef class VgpuSchedulerGetState: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_get_state_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) + return __from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20928,10 +20689,10 @@ cdef class VgpuSchedulerGetState: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerGetState obj = VgpuSchedulerGetState.__new__(VgpuSchedulerGetState) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) obj._owner = None obj._owned = True else: @@ -20972,7 +20733,7 @@ cdef class VgpuSchedulerStateInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") self._owner = None @@ -20984,7 +20745,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v1 object at {hex(id(self))}>" @@ -21005,20 +20766,20 @@ cdef class VgpuSchedulerStateInfo_v1: if not isinstance(other, VgpuSchedulerStateInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21035,7 +20796,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def version(self): @@ -21084,7 +20845,7 @@ cdef class VgpuSchedulerStateInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) @staticmethod def from_data(data): @@ -21093,7 +20854,7 @@ cdef class VgpuSchedulerStateInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) + return __from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21108,10 +20869,10 @@ cdef class VgpuSchedulerStateInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v1 obj = VgpuSchedulerStateInfo_v1.__new__(VgpuSchedulerStateInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -21154,7 +20915,7 @@ cdef class VgpuSchedulerLogInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") self._owner = None @@ -21166,7 +20927,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v1 object at {hex(id(self))}>" @@ -21187,20 +20948,20 @@ cdef class VgpuSchedulerLogInfo_v1: if not isinstance(other, VgpuSchedulerLogInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21217,7 +20978,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -21231,7 +20992,7 @@ cdef class VgpuSchedulerLogInfo_v1: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def version(self): @@ -21291,7 +21052,7 @@ cdef class VgpuSchedulerLogInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) @staticmethod def from_data(data): @@ -21300,7 +21061,7 @@ cdef class VgpuSchedulerLogInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) + return __from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21315,10 +21076,10 @@ cdef class VgpuSchedulerLogInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v1 obj = VgpuSchedulerLogInfo_v1.__new__(VgpuSchedulerLogInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -21359,7 +21120,7 @@ cdef class VgpuSchedulerState_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") self._owner = None @@ -21371,7 +21132,7 @@ cdef class VgpuSchedulerState_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v1 object at {hex(id(self))}>" @@ -21392,20 +21153,20 @@ cdef class VgpuSchedulerState_v1: if not isinstance(other, VgpuSchedulerState_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21422,7 +21183,7 @@ cdef class VgpuSchedulerState_v1: if self._readonly: raise ValueError("This VgpuSchedulerState_v1 instance is read-only") cdef VgpuSchedulerSetParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) @property def version(self): @@ -21471,7 +21232,7 @@ cdef class VgpuSchedulerState_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) @staticmethod def from_data(data): @@ -21480,7 +21241,7 @@ cdef class VgpuSchedulerState_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) + return __from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21495,10 +21256,10 @@ cdef class VgpuSchedulerState_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v1 obj = VgpuSchedulerState_v1.__new__(VgpuSchedulerState_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) obj._owner = None obj._owned = True else: @@ -21537,7 +21298,7 @@ cdef class GridLicensableFeatures: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = calloc(1, sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") self._owner = None @@ -21549,7 +21310,7 @@ cdef class GridLicensableFeatures: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GridLicensableFeatures object at {hex(id(self))}>" @@ -21570,20 +21331,20 @@ cdef class GridLicensableFeatures: if not isinstance(other, GridLicensableFeatures): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21605,7 +21366,7 @@ cdef class GridLicensableFeatures: self._ptr[0].licensableFeaturesCount = len(val) if len(val) == 0: return - _cyb_memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) + memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) @property def is_grid_license_supported(self): @@ -21621,7 +21382,7 @@ cdef class GridLicensableFeatures: @staticmethod def from_buffer(buffer): """Create an GridLicensableFeatures instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) + return __from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) @staticmethod def from_data(data): @@ -21630,7 +21391,7 @@ cdef class GridLicensableFeatures: Args: data (_numpy.ndarray): a single-element array of dtype `grid_licensable_features_dtype` holding the data. """ - return _cyb_from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) + return __from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21645,10 +21406,10 @@ cdef class GridLicensableFeatures: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeatures obj = GridLicensableFeatures.__new__(GridLicensableFeatures) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) + obj._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) obj._owner = None obj._owned = True else: @@ -21687,7 +21448,7 @@ cdef class NvLinkInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") self._owner = None @@ -21699,7 +21460,7 @@ cdef class NvLinkInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v2 object at {hex(id(self))}>" @@ -21720,20 +21481,20 @@ cdef class NvLinkInfo_v2: if not isinstance(other, NvLinkInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21750,7 +21511,7 @@ cdef class NvLinkInfo_v2: if self._readonly: raise ValueError("This NvLinkInfo_v2 instance is read-only") cdef NvlinkFirmwareInfo val_ = val - _cyb_memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) + memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) @property def version(self): @@ -21777,7 +21538,7 @@ cdef class NvLinkInfo_v2: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) + return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) @staticmethod def from_data(data): @@ -21786,7 +21547,7 @@ cdef class NvLinkInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) + return __from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21801,10 +21562,10 @@ cdef class NvLinkInfo_v2: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v2 obj = NvLinkInfo_v2.__new__(NvLinkInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -21816,7 +21577,7 @@ cdef class NvLinkInfo_v2: cpdef init_v2(): - """Initialize the NVML Library lazily, without allocating any device state. + """Initialize NVML, but don't initialize any GPUs yet. .. seealso:: `nvmlInit_v2` """ @@ -21826,10 +21587,10 @@ cpdef init_v2(): cpdef init_with_flags(unsigned int flags): - """Initialize the NVML Library lazily, without allocating any device state, with additional init flags. + """nvmlInitWithFlags is a variant of ``nvmlInit()``, that allows passing a set of boolean values modifying the behaviour of ``nvmlInit()``. Other than the "flags" parameter it is completely similar to ``nvmlInit_v2``. Args: - flags (unsigned int): NVML_INIT_FLAG_* flags that can modify NVML Init behavior. + flags (unsigned int): behaviour modifier flags. .. seealso:: `nvmlInitWithFlags` """ @@ -21839,7 +21600,7 @@ cpdef init_with_flags(unsigned int flags): cpdef shutdown(): - """Shut down and cleanup NVML Library state. + """Shut down NVML by releasing all GPU resources previously allocated with :func:`init_v2`. .. seealso:: `nvmlShutdown` """ @@ -21874,7 +21635,7 @@ cpdef str system_get_driver_version(): with nogil: __status__ = nvmlSystemGetDriverVersion(version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef str system_get_nvml_version(): @@ -21890,7 +21651,7 @@ cpdef str system_get_nvml_version(): with nogil: __status__ = nvmlSystemGetNVMLVersion(version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef int system_get_cuda_driver_version() except *: @@ -21939,7 +21700,7 @@ cpdef str system_get_process_name(unsigned int pid): with nogil: __status__ = nvmlSystemGetProcessName(pid, name, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(name) + return cpython.PyUnicode_FromString(name) cpdef object system_get_hic_version(): @@ -22226,7 +21987,7 @@ cpdef str device_get_name(intptr_t device): with nogil: __status__ = nvmlDeviceGetName(device, name, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(name) + return cpython.PyUnicode_FromString(name) cpdef int device_get_brand(intptr_t device) except? -1: @@ -22281,7 +22042,7 @@ cpdef str device_get_serial(intptr_t device): with nogil: __status__ = nvmlDeviceGetSerial(device, serial, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(serial) + return cpython.PyUnicode_FromString(serial) cpdef unsigned int device_get_module_id(intptr_t device) except? 0: @@ -22335,8 +22096,8 @@ cpdef object device_get_memory_affinity(intptr_t device, unsigned int node_set_s .. seealso:: `nvmlDeviceGetMemoryAffinity` """ if node_set_size == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef _cyb_view.array node_set = _cyb_view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef view.array node_set = view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *node_set_ptr = (node_set.data) with nogil: __status__ = nvmlDeviceGetMemoryAffinity(device, node_set_size, node_set_ptr, scope) @@ -22358,8 +22119,8 @@ cpdef object device_get_cpu_affinity_within_scope(intptr_t device, unsigned int .. seealso:: `nvmlDeviceGetCpuAffinityWithinScope` """ if cpu_set_size == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinityWithinScope(device, cpu_set_size, cpu_set_ptr, scope) @@ -22380,8 +22141,8 @@ cpdef object device_get_cpu_affinity(intptr_t device, unsigned int cpu_set_size) .. seealso:: `nvmlDeviceGetCpuAffinity` """ if cpu_set_size == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinity(device, cpu_set_size, cpu_set_ptr) @@ -22488,7 +22249,7 @@ cpdef str device_get_uuid(intptr_t device): with nogil: __status__ = nvmlDeviceGetUUID(device, uuid, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(uuid) + return cpython.PyUnicode_FromString(uuid) cpdef unsigned int device_get_minor_number(intptr_t device) except? 0: @@ -22525,7 +22286,7 @@ cpdef str device_get_board_part_number(intptr_t device): with nogil: __status__ = nvmlDeviceGetBoardPartNumber(device, part_number, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(part_number) + return cpython.PyUnicode_FromString(part_number) cpdef str device_get_inforom_version(intptr_t device, int object): @@ -22545,7 +22306,7 @@ cpdef str device_get_inforom_version(intptr_t device, int object): with nogil: __status__ = nvmlDeviceGetInforomVersion(device, <_InforomObject>object, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef str device_get_inforom_image_version(intptr_t device): @@ -22564,7 +22325,7 @@ cpdef str device_get_inforom_image_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetInforomImageVersion(device, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef unsigned int device_get_inforom_configuration_checksum(intptr_t device) except? 0: @@ -22951,8 +22712,8 @@ cpdef object device_get_supported_memory_clocks(intptr_t device): __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, clocks_m_hz_ptr) @@ -22977,8 +22738,8 @@ cpdef object device_get_supported_graphics_clocks(intptr_t device, unsigned int __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, clocks_m_hz_ptr) @@ -23941,7 +23702,7 @@ cpdef str device_get_vbios_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetVbiosVersion(device, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef object device_get_bridge_chip_info(intptr_t device): @@ -24501,8 +24262,8 @@ cpdef object device_get_accounting_pids(intptr_t device): __status__ = nvmlDeviceGetAccountingPids(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlDeviceGetAccountingPids(device, count, pids_ptr) @@ -24545,8 +24306,8 @@ cpdef object device_get_retired_pages(intptr_t device, int cause): __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, NULL) check_status_size(__status__) if page_count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] - cdef _cyb_view.array addresses = _cyb_view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] + cdef view.array addresses = view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") cdef unsigned long long *addresses_ptr = (addresses.data) with nogil: __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, addresses_ptr) @@ -25484,7 +25245,7 @@ cpdef str vgpu_type_get_class(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetClass(vgpu_type_id, vgpu_type_class, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(vgpu_type_class) + return cpython.PyUnicode_FromString(vgpu_type_class) cpdef unsigned int vgpu_type_get_gpu_instance_profile_id(unsigned int vgpu_type_id) except? 0: @@ -25602,7 +25363,7 @@ cpdef str vgpu_type_get_license(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetLicense(vgpu_type_id, vgpu_type_license_string, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(vgpu_type_license_string) + return cpython.PyUnicode_FromString(vgpu_type_license_string) cpdef unsigned int vgpu_type_get_frame_rate_limit(unsigned int vgpu_type_id) except? 0: @@ -25696,7 +25457,7 @@ cpdef str vgpu_instance_get_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetUUID(vgpu_instance, uuid, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(uuid) + return cpython.PyUnicode_FromString(uuid) cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): @@ -25715,7 +25476,7 @@ cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetVmDriverVersion(vgpu_instance, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef unsigned long long vgpu_instance_get_fb_usage(unsigned int vgpu_instance) except? 0: @@ -25973,7 +25734,7 @@ cpdef str vgpu_instance_get_gpu_pci_id(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetGpuPciId(vgpu_instance, vgpu_pci_id, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(vgpu_pci_id) + return cpython.PyUnicode_FromString(vgpu_pci_id) cpdef unsigned int vgpu_type_get_capabilities(unsigned int vgpu_type_id, int capability) except? 0: @@ -26011,7 +25772,7 @@ cpdef str vgpu_instance_get_mdev_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetMdevUUID(vgpu_instance, mdev_uuid, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(mdev_uuid) + return cpython.PyUnicode_FromString(mdev_uuid) cpdef gpu_instance_set_vgpu_scheduler_state(intptr_t gpu_instance, intptr_t p_scheduler): @@ -26091,7 +25852,7 @@ cpdef str device_get_pgpu_metadata_string(intptr_t device): with nogil: __status__ = nvmlDeviceGetPgpuMetadataString(device, pgpu_metadata, buffer_size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(pgpu_metadata) + return cpython.PyUnicode_FromString(pgpu_metadata) cpdef object device_get_vgpu_scheduler_log(intptr_t device): @@ -26235,8 +25996,8 @@ cpdef object vgpu_instance_get_accounting_pids(unsigned int vgpu_instance): __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, pids_ptr) @@ -28691,4 +28452,3 @@ cpdef str vgpu_type_get_name(unsigned int vgpu_type_id): device_get_virtualization_mode.__doc__ = device_get_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") device_set_virtualization_mode.__doc__ = device_set_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") GpmMetricId.GPM_METRIC_DRAM_BW_UTIL.__doc__ = "Percentage of DRAM bw used vs theoretical maximum. ``0.0 - 100.0 *\u200d/``." -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvvm.pxd b/cuda_bindings/cuda/bindings/nvvm.pxd index 420716e052c..ee2a3b8da3b 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/nvvm.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=836bcb954d3db4313e3476bfd2e80f1318724c478a277e2d0194f4ad714e02ef # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index f7039477374..b269bb5366f 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -1,28 +1,22 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=db95fcc56a4df8bfa32ac08d8cadcaf2a7b3c69fd989f600673f3c48818d90b6 # -# This code was automatically generated across versions from 12.0.1 to 13.4.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum - -# <<<< END OF PREAMBLE CONTENT >>>> - +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. cimport cython # NOQA from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, nested_resource) +from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum + ############################################################################### # Enum ############################################################################### -class Result(_cyb_FastEnum): +class Result(_IntEnum): """ NVVM API call result code. @@ -327,4 +321,3 @@ cpdef int llvm_version(arch) except? 0: __status__ = nvvmLLVMVersion(_arch_, &major) check_status(__status__) return major -del _cyb_FastEnum From 16e65b0bcf4956da7c263b0e8cf90a4d06a33005 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 08:03:39 -0700 Subject: [PATCH 11/22] Revert "run_cybind_cython_gen 13.3.0 ../cuda-python" This reverts commit b8f6a853c8f34cdacbfa426867cc64278818c279. --- .../cuda/bindings/_bindings/cyruntime.pxd.in | 3 +-- .../cuda/bindings/_bindings/cyruntime.pyx.in | 3 +-- .../bindings/_bindings/cyruntime_ptds.pxd.in | 3 +-- .../bindings/_bindings/cyruntime_ptds.pyx.in | 3 +-- .../cuda/bindings/_internal/_fast_enum.py | 3 +-- .../cuda/bindings/_internal/driver.pxd | 3 +-- .../cuda/bindings/_internal/driver_linux.pyx | 3 +-- .../bindings/_internal/driver_windows.pyx | 3 +-- .../cuda/bindings/_internal/nvrtc.pxd | 3 +-- .../cuda/bindings/_internal/nvrtc_linux.pyx | 3 +-- .../cuda/bindings/_internal/nvrtc_windows.pyx | 3 +-- cuda_bindings/cuda/bindings/cydriver.pxd | 10 ++++----- cuda_bindings/cuda/bindings/cydriver.pyx | 3 +-- cuda_bindings/cuda/bindings/cynvrtc.pxd | 3 +-- cuda_bindings/cuda/bindings/cynvrtc.pyx | 3 +-- cuda_bindings/cuda/bindings/cyruntime.pxd.in | 3 +-- cuda_bindings/cuda/bindings/cyruntime.pyx.in | 3 +-- .../cuda/bindings/cyruntime_functions.pxi.in | 3 +-- .../cuda/bindings/cyruntime_types.pxi.in | 3 +-- cuda_bindings/cuda/bindings/driver.pxd | 11 ++++++++-- cuda_bindings/cuda/bindings/driver.pyx | 22 ++++++++++++++----- cuda_bindings/cuda/bindings/nvrtc.pxd | 3 +-- cuda_bindings/cuda/bindings/nvrtc.pyx | 3 +-- cuda_bindings/cuda/bindings/runtime.pxd.in | 3 +-- cuda_bindings/cuda/bindings/runtime.pyx.in | 3 +-- cuda_bindings/docs/source/module/driver.rst | 1 - cuda_bindings/docs/source/module/nvrtc.rst | 1 - cuda_bindings/docs/source/module/runtime.rst | 1 - 28 files changed, 52 insertions(+), 60 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in index 8772569c527..f3e7ad72c3f 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b3a2262d55c56664e63fdbbdc873271231576691f0299f60f751ad16ada2b4bb -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. include "../cyruntime_types.pxi" include "../_lib/cyruntime/cyruntime.pxd" diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in index c44b3e58df8..565e158cf45 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8ee7c6118c4caa1ce9a74a7f64ae4b650f1c3c3d4862bc8e3ec3c2a8a5b8301a -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. include "../cyruntime_functions.pxi" import os diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in index 009dd0dc517..f44b806d829 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3d0cc46c1986151a738226de05cb687a17f22d889db8f7d25f9963f201b01dbd -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in index 8fac3ee93c2..ceb7e0ac3c4 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2e3d73f811ab98842ef20fcd09865e4fcde4b54d46400d52bd0e933334809537 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py index 0e86b4e826d..c69c822588c 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=64c1e209e2bdea7f3c6c19698ebc1879b3b852178892b01f0ff2ef3009bdf590 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. """ diff --git a/cuda_bindings/cuda/bindings/_internal/driver.pxd b/cuda_bindings/cuda/bindings/_internal/driver.pxd index 65efb586609..dd221d2598d 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver.pxd +++ b/cuda_bindings/cuda/bindings/_internal/driver.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9e39aaca65ec3229429f4e6a0ecabdb183f9602b4d0072df39e2161fbfc16293 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from ..cydriver cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx index 00134df761d..26d88842946 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f33bed7eb99f02796f63126b9cfbabb23258dbb856b5b6aa25af73d373f8f658 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx index 23550677c8c..e199aa78ffb 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=08b9ad7032b4f20684748193e496b6a6adc46cc1a5d2933680a4c40816bcdf8f # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd index b2ae4c7c409..95a8f5c560e 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=90b341b6ec7a9907edac552831aa4504e5a5bb40401ed524c67b8a6600ebf6f1 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from ..cynvrtc cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx index f7d2a435b64..c5b283f1ebb 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=072ab825e78a81dbe61990003592e0e16d8aa44db854c9991f48fe900c8b21f9 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx index 8e311ff2fbe..13cfbed4725 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5415c47174286e4db1eed7437a7c31309640320f36455af48db85b80956738a4 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd b/cuda_bindings/cuda/bindings/cydriver.pxd index d2b56694558..29819407112 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd +++ b/cuda_bindings/cuda/bindings/cydriver.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5dc400b98d4696fcedfd11c4b05021de9b150edb836be62bd07034a8811524e0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t @@ -587,6 +586,9 @@ cdef extern from 'cuda.h': CU_TARGET_COMPUTE_103F CU_TARGET_COMPUTE_120F CU_TARGET_COMPUTE_121F + CU_TARGET_COMPUTE_101 + CU_TARGET_COMPUTE_101A + CU_TARGET_COMPUTE_101F ctypedef CUjit_target_enum CUjit_target cdef extern from 'cuda.h': @@ -3645,8 +3647,6 @@ cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 -cdef enum: CU_GRAPH_NODE_TYPE_RESERVED_16 = 16 - cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 @@ -3715,8 +3715,6 @@ cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 -cdef enum: CU_MEM_CREATE_USAGE_GPU_DIRECT_RDMA_OVER_PCIE = 4 - cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx b/cuda_bindings/cuda/bindings/cydriver.pyx index f12ab5ec8a4..b558e3afd7f 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx +++ b/cuda_bindings/cuda/bindings/cydriver.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0d0f36d0d763f489ddf26f5552c6836230ecca38c8ee794c57c4e9742dab67e9 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from ._internal cimport driver as _driver diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pxd b/cuda_bindings/cuda/bindings/cynvrtc.pxd index 75559460f73..f3066f12130 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pxd +++ b/cuda_bindings/cuda/bindings/cynvrtc.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=cd48fc1a3c6b8a5c6e0ca842b8ab5562bc325465e58be4e52a886285b79167e1 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pyx b/cuda_bindings/cuda/bindings/cynvrtc.pyx index dc4069c097e..936e4eff18a 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pyx +++ b/cuda_bindings/cuda/bindings/cynvrtc.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fb1b6808a82eb184282bf20605f297efa5791e112fb06ff9e2113abd2635b0ff # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from ._internal cimport nvrtc as _nvrtc diff --git a/cuda_bindings/cuda/bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/cyruntime.pxd.in index 0392006d164..b714d32bb00 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pxd.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=763764121989e408a4d2d417375585034af004071d2c9220fb18ce2bcec6dfd5 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/cyruntime.pyx.in index 67163f7842c..9b8324f1139 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=94a1b86e911326af73d60ae7523541fdad5a14d3225a725ce16886ced39a91e5 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cimport cuda.bindings._bindings.cyruntime as cyruntime cimport cython diff --git a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in index 4d8a7ae64a6..81e54abed07 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0a6a7c0de914a4d5f430df440e2c693bd168b5d9bb6eb3956b4d8b6683a69918 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "cuda_runtime_api.h": {{if 'cudaDeviceReset' in found_functions}} diff --git a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in index 7427060031b..d6ae085f5d4 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5e54bef72329c0f63347d9bb279f0c4767bbc52599e07d8adb9fcfe7b5904737 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "vector_types.h": diff --git a/cuda_bindings/cuda/bindings/driver.pxd b/cuda_bindings/cuda/bindings/driver.pxd index fb956fdc841..e22a9007115 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd +++ b/cuda_bindings/cuda/bindings/driver.pxd @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=cabdddc3010a0ec786a37c7059edfd295a5a669d31fb489bf61fa95a211a402f -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. cimport cuda.bindings.cydriver as cydriver include "_lib/utils.pxd" @@ -4990,6 +4989,10 @@ cdef class CUcheckpointRestoreArgs_st: Reserved for future use, must be zeroed + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods ------- getPtr() @@ -10587,6 +10590,10 @@ cdef class CUcheckpointRestoreArgs(CUcheckpointRestoreArgs_st): Reserved for future use, must be zeroed + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods ------- getPtr() diff --git a/cuda_bindings/cuda/bindings/driver.pyx b/cuda_bindings/cuda/bindings/driver.pyx index d0055c9b43e..e427814ac55 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx +++ b/cuda_bindings/cuda/bindings/driver.pyx @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=12523adba160813127c6cb1d9177baaa18b39bf066bb8836a03a97564848a296 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. from typing import Any, Optional import cython import ctypes @@ -23949,6 +23948,10 @@ cdef class CUcheckpointRestoreArgs_st: Reserved for future use, must be zeroed + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods ------- getPtr() @@ -24029,11 +24032,11 @@ cdef class CUcheckpointRestoreArgs_st: @property def reserved(self): - return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 52) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, {{struct_field_array_lengths['CUcheckpointRestoreArgs_st.reserved']}}) @reserved.setter def reserved(self, reserved): - if len(reserved) != 52: - raise ValueError("reserved length must be 52, is " + str(len(reserved))) + if len(reserved) != {{struct_field_array_lengths['CUcheckpointRestoreArgs_st.reserved']}}: + raise ValueError("reserved length must be {{struct_field_array_lengths['CUcheckpointRestoreArgs_st.reserved']}}, is " + str(len(reserved))) if CHAR_MIN == 0: for i, b in enumerate(reserved): if b < 0 and b > -129: @@ -24046,6 +24049,15 @@ cdef class CUcheckpointRestoreArgs_st: self._pvt_ptr[0].reserved[i] = b + @property + def reserved(self): + return [cuuint64_t(init_value=_reserved) for _reserved in self._pvt_ptr[0].reserved] + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + + + cdef class CUcheckpointUnlockArgs_st: """ CUDA checkpoint optional unlock arguments diff --git a/cuda_bindings/cuda/bindings/nvrtc.pxd b/cuda_bindings/cuda/bindings/nvrtc.pxd index 2c64b14ad78..c2e410d1aa2 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/nvrtc.pxd @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2dcb374cf17cae1c6109b7c0b3d1f717c73f5bbb7e94cd505771ca60d7305d7b -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. cimport cuda.bindings.cynvrtc as cynvrtc include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx b/cuda_bindings/cuda/bindings/nvrtc.pyx index c7e50b8199e..94808e0deda 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=556154b46e2590ec7ca850e9c74a8a0af62026f9a639b813914ca77c4da18246 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/runtime.pxd.in b/cuda_bindings/cuda/bindings/runtime.pxd.in index 03f487cb34d..5d9a9fe9fea 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd.in +++ b/cuda_bindings/cuda/bindings/runtime.pxd.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fc155abf4daab6600e2fccea3a1cc68b5f0c0d3877a1f90a7bab4f6b57b9996b -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cimport cuda.bindings.cyruntime as cyruntime include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index 1b19caed026..8654e52fea4 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d8ac44d495167b1d7cd8fd18e62291b171482a2656bad9b4230e7231dd8d853d -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1881+g248da917e. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/docs/source/module/driver.rst b/cuda_bindings/docs/source/module/driver.rst index edd1fd212b9..4f3df8fbf38 100644 --- a/cuda_bindings/docs/source/module/driver.rst +++ b/cuda_bindings/docs/source/module/driver.rst @@ -1,6 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 -.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=15f77ea651a2deffa7f7ae710189546cff9c23ba311b693207743eaf339a0a9c ------ driver diff --git a/cuda_bindings/docs/source/module/nvrtc.rst b/cuda_bindings/docs/source/module/nvrtc.rst index 963551fce26..0432493d47f 100644 --- a/cuda_bindings/docs/source/module/nvrtc.rst +++ b/cuda_bindings/docs/source/module/nvrtc.rst @@ -1,6 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 -.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9f44170e12fd85fa04fcd599a18d0b6474ec7920be8f28a5c097000eb3ccb0e0 ----- nvrtc diff --git a/cuda_bindings/docs/source/module/runtime.rst b/cuda_bindings/docs/source/module/runtime.rst index fb1c0bb9015..3e86a79e267 100644 --- a/cuda_bindings/docs/source/module/runtime.rst +++ b/cuda_bindings/docs/source/module/runtime.rst @@ -1,6 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 -.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0eccd5db44f7406acb693f5dd95ad2fa17c787c11659578cf54e116eb0b06e01 ------- runtime From cc82446318f566629e0d6c6bc422ac9c1f92d574 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 08:08:02 -0700 Subject: [PATCH 12/22] run_cybind_cython_gen 13.3.0 ../cuda-python --- cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in | 3 ++- cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in | 3 ++- cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in | 3 ++- cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in | 3 ++- cuda_bindings/cuda/bindings/_internal/_fast_enum.py | 3 ++- cuda_bindings/cuda/bindings/_internal/driver.pxd | 3 ++- cuda_bindings/cuda/bindings/_internal/driver_linux.pyx | 3 ++- cuda_bindings/cuda/bindings/_internal/driver_windows.pyx | 3 ++- cuda_bindings/cuda/bindings/_internal/nvrtc.pxd | 3 ++- cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx | 3 ++- cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx | 3 ++- cuda_bindings/cuda/bindings/cydriver.pxd | 3 ++- cuda_bindings/cuda/bindings/cydriver.pyx | 3 ++- cuda_bindings/cuda/bindings/cynvrtc.pxd | 3 ++- cuda_bindings/cuda/bindings/cynvrtc.pyx | 3 ++- cuda_bindings/cuda/bindings/cyruntime.pxd.in | 3 ++- cuda_bindings/cuda/bindings/cyruntime.pyx.in | 3 ++- cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in | 3 ++- cuda_bindings/cuda/bindings/cyruntime_types.pxi.in | 3 ++- cuda_bindings/cuda/bindings/driver.pxd | 3 ++- cuda_bindings/cuda/bindings/driver.pyx | 3 ++- cuda_bindings/cuda/bindings/nvrtc.pxd | 3 ++- cuda_bindings/cuda/bindings/nvrtc.pyx | 3 ++- cuda_bindings/cuda/bindings/runtime.pxd.in | 3 ++- cuda_bindings/cuda/bindings/runtime.pyx.in | 3 ++- cuda_bindings/docs/source/module/driver.rst | 1 + cuda_bindings/docs/source/module/nvrtc.rst | 1 + cuda_bindings/docs/source/module/runtime.rst | 1 + 28 files changed, 53 insertions(+), 25 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in index f3e7ad72c3f..4111d3026d8 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a99a543be62e221f4b4b43249719b689c33ea030adef3dfa012b31efac555ece -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. include "../cyruntime_types.pxi" include "../_lib/cyruntime/cyruntime.pxd" diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in index 565e158cf45..6917512cb82 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ccadd478eafb421b735d8fc0c44e1c03e873885646a81381f1d995bd573b5120 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. include "../cyruntime_functions.pxi" import os diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in index f44b806d829..516424d9d81 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=005e8f266f43a90c73b382df384f4143abf0e82b26d8ad69cb8aa58fbafa13ef -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in index ceb7e0ac3c4..d64be7623f8 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=1e1b93a907c72767d54e7b740e3e3a1b7b629b111af47d22c94b587b769bab9c -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py index c69c822588c..aa535fbc30f 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a5b4a9e0738454701ffd077f67db69d4319c686d2b49150a88c84010c7f8ae93 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. """ diff --git a/cuda_bindings/cuda/bindings/_internal/driver.pxd b/cuda_bindings/cuda/bindings/_internal/driver.pxd index dd221d2598d..2bc885df0f7 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver.pxd +++ b/cuda_bindings/cuda/bindings/_internal/driver.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a82b3f5dcb30b13294f6896a4d9d9f2f8d7be6b29c8f0a0c61677b1c622d4480 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. from ..cydriver cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx index 26d88842946..04ff330ff4f 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5707b0fec0518992a2e1a55400a030c3921e5443dc65094af083b8845b41b0e5 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx index e199aa78ffb..eed81cc1bcd 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=51232c67845ad8bb70e4d63f8f48ed1246b27d371b929f229fa09c27b23235c8 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd index 95a8f5c560e..7779dac2cdf 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ff79428bd0afac112d0a9f6131f9ed097b8d0ebc4574444a0e4a41e7f6e260d0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. from ..cynvrtc cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx index c5b283f1ebb..c29b9b4adfa 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6e54cb56384256b65cc962fbb478f7fac87523f222a141785b66881d8f554c64 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx index 13cfbed4725..4e85392c5cb 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7e496ceaaaf75ed29455bb670e3b3af9ab7d4ba1ea155a129088c04aab9b3c16 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd b/cuda_bindings/cuda/bindings/cydriver.pxd index 29819407112..6633fb7f715 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd +++ b/cuda_bindings/cuda/bindings/cydriver.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=be542bd43838a355344b0cdedcf3496368dd3cf0ebdfeda22b5963f384f4d06d # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx b/cuda_bindings/cuda/bindings/cydriver.pyx index b558e3afd7f..abc901d0a0d 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx +++ b/cuda_bindings/cuda/bindings/cydriver.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5b828e2ee0de9b245c71a6ba9361656ab10f7564caa7e3d9c162b2c6a07fb3df # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. from ._internal cimport driver as _driver diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pxd b/cuda_bindings/cuda/bindings/cynvrtc.pxd index f3066f12130..061a77f1477 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pxd +++ b/cuda_bindings/cuda/bindings/cynvrtc.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0da658de603326899002d26fdbea39e6f469626207e7b40435f7f24a7e5accf0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pyx b/cuda_bindings/cuda/bindings/cynvrtc.pyx index 936e4eff18a..2e0f8af1c94 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pyx +++ b/cuda_bindings/cuda/bindings/cynvrtc.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9725757222bfc514253ab6a6113b4e6b1c33fab841fe2fff8ebb1012ecf7715b # -# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. from ._internal cimport nvrtc as _nvrtc diff --git a/cuda_bindings/cuda/bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/cyruntime.pxd.in index b714d32bb00..1f6c90a2874 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pxd.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2d7f136277c2cc633450e22e7833a0cab63cdfc70e07719a2e46d3812cd11a2f -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/cyruntime.pyx.in index 9b8324f1139..a4d781dc64c 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8eaac6db08318ecc59f425f779f230fc18f12a64d077e6c9b3d0197725b747a4 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. cimport cuda.bindings._bindings.cyruntime as cyruntime cimport cython diff --git a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in index 81e54abed07..ee3571ee8cb 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=29630fb8d40658dc3ed853407f00b4618688984d4227aae877e2f32807fef519 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. cdef extern from "cuda_runtime_api.h": {{if 'cudaDeviceReset' in found_functions}} diff --git a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in index d6ae085f5d4..69e5d4b490b 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=93953ce179542f5c6172446b305a7568ce2b5190b3bfba1f1c9da282c3b965f0 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. cdef extern from "vector_types.h": diff --git a/cuda_bindings/cuda/bindings/driver.pxd b/cuda_bindings/cuda/bindings/driver.pxd index e22a9007115..1aba8b96cc4 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd +++ b/cuda_bindings/cuda/bindings/driver.pxd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f4b08b7f4b26966f9f462562819700500a100748c5b34ab47de79836e6bec3f2 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. cimport cuda.bindings.cydriver as cydriver include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/driver.pyx b/cuda_bindings/cuda/bindings/driver.pyx index e427814ac55..7f588984d84 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx +++ b/cuda_bindings/cuda/bindings/driver.pyx @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4a70be46627269cff03a2b89504463158d6e50d738cfde91e8c3ed1bf88fd9e0 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/nvrtc.pxd b/cuda_bindings/cuda/bindings/nvrtc.pxd index c2e410d1aa2..10ac2cfedd0 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/nvrtc.pxd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=06a058e3c626563f034714cce129fd58b33dd80c0e4a954723e92d0ae61c7c58 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. cimport cuda.bindings.cynvrtc as cynvrtc include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx b/cuda_bindings/cuda/bindings/nvrtc.pyx index 94808e0deda..d2c71ca0c57 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ac1af34ecd1468ac91074ce7f18423af19fbc7727653cdfc1cd9b6f33f6cec72 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/runtime.pxd.in b/cuda_bindings/cuda/bindings/runtime.pxd.in index 5d9a9fe9fea..c6b9ec47ffb 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd.in +++ b/cuda_bindings/cuda/bindings/runtime.pxd.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=532f673750b6344c789f7947449c1d99e3587792ba3b110e9dcc36396decbb67 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. cimport cuda.bindings.cyruntime as cyruntime include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index 8654e52fea4..4c783d2ad00 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6fe2ed828d10a452e3b9a6c2b27e9f606eb6aec3dae2613d0a6eae475c7744a2 -# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. +# This code was automatically generated with version 13.3.0. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/docs/source/module/driver.rst b/cuda_bindings/docs/source/module/driver.rst index 4f3df8fbf38..edd1fd212b9 100644 --- a/cuda_bindings/docs/source/module/driver.rst +++ b/cuda_bindings/docs/source/module/driver.rst @@ -1,5 +1,6 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 +.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=15f77ea651a2deffa7f7ae710189546cff9c23ba311b693207743eaf339a0a9c ------ driver diff --git a/cuda_bindings/docs/source/module/nvrtc.rst b/cuda_bindings/docs/source/module/nvrtc.rst index 0432493d47f..963551fce26 100644 --- a/cuda_bindings/docs/source/module/nvrtc.rst +++ b/cuda_bindings/docs/source/module/nvrtc.rst @@ -1,5 +1,6 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 +.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9f44170e12fd85fa04fcd599a18d0b6474ec7920be8f28a5c097000eb3ccb0e0 ----- nvrtc diff --git a/cuda_bindings/docs/source/module/runtime.rst b/cuda_bindings/docs/source/module/runtime.rst index 3e86a79e267..fb1c0bb9015 100644 --- a/cuda_bindings/docs/source/module/runtime.rst +++ b/cuda_bindings/docs/source/module/runtime.rst @@ -1,5 +1,6 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 +.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0eccd5db44f7406acb693f5dd95ad2fa17c787c11659578cf54e116eb0b06e01 ------- runtime From 94e42e89607a8ae6f12ab0e0ec458157593d180e Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 08:09:01 -0700 Subject: [PATCH 13/22] run_cybind_native 13.3.0 ../cuda-python --- .../cuda/bindings/_internal/_fast_enum.py | 4 +- .../cuda/bindings/_internal/cudla.pxd | 3 +- .../cuda/bindings/_internal/cudla_linux.pyx | 3 +- .../cuda/bindings/_internal/cufile.pxd | 3 +- .../cuda/bindings/_internal/cufile_linux.pyx | 3 +- .../cuda/bindings/_internal/nvfatbin.pxd | 3 +- .../bindings/_internal/nvfatbin_linux.pyx | 3 +- .../bindings/_internal/nvfatbin_windows.pyx | 3 +- .../cuda/bindings/_internal/nvjitlink.pxd | 3 +- .../bindings/_internal/nvjitlink_linux.pyx | 3 +- .../bindings/_internal/nvjitlink_windows.pyx | 3 +- .../cuda/bindings/_internal/nvml.pxd | 3 +- .../cuda/bindings/_internal/nvml_linux.pyx | 3 +- .../cuda/bindings/_internal/nvml_windows.pyx | 3 +- .../cuda/bindings/_internal/nvvm.pxd | 3 +- .../cuda/bindings/_internal/nvvm_linux.pyx | 3 +- .../cuda/bindings/_internal/nvvm_windows.pyx | 3 +- cuda_bindings/cuda/bindings/cudla.pxd | 3 +- cuda_bindings/cuda/bindings/cudla.pyx | 333 ++- cuda_bindings/cuda/bindings/cufile.pxd | 3 +- cuda_bindings/cuda/bindings/cufile.pyx | 372 +-- cuda_bindings/cuda/bindings/cycudla.pxd | 3 +- cuda_bindings/cuda/bindings/cycudla.pyx | 3 +- cuda_bindings/cuda/bindings/cycufile.pxd | 3 +- cuda_bindings/cuda/bindings/cycufile.pyx | 3 +- cuda_bindings/cuda/bindings/cynvfatbin.pxd | 3 +- cuda_bindings/cuda/bindings/cynvfatbin.pyx | 3 +- cuda_bindings/cuda/bindings/cynvjitlink.pxd | 3 +- cuda_bindings/cuda/bindings/cynvjitlink.pyx | 3 +- cuda_bindings/cuda/bindings/cynvml.pxd | 3 +- cuda_bindings/cuda/bindings/cynvml.pyx | 3 +- cuda_bindings/cuda/bindings/cynvvm.pxd | 3 +- cuda_bindings/cuda/bindings/cynvvm.pyx | 3 +- cuda_bindings/cuda/bindings/nvfatbin.pxd | 3 +- cuda_bindings/cuda/bindings/nvfatbin.pyx | 14 +- cuda_bindings/cuda/bindings/nvjitlink.pxd | 3 +- cuda_bindings/cuda/bindings/nvjitlink.pyx | 16 +- cuda_bindings/cuda/bindings/nvml.pxd | 3 +- cuda_bindings/cuda/bindings/nvml.pyx | 2605 +++++++++-------- cuda_bindings/cuda/bindings/nvvm.pxd | 3 +- cuda_bindings/cuda/bindings/nvvm.pyx | 15 +- 41 files changed, 1775 insertions(+), 1686 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py index aa535fbc30f..67f049d2768 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a5b4a9e0738454701ffd077f67db69d4319c686d2b49150a88c84010c7f8ae93 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5791f341ee9bb6573f42300fbed50cc52fc5e808c1d6bb9156e6aabb9db29b17 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. """ diff --git a/cuda_bindings/cuda/bindings/_internal/cudla.pxd b/cuda_bindings/cuda/bindings/_internal/cudla.pxd index 00bf3adc074..be14bfa9b33 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cudla.pxd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=07f18bf6993a0d962a4e844aa9ea9a335534c669992d112dd12003b77015e5ba -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. from ..cycudla cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx index 229681244ad..961cb14c96e 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2b56e5f08b7806fe10648817d36d96ce420cb5a8329615fb283f71119128d090 -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/cufile.pxd b/cuda_bindings/cuda/bindings/_internal/cufile.pxd index 7d0ace32466..f05d0549512 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cufile.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b70fdd33eb00b70224c097fb28dd1031d82e8a2930356a4428c93e3bd1b52a86 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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 7d92fc8ec46..123ffcf1ac1 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b43946a1b7b010b7d9ee95ed67723e3dfc54b46a6dc68829e936ffad6ba852dc # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd index 958e06e18af..12477d5f972 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b52d99b7f07615d6c5ecb869a5c632e6e9cb4d0cb4f6cb1e43977d29ecd9995c # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. from ..cynvfatbin cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx index 99a50ff9e82..8929d4298af 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=821fd26991431cd8e528f964b5035e1deafcddf44d2971a267d9ed11d80d5199 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx index 0a20389e291..7963b3346b0 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2052c33a9bbfdef36b362c4eedc1284ce8fa2fc905a53ac9c366218ca99f5913 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd index a6488994777..1fbb30e858b 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fd32577c0d6b922ff30c56dc4f3dcbed2251c393098c27d972ccc8688564fa50 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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 0a399b244c7..c9f205c6834 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f6e8c32c0afa43fe218ae5c6f43f402bb85ab1e9898ad6270872c3e546eb4913 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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 ba6f1c8d2df..2ac21a68648 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9043dd9e45a69e2bd6c7984832fca8cc1ccd7c66b605b384e4cff18b0c713027 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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 84a90694c0c..f002aad9293 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvml.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ed4c433854399c2e4f1adc3ffcfc37901e1be29c5aa50728498c87225edf92b1 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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 c61a2d7e22f..02aca861d2d 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bdb56d8618b22dfcdcb3da879bbe276c3caf7c07aae6e5aa2b76de817f4baa39 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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 7697b60af9d..c17d2ad6893 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=56d9b790c493aea94da4c2c52e78dea025da7c698edc614c374767038d40869c # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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 f265943dda4..38efdc53074 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a27b041eb470b98bf5b1a0a92ace9467c5f3921d47ee10557a4f00ff1e4ac411 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. from ..cynvvm cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx index f82a058cfb7..ebec0c9d6c6 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3c31adc68b8220439ea196a56ea63cf670aff0f85c0a67c8f554e1af4d07f456 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx index 27d31f96257..95f2e73b454 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=49ccc5908d39ebb526fee704591480550b5f780c05f14366531360e3ec2ac17a # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cudla.pxd b/cuda_bindings/cuda/bindings/cudla.pxd index 6126d868893..2501272f1ab 100644 --- a/cuda_bindings/cuda/bindings/cudla.pxd +++ b/cuda_bindings/cuda/bindings/cudla.pxd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e64a78a1b3e010d167373d7c9635ff4637dfd1a6a38ffafb671dcde4e12aaaad -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index f1b0938f108..b3ac7c1e369 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -1,25 +1,51 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 - -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. - -cimport cython # NOQA -from libc.stdint cimport intptr_t, uintptr_t - -from ._internal.utils cimport get_buffer_pointer - -from enum import IntEnum as _IntEnum - -from libc.stdlib cimport calloc, free, malloc -from cython cimport view -cimport cpython.buffer -cimport cpython.memoryview -cimport cpython -from libc.string cimport memcmp, memcpy +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6e7ac86c22e602c08df8250f3b50c135945378aa8ae4ddb4e10174fd979c4aa5 + +# <<<< PREAMBLE CONTENT >>>> + +cimport cpython as _cyb_cpython +cimport cpython.buffer as _cyb_cpython_buffer +from cython cimport view as _cyb_view +from libc.stdlib cimport ( + calloc as _cyb_calloc, + free as _cyb_free, + malloc as _cyb_malloc, +) +from libc.string cimport ( + memcmp as _cyb_memcmp, + memcpy as _cyb_memcpy, +) +from enum import IntEnum as _cyb_IntEnum import numpy as _numpy +cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL + +cdef _cyb_from_buffer(buffer, size, lowpp_type): + cdef _cyb_cpython.Py_buffer view + if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + _cyb_cpython.PyBuffer_Release(&view) -cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): +cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -31,34 +57,16 @@ cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) +# <<<< END OF PREAMBLE CONTENT >>>> -cdef __from_buffer(buffer, size, lowpp_type): - cdef Py_buffer view - if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - cpython.PyBuffer_Release(&view) +# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. -cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +cimport cython # NOQA +from libc.stdint cimport intptr_t, uintptr_t +from libc.stdlib cimport malloc, free +from ._internal.utils cimport get_buffer_pointer @@ -94,7 +102,7 @@ cdef class ExternalMemoryHandleDesc: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = _cyb_calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") self._owner = None @@ -106,7 +114,7 @@ cdef class ExternalMemoryHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ExternalMemoryHandleDesc object at {hex(id(self))}>" @@ -127,20 +135,20 @@ cdef class ExternalMemoryHandleDesc: if not isinstance(other, ExternalMemoryHandleDesc): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -172,7 +180,7 @@ cdef class ExternalMemoryHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalMemoryHandleDesc instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) + return _cyb_from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) @staticmethod def from_data(data): @@ -181,7 +189,7 @@ cdef class ExternalMemoryHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_memory_handle_desc_dtype` holding the data. """ - return __from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) + return _cyb_from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -196,10 +204,10 @@ cdef class ExternalMemoryHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalMemoryHandleDesc obj = ExternalMemoryHandleDesc.__new__(ExternalMemoryHandleDesc) if owner is None: - obj._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + obj._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -236,7 +244,7 @@ cdef class ExternalSemaphoreHandleDesc: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = _cyb_calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") self._owner = None @@ -248,7 +256,7 @@ cdef class ExternalSemaphoreHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ExternalSemaphoreHandleDesc object at {hex(id(self))}>" @@ -269,20 +277,20 @@ cdef class ExternalSemaphoreHandleDesc: if not isinstance(other, ExternalSemaphoreHandleDesc): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -303,7 +311,7 @@ cdef class ExternalSemaphoreHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalSemaphoreHandleDesc instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) + return _cyb_from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) @staticmethod def from_data(data): @@ -312,7 +320,7 @@ cdef class ExternalSemaphoreHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_semaphore_handle_desc_dtype` holding the data. """ - return __from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) + return _cyb_from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -327,10 +335,10 @@ cdef class ExternalSemaphoreHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalSemaphoreHandleDesc obj = ExternalSemaphoreHandleDesc.__new__(ExternalSemaphoreHandleDesc) if owner is None: - obj._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + obj._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -378,7 +386,7 @@ cdef class ModuleTensorDescriptor: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaModuleTensorDescriptor)) + self._ptr = _cyb_calloc(1, sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") self._owner = None @@ -390,7 +398,7 @@ cdef class ModuleTensorDescriptor: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ModuleTensorDescriptor object at {hex(id(self))}>" @@ -411,20 +419,20 @@ cdef class ModuleTensorDescriptor: if not isinstance(other, ModuleTensorDescriptor): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) + self._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -434,7 +442,7 @@ cdef class ModuleTensorDescriptor: @property def name(self): """~_numpy.int8: (array of length 81).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -444,7 +452,7 @@ cdef class ModuleTensorDescriptor: if len(buf) >= 81: raise ValueError("String too long for field name, max length is 80") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 81) + _cyb_memcpy((self._ptr[0].name), ptr, 81) @property def size_(self): @@ -559,7 +567,7 @@ cdef class ModuleTensorDescriptor: @property def stride(self): """~_numpy.uint32: (array of length 8).""" - cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].stride)) return _numpy.asarray(arr) @@ -569,14 +577,14 @@ cdef class ModuleTensorDescriptor: raise ValueError("This ModuleTensorDescriptor instance is read-only") if len(val) != 8: raise ValueError(f"Expected length { 8 } for field stride, got {len(val)}") - cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) + _cyb_memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an ModuleTensorDescriptor instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) + return _cyb_from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) @staticmethod def from_data(data): @@ -585,7 +593,7 @@ cdef class ModuleTensorDescriptor: Args: data (_numpy.ndarray): a single-element array of dtype `module_tensor_descriptor_dtype` holding the data. """ - return __from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) + return _cyb_from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -600,10 +608,10 @@ cdef class ModuleTensorDescriptor: raise ValueError("ptr must not be null (0)") cdef ModuleTensorDescriptor obj = ModuleTensorDescriptor.__new__(ModuleTensorDescriptor) if owner is None: - obj._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) + obj._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) obj._owner = None obj._owned = True else: @@ -641,7 +649,7 @@ cdef class Fence: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CudlaFence)) + self._ptr = _cyb_calloc(1, sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") self._owner = None @@ -653,7 +661,7 @@ cdef class Fence: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Fence object at {hex(id(self))}>" @@ -674,20 +682,20 @@ cdef class Fence: if not isinstance(other, Fence): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CudlaFence)) + self._ptr = _cyb_malloc(sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") - memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -719,7 +727,7 @@ cdef class Fence: @staticmethod def from_buffer(buffer): """Create an Fence instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CudlaFence), Fence) + return _cyb_from_buffer(buffer, sizeof(CudlaFence), Fence) @staticmethod def from_data(data): @@ -728,7 +736,7 @@ cdef class Fence: Args: data (_numpy.ndarray): a single-element array of dtype `fence_dtype` holding the data. """ - return __from_data(data, "fence_dtype", fence_dtype, Fence) + return _cyb_from_data(data, "fence_dtype", fence_dtype, Fence) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -743,10 +751,10 @@ cdef class Fence: raise ValueError("ptr must not be null (0)") cdef Fence obj = Fence.__new__(Fence) if owner is None: - obj._ptr = malloc(sizeof(CudlaFence)) + obj._ptr = _cyb_malloc(sizeof(CudlaFence)) if obj._ptr == NULL: raise MemoryError("Error allocating Fence") - memcpy((obj._ptr), ptr, sizeof(CudlaFence)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CudlaFence)) obj._owner = None obj._owned = True else: @@ -778,7 +786,7 @@ cdef class DevAttribute: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaDevAttribute)) + self._ptr = _cyb_calloc(1, sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") self._owner = None @@ -790,7 +798,7 @@ cdef class DevAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DevAttribute object at {hex(id(self))}>" @@ -811,20 +819,20 @@ cdef class DevAttribute: if not isinstance(other, DevAttribute): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaDevAttribute)) + self._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -856,7 +864,7 @@ cdef class DevAttribute: @staticmethod def from_buffer(buffer): """Create an DevAttribute instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) + return _cyb_from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) @staticmethod def from_data(data): @@ -865,7 +873,7 @@ cdef class DevAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `dev_attribute_dtype` holding the data. """ - return __from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) + return _cyb_from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -880,10 +888,10 @@ cdef class DevAttribute: raise ValueError("ptr must not be null (0)") cdef DevAttribute obj = DevAttribute.__new__(DevAttribute) if owner is None: - obj._ptr = malloc(sizeof(cudlaDevAttribute)) + obj._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) obj._owner = None obj._owned = True else: @@ -917,7 +925,7 @@ cdef class ModuleAttribute: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cudlaModuleAttribute)) + self._ptr = _cyb_calloc(1, sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") self._owner = None @@ -929,7 +937,7 @@ cdef class ModuleAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ModuleAttribute object at {hex(id(self))}>" @@ -950,20 +958,20 @@ cdef class ModuleAttribute: if not isinstance(other, ModuleAttribute): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaModuleAttribute)) + self._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1017,7 +1025,7 @@ cdef class ModuleAttribute: @staticmethod def from_buffer(buffer): """Create an ModuleAttribute instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) + return _cyb_from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) @staticmethod def from_data(data): @@ -1026,7 +1034,7 @@ cdef class ModuleAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `module_attribute_dtype` holding the data. """ - return __from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) + return _cyb_from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1041,10 +1049,10 @@ cdef class ModuleAttribute: raise ValueError("ptr must not be null (0)") cdef ModuleAttribute obj = ModuleAttribute.__new__(ModuleAttribute) if owner is None: - obj._ptr = malloc(sizeof(cudlaModuleAttribute)) + obj._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) obj._owner = None obj._owned = True else: @@ -1083,7 +1091,7 @@ cdef class WaitEvents: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(cudlaWaitEvents)) + self._ptr = _cyb_calloc(1, sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") self._owner = None @@ -1096,7 +1104,7 @@ cdef class WaitEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.WaitEvents object at {hex(id(self))}>" @@ -1117,20 +1125,20 @@ cdef class WaitEvents: if not isinstance(other, WaitEvents): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaWaitEvents)) + self._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1156,7 +1164,7 @@ cdef class WaitEvents: @staticmethod def from_buffer(buffer): """Create an WaitEvents instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) + return _cyb_from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) @staticmethod def from_data(data): @@ -1165,7 +1173,7 @@ cdef class WaitEvents: Args: data (_numpy.ndarray): a single-element array of dtype `wait_events_dtype` holding the data. """ - return __from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) + return _cyb_from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1180,10 +1188,10 @@ cdef class WaitEvents: raise ValueError("ptr must not be null (0)") cdef WaitEvents obj = WaitEvents.__new__(WaitEvents) if owner is None: - obj._ptr = malloc(sizeof(cudlaWaitEvents)) + obj._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) obj._owner = None obj._owned = True else: @@ -1224,7 +1232,7 @@ cdef class SignalEvents: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(cudlaSignalEvents)) + self._ptr = _cyb_calloc(1, sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") self._owner = None @@ -1237,7 +1245,7 @@ cdef class SignalEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.SignalEvents object at {hex(id(self))}>" @@ -1258,20 +1266,20 @@ cdef class SignalEvents: if not isinstance(other, SignalEvents): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaSignalEvents)) + self._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1282,8 +1290,8 @@ cdef class SignalEvents: def dev_ptrs(self): """int: """ if self._ptr[0].devPtrs == NULL or self._ptr[0].numEvents == 0: - return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef view.array arr = view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].devPtrs) return arr @@ -1295,7 +1303,7 @@ cdef class SignalEvents: self._ptr[0].numEvents = _n if _n == 0: return - cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1322,7 +1330,7 @@ cdef class SignalEvents: @staticmethod def from_buffer(buffer): """Create an SignalEvents instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) + return _cyb_from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) @staticmethod def from_data(data): @@ -1331,7 +1339,7 @@ cdef class SignalEvents: Args: data (_numpy.ndarray): a single-element array of dtype `signal_events_dtype` holding the data. """ - return __from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) + return _cyb_from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1346,10 +1354,10 @@ cdef class SignalEvents: raise ValueError("ptr must not be null (0)") cdef SignalEvents obj = SignalEvents.__new__(SignalEvents) if owner is None: - obj._ptr = malloc(sizeof(cudlaSignalEvents)) + obj._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) obj._owner = None obj._owned = True else: @@ -1394,7 +1402,7 @@ cdef class Task: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(cudlaTask)) + self._ptr = _cyb_calloc(1, sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") self._owner = None @@ -1407,7 +1415,7 @@ cdef class Task: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Task object at {hex(id(self))}>" @@ -1428,20 +1436,20 @@ cdef class Task: if not isinstance(other, Task): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(cudlaTask)) + self._ptr = _cyb_malloc(sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") - memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1463,8 +1471,8 @@ cdef class Task: def output_tensor(self): """int: """ if self._ptr[0].outputTensor == NULL or self._ptr[0].numOutputTensors == 0: - return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef view.array arr = view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].outputTensor) return arr @@ -1476,7 +1484,7 @@ cdef class Task: self._ptr[0].numOutputTensors = _n if _n == 0: return - cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1488,8 +1496,8 @@ cdef class Task: def input_tensor(self): """int: """ if self._ptr[0].inputTensor == NULL or self._ptr[0].numInputTensors == 0: - return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef view.array arr = view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].inputTensor) return arr @@ -1501,7 +1509,7 @@ cdef class Task: self._ptr[0].numInputTensors = _n if _n == 0: return - cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1534,7 +1542,7 @@ cdef class Task: @staticmethod def from_buffer(buffer): """Create an Task instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(cudlaTask), Task) + return _cyb_from_buffer(buffer, sizeof(cudlaTask), Task) @staticmethod def from_data(data): @@ -1543,7 +1551,7 @@ cdef class Task: Args: data (_numpy.ndarray): a single-element array of dtype `task_dtype` holding the data. """ - return __from_data(data, "task_dtype", task_dtype, Task) + return _cyb_from_data(data, "task_dtype", task_dtype, Task) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1558,10 +1566,10 @@ cdef class Task: raise ValueError("ptr must not be null (0)") cdef Task obj = Task.__new__(Task) if owner is None: - obj._ptr = malloc(sizeof(cudlaTask)) + obj._ptr = _cyb_malloc(sizeof(cudlaTask)) if obj._ptr == NULL: raise MemoryError("Error allocating Task") - memcpy((obj._ptr), ptr, sizeof(cudlaTask)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaTask)) obj._owner = None obj._owned = True else: @@ -1577,7 +1585,7 @@ cdef class Task: # Enum ############################################################################### -class Status(_IntEnum): +class Status(_cyb_IntEnum): """ See `cudlaStatus`. """ @@ -1606,14 +1614,14 @@ class Status(_IntEnum): ErrorDlaErrDataMismatch = cudlaErrorDlaErrDataMismatch ErrorUnknown = cudlaErrorUnknown -class Mode(_IntEnum): +class Mode(_cyb_IntEnum): """ See `cudlaMode`. """ CUDA_DLA = CUDLA_CUDA_DLA STANDALONE = CUDLA_STANDALONE -class ModuleAttributeType(_IntEnum): +class ModuleAttributeType(_cyb_IntEnum): """ See `cudlaModuleAttributeType`. """ @@ -1624,21 +1632,21 @@ class ModuleAttributeType(_IntEnum): NUM_OUTPUT_TASK_STATISTICS = CUDLA_NUM_OUTPUT_TASK_STATISTICS OUTPUT_TASK_STATISTICS_DESCRIPTORS = CUDLA_OUTPUT_TASK_STATISTICS_DESCRIPTORS -class FenceType(_IntEnum): +class FenceType(_cyb_IntEnum): """ See `cudlaFenceType`. """ NVSCISYNC_FENCE = CUDLA_NVSCISYNC_FENCE NVSCISYNC_FENCE_SOF = CUDLA_NVSCISYNC_FENCE_SOF -class ModuleLoadFlags(_IntEnum): +class ModuleLoadFlags(_cyb_IntEnum): """ See `cudlaModuleLoadFlags`. """ MODULE_DEFAULT = CUDLA_MODULE_DEFAULT MODULE_ENABLE_FAULT_DIAGNOSTICS = CUDLA_MODULE_ENABLE_FAULT_DIAGNOSTICS -class SubmissionFlags(_IntEnum): +class SubmissionFlags(_cyb_IntEnum): """ See `cudlaSubmissionFlags`. """ @@ -1646,7 +1654,7 @@ class SubmissionFlags(_IntEnum): SUBMIT_SKIP_LOCK_ACQUIRE = CUDLA_SUBMIT_SKIP_LOCK_ACQUIRE SUBMIT_DIAGNOSTICS_TASK = CUDLA_SUBMIT_DIAGNOSTICS_TASK -class AccessPermissionFlags(_IntEnum): +class AccessPermissionFlags(_cyb_IntEnum): """ See `cudlaAccessPermissionFlags`. """ @@ -1654,7 +1662,7 @@ class AccessPermissionFlags(_IntEnum): READ_ONLY_PERM = CUDLA_READ_ONLY_PERM TASK_STATISTICS = CUDLA_TASK_STATISTICS -class DevAttributeType(_IntEnum): +class DevAttributeType(_cyb_IntEnum): """ See `cudlaDevAttributeType`. """ @@ -1826,3 +1834,4 @@ cpdef module_get_attributes(intptr_t h_module, int attr_type) except *: free(desc_buf) else: raise ValueError(f"Unknown attribute type: {attr_type}") +del _cyb_IntEnum diff --git a/cuda_bindings/cuda/bindings/cufile.pxd b/cuda_bindings/cuda/bindings/cufile.pxd index 1803837a4ce..8ffbe660637 100644 --- a/cuda_bindings/cuda/bindings/cufile.pxd +++ b/cuda_bindings/cuda/bindings/cufile.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=232df43b5a8960f10286c172abc71222a3822087a1f6134e12d9341f3b53886c # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1568+g289771de9.d20260413. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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 2798a65cb3f..734dbce4e06 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -1,29 +1,55 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=359f9b42f4f97b9a74570e1f7d20eb6f5faae2df194a6161f4d5a9512c3ffbe3 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. - -cimport cython # NOQA -from libc cimport errno -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum - -import cython - -from cuda.bindings.driver import CUresult as pyCUresult - -from libc.stdlib cimport calloc, free, malloc -from cython cimport view -cimport cpython.buffer -cimport cpython.memoryview -cimport cpython -from libc.string cimport memcmp, memcpy +# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +cimport cpython as _cyb_cpython +cimport cpython.buffer as _cyb_cpython_buffer +cimport cpython.memoryview as _cyb_cpython_memoryview +from cython cimport view as _cyb_view +from libc.stdlib cimport ( + calloc as _cyb_calloc, + free as _cyb_free, + malloc as _cyb_malloc, +) +from libc.string cimport ( + memcmp as _cyb_memcmp, + memcpy as _cyb_memcpy, +) +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum import numpy as _numpy +cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): +cdef _cyb_from_buffer(buffer, size, lowpp_type): + cdef _cyb_cpython.Py_buffer view + if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + _cyb_cpython.PyBuffer_Release(&view) + +cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -35,34 +61,17 @@ cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) +# <<<< END OF PREAMBLE CONTENT >>>> -cdef __from_buffer(buffer, size, lowpp_type): - cdef Py_buffer view - if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - cpython.PyBuffer_Release(&view) +cimport cython # NOQA +from libc cimport errno +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) -cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +import cython +from cuda.bindings.driver import CUresult as pyCUresult ############################################################################### # POD @@ -89,7 +98,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof((NULL).handle)) + self._ptr = _cyb_calloc(1, sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") self._owner = None @@ -101,7 +110,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -122,20 +131,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof((NULL).handle)) + self._ptr = _cyb_malloc(sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -167,7 +176,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((NULL).handle), _py_anon_pod1) + return _cyb_from_buffer(buffer, sizeof((NULL).handle), _py_anon_pod1) @staticmethod def from_data(data): @@ -176,7 +185,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -191,10 +200,10 @@ 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 = malloc(sizeof((NULL).handle)) + obj._ptr = _cyb_malloc(sizeof((NULL).handle)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy((obj._ptr), ptr, sizeof((NULL).handle)) + _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).handle)) obj._owner = None obj._owned = True else: @@ -234,7 +243,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof((NULL).u.batch)) + self._ptr = _cyb_calloc(1, sizeof((NULL).u.batch)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") self._owner = None @@ -246,7 +255,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -267,20 +276,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof((NULL).u.batch)) + self._ptr = _cyb_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)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u.batch)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -334,7 +343,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((NULL).u.batch), _py_anon_pod3) + return _cyb_from_buffer(buffer, sizeof((NULL).u.batch), _py_anon_pod3) @staticmethod def from_data(data): @@ -343,7 +352,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -358,10 +367,10 @@ 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 = malloc(sizeof((NULL).u.batch)) + obj._ptr = _cyb_malloc(sizeof((NULL).u.batch)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) + _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) obj._owner = None obj._owned = True else: @@ -436,10 +445,10 @@ cdef class IOEvents: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def cookie(self): @@ -528,8 +537,8 @@ cdef class IOEvents: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOEvents obj = IOEvents.__new__(IOEvents) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOEvents_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_events_dtype) obj._data = data.view(_numpy.recarray) @@ -564,7 +573,7 @@ cdef class OpCounter: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileOpCounter_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") self._owner = None @@ -576,7 +585,7 @@ cdef class OpCounter: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.OpCounter object at {hex(id(self))}>" @@ -597,20 +606,20 @@ cdef class OpCounter: if not isinstance(other, OpCounter): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileOpCounter_t)) + self._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -642,7 +651,7 @@ cdef class OpCounter: @staticmethod def from_buffer(buffer): """Create an OpCounter instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) + return _cyb_from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) @staticmethod def from_data(data): @@ -651,7 +660,7 @@ cdef class OpCounter: Args: data (_numpy.ndarray): a single-element array of dtype `op_counter_dtype` holding the data. """ - return __from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) + return _cyb_from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -666,10 +675,10 @@ cdef class OpCounter: raise ValueError("ptr must not be null (0)") cdef OpCounter obj = OpCounter.__new__(OpCounter) if owner is None: - obj._ptr = malloc(sizeof(CUfileOpCounter_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) if obj._ptr == NULL: raise MemoryError("Error allocating OpCounter") - memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) obj._owner = None obj._owned = True else: @@ -771,10 +780,10 @@ cdef class PerGpuStats: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def uuid(self): @@ -1158,8 +1167,8 @@ cdef class PerGpuStats: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PerGpuStats obj = PerGpuStats.__new__(PerGpuStats) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfilePerGpuStats_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=per_gpu_stats_dtype) obj._data = data.view(_numpy.recarray) @@ -1231,10 +1240,10 @@ cdef class Descr: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def type(self): @@ -1321,8 +1330,8 @@ cdef class Descr: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Descr obj = Descr.__new__(Descr) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileDescr_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=descr_dtype) obj._data = data.view(_numpy.recarray) @@ -1350,7 +1359,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof((NULL).u)) + self._ptr = _cyb_calloc(1, sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") self._owner = None @@ -1362,7 +1371,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -1383,20 +1392,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof((NULL).u)) + self._ptr = _cyb_malloc(sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1413,12 +1422,12 @@ 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(cuda_bindings_cufile__anon_pod3) * 1) + _cyb_memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(cuda_bindings_cufile__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an _py_anon_pod2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) + return _cyb_from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) @staticmethod def from_data(data): @@ -1427,7 +1436,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1442,10 +1451,10 @@ 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 = malloc(sizeof((NULL).u)) + obj._ptr = _cyb_malloc(sizeof((NULL).u)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy((obj._ptr), ptr, sizeof((NULL).u)) + _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u)) obj._owner = None obj._owned = True else: @@ -1524,7 +1533,7 @@ cdef class StatsLevel1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileStatsLevel1_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") self._owner = None @@ -1536,7 +1545,7 @@ cdef class StatsLevel1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel1 object at {hex(id(self))}>" @@ -1557,20 +1566,20 @@ cdef class StatsLevel1: if not isinstance(other, StatsLevel1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileStatsLevel1_t)) + self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1587,7 +1596,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def write_ops(self): @@ -1599,7 +1608,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_register_ops(self): @@ -1611,7 +1620,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_deregister_ops(self): @@ -1623,7 +1632,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_register_ops(self): @@ -1635,7 +1644,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_deregister_ops(self): @@ -1647,7 +1656,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_submit_ops(self): @@ -1659,7 +1668,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_complete_ops(self): @@ -1671,7 +1680,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_setup_ops(self): @@ -1683,7 +1692,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_cancel_ops(self): @@ -1695,7 +1704,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_destroy_ops(self): @@ -1707,7 +1716,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_enqueued_ops(self): @@ -1719,7 +1728,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_enqueued_ops(self): @@ -1731,7 +1740,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_processed_ops(self): @@ -1743,7 +1752,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_processed_ops(self): @@ -1755,7 +1764,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_nvfs_submit_ops(self): @@ -1767,7 +1776,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_p2p_submit_ops(self): @@ -1779,7 +1788,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_aio_submit_ops(self): @@ -1791,7 +1800,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_iouring_submit_ops(self): @@ -1803,7 +1812,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_mixed_io_submit_ops(self): @@ -1815,7 +1824,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_total_submit_ops(self): @@ -1827,7 +1836,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + _cyb_memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def read_bytes(self): @@ -2074,7 +2083,7 @@ cdef class StatsLevel1: @staticmethod def from_buffer(buffer): """Create an StatsLevel1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) + return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) @staticmethod def from_data(data): @@ -2083,7 +2092,7 @@ cdef class StatsLevel1: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level1_dtype` holding the data. """ - return __from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) + return _cyb_from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2098,10 +2107,10 @@ cdef class StatsLevel1: raise ValueError("ptr must not be null (0)") cdef StatsLevel1 obj = StatsLevel1.__new__(StatsLevel1) if owner is None: - obj._ptr = malloc(sizeof(CUfileStatsLevel1_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) obj._owner = None obj._owned = True else: @@ -2178,10 +2187,10 @@ cdef class IOParams: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def mode(self): @@ -2290,8 +2299,8 @@ cdef class IOParams: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOParams obj = IOParams.__new__(IOParams) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOParams_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_params_dtype) obj._data = data.view(_numpy.recarray) @@ -2327,7 +2336,7 @@ cdef class StatsLevel2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileStatsLevel2_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") self._owner = None @@ -2339,7 +2348,7 @@ cdef class StatsLevel2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel2 object at {hex(id(self))}>" @@ -2360,20 +2369,20 @@ cdef class StatsLevel2: if not isinstance(other, StatsLevel2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileStatsLevel2_t)) + self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2390,12 +2399,12 @@ cdef class StatsLevel2: if self._readonly: raise ValueError("This StatsLevel2 instance is read-only") cdef StatsLevel1 val_ = val - memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) + _cyb_memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) @property def read_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].read_size_kb_hist)) return _numpy.asarray(arr) @@ -2405,14 +2414,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field read_size_kb_hist, got {len(val)}") - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + _cyb_memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @property def write_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].write_size_kb_hist)) return _numpy.asarray(arr) @@ -2422,14 +2431,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field write_size_kb_hist, got {len(val)}") - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + _cyb_memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an StatsLevel2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) + return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) @staticmethod def from_data(data): @@ -2438,7 +2447,7 @@ cdef class StatsLevel2: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level2_dtype` holding the data. """ - return __from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) + return _cyb_from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2453,10 +2462,10 @@ cdef class StatsLevel2: raise ValueError("ptr must not be null (0)") cdef StatsLevel2 obj = StatsLevel2.__new__(StatsLevel2) if owner is None: - obj._ptr = malloc(sizeof(CUfileStatsLevel2_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) obj._owner = None obj._owned = True else: @@ -2495,7 +2504,7 @@ cdef class StatsLevel3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(CUfileStatsLevel3_t)) + self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") self._owner = None @@ -2507,7 +2516,7 @@ cdef class StatsLevel3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel3 object at {hex(id(self))}>" @@ -2528,20 +2537,20 @@ cdef class StatsLevel3: if not isinstance(other, StatsLevel3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(CUfileStatsLevel3_t)) + self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2558,7 +2567,7 @@ cdef class StatsLevel3: if self._readonly: raise ValueError("This StatsLevel3 instance is read-only") cdef StatsLevel2 val_ = val - memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) + _cyb_memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) @property def per_gpu_stats(self): @@ -2572,7 +2581,7 @@ cdef class StatsLevel3: cdef PerGpuStats val_ = val if len(val) != 16: raise ValueError(f"Expected length { 16 } for field per_gpu_stats, got {len(val)}") - memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) + _cyb_memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) @property def num_gpus(self): @@ -2588,7 +2597,7 @@ cdef class StatsLevel3: @staticmethod def from_buffer(buffer): """Create an StatsLevel3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) + return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) @staticmethod def from_data(data): @@ -2597,7 +2606,7 @@ cdef class StatsLevel3: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level3_dtype` holding the data. """ - return __from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) + return _cyb_from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2612,10 +2621,10 @@ cdef class StatsLevel3: raise ValueError("ptr must not be null (0)") cdef StatsLevel3 obj = StatsLevel3.__new__(StatsLevel3) if owner is None: - obj._ptr = malloc(sizeof(CUfileStatsLevel3_t)) + obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) obj._owner = None obj._owned = True else: @@ -2630,7 +2639,7 @@ cdef class StatsLevel3: # Enum ############################################################################### -class OpError(_FastEnum): +class OpError(_cyb_FastEnum): """ See `CUfileOpError`. """ @@ -2684,7 +2693,7 @@ class OpError(_FastEnum): BATCH_NOCOMPAT_ERROR = CU_FILE_BATCH_NOCOMPAT_ERROR IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR -class DriverStatusFlags(_FastEnum): +class DriverStatusFlags(_cyb_FastEnum): """ See `CUfileDriverStatusFlags_t`. """ @@ -2703,7 +2712,7 @@ class DriverStatusFlags(_FastEnum): VIRTIOFS_SUPPORTED = (CU_FILE_VIRTIOFS_SUPPORTED, 'Support for VirtioFS') MAX_TARGET_TYPES = (CU_FILE_MAX_TARGET_TYPES, 'Maximum FS supported') -class DriverControlFlags(_FastEnum): +class DriverControlFlags(_cyb_FastEnum): """ See `CUfileDriverControlFlags_t`. """ @@ -2712,7 +2721,7 @@ class DriverControlFlags(_FastEnum): POSIX_IO_MODE = (CU_FILE_POSIX_IO_MODE, 'Vanilla posix io mode. properties.posix_io_mode') FALLBACK_IO_MODE = (CU_FILE_FALLBACK_IO_MODE, 'Fallback io mode. properties.gds_fallback_io') -class FeatureFlags(_FastEnum): +class FeatureFlags(_cyb_FastEnum): """ See `CUfileFeatureFlags_t`. """ @@ -2722,7 +2731,7 @@ class FeatureFlags(_FastEnum): PARALLEL_IO_SUPPORTED = (CU_FILE_PARALLEL_IO_SUPPORTED, 'Supported') P2P_SUPPORTED = (CU_FILE_P2P_SUPPORTED, 'Support for PCI P2PDMA') -class FileHandleType(_FastEnum): +class FileHandleType(_cyb_FastEnum): """ See `CUfileFileHandleType`. """ @@ -2730,14 +2739,14 @@ class FileHandleType(_FastEnum): OPAQUE_WIN32 = (CU_FILE_HANDLE_TYPE_OPAQUE_WIN32, 'Windows based handle (unsupported)') USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS -class Opcode(_FastEnum): +class Opcode(_cyb_FastEnum): """ See `CUfileOpcode_t`. """ READ = CUFILE_READ WRITE = CUFILE_WRITE -class Status(_FastEnum): +class Status(_cyb_FastEnum): """ See `CUfileStatus_t`. """ @@ -2749,13 +2758,13 @@ class Status(_FastEnum): TIMEOUT = CUFILE_TIMEOUT FAILED = CUFILE_FAILED -class BatchMode(_FastEnum): +class BatchMode(_cyb_FastEnum): """ See `CUfileBatchMode_t`. """ BATCH = CUFILE_BATCH -class SizeTConfigParameter(_FastEnum): +class SizeTConfigParameter(_cyb_FastEnum): """ See `CUFileSizeTConfigParameter_t`. """ @@ -2772,7 +2781,7 @@ class SizeTConfigParameter(_FastEnum): POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS -class BoolConfigParameter(_FastEnum): +class BoolConfigParameter(_cyb_FastEnum): """ See `CUFileBoolConfigParameter_t`. """ @@ -2789,7 +2798,7 @@ class BoolConfigParameter(_FastEnum): SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS -class StringConfigParameter(_FastEnum): +class StringConfigParameter(_cyb_FastEnum): """ See `CUFileStringConfigParameter_t`. """ @@ -2797,7 +2806,7 @@ class StringConfigParameter(_FastEnum): ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH LOG_DIR = CUFILE_PARAM_LOG_DIR -class ArrayConfigParameter(_FastEnum): +class ArrayConfigParameter(_cyb_FastEnum): """ See `CUFileArrayConfigParameter_t`. """ @@ -2806,7 +2815,7 @@ class ArrayConfigParameter(_FastEnum): GPU_BOUNCE_BUFFER_SLAB_SIZE_KB = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_SIZE_KB GPU_BOUNCE_BUFFER_SLAB_COUNT = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_COUNT -class P2PFlags(_FastEnum): +class P2PFlags(_cyb_FastEnum): """ See `CUfileP2PFlags_t`. """ @@ -3094,7 +3103,7 @@ cpdef str get_parameter_string(int param, int len): with nogil: __status__ = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) check_status(__status__) - return cpython.PyUnicode_FromString(desc_str) + return _cyb_cpython.PyUnicode_FromString(desc_str) cpdef set_parameter_size_t(int param, size_t value): @@ -3332,3 +3341,4 @@ cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) check_status(status) return status +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/cycudla.pxd b/cuda_bindings/cuda/bindings/cycudla.pxd index 8a90dd964a7..2ebaaa1ed08 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pxd +++ b/cuda_bindings/cuda/bindings/cycudla.pxd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c4dacd5de0bc9a6ac0cc92dabed1728cc6133d0448924ea6db4f9c740ff089b6 -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. # This layer exposes the C header to Cython as-is. from libc.stdint cimport int8_t, int16_t, int32_t, int64_t diff --git a/cuda_bindings/cuda/bindings/cycudla.pyx b/cuda_bindings/cuda/bindings/cycudla.pyx index 198ffb308a7..1f9861d593e 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pyx +++ b/cuda_bindings/cuda/bindings/cycudla.pyx @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b134ed8cb83eb5a5c6ff30be817e64d09d421d7257761e58fbc06b131690a392 -# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. from ._internal cimport cudla as _cudla diff --git a/cuda_bindings/cuda/bindings/cycufile.pxd b/cuda_bindings/cuda/bindings/cycufile.pxd index 96c93f1a54e..a47a09c4d13 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pxd +++ b/cuda_bindings/cuda/bindings/cycufile.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f840820f160e36eebe6e052b5a5d3a35b55704060301ee2ab7d5cd7a7d580418 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t from libc.time cimport time_t diff --git a/cuda_bindings/cuda/bindings/cycufile.pyx b/cuda_bindings/cuda/bindings/cycufile.pyx index 32b0614be24..60f9bf5cf00 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pyx +++ b/cuda_bindings/cuda/bindings/cycufile.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=74f1f9c9443af66fdadbfeeb01e5c15c2d8f1b9b0b20eafa2a279583bcf7df00 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. from ._internal cimport cufile as _cufile diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pxd b/cuda_bindings/cuda/bindings/cynvfatbin.pxd index f810e5e0077..584d1d16a02 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fede358631d711050e04c9b0f7582773ba7012844987bc47358f1378d484a136 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pyx b/cuda_bindings/cuda/bindings/cynvfatbin.pyx index bac18e05a70..fd301a15bca 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bae30bbdaff2009b86c05de2a46bbaecad9e63327c93a10b6f2e8a2d95fd6a60 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. from ._internal cimport nvfatbin as _nvfatbin diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pxd b/cuda_bindings/cuda/bindings/cynvjitlink.pxd index 8f8a249acb3..058bae2f030 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=58778b073e81f54fcf5c42775b45944d22b6e944fe6965b42d83898239f1e1b6 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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 a44fedf196e..a0b54a192ca 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e507515291c3bc20b88d0b58ab5b01a1cc38c5d21bca87a4f379cc846b869ed4 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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 21c2ca0c180..95e3c92333b 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pxd +++ b/cuda_bindings/cuda/bindings/cynvml.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5e55307c8ff89e076c29fc7c2a36bf0af7ecf3162693a4c94d7fca65454d6a9e # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. from libc.stdint cimport int64_t diff --git a/cuda_bindings/cuda/bindings/cynvml.pyx b/cuda_bindings/cuda/bindings/cynvml.pyx index 09ee2601a5b..eca48875f37 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pyx +++ b/cuda_bindings/cuda/bindings/cynvml.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ec221879a459b2de9b3dfe54cba58613e9c08b279a95f782a450c98fd7cea532 # -# This code was automatically generated across versions from 12.9.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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 e1f89be12cf..1b07f216479 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pxd +++ b/cuda_bindings/cuda/bindings/cynvvm.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=79be0fd21f7c6b6112743eb60ce9e69287a66999ecaaa063d87a52ab64982bce # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. ############################################################################### diff --git a/cuda_bindings/cuda/bindings/cynvvm.pyx b/cuda_bindings/cuda/bindings/cynvvm.pyx index 4e4b4fe5a74..23f4cc720cf 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pyx +++ b/cuda_bindings/cuda/bindings/cynvvm.pyx @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7ea5803be62646c287bad43350e27d3254f35d25ab50b9c54f7ac5695b4c3114 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. from ._internal cimport nvvm as _nvvm diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pxd b/cuda_bindings/cuda/bindings/nvfatbin.pxd index dbfb587b7f2..6ad1678fc9d 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/nvfatbin.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c9d5a4b06ca92f766674f286b75dfc83dff952b5987eb88cdb2773bb28f1ea6a # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index 8367cd14e83..527792d0eca 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -1,15 +1,22 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d5a4eb978220598892471233ffd8b7caa8cee7b6b0c27d2d9c458f1d91979f8b # -# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum + +# <<<< END OF PREAMBLE CONTENT >>>> + cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) -from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum from libcpp.vector cimport vector @@ -17,7 +24,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_IntEnum): +class Result(_cyb_FastEnum): """ The enumerated type `nvFatbinResult` defines API call result codes. nvFatbin APIs return `nvFatbinResult` codes to indicate the result. @@ -323,3 +330,4 @@ cpdef add_tile_ir(intptr_t handle, code, size_t size, identifier, options_cmd_li with nogil: __status__ = nvFatbinAddTileIR(handle, _code_, size, _identifier_, _options_cmd_line_) check_status(__status__) +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pxd b/cuda_bindings/cuda/bindings/nvjitlink.pxd index 8c568cbc1b6..97f4a7aaafe 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/nvjitlink.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b847666247321f33f1f6b4c5fa92d6ee5d1022389e32eceb03c7458c45ff44ed # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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 0f36b3afe1e..e75f1552966 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -1,15 +1,22 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=18cc1af125a513c3867c6f2bd8e97f4b0b2d2e58565a8980223a419ae5f23b74 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum + +# <<<< END OF PREAMBLE CONTENT >>>> + cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum from libcpp.vector cimport vector @@ -17,7 +24,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_FastEnum): +class Result(_cyb_FastEnum): """ The enumerated type `nvJitLinkResult` defines API call result codes. nvJitLink APIs return `nvJitLinkResult` codes to indicate the result. @@ -44,7 +51,7 @@ class Result(_FastEnum): ERROR_UNSUPPORTED_ARCH = (NVJITLINK_ERROR_UNSUPPORTED_ARCH, 'Unsupported -arch value') ERROR_LTO_NOT_ENABLED = (NVJITLINK_ERROR_LTO_NOT_ENABLED, 'Requires -lto') -class InputType(_FastEnum): +class InputType(_cyb_FastEnum): """ The enumerated type `nvJitLinkInputType` defines the kind of inputs that can be passed to nvJitLinkAdd* APIs. @@ -367,3 +374,4 @@ cpdef get_linked_ltoir(intptr_t handle, ltoir): with nogil: __status__ = nvJitLinkGetLinkedLTOIR(handle, _ltoir_) check_status(__status__) +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvml.pxd b/cuda_bindings/cuda/bindings/nvml.pxd index 9c0dd62d8d5..0f275a22935 100644 --- a/cuda_bindings/cuda/bindings/nvml.pxd +++ b/cuda_bindings/cuda/bindings/nvml.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=eb901f46ca6b6930935726541c32b3ea04f7f46b6090c4c2ad9cb62386c2028b # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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 52fefd94e32..430c648da83 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -1,29 +1,55 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=52642c2c289dbd93191f019468630c0c7935bf99bc15c9c7c0de3797a109e8b0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. - -cimport cython # NOQA - -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) - -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum - -from cuda.bindings.cydriver cimport CUDA_VERSION - - -from libc.stdlib cimport calloc, free, malloc -from cython cimport view -cimport cpython.buffer -cimport cpython.memoryview -cimport cpython -from libc.string cimport memcmp, memcpy +# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +cimport cpython as _cyb_cpython +cimport cpython.buffer as _cyb_cpython_buffer +cimport cpython.memoryview as _cyb_cpython_memoryview +from cython cimport view as _cyb_view +from libc.stdlib cimport ( + calloc as _cyb_calloc, + free as _cyb_free, + malloc as _cyb_malloc, +) +from libc.string cimport ( + memcmp as _cyb_memcmp, + memcpy as _cyb_memcpy, +) +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum import numpy as _numpy +cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL + +cdef _cyb_from_buffer(buffer, size, lowpp_type): + cdef _cyb_cpython.Py_buffer view + if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + _cyb_cpython.PyBuffer_Release(&view) -cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): +cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -35,34 +61,20 @@ cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) +# <<<< END OF PREAMBLE CONTENT >>>> -cdef __from_buffer(buffer, size, lowpp_type): - cdef Py_buffer view - if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - cpython.PyBuffer_Release(&view) +cimport cython # NOQA +from cython cimport view +cimport cpython +from libc.string cimport memcpy -cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum + +from cuda.bindings.cydriver cimport CUDA_VERSION cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsigned int ver) nogil: @@ -73,7 +85,7 @@ cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsi # Enum ############################################################################### -class BridgeChipType(_FastEnum): +class BridgeChipType(_cyb_FastEnum): """ Enum to represent type of bridge chip @@ -82,7 +94,7 @@ class BridgeChipType(_FastEnum): BRIDGE_CHIP_PLX = NVML_BRIDGE_CHIP_PLX BRIDGE_CHIP_BRO4 = NVML_BRIDGE_CHIP_BRO4 -class NvLinkUtilizationCountUnits(_FastEnum): +class NvLinkUtilizationCountUnits(_cyb_FastEnum): """ Enum to represent the NvLink utilization counter packet units @@ -94,7 +106,7 @@ class NvLinkUtilizationCountUnits(_FastEnum): NVLINK_COUNTER_UNIT_RESERVED = NVML_NVLINK_COUNTER_UNIT_RESERVED NVLINK_COUNTER_UNIT_COUNT = NVML_NVLINK_COUNTER_UNIT_COUNT -class NvLinkUtilizationCountPktTypes(_FastEnum): +class NvLinkUtilizationCountPktTypes(_cyb_FastEnum): """ Enum to represent the NvLink utilization counter packet types to count ** this is ONLY applicable with the units as packets or bytes ** as @@ -113,7 +125,7 @@ class NvLinkUtilizationCountPktTypes(_FastEnum): NVLINK_COUNTER_PKTFILTER_RESPNODATA = NVML_NVLINK_COUNTER_PKTFILTER_RESPNODATA NVLINK_COUNTER_PKTFILTER_ALL = NVML_NVLINK_COUNTER_PKTFILTER_ALL -class NvLinkCapability(_FastEnum): +class NvLinkCapability(_cyb_FastEnum): """ Enum to represent NvLink queryable capabilities @@ -127,7 +139,7 @@ class NvLinkCapability(_FastEnum): NVLINK_CAP_VALID = NVML_NVLINK_CAP_VALID NVLINK_CAP_COUNT = NVML_NVLINK_CAP_COUNT -class NvLinkErrorCounter(_FastEnum): +class NvLinkErrorCounter(_cyb_FastEnum): """ Enum to represent NvLink queryable error counters @@ -140,7 +152,7 @@ class NvLinkErrorCounter(_FastEnum): NVLINK_ERROR_DL_ECC_DATA = NVML_NVLINK_ERROR_DL_ECC_DATA NVLINK_ERROR_COUNT = NVML_NVLINK_ERROR_COUNT -class IntNvLinkDeviceType(_FastEnum): +class IntNvLinkDeviceType(_cyb_FastEnum): """ Enum to represent NvLink's remote device type @@ -151,7 +163,7 @@ class IntNvLinkDeviceType(_FastEnum): NVLINK_DEVICE_TYPE_SWITCH = NVML_NVLINK_DEVICE_TYPE_SWITCH NVLINK_DEVICE_TYPE_UNKNOWN = NVML_NVLINK_DEVICE_TYPE_UNKNOWN -class GpuTopologyLevel(_FastEnum): +class GpuTopologyLevel(_cyb_FastEnum): """ Represents level relationships within a system between two GPUs The enums are spaced to allow for future relationships @@ -165,7 +177,7 @@ class GpuTopologyLevel(_FastEnum): TOPOLOGY_NODE = NVML_TOPOLOGY_NODE TOPOLOGY_SYSTEM = NVML_TOPOLOGY_SYSTEM -class GpuP2PStatus(_FastEnum): +class GpuP2PStatus(_cyb_FastEnum): """ See `nvmlGpuP2PStatus_t`. """ @@ -178,7 +190,7 @@ class GpuP2PStatus(_FastEnum): P2P_STATUS_NOT_SUPPORTED = NVML_P2P_STATUS_NOT_SUPPORTED P2P_STATUS_UNKNOWN = NVML_P2P_STATUS_UNKNOWN -class GpuP2PCapsIndex(_FastEnum): +class GpuP2PCapsIndex(_cyb_FastEnum): """ See `nvmlGpuP2PCapsIndex_t`. """ @@ -190,7 +202,7 @@ class GpuP2PCapsIndex(_FastEnum): P2P_CAPS_INDEX_PROP = NVML_P2P_CAPS_INDEX_PROP P2P_CAPS_INDEX_UNKNOWN = NVML_P2P_CAPS_INDEX_UNKNOWN -class SamplingType(_FastEnum): +class SamplingType(_cyb_FastEnum): """ Represents Type of Sampling Event @@ -208,7 +220,7 @@ class SamplingType(_FastEnum): OFA_UTILIZATION_SAMPLES = (NVML_OFA_UTILIZATION_SAMPLES, 'To represent percent of time during which NVOFA remains busy.') SAMPLINGTYPE_COUNT = NVML_SAMPLINGTYPE_COUNT -class PcieUtilCounter(_FastEnum): +class PcieUtilCounter(_cyb_FastEnum): """ Represents the queryable PCIe utilization counters @@ -218,7 +230,7 @@ class PcieUtilCounter(_FastEnum): PCIE_UTIL_RX_BYTES = NVML_PCIE_UTIL_RX_BYTES PCIE_UTIL_COUNT = NVML_PCIE_UTIL_COUNT -class ValueType(_FastEnum): +class ValueType(_cyb_FastEnum): """ Represents the type for sample value returned @@ -233,7 +245,7 @@ class ValueType(_FastEnum): UNSIGNED_SHORT = NVML_VALUE_TYPE_UNSIGNED_SHORT COUNT = NVML_VALUE_TYPE_COUNT -class PerfPolicyType(_FastEnum): +class PerfPolicyType(_cyb_FastEnum): """ Represents type of perf policy for which violation times can be queried @@ -249,7 +261,7 @@ class PerfPolicyType(_FastEnum): PERF_POLICY_TOTAL_BASE_CLOCKS = (NVML_PERF_POLICY_TOTAL_BASE_CLOCKS, 'Total time the GPU was held below base clocks.') PERF_POLICY_COUNT = NVML_PERF_POLICY_COUNT -class ThermalTarget(_FastEnum): +class ThermalTarget(_cyb_FastEnum): """ Represents the thermal sensor targets @@ -266,7 +278,7 @@ class ThermalTarget(_FastEnum): ALL = NVML_THERMAL_TARGET_ALL UNKNOWN = NVML_THERMAL_TARGET_UNKNOWN -class ThermalController(_FastEnum): +class ThermalController(_cyb_FastEnum): """ Represents the thermal sensor controllers @@ -292,7 +304,7 @@ class ThermalController(_FastEnum): ADT7473S = NVML_THERMAL_CONTROLLER_ADT7473S UNKNOWN = NVML_THERMAL_CONTROLLER_UNKNOWN -class CoolerControl(_FastEnum): +class CoolerControl(_cyb_FastEnum): """ Cooler control type @@ -303,7 +315,7 @@ class CoolerControl(_FastEnum): THERMAL_COOLER_SIGNAL_VARIABLE = (NVML_THERMAL_COOLER_SIGNAL_VARIABLE, "This cooler's level can be adjusted from some minimum to some maximum (eg a knob).") THERMAL_COOLER_SIGNAL_COUNT = NVML_THERMAL_COOLER_SIGNAL_COUNT -class CoolerTarget(_FastEnum): +class CoolerTarget(_cyb_FastEnum): """ Cooler's target @@ -315,7 +327,7 @@ class CoolerTarget(_FastEnum): THERMAL_POWER_SUPPLY = (NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY, 'This cooler can cool the power supply.') THERMAL_GPU_RELATED = (NVML_THERMAL_COOLER_TARGET_GPU_RELATED, 'This cooler cools all of the components related to its target gpu. GPU_RELATED = GPU | MEMORY | POWER_SUPPLY.') -class UUIDType(_FastEnum): +class UUIDType(_cyb_FastEnum): """ Enum to represent different UUID types @@ -325,7 +337,7 @@ class UUIDType(_FastEnum): ASCII = (NVML_UUID_TYPE_ASCII, 'ASCII format type.') BINARY = (NVML_UUID_TYPE_BINARY, 'Binary format type.') -class EnableState(_FastEnum): +class EnableState(_cyb_FastEnum): """ Generic enable/disable enum. @@ -334,7 +346,7 @@ class EnableState(_FastEnum): FEATURE_DISABLED = (NVML_FEATURE_DISABLED, 'Feature disabled.') FEATURE_ENABLED = (NVML_FEATURE_ENABLED, 'Feature enabled.') -class BrandType(_FastEnum): +class BrandType(_cyb_FastEnum): """ - The Brand of the GPU @@ -360,7 +372,7 @@ class BrandType(_FastEnum): BRAND_TITAN_RTX = NVML_BRAND_TITAN_RTX BRAND_COUNT = NVML_BRAND_COUNT -class TemperatureThresholds(_FastEnum): +class TemperatureThresholds(_cyb_FastEnum): """ Temperature thresholds. @@ -376,7 +388,7 @@ class TemperatureThresholds(_FastEnum): TEMPERATURE_THRESHOLD_GPS_CURR = NVML_TEMPERATURE_THRESHOLD_GPS_CURR TEMPERATURE_THRESHOLD_COUNT = NVML_TEMPERATURE_THRESHOLD_COUNT -class TemperatureSensors(_FastEnum): +class TemperatureSensors(_cyb_FastEnum): """ Temperature sensors. @@ -385,7 +397,7 @@ class TemperatureSensors(_FastEnum): TEMPERATURE_GPU = (NVML_TEMPERATURE_GPU, 'Temperature sensor for the GPU die.') TEMPERATURE_COUNT = NVML_TEMPERATURE_COUNT -class ComputeMode(_FastEnum): +class ComputeMode(_cyb_FastEnum): """ Compute mode. NVML_COMPUTEMODE_EXCLUSIVE_PROCESS was added in CUDA 4.0. Earlier CUDA versions supported a single exclusive mode, which is @@ -399,7 +411,7 @@ class ComputeMode(_FastEnum): COMPUTEMODE_EXCLUSIVE_PROCESS = (NVML_COMPUTEMODE_EXCLUSIVE_PROCESS, 'Compute-exclusive-process mode -- only one context per device, usable from multiple threads at a time.') COMPUTEMODE_COUNT = NVML_COMPUTEMODE_COUNT -class MemoryErrorType(_FastEnum): +class MemoryErrorType(_cyb_FastEnum): """ Memory error types @@ -409,7 +421,7 @@ class MemoryErrorType(_FastEnum): UNCORRECTED = (NVML_MEMORY_ERROR_TYPE_UNCORRECTED, 'A memory error that was not corrected For ECC errors, these are double bit errors For Texture memory, these are errors where the resend fails') COUNT = (NVML_MEMORY_ERROR_TYPE_COUNT, 'Count of memory error types.') -class NvlinkVersion(_FastEnum): +class NvlinkVersion(_cyb_FastEnum): """ Represents Nvlink Version @@ -425,7 +437,7 @@ class NvlinkVersion(_FastEnum): VERSION_5_0 = (NVML_NVLINK_VERSION_5_0, 'NVLink Version 5.0.') VERSION_6_0 = (NVML_NVLINK_VERSION_6_0, 'NVLink Version 6.0.') -class EccCounterType(_FastEnum): +class EccCounterType(_cyb_FastEnum): """ ECC counter types. Note: Volatile counts are reset each time the driver loads. On Windows this is once per boot. On Linux this can be @@ -440,7 +452,7 @@ class EccCounterType(_FastEnum): AGGREGATE_ECC = (NVML_AGGREGATE_ECC, 'Aggregate counts persist across reboots (i.e. for the lifetime of the device).') COUNT = (NVML_ECC_COUNTER_TYPE_COUNT, 'Count of memory counter types.') -class ClockType(_FastEnum): +class ClockType(_cyb_FastEnum): """ Clock types. All speeds are in Mhz. @@ -452,7 +464,7 @@ class ClockType(_FastEnum): CLOCK_VIDEO = (NVML_CLOCK_VIDEO, 'Video encoder/decoder clock domain.') CLOCK_COUNT = (NVML_CLOCK_COUNT, 'Count of clock types.') -class ClockId(_FastEnum): +class ClockId(_cyb_FastEnum): """ Clock Ids. These are used in combination with `nvmlClockType_t` to specify a single clock value. @@ -465,7 +477,7 @@ class ClockId(_FastEnum): CUSTOMER_BOOST_MAX = (NVML_CLOCK_ID_CUSTOMER_BOOST_MAX, 'OEM-defined maximum clock rate.') COUNT = (NVML_CLOCK_ID_COUNT, 'Count of Clock Ids.') -class DriverModel(_FastEnum): +class DriverModel(_cyb_FastEnum): """ Driver models. Windows only. @@ -475,7 +487,7 @@ class DriverModel(_FastEnum): DRIVER_WDM = (NVML_DRIVER_WDM, 'WDM (TCC) model (deprecated) -- GPU treated as a generic compute device.') DRIVER_MCDM = (NVML_DRIVER_MCDM, 'MCDM driver model -- GPU treated as a Microsoft compute device.') -class Pstates(_FastEnum): +class Pstates(_cyb_FastEnum): """ Allowed PStates. @@ -499,7 +511,7 @@ class Pstates(_FastEnum): PSTATE_15 = (NVML_PSTATE_15, 'Performance state 15 -- Minimum Performance.') PSTATE_UNKNOWN = (NVML_PSTATE_UNKNOWN, 'Unknown performance state.') -class GpuOperationMode(_FastEnum): +class GpuOperationMode(_cyb_FastEnum): """ GPU Operation Mode GOM allows to reduce power usage and optimize GPU throughput by disabling GPU features. Each GOM is designed to meet @@ -511,7 +523,7 @@ class GpuOperationMode(_FastEnum): GOM_COMPUTE = (NVML_GOM_COMPUTE, 'Designed for running only compute tasks. Graphics operations are not allowed') GOM_LOW_DP = (NVML_GOM_LOW_DP, "Designed for running graphics applications that don't require high bandwidth double precision") -class InforomObject(_FastEnum): +class InforomObject(_cyb_FastEnum): """ Available infoROM objects. @@ -523,7 +535,7 @@ class InforomObject(_FastEnum): INFOROM_DEN = (NVML_INFOROM_DEN, 'DRAM Encryption object.') INFOROM_COUNT = (NVML_INFOROM_COUNT, 'This counts the number of infoROM objects the driver knows about.') -class Return(_FastEnum): +class Return(_cyb_FastEnum): """ Return values for NVML API calls. @@ -562,7 +574,7 @@ class Return(_FastEnum): ERROR_RESET_TYPE_NOT_SUPPORTED = (NVML_ERROR_RESET_TYPE_NOT_SUPPORTED, 'Reset not supported for given device/parameters.') ERROR_UNKNOWN = (NVML_ERROR_UNKNOWN, 'An internal driver error occurred.') -class MemoryLocation(_FastEnum): +class MemoryLocation(_cyb_FastEnum): """ See `nvmlDeviceGetMemoryErrorCounter` @@ -579,7 +591,7 @@ class MemoryLocation(_FastEnum): SRAM = (NVML_MEMORY_LOCATION_SRAM, 'Turing+ SRAM.') COUNT = (NVML_MEMORY_LOCATION_COUNT, 'This counts the number of memory locations the driver knows about.') -class PageRetirementCause(_FastEnum): +class PageRetirementCause(_cyb_FastEnum): """ Causes for page retirement @@ -589,7 +601,7 @@ class PageRetirementCause(_FastEnum): DOUBLE_BIT_ECC_ERROR = (NVML_PAGE_RETIREMENT_CAUSE_DOUBLE_BIT_ECC_ERROR, 'Page was retired due to double bit ECC error.') COUNT = NVML_PAGE_RETIREMENT_CAUSE_COUNT -class RestrictedAPI(_FastEnum): +class RestrictedAPI(_cyb_FastEnum): """ API types that allow changes to default permission restrictions @@ -599,7 +611,7 @@ class RestrictedAPI(_FastEnum): SET_AUTO_BOOSTED_CLOCKS = (NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS, 'APIs that enable/disable Auto Boosted clocks see nvmlDeviceSetAutoBoostedClocksEnabled') COUNT = NVML_RESTRICTED_API_COUNT -class GpuUtilizationDomainId(_FastEnum): +class GpuUtilizationDomainId(_cyb_FastEnum): """ Represents the GPU utilization domains @@ -610,7 +622,7 @@ class GpuUtilizationDomainId(_FastEnum): GPU_UTILIZATION_DOMAIN_VID = (NVML_GPU_UTILIZATION_DOMAIN_VID, 'Video engine domain.') GPU_UTILIZATION_DOMAIN_BUS = (NVML_GPU_UTILIZATION_DOMAIN_BUS, 'Bus interface domain.') -class GpuVirtualizationMode(_FastEnum): +class GpuVirtualizationMode(_cyb_FastEnum): """ GPU virtualization mode types. @@ -622,7 +634,7 @@ class GpuVirtualizationMode(_FastEnum): HOST_VGPU = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU, 'Device is associated with VGX hypervisor in vGPU mode.') HOST_VSGA = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA, 'Device is associated with VGX hypervisor in vSGA mode.') -class HostVgpuMode(_FastEnum): +class HostVgpuMode(_cyb_FastEnum): """ Host vGPU modes @@ -631,7 +643,7 @@ class HostVgpuMode(_FastEnum): NON_SRIOV = (NVML_HOST_VGPU_MODE_NON_SRIOV, 'Non SR-IOV mode.') SRIOV = (NVML_HOST_VGPU_MODE_SRIOV, 'SR-IOV mode.') -class VgpuVmIdType(_FastEnum): +class VgpuVmIdType(_cyb_FastEnum): """ Types of VM identifiers @@ -640,7 +652,7 @@ class VgpuVmIdType(_FastEnum): VGPU_VM_ID_DOMAIN_ID = (NVML_VGPU_VM_ID_DOMAIN_ID, 'VM ID represents DOMAIN ID.') VGPU_VM_ID_UUID = (NVML_VGPU_VM_ID_UUID, 'VM ID represents UUID.') -class VgpuGuestInfoState(_FastEnum): +class VgpuGuestInfoState(_cyb_FastEnum): """ vGPU GUEST info state @@ -649,7 +661,7 @@ class VgpuGuestInfoState(_FastEnum): VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED, 'Guest-dependent fields uninitialized.') VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED, 'Guest-dependent fields initialized.') -class GridLicenseFeatureCode(_FastEnum): +class GridLicenseFeatureCode(_cyb_FastEnum): """ vGPU software licensable features @@ -662,7 +674,7 @@ class GridLicenseFeatureCode(_FastEnum): GAMING = (NVML_GRID_LICENSE_FEATURE_CODE_GAMING, 'Gaming.') COMPUTE = (NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE, 'Compute.') -class VgpuCapability(_FastEnum): +class VgpuCapability(_cyb_FastEnum): """ vGPU queryable capabilities @@ -675,7 +687,7 @@ class VgpuCapability(_FastEnum): VGPU_CAP_EXCLUSIVE_SIZE = (NVML_VGPU_CAP_EXCLUSIVE_SIZE, 'vGPU profile cannot run on a GPU alongside other profiles of different size') VGPU_CAP_COUNT = NVML_VGPU_CAP_COUNT -class VgpuDriverCapability(_FastEnum): +class VgpuDriverCapability(_cyb_FastEnum): """ vGPU driver queryable capabilities @@ -685,7 +697,7 @@ class VgpuDriverCapability(_FastEnum): VGPU_DRIVER_CAP_WARM_UPDATE = (NVML_VGPU_DRIVER_CAP_WARM_UPDATE, 'Supports FSR and warm update of vGPU host driver without terminating the running guest VM.') VGPU_DRIVER_CAP_COUNT = NVML_VGPU_DRIVER_CAP_COUNT -class DeviceVgpuCapability(_FastEnum): +class DeviceVgpuCapability(_cyb_FastEnum): """ Device vGPU queryable capabilities @@ -705,7 +717,7 @@ class DeviceVgpuCapability(_FastEnum): DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = (NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED, 'Set/Get MIG timesliced mode reporting, without impacting the underlying functionality.') DEVICE_VGPU_CAP_COUNT = NVML_DEVICE_VGPU_CAP_COUNT -class DeviceGpuRecoveryAction(_FastEnum): +class DeviceGpuRecoveryAction(_cyb_FastEnum): """ Enum describing the GPU Recovery Action @@ -718,7 +730,7 @@ class DeviceGpuRecoveryAction(_FastEnum): GPU_RECOVERY_ACTION_DRAIN_AND_RESET = (NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET, 'Drain P2P and Reset Gpu.') GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN = (NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN, 'Recover IMEX Domain.') -class FanState(_FastEnum): +class FanState(_cyb_FastEnum): """ Fan state enum. @@ -727,7 +739,7 @@ class FanState(_FastEnum): FAN_NORMAL = (NVML_FAN_NORMAL, 'Fan is working properly.') FAN_FAILED = (NVML_FAN_FAILED, 'Fan has failed.') -class LedColor(_FastEnum): +class LedColor(_cyb_FastEnum): """ Led color enum. @@ -736,7 +748,7 @@ class LedColor(_FastEnum): GREEN = (NVML_LED_COLOR_GREEN, 'GREEN, indicates good health.') AMBER = (NVML_LED_COLOR_AMBER, 'AMBER, indicates problem.') -class EncoderType(_FastEnum): +class EncoderType(_cyb_FastEnum): """ Represents type of encoder for capacity can be queried @@ -747,7 +759,7 @@ class EncoderType(_FastEnum): ENCODER_QUERY_AV1 = (NVML_ENCODER_QUERY_AV1, 'AV1 encoder.') ENCODER_QUERY_UNKNOWN = (NVML_ENCODER_QUERY_UNKNOWN, 'Unknown encoder.') -class FBCSessionType(_FastEnum): +class FBCSessionType(_cyb_FastEnum): """ Represents frame buffer capture session type @@ -759,7 +771,7 @@ class FBCSessionType(_FastEnum): VID = (NVML_FBC_SESSION_TYPE_VID, 'Vid.') HWENC = (NVML_FBC_SESSION_TYPE_HWENC, 'HEnc.') -class DetachGpuState(_FastEnum): +class DetachGpuState(_cyb_FastEnum): """ Is the GPU device to be removed from the kernel by `nvmlDeviceRemoveGpu()` @@ -769,7 +781,7 @@ class DetachGpuState(_FastEnum): DETACH_GPU_KEEP = NVML_DETACH_GPU_KEEP DETACH_GPU_REMOVE = NVML_DETACH_GPU_REMOVE -class PcieLinkState(_FastEnum): +class PcieLinkState(_cyb_FastEnum): """ Parent bridge PCIe link state requested by `nvmlDeviceRemoveGpu()` @@ -778,7 +790,7 @@ class PcieLinkState(_FastEnum): PCIE_LINK_KEEP = NVML_PCIE_LINK_KEEP PCIE_LINK_SHUT_DOWN = NVML_PCIE_LINK_SHUT_DOWN -class ClockLimitId(_FastEnum): +class ClockLimitId(_cyb_FastEnum): """ See `nvmlClockLimitId_t`. """ @@ -786,7 +798,7 @@ class ClockLimitId(_FastEnum): TDP = NVML_CLOCK_LIMIT_ID_TDP UNLIMITED = NVML_CLOCK_LIMIT_ID_UNLIMITED -class VgpuVmCompatibility(_FastEnum): +class VgpuVmCompatibility(_cyb_FastEnum): """ vGPU VM compatibility codes @@ -798,7 +810,7 @@ class VgpuVmCompatibility(_FastEnum): SLEEP = (NVML_VGPU_VM_COMPATIBILITY_SLEEP, 'vGPU is runnable from a sleeped state (ACPI S3)') LIVE = (NVML_VGPU_VM_COMPATIBILITY_LIVE, 'vGPU is runnable from a live/paused (ACPI S0)') -class VgpuPgpuCompatibilityLimitCode(_FastEnum): +class VgpuPgpuCompatibilityLimitCode(_cyb_FastEnum): """ vGPU-pGPU compatibility limit codes @@ -810,7 +822,7 @@ class VgpuPgpuCompatibilityLimitCode(_FastEnum): VGPU_COMPATIBILITY_LIMIT_GPU = (NVML_VGPU_COMPATIBILITY_LIMIT_GPU, 'Compatibility is limited by GPU hardware.') VGPU_COMPATIBILITY_LIMIT_OTHER = (NVML_VGPU_COMPATIBILITY_LIMIT_OTHER, 'Compatibility is limited by an undefined factor.') -class GpmMetricId(_FastEnum): +class GpmMetricId(_cyb_FastEnum): """ GPM Metric Identifiers @@ -1120,7 +1132,7 @@ class GpmMetricId(_FastEnum): GPM_METRIC_NVLINK_L35_TX = (NVML_GPM_METRIC_NVLINK_L35_TX, 'NvLink write for link 35 in bytes since reboot.') GPM_METRIC_MAX = (NVML_GPM_METRIC_MAX, 'Maximum value above +1.') -class PowerProfileType(_FastEnum): +class PowerProfileType(_cyb_FastEnum): """ See `nvmlPowerProfileType_t`. """ @@ -1141,7 +1153,7 @@ class PowerProfileType(_FastEnum): POWER_PROFILE_MIG = NVML_POWER_PROFILE_MIG POWER_PROFILE_MAX = NVML_POWER_PROFILE_MAX -class DeviceAddressingModeType(_FastEnum): +class DeviceAddressingModeType(_cyb_FastEnum): """ Enum to represent device addressing mode values @@ -1151,7 +1163,7 @@ class DeviceAddressingModeType(_FastEnum): DEVICE_ADDRESSING_MODE_HMM = (NVML_DEVICE_ADDRESSING_MODE_HMM, 'Heterogeneous Memory Management mode.') DEVICE_ADDRESSING_MODE_ATS = (NVML_DEVICE_ADDRESSING_MODE_ATS, 'Address Translation Services mode.') -class PRMCounterId(_FastEnum): +class PRMCounterId(_cyb_FastEnum): """ PRM Counter IDs @@ -1173,7 +1185,7 @@ class PRMCounterId(_FastEnum): PPCNT_PLR_SYNC_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS PPRM_OPER_RECOVERY = NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY -class PowerProfileOperation(_FastEnum): +class PowerProfileOperation(_cyb_FastEnum): """ Enum for operation to perform on the requested profiles @@ -1184,7 +1196,7 @@ class PowerProfileOperation(_FastEnum): SET_AND_OVERWRITE = (NVML_POWER_PROFILE_OPERATION_SET_AND_OVERWRITE, 'Overwrite the existing list of requested profiles with just the requested profiles.') MAX = (NVML_POWER_PROFILE_OPERATION_MAX, 'Max value above +1.') -class ProcessMode(_FastEnum): +class ProcessMode(_cyb_FastEnum): """ Enum to represent process mode. @@ -1196,7 +1208,7 @@ class ProcessMode(_FastEnum): ALL = (NVML_PROCESS_MODE_ALL, 'All processes running on the GPU (compute, graphics, MPS, and other types).') MAX = (NVML_PROCESS_MODE_MAX, 'Maximum value for bounds checking.') -class CPERType(_FastEnum): +class CPERType(_cyb_FastEnum): """ Bitmask of CPER record types. Multiple values may be combined to request records from several sources in one call. @@ -2180,7 +2192,7 @@ cdef class PciInfoExt_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") self._owner = None @@ -2192,7 +2204,7 @@ cdef class PciInfoExt_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PciInfoExt_v1 object at {hex(id(self))}>" @@ -2213,20 +2225,20 @@ cdef class PciInfoExt_v1: if not isinstance(other, PciInfoExt_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2324,7 +2336,7 @@ cdef class PciInfoExt_v1: @property def bus_id(self): """~_numpy.int8: (array of length 32).The tuple domain:bus:device.function PCI identifier (& NULL terminator).""" - return cpython.PyUnicode_FromString(self._ptr[0].busId) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2334,12 +2346,12 @@ cdef class PciInfoExt_v1: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - memcpy((self._ptr[0].busId), ptr, 32) + _cyb_memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfoExt_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) @staticmethod def from_data(data): @@ -2348,7 +2360,7 @@ cdef class PciInfoExt_v1: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_ext_v1_dtype` holding the data. """ - return __from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) + return _cyb_from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2363,10 +2375,10 @@ cdef class PciInfoExt_v1: raise ValueError("ptr must not be null (0)") cdef PciInfoExt_v1 obj = PciInfoExt_v1.__new__(PciInfoExt_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) obj._owner = None obj._owned = True else: @@ -2409,7 +2421,7 @@ cdef class PciInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPciInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") self._owner = None @@ -2421,7 +2433,7 @@ cdef class PciInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PciInfo object at {hex(id(self))}>" @@ -2442,20 +2454,20 @@ cdef class PciInfo: if not isinstance(other, PciInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPciInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2465,7 +2477,7 @@ cdef class PciInfo: @property def bus_id_legacy(self): """~_numpy.int8: (array of length 16).""" - return cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) @bus_id_legacy.setter def bus_id_legacy(self, val): @@ -2475,7 +2487,7 @@ cdef class PciInfo: if len(buf) >= 16: raise ValueError("String too long for field bus_id_legacy, max length is 15") cdef char *ptr = buf - memcpy((self._ptr[0].busIdLegacy), ptr, 16) + _cyb_memcpy((self._ptr[0].busIdLegacy), ptr, 16) @property def domain(self): @@ -2535,7 +2547,7 @@ cdef class PciInfo: @property def bus_id(self): """~_numpy.int8: (array of length 32).""" - return cpython.PyUnicode_FromString(self._ptr[0].busId) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2545,12 +2557,12 @@ cdef class PciInfo: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - memcpy((self._ptr[0].busId), ptr, 32) + _cyb_memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) @staticmethod def from_data(data): @@ -2559,7 +2571,7 @@ cdef class PciInfo: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_dtype` holding the data. """ - return __from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) + return _cyb_from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2574,10 +2586,10 @@ cdef class PciInfo: raise ValueError("ptr must not be null (0)") cdef PciInfo obj = PciInfo.__new__(PciInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlPciInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) obj._owner = None obj._owned = True else: @@ -2615,7 +2627,7 @@ cdef class Utilization: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlUtilization_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") self._owner = None @@ -2627,7 +2639,7 @@ cdef class Utilization: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Utilization object at {hex(id(self))}>" @@ -2648,20 +2660,20 @@ cdef class Utilization: if not isinstance(other, Utilization): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlUtilization_t)) + self._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2693,7 +2705,7 @@ cdef class Utilization: @staticmethod def from_buffer(buffer): """Create an Utilization instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) + return _cyb_from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) @staticmethod def from_data(data): @@ -2702,7 +2714,7 @@ cdef class Utilization: Args: data (_numpy.ndarray): a single-element array of dtype `utilization_dtype` holding the data. """ - return __from_data(data, "utilization_dtype", utilization_dtype, Utilization) + return _cyb_from_data(data, "utilization_dtype", utilization_dtype, Utilization) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2717,10 +2729,10 @@ cdef class Utilization: raise ValueError("ptr must not be null (0)") cdef Utilization obj = Utilization.__new__(Utilization) if owner is None: - obj._ptr = malloc(sizeof(nvmlUtilization_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Utilization") - memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) obj._owner = None obj._owned = True else: @@ -2759,7 +2771,7 @@ cdef class Memory: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlMemory_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") self._owner = None @@ -2771,7 +2783,7 @@ cdef class Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Memory object at {hex(id(self))}>" @@ -2792,20 +2804,20 @@ cdef class Memory: if not isinstance(other, Memory): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlMemory_t)) + self._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2848,7 +2860,7 @@ cdef class Memory: @staticmethod def from_buffer(buffer): """Create an Memory instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlMemory_t), Memory) + return _cyb_from_buffer(buffer, sizeof(nvmlMemory_t), Memory) @staticmethod def from_data(data): @@ -2857,7 +2869,7 @@ cdef class Memory: Args: data (_numpy.ndarray): a single-element array of dtype `memory_dtype` holding the data. """ - return __from_data(data, "memory_dtype", memory_dtype, Memory) + return _cyb_from_data(data, "memory_dtype", memory_dtype, Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2872,10 +2884,10 @@ cdef class Memory: raise ValueError("ptr must not be null (0)") cdef Memory obj = Memory.__new__(Memory) if owner is None: - obj._ptr = malloc(sizeof(nvmlMemory_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory") - memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) obj._owner = None obj._owned = True else: @@ -2916,7 +2928,7 @@ cdef class Memory_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlMemory_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") self._owner = None @@ -2928,7 +2940,7 @@ cdef class Memory_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Memory_v2 object at {hex(id(self))}>" @@ -2949,20 +2961,20 @@ cdef class Memory_v2: if not isinstance(other, Memory_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlMemory_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3027,7 +3039,7 @@ cdef class Memory_v2: @staticmethod def from_buffer(buffer): """Create an Memory_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) @staticmethod def from_data(data): @@ -3036,7 +3048,7 @@ cdef class Memory_v2: Args: data (_numpy.ndarray): a single-element array of dtype `memory_v2_dtype` holding the data. """ - return __from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) + return _cyb_from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3051,10 +3063,10 @@ cdef class Memory_v2: raise ValueError("ptr must not be null (0)") cdef Memory_v2 obj = Memory_v2.__new__(Memory_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlMemory_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) obj._owner = None obj._owned = True else: @@ -3093,7 +3105,7 @@ cdef class BAR1Memory: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlBAR1Memory_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") self._owner = None @@ -3105,7 +3117,7 @@ cdef class BAR1Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.BAR1Memory object at {hex(id(self))}>" @@ -3126,20 +3138,20 @@ cdef class BAR1Memory: if not isinstance(other, BAR1Memory): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlBAR1Memory_t)) + self._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3182,7 +3194,7 @@ cdef class BAR1Memory: @staticmethod def from_buffer(buffer): """Create an BAR1Memory instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) + return _cyb_from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) @staticmethod def from_data(data): @@ -3191,7 +3203,7 @@ cdef class BAR1Memory: Args: data (_numpy.ndarray): a single-element array of dtype `ba_r1memory_dtype` holding the data. """ - return __from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) + return _cyb_from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3206,10 +3218,10 @@ cdef class BAR1Memory: raise ValueError("ptr must not be null (0)") cdef BAR1Memory obj = BAR1Memory.__new__(BAR1Memory) if owner is None: - obj._ptr = malloc(sizeof(nvmlBAR1Memory_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) obj._owner = None obj._owned = True else: @@ -3285,10 +3297,10 @@ cdef class ProcessInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3388,8 +3400,8 @@ cdef class ProcessInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessInfo obj = ProcessInfo.__new__(ProcessInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_info_dtype) obj._data = data.view(_numpy.recarray) @@ -3463,10 +3475,10 @@ cdef class ProcessDetail_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3577,8 +3589,8 @@ cdef class ProcessDetail_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessDetail_v1 obj = ProcessDetail_v1.__new__(ProcessDetail_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessDetail_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_detail_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -3620,7 +3632,7 @@ cdef class DeviceAttributes: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlDeviceAttributes_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") self._owner = None @@ -3632,7 +3644,7 @@ cdef class DeviceAttributes: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DeviceAttributes object at {hex(id(self))}>" @@ -3653,20 +3665,20 @@ cdef class DeviceAttributes: if not isinstance(other, DeviceAttributes): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) + self._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3775,7 +3787,7 @@ cdef class DeviceAttributes: @staticmethod def from_buffer(buffer): """Create an DeviceAttributes instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) + return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) @staticmethod def from_data(data): @@ -3784,7 +3796,7 @@ cdef class DeviceAttributes: Args: data (_numpy.ndarray): a single-element array of dtype `device_attributes_dtype` holding the data. """ - return __from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) + return _cyb_from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3799,10 +3811,10 @@ cdef class DeviceAttributes: raise ValueError("ptr must not be null (0)") cdef DeviceAttributes obj = DeviceAttributes.__new__(DeviceAttributes) if owner is None: - obj._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) obj._owner = None obj._owned = True else: @@ -3839,7 +3851,7 @@ cdef class C2cModeInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") self._owner = None @@ -3851,7 +3863,7 @@ cdef class C2cModeInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.C2cModeInfo_v1 object at {hex(id(self))}>" @@ -3872,20 +3884,20 @@ cdef class C2cModeInfo_v1: if not isinstance(other, C2cModeInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3906,7 +3918,7 @@ cdef class C2cModeInfo_v1: @staticmethod def from_buffer(buffer): """Create an C2cModeInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) @staticmethod def from_data(data): @@ -3915,7 +3927,7 @@ cdef class C2cModeInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `c2c_mode_info_v1_dtype` holding the data. """ - return __from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) + return _cyb_from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3930,10 +3942,10 @@ cdef class C2cModeInfo_v1: raise ValueError("ptr must not be null (0)") cdef C2cModeInfo_v1 obj = C2cModeInfo_v1.__new__(C2cModeInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -3974,7 +3986,7 @@ cdef class RowRemapperHistogramValues: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") self._owner = None @@ -3986,7 +3998,7 @@ cdef class RowRemapperHistogramValues: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.RowRemapperHistogramValues object at {hex(id(self))}>" @@ -4007,20 +4019,20 @@ cdef class RowRemapperHistogramValues: if not isinstance(other, RowRemapperHistogramValues): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4085,7 +4097,7 @@ cdef class RowRemapperHistogramValues: @staticmethod def from_buffer(buffer): """Create an RowRemapperHistogramValues instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) + return _cyb_from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) @staticmethod def from_data(data): @@ -4094,7 +4106,7 @@ cdef class RowRemapperHistogramValues: Args: data (_numpy.ndarray): a single-element array of dtype `row_remapper_histogram_values_dtype` holding the data. """ - return __from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) + return _cyb_from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4109,10 +4121,10 @@ cdef class RowRemapperHistogramValues: raise ValueError("ptr must not be null (0)") cdef RowRemapperHistogramValues obj = RowRemapperHistogramValues.__new__(RowRemapperHistogramValues) if owner is None: - obj._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) obj._owner = None obj._owned = True else: @@ -4186,10 +4198,10 @@ cdef class BridgeChipInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def type(self): @@ -4267,8 +4279,8 @@ cdef class BridgeChipInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef BridgeChipInfo obj = BridgeChipInfo.__new__(BridgeChipInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlBridgeChipInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=bridge_chip_info_dtype) obj._data = data.view(_numpy.recarray) @@ -4302,7 +4314,7 @@ cdef class Value: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlValue_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") self._owner = None @@ -4314,7 +4326,7 @@ cdef class Value: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.Value object at {hex(id(self))}>" @@ -4335,20 +4347,20 @@ cdef class Value: if not isinstance(other, Value): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlValue_t)) + self._ptr = _cyb_malloc(sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4435,7 +4447,7 @@ cdef class Value: @staticmethod def from_buffer(buffer): """Create an Value instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlValue_t), Value) + return _cyb_from_buffer(buffer, sizeof(nvmlValue_t), Value) @staticmethod def from_data(data): @@ -4444,7 +4456,7 @@ cdef class Value: Args: data (_numpy.ndarray): a single-element array of dtype `value_dtype` holding the data. """ - return __from_data(data, "value_dtype", value_dtype, Value) + return _cyb_from_data(data, "value_dtype", value_dtype, Value) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4459,10 +4471,10 @@ cdef class Value: raise ValueError("ptr must not be null (0)") cdef Value obj = Value.__new__(Value) if owner is None: - obj._ptr = malloc(sizeof(nvmlValue_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlValue_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Value") - memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) obj._owner = None obj._owned = True else: @@ -4503,7 +4515,7 @@ cdef class _py_anon_pod0: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod0)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod0)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") self._owner = None @@ -4515,7 +4527,7 @@ cdef class _py_anon_pod0: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod0 object at {hex(id(self))}>" @@ -4536,20 +4548,20 @@ cdef class _py_anon_pod0: if not isinstance(other, _py_anon_pod0): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod0), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod0)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod0)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4614,7 +4626,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(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) @staticmethod def from_data(data): @@ -4623,7 +4635,7 @@ cdef class _py_anon_pod0: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod0_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) + return _cyb_from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4638,10 +4650,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) obj._owner = None obj._owned = True else: @@ -4681,7 +4693,7 @@ cdef class CoolerInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") self._owner = None @@ -4693,7 +4705,7 @@ cdef class CoolerInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.CoolerInfo_v1 object at {hex(id(self))}>" @@ -4714,20 +4726,20 @@ cdef class CoolerInfo_v1: if not isinstance(other, CoolerInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4781,7 +4793,7 @@ cdef class CoolerInfo_v1: @staticmethod def from_buffer(buffer): """Create an CoolerInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) @staticmethod def from_data(data): @@ -4790,7 +4802,7 @@ cdef class CoolerInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `cooler_info_v1_dtype` holding the data. """ - return __from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) + return _cyb_from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4805,10 +4817,10 @@ cdef class CoolerInfo_v1: raise ValueError("ptr must not be null (0)") cdef CoolerInfo_v1 obj = CoolerInfo_v1.__new__(CoolerInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -4882,10 +4894,10 @@ cdef class ClkMonFaultInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def clk_api_domain(self): @@ -4963,8 +4975,8 @@ cdef class ClkMonFaultInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ClkMonFaultInfo obj = ClkMonFaultInfo.__new__(ClkMonFaultInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlClkMonFaultInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=clk_mon_fault_info_dtype) obj._data = data.view(_numpy.recarray) @@ -5003,7 +5015,7 @@ cdef class ClockOffset_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlClockOffset_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") self._owner = None @@ -5015,7 +5027,7 @@ cdef class ClockOffset_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ClockOffset_v1 object at {hex(id(self))}>" @@ -5036,20 +5048,20 @@ cdef class ClockOffset_v1: if not isinstance(other, ClockOffset_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5125,7 +5137,7 @@ cdef class ClockOffset_v1: @staticmethod def from_buffer(buffer): """Create an ClockOffset_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) @staticmethod def from_data(data): @@ -5134,7 +5146,7 @@ cdef class ClockOffset_v1: Args: data (_numpy.ndarray): a single-element array of dtype `clock_offset_v1_dtype` holding the data. """ - return __from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) + return _cyb_from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5149,10 +5161,10 @@ cdef class ClockOffset_v1: raise ValueError("ptr must not be null (0)") cdef ClockOffset_v1 obj = ClockOffset_v1.__new__(ClockOffset_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) obj._owner = None obj._owned = True else: @@ -5230,10 +5242,10 @@ cdef class ProcessUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -5355,8 +5367,8 @@ cdef class ProcessUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationSample obj = ProcessUtilizationSample.__new__(ProcessUtilizationSample) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -5433,10 +5445,10 @@ cdef class ProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -5580,8 +5592,8 @@ cdef class ProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationInfo_v1 obj = ProcessUtilizationInfo_v1.__new__(ProcessUtilizationInfo_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -5627,7 +5639,7 @@ cdef class EccSramErrorStatus_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") self._owner = None @@ -5639,7 +5651,7 @@ cdef class EccSramErrorStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.EccSramErrorStatus_v1 object at {hex(id(self))}>" @@ -5660,20 +5672,20 @@ cdef class EccSramErrorStatus_v1: if not isinstance(other, EccSramErrorStatus_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5826,7 +5838,7 @@ cdef class EccSramErrorStatus_v1: @staticmethod def from_buffer(buffer): """Create an EccSramErrorStatus_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) @staticmethod def from_data(data): @@ -5835,7 +5847,7 @@ cdef class EccSramErrorStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_error_status_v1_dtype` holding the data. """ - return __from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) + return _cyb_from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5850,10 +5862,10 @@ cdef class EccSramErrorStatus_v1: raise ValueError("ptr must not be null (0)") cdef EccSramErrorStatus_v1 obj = EccSramErrorStatus_v1.__new__(EccSramErrorStatus_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -5897,7 +5909,7 @@ cdef class PlatformInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") self._owner = None @@ -5909,7 +5921,7 @@ cdef class PlatformInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v1 object at {hex(id(self))}>" @@ -5930,20 +5942,20 @@ cdef class PlatformInfo_v1: if not isinstance(other, PlatformInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5964,7 +5976,7 @@ cdef class PlatformInfo_v1: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -5974,14 +5986,14 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def rack_guid(self): """~_numpy.uint8: (array of length 16).GUID of the rack containing this GPU (for Blackwell rackGuid is 13 bytes so indices 13-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].rackGuid)) return _numpy.asarray(arr) @@ -5991,9 +6003,9 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field rack_guid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_physical_slot_number(self): @@ -6053,7 +6065,7 @@ cdef class PlatformInfo_v1: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) @staticmethod def from_data(data): @@ -6062,7 +6074,7 @@ cdef class PlatformInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v1_dtype` holding the data. """ - return __from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) + return _cyb_from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6077,10 +6089,10 @@ cdef class PlatformInfo_v1: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v1 obj = PlatformInfo_v1.__new__(PlatformInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -6124,7 +6136,7 @@ cdef class PlatformInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") self._owner = None @@ -6136,7 +6148,7 @@ cdef class PlatformInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v2 object at {hex(id(self))}>" @@ -6157,20 +6169,20 @@ cdef class PlatformInfo_v2: if not isinstance(other, PlatformInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6191,7 +6203,7 @@ cdef class PlatformInfo_v2: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -6201,14 +6213,14 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_serial_number(self): """~_numpy.uint8: (array of length 16).Serial number of the chassis containing this GPU (for Blackwell it is 13 bytes so indices 13-15 are zero).""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].chassisSerialNumber)) return _numpy.asarray(arr) @@ -6218,9 +6230,9 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field chassis_serial_number, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) @property def slot_number(self): @@ -6280,7 +6292,7 @@ cdef class PlatformInfo_v2: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) @staticmethod def from_data(data): @@ -6289,7 +6301,7 @@ cdef class PlatformInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v2_dtype` holding the data. """ - return __from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) + return _cyb_from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6304,10 +6316,10 @@ cdef class PlatformInfo_v2: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v2 obj = PlatformInfo_v2.__new__(PlatformInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -6347,7 +6359,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod1)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod1)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") self._owner = None @@ -6359,7 +6371,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -6380,20 +6392,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod1), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod1)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod1)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6447,7 +6459,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(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) @staticmethod def from_data(data): @@ -6456,7 +6468,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6471,10 +6483,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) obj._owner = None obj._owned = True else: @@ -6516,7 +6528,7 @@ cdef class VgpuPlacementList_v2: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") self._owner = None @@ -6529,7 +6541,7 @@ cdef class VgpuPlacementList_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuPlacementList_v2 object at {hex(id(self))}>" @@ -6550,20 +6562,20 @@ cdef class VgpuPlacementList_v2: if not isinstance(other, VgpuPlacementList_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6597,7 +6609,7 @@ cdef class VgpuPlacementList_v2: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -6605,7 +6617,7 @@ cdef class VgpuPlacementList_v2: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuPlacementList_v2 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].count = len(val) @@ -6625,7 +6637,7 @@ cdef class VgpuPlacementList_v2: @staticmethod def from_buffer(buffer): """Create an VgpuPlacementList_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) @staticmethod def from_data(data): @@ -6634,7 +6646,7 @@ cdef class VgpuPlacementList_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_placement_list_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) + return _cyb_from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6649,10 +6661,10 @@ cdef class VgpuPlacementList_v2: raise ValueError("ptr must not be null (0)") cdef VgpuPlacementList_v2 obj = VgpuPlacementList_v2.__new__(VgpuPlacementList_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) obj._owner = None obj._owned = True else: @@ -6691,7 +6703,7 @@ cdef class VgpuTypeBar1Info_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") self._owner = None @@ -6703,7 +6715,7 @@ cdef class VgpuTypeBar1Info_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeBar1Info_v1 object at {hex(id(self))}>" @@ -6724,20 +6736,20 @@ cdef class VgpuTypeBar1Info_v1: if not isinstance(other, VgpuTypeBar1Info_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6769,7 +6781,7 @@ cdef class VgpuTypeBar1Info_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeBar1Info_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) @staticmethod def from_data(data): @@ -6778,7 +6790,7 @@ cdef class VgpuTypeBar1Info_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_bar1info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) + return _cyb_from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6793,10 +6805,10 @@ cdef class VgpuTypeBar1Info_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeBar1Info_v1 obj = VgpuTypeBar1Info_v1.__new__(VgpuTypeBar1Info_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) obj._owner = None obj._owned = True else: @@ -6878,10 +6890,10 @@ cdef class VgpuProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def process_name(self): @@ -7045,8 +7057,8 @@ cdef class VgpuProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuProcessUtilizationInfo_v1 obj = VgpuProcessUtilizationInfo_v1.__new__(VgpuProcessUtilizationInfo_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -7081,7 +7093,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod2)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod2)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") self._owner = None @@ -7093,7 +7105,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -7114,20 +7126,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod2), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod2)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod2)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7159,7 +7171,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(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) @staticmethod def from_data(data): @@ -7168,7 +7180,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7183,10 +7195,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) obj._owner = None obj._owned = True else: @@ -7223,7 +7235,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod3)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod3)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") self._owner = None @@ -7235,7 +7247,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -7256,20 +7268,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod3), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod3)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod3)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7290,7 +7302,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(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) @staticmethod def from_data(data): @@ -7299,7 +7311,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7314,10 +7326,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) obj._owner = None obj._owned = True else: @@ -7395,10 +7407,10 @@ cdef class VgpuSchedulerLogEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -7520,8 +7532,8 @@ cdef class VgpuSchedulerLogEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry obj = VgpuSchedulerLogEntry.__new__(VgpuSchedulerLogEntry) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -7556,7 +7568,7 @@ cdef class _py_anon_pod4: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod4)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod4)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") self._owner = None @@ -7568,7 +7580,7 @@ cdef class _py_anon_pod4: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod4 object at {hex(id(self))}>" @@ -7589,20 +7601,20 @@ cdef class _py_anon_pod4: if not isinstance(other, _py_anon_pod4): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod4), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod4)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod4)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7634,7 +7646,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(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) @staticmethod def from_data(data): @@ -7643,7 +7655,7 @@ cdef class _py_anon_pod4: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod4_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) + return _cyb_from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7658,10 +7670,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) obj._owner = None obj._owned = True else: @@ -7698,7 +7710,7 @@ cdef class _py_anon_pod5: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(cuda_bindings_nvml__anon_pod5)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod5)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") self._owner = None @@ -7710,7 +7722,7 @@ cdef class _py_anon_pod5: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod5 object at {hex(id(self))}>" @@ -7731,20 +7743,20 @@ cdef class _py_anon_pod5: if not isinstance(other, _py_anon_pod5): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) + return (_cyb_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(cuda_bindings_nvml__anon_pod5), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___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 = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + self._ptr = _cyb_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(cuda_bindings_nvml__anon_pod5)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod5)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7765,7 +7777,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(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) @staticmethod def from_data(data): @@ -7774,7 +7786,7 @@ cdef class _py_anon_pod5: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod5_dtype` holding the data. """ - return __from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) + return _cyb_from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7789,10 +7801,10 @@ 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 = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) obj._owner = None obj._owned = True else: @@ -7836,7 +7848,7 @@ cdef class VgpuSchedulerCapabilities: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") self._owner = None @@ -7848,7 +7860,7 @@ cdef class VgpuSchedulerCapabilities: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerCapabilities object at {hex(id(self))}>" @@ -7869,20 +7881,20 @@ cdef class VgpuSchedulerCapabilities: if not isinstance(other, VgpuSchedulerCapabilities): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7892,7 +7904,7 @@ cdef class VgpuSchedulerCapabilities: @property def supported_schedulers(self): """~_numpy.uint32: (array of length 3).""" - cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].supportedSchedulers)) return _numpy.asarray(arr) @@ -7902,9 +7914,9 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("This VgpuSchedulerCapabilities instance is read-only") if len(val) != 3: raise ValueError(f"Expected length { 3 } for field supported_schedulers, got {len(val)}") - cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) + _cyb_memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) @property def max_timeslice(self): @@ -7986,7 +7998,7 @@ cdef class VgpuSchedulerCapabilities: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerCapabilities instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) @staticmethod def from_data(data): @@ -7995,7 +8007,7 @@ cdef class VgpuSchedulerCapabilities: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_capabilities_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) + return _cyb_from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8010,10 +8022,10 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerCapabilities obj = VgpuSchedulerCapabilities.__new__(VgpuSchedulerCapabilities) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) obj._owner = None obj._owned = True else: @@ -8056,7 +8068,7 @@ cdef class VgpuLicenseExpiry: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") self._owner = None @@ -8068,7 +8080,7 @@ cdef class VgpuLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseExpiry object at {hex(id(self))}>" @@ -8089,20 +8101,20 @@ cdef class VgpuLicenseExpiry: if not isinstance(other, VgpuLicenseExpiry): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8189,7 +8201,7 @@ cdef class VgpuLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseExpiry instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) @staticmethod def from_data(data): @@ -8198,7 +8210,7 @@ cdef class VgpuLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_expiry_dtype` holding the data. """ - return __from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) + return _cyb_from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8213,10 +8225,10 @@ cdef class VgpuLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseExpiry obj = VgpuLicenseExpiry.__new__(VgpuLicenseExpiry) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8259,7 +8271,7 @@ cdef class GridLicenseExpiry: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") self._owner = None @@ -8271,7 +8283,7 @@ cdef class GridLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GridLicenseExpiry object at {hex(id(self))}>" @@ -8292,20 +8304,20 @@ cdef class GridLicenseExpiry: if not isinstance(other, GridLicenseExpiry): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8392,7 +8404,7 @@ cdef class GridLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an GridLicenseExpiry instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) + return _cyb_from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) @staticmethod def from_data(data): @@ -8401,7 +8413,7 @@ cdef class GridLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `grid_license_expiry_dtype` holding the data. """ - return __from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) + return _cyb_from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8416,10 +8428,10 @@ cdef class GridLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef GridLicenseExpiry obj = GridLicenseExpiry.__new__(GridLicenseExpiry) if owner is None: - obj._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8459,7 +8471,7 @@ cdef class VgpuTypeIdInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") self._owner = None @@ -8472,7 +8484,7 @@ cdef class VgpuTypeIdInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeIdInfo_v1 object at {hex(id(self))}>" @@ -8493,20 +8505,20 @@ cdef class VgpuTypeIdInfo_v1: if not isinstance(other, VgpuTypeIdInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8529,7 +8541,7 @@ cdef class VgpuTypeIdInfo_v1: """int: OUT: List of vGPU type IDs.""" if self._ptr[0].vgpuTypeIds == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuTypeIds) return _numpy.asarray(arr) @@ -8537,7 +8549,7 @@ cdef class VgpuTypeIdInfo_v1: def vgpu_type_ids(self, val): if self._readonly: raise ValueError("This VgpuTypeIdInfo_v1 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuTypeIds = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8546,7 +8558,7 @@ cdef class VgpuTypeIdInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeIdInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) @staticmethod def from_data(data): @@ -8555,7 +8567,7 @@ cdef class VgpuTypeIdInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_id_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) + return _cyb_from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8570,10 +8582,10 @@ cdef class VgpuTypeIdInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeIdInfo_v1 obj = VgpuTypeIdInfo_v1.__new__(VgpuTypeIdInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8614,7 +8626,7 @@ cdef class ActiveVgpuInstanceInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") self._owner = None @@ -8627,7 +8639,7 @@ cdef class ActiveVgpuInstanceInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ActiveVgpuInstanceInfo_v1 object at {hex(id(self))}>" @@ -8648,20 +8660,20 @@ cdef class ActiveVgpuInstanceInfo_v1: if not isinstance(other, ActiveVgpuInstanceInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8684,7 +8696,7 @@ cdef class ActiveVgpuInstanceInfo_v1: """int: IN/OUT: list of active vGPU instances.""" if self._ptr[0].vgpuInstances == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuInstances) return _numpy.asarray(arr) @@ -8692,7 +8704,7 @@ cdef class ActiveVgpuInstanceInfo_v1: def vgpu_instances(self, val): if self._readonly: raise ValueError("This ActiveVgpuInstanceInfo_v1 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuInstances = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8701,7 +8713,7 @@ cdef class ActiveVgpuInstanceInfo_v1: @staticmethod def from_buffer(buffer): """Create an ActiveVgpuInstanceInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) @staticmethod def from_data(data): @@ -8710,7 +8722,7 @@ cdef class ActiveVgpuInstanceInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `active_vgpu_instance_info_v1_dtype` holding the data. """ - return __from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) + return _cyb_from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8725,10 +8737,10 @@ cdef class ActiveVgpuInstanceInfo_v1: raise ValueError("ptr must not be null (0)") cdef ActiveVgpuInstanceInfo_v1 obj = ActiveVgpuInstanceInfo_v1.__new__(ActiveVgpuInstanceInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8771,7 +8783,7 @@ cdef class VgpuCreatablePlacementInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") self._owner = None @@ -8784,7 +8796,7 @@ cdef class VgpuCreatablePlacementInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuCreatablePlacementInfo_v1 object at {hex(id(self))}>" @@ -8805,20 +8817,20 @@ cdef class VgpuCreatablePlacementInfo_v1: if not isinstance(other, VgpuCreatablePlacementInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8863,7 +8875,7 @@ cdef class VgpuCreatablePlacementInfo_v1: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef view.array arr = view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -8871,7 +8883,7 @@ cdef class VgpuCreatablePlacementInfo_v1: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuCreatablePlacementInfo_v1 instance is read-only") - cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].placementSize = len(val) @@ -8880,7 +8892,7 @@ cdef class VgpuCreatablePlacementInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuCreatablePlacementInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) @staticmethod def from_data(data): @@ -8889,7 +8901,7 @@ cdef class VgpuCreatablePlacementInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_creatable_placement_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) + return _cyb_from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8904,10 +8916,10 @@ cdef class VgpuCreatablePlacementInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuCreatablePlacementInfo_v1 obj = VgpuCreatablePlacementInfo_v1.__new__(VgpuCreatablePlacementInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8982,10 +8994,10 @@ cdef class HwbcEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def hwbc_id(self): @@ -9061,8 +9073,8 @@ cdef class HwbcEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef HwbcEntry obj = HwbcEntry.__new__(HwbcEntry) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlHwbcEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=hwbc_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -9097,7 +9109,7 @@ cdef class LedState: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlLedState_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") self._owner = None @@ -9109,7 +9121,7 @@ cdef class LedState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.LedState object at {hex(id(self))}>" @@ -9130,20 +9142,20 @@ cdef class LedState: if not isinstance(other, LedState): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlLedState_t)) + self._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9153,7 +9165,7 @@ cdef class LedState: @property def cause(self): """~_numpy.int8: (array of length 256).""" - return cpython.PyUnicode_FromString(self._ptr[0].cause) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].cause) @cause.setter def cause(self, val): @@ -9163,7 +9175,7 @@ cdef class LedState: if len(buf) >= 256: raise ValueError("String too long for field cause, max length is 255") cdef char *ptr = buf - memcpy((self._ptr[0].cause), ptr, 256) + _cyb_memcpy((self._ptr[0].cause), ptr, 256) @property def color(self): @@ -9179,7 +9191,7 @@ cdef class LedState: @staticmethod def from_buffer(buffer): """Create an LedState instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlLedState_t), LedState) + return _cyb_from_buffer(buffer, sizeof(nvmlLedState_t), LedState) @staticmethod def from_data(data): @@ -9188,7 +9200,7 @@ cdef class LedState: Args: data (_numpy.ndarray): a single-element array of dtype `led_state_dtype` holding the data. """ - return __from_data(data, "led_state_dtype", led_state_dtype, LedState) + return _cyb_from_data(data, "led_state_dtype", led_state_dtype, LedState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9203,10 +9215,10 @@ cdef class LedState: raise ValueError("ptr must not be null (0)") cdef LedState obj = LedState.__new__(LedState) if owner is None: - obj._ptr = malloc(sizeof(nvmlLedState_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating LedState") - memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) obj._owner = None obj._owned = True else: @@ -9246,7 +9258,7 @@ cdef class UnitInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlUnitInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") self._owner = None @@ -9258,7 +9270,7 @@ cdef class UnitInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.UnitInfo object at {hex(id(self))}>" @@ -9279,20 +9291,20 @@ cdef class UnitInfo: if not isinstance(other, UnitInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlUnitInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9302,7 +9314,7 @@ cdef class UnitInfo: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -9312,12 +9324,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @property def id(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].id) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].id) @id.setter def id(self, val): @@ -9327,12 +9339,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field id, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].id), ptr, 96) + _cyb_memcpy((self._ptr[0].id), ptr, 96) @property def serial(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].serial) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].serial) @serial.setter def serial(self, val): @@ -9342,12 +9354,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field serial, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].serial), ptr, 96) + _cyb_memcpy((self._ptr[0].serial), ptr, 96) @property def firmware_version(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) @firmware_version.setter def firmware_version(self, val): @@ -9357,12 +9369,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field firmware_version, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].firmwareVersion), ptr, 96) + _cyb_memcpy((self._ptr[0].firmwareVersion), ptr, 96) @staticmethod def from_buffer(buffer): """Create an UnitInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) @staticmethod def from_data(data): @@ -9371,7 +9383,7 @@ cdef class UnitInfo: Args: data (_numpy.ndarray): a single-element array of dtype `unit_info_dtype` holding the data. """ - return __from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) + return _cyb_from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9386,10 +9398,10 @@ cdef class UnitInfo: raise ValueError("ptr must not be null (0)") cdef UnitInfo obj = UnitInfo.__new__(UnitInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlUnitInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) obj._owner = None obj._owned = True else: @@ -9429,7 +9441,7 @@ cdef class PSUInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPSUInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") self._owner = None @@ -9441,7 +9453,7 @@ cdef class PSUInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PSUInfo object at {hex(id(self))}>" @@ -9462,20 +9474,20 @@ cdef class PSUInfo: if not isinstance(other, PSUInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPSUInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9485,7 +9497,7 @@ cdef class PSUInfo: @property def state(self): """~_numpy.int8: (array of length 256).""" - return cpython.PyUnicode_FromString(self._ptr[0].state) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].state) @state.setter def state(self, val): @@ -9495,7 +9507,7 @@ cdef class PSUInfo: if len(buf) >= 256: raise ValueError("String too long for field state, max length is 255") cdef char *ptr = buf - memcpy((self._ptr[0].state), ptr, 256) + _cyb_memcpy((self._ptr[0].state), ptr, 256) @property def current(self): @@ -9533,7 +9545,7 @@ cdef class PSUInfo: @staticmethod def from_buffer(buffer): """Create an PSUInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) @staticmethod def from_data(data): @@ -9542,7 +9554,7 @@ cdef class PSUInfo: Args: data (_numpy.ndarray): a single-element array of dtype `psu_info_dtype` holding the data. """ - return __from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) + return _cyb_from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9557,10 +9569,10 @@ cdef class PSUInfo: raise ValueError("ptr must not be null (0)") cdef PSUInfo obj = PSUInfo.__new__(PSUInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlPSUInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) obj._owner = None obj._owned = True else: @@ -9634,10 +9646,10 @@ cdef class UnitFanInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def speed(self): @@ -9715,8 +9727,8 @@ cdef class UnitFanInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef UnitFanInfo obj = UnitFanInfo.__new__(UnitFanInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlUnitFanInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=unit_fan_info_dtype) obj._data = data.view(_numpy.recarray) @@ -9754,7 +9766,7 @@ cdef class EventData: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlEventData_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") self._owner = None @@ -9766,7 +9778,7 @@ cdef class EventData: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.EventData object at {hex(id(self))}>" @@ -9787,20 +9799,20 @@ cdef class EventData: if not isinstance(other, EventData): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlEventData_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9865,7 +9877,7 @@ cdef class EventData: @staticmethod def from_buffer(buffer): """Create an EventData instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlEventData_t), EventData) + return _cyb_from_buffer(buffer, sizeof(nvmlEventData_t), EventData) @staticmethod def from_data(data): @@ -9874,7 +9886,7 @@ cdef class EventData: Args: data (_numpy.ndarray): a single-element array of dtype `event_data_dtype` holding the data. """ - return __from_data(data, "event_data_dtype", event_data_dtype, EventData) + return _cyb_from_data(data, "event_data_dtype", event_data_dtype, EventData) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9889,10 +9901,10 @@ cdef class EventData: raise ValueError("ptr must not be null (0)") cdef EventData obj = EventData.__new__(EventData) if owner is None: - obj._ptr = malloc(sizeof(nvmlEventData_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EventData") - memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) obj._owner = None obj._owned = True else: @@ -9966,10 +9978,10 @@ cdef class SystemEventData_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def event_type(self): @@ -10047,8 +10059,8 @@ cdef class SystemEventData_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef SystemEventData_v1 obj = SystemEventData_v1.__new__(SystemEventData_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSystemEventData_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=system_event_data_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -10088,7 +10100,7 @@ cdef class AccountingStats: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlAccountingStats_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") self._owner = None @@ -10100,7 +10112,7 @@ cdef class AccountingStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.AccountingStats object at {hex(id(self))}>" @@ -10121,20 +10133,20 @@ cdef class AccountingStats: if not isinstance(other, AccountingStats): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlAccountingStats_t)) + self._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10210,7 +10222,7 @@ cdef class AccountingStats: @staticmethod def from_buffer(buffer): """Create an AccountingStats instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) + return _cyb_from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) @staticmethod def from_data(data): @@ -10219,7 +10231,7 @@ cdef class AccountingStats: Args: data (_numpy.ndarray): a single-element array of dtype `accounting_stats_dtype` holding the data. """ - return __from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) + return _cyb_from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10234,10 +10246,10 @@ cdef class AccountingStats: raise ValueError("ptr must not be null (0)") cdef AccountingStats obj = AccountingStats.__new__(AccountingStats) if owner is None: - obj._ptr = malloc(sizeof(nvmlAccountingStats_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) obj._owner = None obj._owned = True else: @@ -10317,10 +10329,10 @@ cdef class EncoderSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10464,8 +10476,8 @@ cdef class EncoderSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EncoderSessionInfo obj = EncoderSessionInfo.__new__(EncoderSessionInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEncoderSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=encoder_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10501,7 +10513,7 @@ cdef class FBCStats: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlFBCStats_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") self._owner = None @@ -10513,7 +10525,7 @@ cdef class FBCStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.FBCStats object at {hex(id(self))}>" @@ -10534,20 +10546,20 @@ cdef class FBCStats: if not isinstance(other, FBCStats): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlFBCStats_t)) + self._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10590,7 +10602,7 @@ cdef class FBCStats: @staticmethod def from_buffer(buffer): """Create an FBCStats instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) + return _cyb_from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) @staticmethod def from_data(data): @@ -10599,7 +10611,7 @@ cdef class FBCStats: Args: data (_numpy.ndarray): a single-element array of dtype `fbc_stats_dtype` holding the data. """ - return __from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) + return _cyb_from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10614,10 +10626,10 @@ cdef class FBCStats: raise ValueError("ptr must not be null (0)") cdef FBCStats obj = FBCStats.__new__(FBCStats) if owner is None: - obj._ptr = malloc(sizeof(nvmlFBCStats_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating FBCStats") - memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) obj._owner = None obj._owned = True else: @@ -10701,10 +10713,10 @@ cdef class FBCSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10892,8 +10904,8 @@ cdef class FBCSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FBCSessionInfo obj = FBCSessionInfo.__new__(FBCSessionInfo) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFBCSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=fbc_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10928,7 +10940,7 @@ cdef class ConfComputeSystemCaps: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") self._owner = None @@ -10940,7 +10952,7 @@ cdef class ConfComputeSystemCaps: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemCaps object at {hex(id(self))}>" @@ -10961,20 +10973,20 @@ cdef class ConfComputeSystemCaps: if not isinstance(other, ConfComputeSystemCaps): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11006,7 +11018,7 @@ cdef class ConfComputeSystemCaps: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemCaps instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) @staticmethod def from_data(data): @@ -11015,7 +11027,7 @@ cdef class ConfComputeSystemCaps: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_caps_dtype` holding the data. """ - return __from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) + return _cyb_from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11030,10 +11042,10 @@ cdef class ConfComputeSystemCaps: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemCaps obj = ConfComputeSystemCaps.__new__(ConfComputeSystemCaps) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) obj._owner = None obj._owned = True else: @@ -11072,7 +11084,7 @@ cdef class ConfComputeSystemState: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeSystemState_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") self._owner = None @@ -11084,7 +11096,7 @@ cdef class ConfComputeSystemState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemState object at {hex(id(self))}>" @@ -11105,20 +11117,20 @@ cdef class ConfComputeSystemState: if not isinstance(other, ConfComputeSystemState): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11161,7 +11173,7 @@ cdef class ConfComputeSystemState: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemState instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) @staticmethod def from_data(data): @@ -11170,7 +11182,7 @@ cdef class ConfComputeSystemState: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_state_dtype` holding the data. """ - return __from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) + return _cyb_from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11185,10 +11197,10 @@ cdef class ConfComputeSystemState: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemState obj = ConfComputeSystemState.__new__(ConfComputeSystemState) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) obj._owner = None obj._owned = True else: @@ -11229,7 +11241,7 @@ cdef class SystemConfComputeSettings_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") self._owner = None @@ -11241,7 +11253,7 @@ cdef class SystemConfComputeSettings_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.SystemConfComputeSettings_v1 object at {hex(id(self))}>" @@ -11262,20 +11274,20 @@ cdef class SystemConfComputeSettings_v1: if not isinstance(other, SystemConfComputeSettings_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11340,7 +11352,7 @@ cdef class SystemConfComputeSettings_v1: @staticmethod def from_buffer(buffer): """Create an SystemConfComputeSettings_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) @staticmethod def from_data(data): @@ -11349,7 +11361,7 @@ cdef class SystemConfComputeSettings_v1: Args: data (_numpy.ndarray): a single-element array of dtype `system_conf_compute_settings_v1_dtype` holding the data. """ - return __from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) + return _cyb_from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11364,10 +11376,10 @@ cdef class SystemConfComputeSettings_v1: raise ValueError("ptr must not be null (0)") cdef SystemConfComputeSettings_v1 obj = SystemConfComputeSettings_v1.__new__(SystemConfComputeSettings_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) obj._owner = None obj._owned = True else: @@ -11405,7 +11417,7 @@ cdef class ConfComputeMemSizeInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") self._owner = None @@ -11417,7 +11429,7 @@ cdef class ConfComputeMemSizeInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeMemSizeInfo object at {hex(id(self))}>" @@ -11438,20 +11450,20 @@ cdef class ConfComputeMemSizeInfo: if not isinstance(other, ConfComputeMemSizeInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11483,7 +11495,7 @@ cdef class ConfComputeMemSizeInfo: @staticmethod def from_buffer(buffer): """Create an ConfComputeMemSizeInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) @staticmethod def from_data(data): @@ -11492,7 +11504,7 @@ cdef class ConfComputeMemSizeInfo: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_mem_size_info_dtype` holding the data. """ - return __from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) + return _cyb_from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11507,10 +11519,10 @@ cdef class ConfComputeMemSizeInfo: raise ValueError("ptr must not be null (0)") cdef ConfComputeMemSizeInfo obj = ConfComputeMemSizeInfo.__new__(ConfComputeMemSizeInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) obj._owner = None obj._owned = True else: @@ -11550,7 +11562,7 @@ cdef class ConfComputeGpuCertificate: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") self._owner = None @@ -11562,7 +11574,7 @@ cdef class ConfComputeGpuCertificate: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuCertificate object at {hex(id(self))}>" @@ -11583,20 +11595,20 @@ cdef class ConfComputeGpuCertificate: if not isinstance(other, ConfComputeGpuCertificate): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11608,7 +11620,7 @@ cdef class ConfComputeGpuCertificate: """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].certChainSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].certChain)) return _numpy.asarray(arr) @@ -11621,16 +11633,16 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].certChainSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_cert_chain(self): """~_numpy.uint8: (array of length 5120).""" if self._ptr[0].attestationCertChainSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationCertChain)) return _numpy.asarray(arr) @@ -11643,14 +11655,14 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].attestationCertChainSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuCertificate instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) @staticmethod def from_data(data): @@ -11659,7 +11671,7 @@ cdef class ConfComputeGpuCertificate: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_certificate_dtype` holding the data. """ - return __from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) + return _cyb_from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11674,10 +11686,10 @@ cdef class ConfComputeGpuCertificate: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuCertificate obj = ConfComputeGpuCertificate.__new__(ConfComputeGpuCertificate) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) obj._owner = None obj._owned = True else: @@ -11719,7 +11731,7 @@ cdef class ConfComputeGpuAttestationReport: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") self._owner = None @@ -11731,7 +11743,7 @@ cdef class ConfComputeGpuAttestationReport: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuAttestationReport object at {hex(id(self))}>" @@ -11752,20 +11764,20 @@ cdef class ConfComputeGpuAttestationReport: if not isinstance(other, ConfComputeGpuAttestationReport): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11786,7 +11798,7 @@ cdef class ConfComputeGpuAttestationReport: @property def nonce(self): """~_numpy.uint8: (array of length 32).""" - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].nonce)) return _numpy.asarray(arr) @@ -11796,16 +11808,16 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("This ConfComputeGpuAttestationReport instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field nonce, got {len(val)}") - cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_report(self): """~_numpy.uint8: (array of length 8192).""" if self._ptr[0].attestationReportSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationReport)) return _numpy.asarray(arr) @@ -11818,16 +11830,16 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].attestationReportSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @property def cec_attestation_report(self): """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].cecAttestationReportSize == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].cecAttestationReport)) return _numpy.asarray(arr) @@ -11840,14 +11852,14 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].cecAttestationReportSize = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuAttestationReport instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) + return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) @staticmethod def from_data(data): @@ -11856,7 +11868,7 @@ cdef class ConfComputeGpuAttestationReport: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_attestation_report_dtype` holding the data. """ - return __from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) + return _cyb_from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11871,10 +11883,10 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuAttestationReport obj = ConfComputeGpuAttestationReport.__new__(ConfComputeGpuAttestationReport) if owner is None: - obj._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) obj._owner = None obj._owned = True else: @@ -11916,7 +11928,7 @@ cdef class GpuFabricInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") self._owner = None @@ -11928,7 +11940,7 @@ cdef class GpuFabricInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v2 object at {hex(id(self))}>" @@ -11949,20 +11961,20 @@ cdef class GpuFabricInfo_v2: if not isinstance(other, GpuFabricInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11983,7 +11995,7 @@ cdef class GpuFabricInfo_v2: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -11993,9 +12005,9 @@ cdef class GpuFabricInfo_v2: raise ValueError("This GpuFabricInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -12044,7 +12056,7 @@ cdef class GpuFabricInfo_v2: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) @staticmethod def from_data(data): @@ -12053,7 +12065,7 @@ cdef class GpuFabricInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v2_dtype` holding the data. """ - return __from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) + return _cyb_from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12068,10 +12080,10 @@ cdef class GpuFabricInfo_v2: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v2 obj = GpuFabricInfo_v2.__new__(GpuFabricInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -12110,7 +12122,7 @@ cdef class NvlinkSupportedBwModes_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") self._owner = None @@ -12122,7 +12134,7 @@ cdef class NvlinkSupportedBwModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSupportedBwModes_v1 object at {hex(id(self))}>" @@ -12143,20 +12155,20 @@ cdef class NvlinkSupportedBwModes_v1: if not isinstance(other, NvlinkSupportedBwModes_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12179,7 +12191,7 @@ cdef class NvlinkSupportedBwModes_v1: """~_numpy.uint8: (array of length 23).""" if self._ptr[0].totalBwModes == 0: return _numpy.array([]) - cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].bwModes)) return _numpy.asarray(arr) @@ -12192,14 +12204,14 @@ cdef class NvlinkSupportedBwModes_v1: self._ptr[0].totalBwModes = len(val) if len(val) == 0: return - cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an NvlinkSupportedBwModes_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) @staticmethod def from_data(data): @@ -12208,7 +12220,7 @@ cdef class NvlinkSupportedBwModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_supported_bw_modes_v1_dtype` holding the data. """ - return __from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) + return _cyb_from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12223,10 +12235,10 @@ cdef class NvlinkSupportedBwModes_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSupportedBwModes_v1 obj = NvlinkSupportedBwModes_v1.__new__(NvlinkSupportedBwModes_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) obj._owner = None obj._owned = True else: @@ -12265,7 +12277,7 @@ cdef class NvlinkGetBwMode_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") self._owner = None @@ -12277,7 +12289,7 @@ cdef class NvlinkGetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkGetBwMode_v1 object at {hex(id(self))}>" @@ -12298,20 +12310,20 @@ cdef class NvlinkGetBwMode_v1: if not isinstance(other, NvlinkGetBwMode_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12354,7 +12366,7 @@ cdef class NvlinkGetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkGetBwMode_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) @staticmethod def from_data(data): @@ -12363,7 +12375,7 @@ cdef class NvlinkGetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_get_bw_mode_v1_dtype` holding the data. """ - return __from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) + return _cyb_from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12378,10 +12390,10 @@ cdef class NvlinkGetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkGetBwMode_v1 obj = NvlinkGetBwMode_v1.__new__(NvlinkGetBwMode_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12420,7 +12432,7 @@ cdef class NvlinkSetBwMode_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") self._owner = None @@ -12432,7 +12444,7 @@ cdef class NvlinkSetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSetBwMode_v1 object at {hex(id(self))}>" @@ -12453,20 +12465,20 @@ cdef class NvlinkSetBwMode_v1: if not isinstance(other, NvlinkSetBwMode_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12509,7 +12521,7 @@ cdef class NvlinkSetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkSetBwMode_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) @staticmethod def from_data(data): @@ -12518,7 +12530,7 @@ cdef class NvlinkSetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_set_bw_mode_v1_dtype` holding the data. """ - return __from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) + return _cyb_from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12533,10 +12545,10 @@ cdef class NvlinkSetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSetBwMode_v1 obj = NvlinkSetBwMode_v1.__new__(NvlinkSetBwMode_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12574,7 +12586,7 @@ cdef class VgpuVersion: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuVersion_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") self._owner = None @@ -12586,7 +12598,7 @@ cdef class VgpuVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuVersion object at {hex(id(self))}>" @@ -12607,20 +12619,20 @@ cdef class VgpuVersion: if not isinstance(other, VgpuVersion): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuVersion_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12652,7 +12664,7 @@ cdef class VgpuVersion: @staticmethod def from_buffer(buffer): """Create an VgpuVersion instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) @staticmethod def from_data(data): @@ -12661,7 +12673,7 @@ cdef class VgpuVersion: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_version_dtype` holding the data. """ - return __from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) + return _cyb_from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12676,10 +12688,10 @@ cdef class VgpuVersion: raise ValueError("ptr must not be null (0)") cdef VgpuVersion obj = VgpuVersion.__new__(VgpuVersion) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuVersion_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) obj._owner = None obj._owned = True else: @@ -12725,7 +12737,7 @@ cdef class VgpuMetadata: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuMetadata_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") self._owner = None @@ -12737,7 +12749,7 @@ cdef class VgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuMetadata object at {hex(id(self))}>" @@ -12758,20 +12770,20 @@ cdef class VgpuMetadata: if not isinstance(other, VgpuMetadata): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12814,7 +12826,7 @@ cdef class VgpuMetadata: @property def guest_driver_version(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) @guest_driver_version.setter def guest_driver_version(self, val): @@ -12824,12 +12836,12 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field guest_driver_version, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].guestDriverVersion), ptr, 80) + _cyb_memcpy((self._ptr[0].guestDriverVersion), ptr, 80) @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -12839,7 +12851,7 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def vgpu_virtualization_caps(self): @@ -12877,7 +12889,7 @@ cdef class VgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -12887,12 +12899,12 @@ cdef class VgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - memcpy((self._ptr[0].opaqueData), ptr, 4) + _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuMetadata instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) @staticmethod def from_data(data): @@ -12901,7 +12913,7 @@ cdef class VgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_metadata_dtype` holding the data. """ - return __from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) + return _cyb_from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12916,10 +12928,10 @@ cdef class VgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuMetadata obj = VgpuMetadata.__new__(VgpuMetadata) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -12957,7 +12969,7 @@ cdef class VgpuPgpuCompatibility: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") self._owner = None @@ -12969,7 +12981,7 @@ cdef class VgpuPgpuCompatibility: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuCompatibility object at {hex(id(self))}>" @@ -12990,20 +13002,20 @@ cdef class VgpuPgpuCompatibility: if not isinstance(other, VgpuPgpuCompatibility): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13035,7 +13047,7 @@ cdef class VgpuPgpuCompatibility: @staticmethod def from_buffer(buffer): """Create an VgpuPgpuCompatibility instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) @staticmethod def from_data(data): @@ -13044,7 +13056,7 @@ cdef class VgpuPgpuCompatibility: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_compatibility_dtype` holding the data. """ - return __from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) + return _cyb_from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13059,10 +13071,10 @@ cdef class VgpuPgpuCompatibility: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuCompatibility obj = VgpuPgpuCompatibility.__new__(VgpuPgpuCompatibility) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) obj._owner = None obj._owned = True else: @@ -13136,10 +13148,10 @@ cdef class GpuInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13217,8 +13229,8 @@ cdef class GpuInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GpuInstancePlacement obj = GpuInstancePlacement.__new__(GpuInstancePlacement) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGpuInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=gpu_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13264,7 +13276,7 @@ cdef class GpuInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") self._owner = None @@ -13276,7 +13288,7 @@ cdef class GpuInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13297,20 +13309,20 @@ cdef class GpuInstanceProfileInfo_v3: if not isinstance(other, GpuInstanceProfileInfo_v3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13441,7 +13453,7 @@ cdef class GpuInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13451,7 +13463,7 @@ cdef class GpuInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -13467,7 +13479,7 @@ cdef class GpuInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -13476,7 +13488,7 @@ cdef class GpuInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_profile_info_v3_dtype` holding the data. """ - return __from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) + return _cyb_from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13491,10 +13503,10 @@ cdef class GpuInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuInstanceProfileInfo_v3 obj = GpuInstanceProfileInfo_v3.__new__(GpuInstanceProfileInfo_v3) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -13568,10 +13580,10 @@ cdef class ComputeInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13649,8 +13661,8 @@ cdef class ComputeInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ComputeInstancePlacement obj = ComputeInstancePlacement.__new__(ComputeInstancePlacement) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlComputeInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=compute_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13694,7 +13706,7 @@ cdef class ComputeInstanceProfileInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") self._owner = None @@ -13706,7 +13718,7 @@ cdef class ComputeInstanceProfileInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v2 object at {hex(id(self))}>" @@ -13727,20 +13739,20 @@ cdef class ComputeInstanceProfileInfo_v2: if not isinstance(other, ComputeInstanceProfileInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13860,7 +13872,7 @@ cdef class ComputeInstanceProfileInfo_v2: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13870,12 +13882,12 @@ cdef class ComputeInstanceProfileInfo_v2: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) @staticmethod def from_data(data): @@ -13884,7 +13896,7 @@ cdef class ComputeInstanceProfileInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v2_dtype` holding the data. """ - return __from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) + return _cyb_from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13899,10 +13911,10 @@ cdef class ComputeInstanceProfileInfo_v2: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v2 obj = ComputeInstanceProfileInfo_v2.__new__(ComputeInstanceProfileInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -13950,7 +13962,7 @@ cdef class ComputeInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") self._owner = None @@ -13962,7 +13974,7 @@ cdef class ComputeInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13983,20 +13995,20 @@ cdef class ComputeInstanceProfileInfo_v3: if not isinstance(other, ComputeInstanceProfileInfo_v3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14116,7 +14128,7 @@ cdef class ComputeInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return cpython.PyUnicode_FromString(self._ptr[0].name) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -14126,7 +14138,7 @@ cdef class ComputeInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - memcpy((self._ptr[0].name), ptr, 96) + _cyb_memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -14142,7 +14154,7 @@ cdef class ComputeInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) + return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -14151,7 +14163,7 @@ cdef class ComputeInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v3_dtype` holding the data. """ - return __from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) + return _cyb_from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14166,10 +14178,10 @@ cdef class ComputeInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v3 obj = ComputeInstanceProfileInfo_v3.__new__(ComputeInstanceProfileInfo_v3) if owner is None: - obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -14207,7 +14219,7 @@ cdef class DeviceAddressingMode_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") self._owner = None @@ -14219,7 +14231,7 @@ cdef class DeviceAddressingMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DeviceAddressingMode_v1 object at {hex(id(self))}>" @@ -14240,20 +14252,20 @@ cdef class DeviceAddressingMode_v1: if not isinstance(other, DeviceAddressingMode_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14285,7 +14297,7 @@ cdef class DeviceAddressingMode_v1: @staticmethod def from_buffer(buffer): """Create an DeviceAddressingMode_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) @staticmethod def from_data(data): @@ -14294,7 +14306,7 @@ cdef class DeviceAddressingMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_addressing_mode_v1_dtype` holding the data. """ - return __from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) + return _cyb_from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14309,10 +14321,10 @@ cdef class DeviceAddressingMode_v1: raise ValueError("ptr must not be null (0)") cdef DeviceAddressingMode_v1 obj = DeviceAddressingMode_v1.__new__(DeviceAddressingMode_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) obj._owner = None obj._owned = True else: @@ -14351,7 +14363,7 @@ cdef class RepairStatus_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlRepairStatus_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") self._owner = None @@ -14363,7 +14375,7 @@ cdef class RepairStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.RepairStatus_v1 object at {hex(id(self))}>" @@ -14384,20 +14396,20 @@ cdef class RepairStatus_v1: if not isinstance(other, RepairStatus_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14440,7 +14452,7 @@ cdef class RepairStatus_v1: @staticmethod def from_buffer(buffer): """Create an RepairStatus_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) @staticmethod def from_data(data): @@ -14449,7 +14461,7 @@ cdef class RepairStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `repair_status_v1_dtype` holding the data. """ - return __from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) + return _cyb_from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14464,10 +14476,10 @@ cdef class RepairStatus_v1: raise ValueError("ptr must not be null (0)") cdef RepairStatus_v1 obj = RepairStatus_v1.__new__(RepairStatus_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -14506,7 +14518,7 @@ cdef class DevicePowerMizerModes_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") self._owner = None @@ -14518,7 +14530,7 @@ cdef class DevicePowerMizerModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.DevicePowerMizerModes_v1 object at {hex(id(self))}>" @@ -14539,20 +14551,20 @@ cdef class DevicePowerMizerModes_v1: if not isinstance(other, DevicePowerMizerModes_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14595,7 +14607,7 @@ cdef class DevicePowerMizerModes_v1: @staticmethod def from_buffer(buffer): """Create an DevicePowerMizerModes_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) @staticmethod def from_data(data): @@ -14604,7 +14616,7 @@ cdef class DevicePowerMizerModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_power_mizer_modes_v1_dtype` holding the data. """ - return __from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) + return _cyb_from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14619,10 +14631,10 @@ cdef class DevicePowerMizerModes_v1: raise ValueError("ptr must not be null (0)") cdef DevicePowerMizerModes_v1 obj = DevicePowerMizerModes_v1.__new__(DevicePowerMizerModes_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) obj._owner = None obj._owned = True else: @@ -14701,10 +14713,10 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def unit(self): @@ -14837,8 +14849,8 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorEntry_v1 obj = EccSramUniqueUncorrectedErrorEntry_v1.__new__(EccSramUniqueUncorrectedErrorEntry_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorEntry_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=ecc_sram_unique_uncorrected_error_entry_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -14878,7 +14890,7 @@ cdef class GpuFabricInfo_v3: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") self._owner = None @@ -14890,7 +14902,7 @@ cdef class GpuFabricInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v3 object at {hex(id(self))}>" @@ -14911,20 +14923,20 @@ cdef class GpuFabricInfo_v3: if not isinstance(other, GpuFabricInfo_v3): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14945,7 +14957,7 @@ cdef class GpuFabricInfo_v3: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -14955,9 +14967,9 @@ cdef class GpuFabricInfo_v3: raise ValueError("This GpuFabricInfo_v3 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -15017,7 +15029,7 @@ cdef class GpuFabricInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v3 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) @staticmethod def from_data(data): @@ -15026,7 +15038,7 @@ cdef class GpuFabricInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v3_dtype` holding the data. """ - return __from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) + return _cyb_from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15041,10 +15053,10 @@ cdef class GpuFabricInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v3 obj = GpuFabricInfo_v3.__new__(GpuFabricInfo_v3) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -15082,7 +15094,7 @@ cdef class NvLinkInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") self._owner = None @@ -15094,7 +15106,7 @@ cdef class NvLinkInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v1 object at {hex(id(self))}>" @@ -15115,20 +15127,20 @@ cdef class NvLinkInfo_v1: if not isinstance(other, NvLinkInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15160,7 +15172,7 @@ cdef class NvLinkInfo_v1: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) @staticmethod def from_data(data): @@ -15169,7 +15181,7 @@ cdef class NvLinkInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v1_dtype` holding the data. """ - return __from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) + return _cyb_from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15184,10 +15196,10 @@ cdef class NvLinkInfo_v1: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v1 obj = NvLinkInfo_v1.__new__(NvLinkInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -15227,7 +15239,7 @@ cdef class NvlinkFirmwareVersion: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") self._owner = None @@ -15239,7 +15251,7 @@ cdef class NvlinkFirmwareVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareVersion object at {hex(id(self))}>" @@ -15260,20 +15272,20 @@ cdef class NvlinkFirmwareVersion: if not isinstance(other, NvlinkFirmwareVersion): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15327,7 +15339,7 @@ cdef class NvlinkFirmwareVersion: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareVersion instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) @staticmethod def from_data(data): @@ -15336,7 +15348,7 @@ cdef class NvlinkFirmwareVersion: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_version_dtype` holding the data. """ - return __from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) + return _cyb_from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15351,10 +15363,10 @@ cdef class NvlinkFirmwareVersion: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareVersion obj = NvlinkFirmwareVersion.__new__(NvlinkFirmwareVersion) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) obj._owner = None obj._owned = True else: @@ -15391,7 +15403,7 @@ cdef class PRMCounterInput_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") self._owner = None @@ -15403,7 +15415,7 @@ cdef class PRMCounterInput_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterInput_v1 object at {hex(id(self))}>" @@ -15424,20 +15436,20 @@ cdef class PRMCounterInput_v1: if not isinstance(other, PRMCounterInput_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15458,7 +15470,7 @@ cdef class PRMCounterInput_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterInput_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) @staticmethod def from_data(data): @@ -15467,7 +15479,7 @@ cdef class PRMCounterInput_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_input_v1_dtype` holding the data. """ - return __from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) + return _cyb_from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15482,10 +15494,10 @@ cdef class PRMCounterInput_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterInput_v1 obj = PRMCounterInput_v1.__new__(PRMCounterInput_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) obj._owner = None obj._owned = True else: @@ -15525,7 +15537,7 @@ cdef class VgpuSchedulerStateInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") self._owner = None @@ -15537,7 +15549,7 @@ cdef class VgpuSchedulerStateInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v2 object at {hex(id(self))}>" @@ -15558,20 +15570,20 @@ cdef class VgpuSchedulerStateInfo_v2: if not isinstance(other, VgpuSchedulerStateInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15625,7 +15637,7 @@ cdef class VgpuSchedulerStateInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) @staticmethod def from_data(data): @@ -15634,7 +15646,7 @@ cdef class VgpuSchedulerStateInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) + return _cyb_from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15649,10 +15661,10 @@ cdef class VgpuSchedulerStateInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v2 obj = VgpuSchedulerStateInfo_v2.__new__(VgpuSchedulerStateInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -15731,10 +15743,10 @@ cdef class VgpuSchedulerLogEntry_v2: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -15867,8 +15879,8 @@ cdef class VgpuSchedulerLogEntry_v2: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry_v2 obj = VgpuSchedulerLogEntry_v2.__new__(VgpuSchedulerLogEntry_v2) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_v2_dtype) obj._data = data.view(_numpy.recarray) @@ -15905,7 +15917,7 @@ cdef class VgpuSchedulerState_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") self._owner = None @@ -15917,7 +15929,7 @@ cdef class VgpuSchedulerState_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v2 object at {hex(id(self))}>" @@ -15938,20 +15950,20 @@ cdef class VgpuSchedulerState_v2: if not isinstance(other, VgpuSchedulerState_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16005,7 +16017,7 @@ cdef class VgpuSchedulerState_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) @staticmethod def from_data(data): @@ -16014,7 +16026,7 @@ cdef class VgpuSchedulerState_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) + return _cyb_from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16029,10 +16041,10 @@ cdef class VgpuSchedulerState_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v2 obj = VgpuSchedulerState_v2.__new__(VgpuSchedulerState_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) obj._owner = None obj._owned = True else: @@ -16070,7 +16082,7 @@ cdef class ExcludedDeviceInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") self._owner = None @@ -16082,7 +16094,7 @@ cdef class ExcludedDeviceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ExcludedDeviceInfo object at {hex(id(self))}>" @@ -16103,20 +16115,20 @@ cdef class ExcludedDeviceInfo: if not isinstance(other, ExcludedDeviceInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16133,12 +16145,12 @@ cdef class ExcludedDeviceInfo: if self._readonly: raise ValueError("This ExcludedDeviceInfo instance is read-only") cdef PciInfo val_ = val - memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) + _cyb_memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) @property def uuid(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].uuid) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].uuid) @uuid.setter def uuid(self, val): @@ -16148,12 +16160,12 @@ cdef class ExcludedDeviceInfo: if len(buf) >= 80: raise ValueError("String too long for field uuid, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].uuid), ptr, 80) + _cyb_memcpy((self._ptr[0].uuid), ptr, 80) @staticmethod def from_buffer(buffer): """Create an ExcludedDeviceInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) @staticmethod def from_data(data): @@ -16162,7 +16174,7 @@ cdef class ExcludedDeviceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `excluded_device_info_dtype` holding the data. """ - return __from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) + return _cyb_from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16177,10 +16189,10 @@ cdef class ExcludedDeviceInfo: raise ValueError("ptr must not be null (0)") cdef ExcludedDeviceInfo obj = ExcludedDeviceInfo.__new__(ExcludedDeviceInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) obj._owner = None obj._owned = True else: @@ -16221,7 +16233,7 @@ cdef class ProcessDetailList_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") self._owner = None @@ -16234,7 +16246,7 @@ cdef class ProcessDetailList_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ProcessDetailList_v1 object at {hex(id(self))}>" @@ -16255,20 +16267,20 @@ cdef class ProcessDetailList_v1: if not isinstance(other, ProcessDetailList_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16316,7 +16328,7 @@ cdef class ProcessDetailList_v1: @staticmethod def from_buffer(buffer): """Create an ProcessDetailList_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) @staticmethod def from_data(data): @@ -16325,7 +16337,7 @@ cdef class ProcessDetailList_v1: Args: data (_numpy.ndarray): a single-element array of dtype `process_detail_list_v1_dtype` holding the data. """ - return __from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) + return _cyb_from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16340,10 +16352,10 @@ cdef class ProcessDetailList_v1: raise ValueError("ptr must not be null (0)") cdef ProcessDetailList_v1 obj = ProcessDetailList_v1.__new__(ProcessDetailList_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) obj._owner = None obj._owned = True else: @@ -16382,7 +16394,7 @@ cdef class BridgeChipHierarchy: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") self._owner = None @@ -16394,7 +16406,7 @@ cdef class BridgeChipHierarchy: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.BridgeChipHierarchy object at {hex(id(self))}>" @@ -16415,20 +16427,20 @@ cdef class BridgeChipHierarchy: if not isinstance(other, BridgeChipHierarchy): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16450,12 +16462,12 @@ cdef class BridgeChipHierarchy: self._ptr[0].bridgeCount = len(val) if len(val) == 0: return - memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) + _cyb_memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) @staticmethod def from_buffer(buffer): """Create an BridgeChipHierarchy instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) + return _cyb_from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) @staticmethod def from_data(data): @@ -16464,7 +16476,7 @@ cdef class BridgeChipHierarchy: Args: data (_numpy.ndarray): a single-element array of dtype `bridge_chip_hierarchy_dtype` holding the data. """ - return __from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) + return _cyb_from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16479,10 +16491,10 @@ cdef class BridgeChipHierarchy: raise ValueError("ptr must not be null (0)") cdef BridgeChipHierarchy obj = BridgeChipHierarchy.__new__(BridgeChipHierarchy) if owner is None: - obj._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) obj._owner = None obj._owned = True else: @@ -16556,10 +16568,10 @@ cdef class Sample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -16635,8 +16647,8 @@ cdef class Sample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Sample obj = Sample.__new__(Sample) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16711,10 +16723,10 @@ cdef class VgpuInstanceUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def vgpu_instance(self): @@ -16828,8 +16840,8 @@ cdef class VgpuInstanceUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationSample obj = VgpuInstanceUtilizationSample.__new__(VgpuInstanceUtilizationSample) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16906,10 +16918,10 @@ cdef class VgpuInstanceUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -17041,8 +17053,8 @@ cdef class VgpuInstanceUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationInfo_v1 obj = VgpuInstanceUtilizationInfo_v1.__new__(VgpuInstanceUtilizationInfo_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -17118,10 +17130,10 @@ cdef class FieldValue: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def field_id(self): @@ -17252,8 +17264,8 @@ cdef class FieldValue: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FieldValue obj = FieldValue.__new__(FieldValue) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFieldValue_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=field_value_dtype) obj._data = data.view(_numpy.recarray) @@ -17289,7 +17301,7 @@ cdef class PRMCounterValue_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") self._owner = None @@ -17301,7 +17313,7 @@ cdef class PRMCounterValue_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterValue_v1 object at {hex(id(self))}>" @@ -17322,20 +17334,20 @@ cdef class PRMCounterValue_v1: if not isinstance(other, PRMCounterValue_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17352,7 +17364,7 @@ cdef class PRMCounterValue_v1: if self._readonly: raise ValueError("This PRMCounterValue_v1 instance is read-only") cdef Value val_ = val - memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) + _cyb_memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) @property def status(self): @@ -17379,7 +17391,7 @@ cdef class PRMCounterValue_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterValue_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) @staticmethod def from_data(data): @@ -17388,7 +17400,7 @@ cdef class PRMCounterValue_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_value_v1_dtype` holding the data. """ - return __from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) + return _cyb_from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17403,10 +17415,10 @@ cdef class PRMCounterValue_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterValue_v1 obj = PRMCounterValue_v1.__new__(PRMCounterValue_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) obj._owner = None obj._owned = True else: @@ -17444,7 +17456,7 @@ cdef class GpuThermalSettings: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuThermalSettings_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") self._owner = None @@ -17456,7 +17468,7 @@ cdef class GpuThermalSettings: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuThermalSettings object at {hex(id(self))}>" @@ -17477,20 +17489,20 @@ cdef class GpuThermalSettings: if not isinstance(other, GpuThermalSettings): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17509,7 +17521,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(cuda_bindings_nvml__anon_pod0) * 3) + _cyb_memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) @property def count(self): @@ -17525,7 +17537,7 @@ cdef class GpuThermalSettings: @staticmethod def from_buffer(buffer): """Create an GpuThermalSettings instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) @staticmethod def from_data(data): @@ -17534,7 +17546,7 @@ cdef class GpuThermalSettings: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_thermal_settings_dtype` holding the data. """ - return __from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) + return _cyb_from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17549,10 +17561,10 @@ cdef class GpuThermalSettings: raise ValueError("ptr must not be null (0)") cdef GpuThermalSettings obj = GpuThermalSettings.__new__(GpuThermalSettings) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) obj._owner = None obj._owned = True else: @@ -17591,7 +17603,7 @@ cdef class ClkMonStatus: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlClkMonStatus_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") self._owner = None @@ -17603,7 +17615,7 @@ cdef class ClkMonStatus: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ClkMonStatus object at {hex(id(self))}>" @@ -17624,20 +17636,20 @@ cdef class ClkMonStatus: if not isinstance(other, ClkMonStatus): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlClkMonStatus_t)) + self._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17659,7 +17671,7 @@ cdef class ClkMonStatus: self._ptr[0].clkMonListSize = len(val) if len(val) == 0: return - memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) + _cyb_memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) @property def b_global_status(self): @@ -17675,7 +17687,7 @@ cdef class ClkMonStatus: @staticmethod def from_buffer(buffer): """Create an ClkMonStatus instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) + return _cyb_from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) @staticmethod def from_data(data): @@ -17684,7 +17696,7 @@ cdef class ClkMonStatus: Args: data (_numpy.ndarray): a single-element array of dtype `clk_mon_status_dtype` holding the data. """ - return __from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) + return _cyb_from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17699,10 +17711,10 @@ cdef class ClkMonStatus: raise ValueError("ptr must not be null (0)") cdef ClkMonStatus obj = ClkMonStatus.__new__(ClkMonStatus) if owner is None: - obj._ptr = malloc(sizeof(nvmlClkMonStatus_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) obj._owner = None obj._owned = True else: @@ -17743,7 +17755,7 @@ cdef class ProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") self._owner = None @@ -17756,7 +17768,7 @@ cdef class ProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -17777,20 +17789,20 @@ cdef class ProcessesUtilizationInfo_v1: if not isinstance(other, ProcessesUtilizationInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17838,7 +17850,7 @@ cdef class ProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an ProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -17847,7 +17859,7 @@ cdef class ProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `processes_utilization_info_v1_dtype` holding the data. """ - return __from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) + return _cyb_from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17862,10 +17874,10 @@ cdef class ProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef ProcessesUtilizationInfo_v1 obj = ProcessesUtilizationInfo_v1.__new__(ProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -17904,7 +17916,7 @@ cdef class GpuDynamicPstatesInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") self._owner = None @@ -17916,7 +17928,7 @@ cdef class GpuDynamicPstatesInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuDynamicPstatesInfo object at {hex(id(self))}>" @@ -17937,20 +17949,20 @@ cdef class GpuDynamicPstatesInfo: if not isinstance(other, GpuDynamicPstatesInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17969,7 +17981,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(cuda_bindings_nvml__anon_pod1) * 8) + _cyb_memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) @property def flags_(self): @@ -17985,7 +17997,7 @@ cdef class GpuDynamicPstatesInfo: @staticmethod def from_buffer(buffer): """Create an GpuDynamicPstatesInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) @staticmethod def from_data(data): @@ -17994,7 +18006,7 @@ cdef class GpuDynamicPstatesInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_dynamic_pstates_info_dtype` holding the data. """ - return __from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) + return _cyb_from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18009,10 +18021,10 @@ cdef class GpuDynamicPstatesInfo: raise ValueError("ptr must not be null (0)") cdef GpuDynamicPstatesInfo obj = GpuDynamicPstatesInfo.__new__(GpuDynamicPstatesInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) obj._owner = None obj._owned = True else: @@ -18053,7 +18065,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") self._owner = None @@ -18066,7 +18078,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -18087,20 +18099,20 @@ cdef class VgpuProcessesUtilizationInfo_v1: if not isinstance(other, VgpuProcessesUtilizationInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18148,7 +18160,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -18157,7 +18169,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_processes_utilization_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) + return _cyb_from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18172,10 +18184,10 @@ cdef class VgpuProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuProcessesUtilizationInfo_v1 obj = VgpuProcessesUtilizationInfo_v1.__new__(VgpuProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -18208,7 +18220,7 @@ cdef class VgpuSchedulerParams: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") self._owner = None @@ -18220,7 +18232,7 @@ cdef class VgpuSchedulerParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerParams object at {hex(id(self))}>" @@ -18241,20 +18253,20 @@ cdef class VgpuSchedulerParams: if not isinstance(other, VgpuSchedulerParams): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18271,7 +18283,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(cuda_bindings_nvml__anon_pod2) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) @property def vgpu_sched_data(self): @@ -18283,12 +18295,12 @@ 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(cuda_bindings_nvml__anon_pod3) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerParams instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) @staticmethod def from_data(data): @@ -18297,7 +18309,7 @@ cdef class VgpuSchedulerParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_params_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) + return _cyb_from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18312,10 +18324,10 @@ cdef class VgpuSchedulerParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerParams obj = VgpuSchedulerParams.__new__(VgpuSchedulerParams) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) obj._owner = None obj._owned = True else: @@ -18347,7 +18359,7 @@ cdef class VgpuSchedulerSetParams: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") self._owner = None @@ -18359,7 +18371,7 @@ cdef class VgpuSchedulerSetParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerSetParams object at {hex(id(self))}>" @@ -18380,20 +18392,20 @@ cdef class VgpuSchedulerSetParams: if not isinstance(other, VgpuSchedulerSetParams): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18410,7 +18422,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(cuda_bindings_nvml__anon_pod4) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) @property def vgpu_sched_data(self): @@ -18422,12 +18434,12 @@ 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(cuda_bindings_nvml__anon_pod5) * 1) + _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerSetParams instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) @staticmethod def from_data(data): @@ -18436,7 +18448,7 @@ cdef class VgpuSchedulerSetParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_set_params_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) + return _cyb_from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18451,10 +18463,10 @@ cdef class VgpuSchedulerSetParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerSetParams obj = VgpuSchedulerSetParams.__new__(VgpuSchedulerSetParams) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) obj._owner = None obj._owned = True else: @@ -18493,7 +18505,7 @@ cdef class VgpuLicenseInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") self._owner = None @@ -18505,7 +18517,7 @@ cdef class VgpuLicenseInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseInfo object at {hex(id(self))}>" @@ -18526,20 +18538,20 @@ cdef class VgpuLicenseInfo: if not isinstance(other, VgpuLicenseInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18556,7 +18568,7 @@ cdef class VgpuLicenseInfo: if self._readonly: raise ValueError("This VgpuLicenseInfo instance is read-only") cdef VgpuLicenseExpiry val_ = val - memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) + _cyb_memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) @property def is_licensed(self): @@ -18583,7 +18595,7 @@ cdef class VgpuLicenseInfo: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) @staticmethod def from_data(data): @@ -18592,7 +18604,7 @@ cdef class VgpuLicenseInfo: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_info_dtype` holding the data. """ - return __from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) + return _cyb_from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18607,10 +18619,10 @@ cdef class VgpuLicenseInfo: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseInfo obj = VgpuLicenseInfo.__new__(VgpuLicenseInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) obj._owner = None obj._owned = True else: @@ -18688,10 +18700,10 @@ cdef class GridLicensableFeature: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def feature_code(self): @@ -18807,8 +18819,8 @@ cdef class GridLicensableFeature: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeature obj = GridLicensableFeature.__new__(GridLicensableFeature) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGridLicensableFeature_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=grid_licensable_feature_dtype) obj._data = data.view(_numpy.recarray) @@ -18843,7 +18855,7 @@ cdef class UnitFanSpeeds: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") self._owner = None @@ -18855,7 +18867,7 @@ cdef class UnitFanSpeeds: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.UnitFanSpeeds object at {hex(id(self))}>" @@ -18876,20 +18888,20 @@ cdef class UnitFanSpeeds: if not isinstance(other, UnitFanSpeeds): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18908,7 +18920,7 @@ cdef class UnitFanSpeeds: cdef UnitFanInfo val_ = val if len(val) != 24: raise ValueError(f"Expected length { 24 } for field fans, got {len(val)}") - memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) + _cyb_memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) @property def count(self): @@ -18924,7 +18936,7 @@ cdef class UnitFanSpeeds: @staticmethod def from_buffer(buffer): """Create an UnitFanSpeeds instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) + return _cyb_from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) @staticmethod def from_data(data): @@ -18933,7 +18945,7 @@ cdef class UnitFanSpeeds: Args: data (_numpy.ndarray): a single-element array of dtype `unit_fan_speeds_dtype` holding the data. """ - return __from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) + return _cyb_from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18948,10 +18960,10 @@ cdef class UnitFanSpeeds: raise ValueError("ptr must not be null (0)") cdef UnitFanSpeeds obj = UnitFanSpeeds.__new__(UnitFanSpeeds) if owner is None: - obj._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) obj._owner = None obj._owned = True else: @@ -18995,7 +19007,7 @@ cdef class VgpuPgpuMetadata: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") self._owner = None @@ -19007,7 +19019,7 @@ cdef class VgpuPgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuMetadata object at {hex(id(self))}>" @@ -19028,20 +19040,20 @@ cdef class VgpuPgpuMetadata: if not isinstance(other, VgpuPgpuMetadata): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19058,7 +19070,7 @@ cdef class VgpuPgpuMetadata: if self._readonly: raise ValueError("This VgpuPgpuMetadata instance is read-only") cdef VgpuVersion val_ = val - memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) + _cyb_memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) @property def version(self): @@ -19085,7 +19097,7 @@ cdef class VgpuPgpuMetadata: @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -19095,7 +19107,7 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def pgpu_virtualization_caps(self): @@ -19122,7 +19134,7 @@ cdef class VgpuPgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -19132,12 +19144,12 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - memcpy((self._ptr[0].opaqueData), ptr, 4) + _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuPgpuMetadata instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) @staticmethod def from_data(data): @@ -19146,7 +19158,7 @@ cdef class VgpuPgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_metadata_dtype` holding the data. """ - return __from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) + return _cyb_from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19161,10 +19173,10 @@ cdef class VgpuPgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuMetadata obj = VgpuPgpuMetadata.__new__(VgpuPgpuMetadata) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -19204,7 +19216,7 @@ cdef class GpuInstanceInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") self._owner = None @@ -19216,7 +19228,7 @@ cdef class GpuInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceInfo object at {hex(id(self))}>" @@ -19237,20 +19249,20 @@ cdef class GpuInstanceInfo: if not isinstance(other, GpuInstanceInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19267,7 +19279,7 @@ cdef class GpuInstanceInfo: if self._readonly: raise ValueError("This GpuInstanceInfo instance is read-only") cdef GpuInstancePlacement val_ = val - memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) + _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) @property def device_(self): @@ -19305,7 +19317,7 @@ cdef class GpuInstanceInfo: @staticmethod def from_buffer(buffer): """Create an GpuInstanceInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) @staticmethod def from_data(data): @@ -19314,7 +19326,7 @@ cdef class GpuInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_info_dtype` holding the data. """ - return __from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) + return _cyb_from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19329,10 +19341,10 @@ cdef class GpuInstanceInfo: raise ValueError("ptr must not be null (0)") cdef GpuInstanceInfo obj = GpuInstanceInfo.__new__(GpuInstanceInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19373,7 +19385,7 @@ cdef class ComputeInstanceInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") self._owner = None @@ -19385,7 +19397,7 @@ cdef class ComputeInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceInfo object at {hex(id(self))}>" @@ -19406,20 +19418,20 @@ cdef class ComputeInstanceInfo: if not isinstance(other, ComputeInstanceInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19436,7 +19448,7 @@ cdef class ComputeInstanceInfo: if self._readonly: raise ValueError("This ComputeInstanceInfo instance is read-only") cdef ComputeInstancePlacement val_ = val - memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) + _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) @property def device_(self): @@ -19485,7 +19497,7 @@ cdef class ComputeInstanceInfo: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) @staticmethod def from_data(data): @@ -19494,7 +19506,7 @@ cdef class ComputeInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_info_dtype` holding the data. """ - return __from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) + return _cyb_from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19509,10 +19521,10 @@ cdef class ComputeInstanceInfo: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceInfo obj = ComputeInstanceInfo.__new__(ComputeInstanceInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19552,7 +19564,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") self._owner = None @@ -19565,7 +19577,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.EccSramUniqueUncorrectedErrorCounts_v1 object at {hex(id(self))}>" @@ -19586,20 +19598,20 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if not isinstance(other, EccSramUniqueUncorrectedErrorCounts_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19636,7 +19648,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: @staticmethod def from_buffer(buffer): """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_data(data): @@ -19645,7 +19657,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_unique_uncorrected_error_counts_v1_dtype` holding the data. """ - return __from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) + return _cyb_from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19660,10 +19672,10 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorCounts_v1 obj = EccSramUniqueUncorrectedErrorCounts_v1.__new__(EccSramUniqueUncorrectedErrorCounts_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) obj._owner = None obj._owned = True else: @@ -19702,7 +19714,7 @@ cdef class NvlinkFirmwareInfo: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") self._owner = None @@ -19714,7 +19726,7 @@ cdef class NvlinkFirmwareInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareInfo object at {hex(id(self))}>" @@ -19735,20 +19747,20 @@ cdef class NvlinkFirmwareInfo: if not isinstance(other, NvlinkFirmwareInfo): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19767,7 +19779,7 @@ cdef class NvlinkFirmwareInfo: cdef NvlinkFirmwareVersion val_ = val if len(val) != 100: raise ValueError(f"Expected length { 100 } for field firmware_version, got {len(val)}") - memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) + _cyb_memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) @property def num_valid_entries(self): @@ -19783,7 +19795,7 @@ cdef class NvlinkFirmwareInfo: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareInfo instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) @staticmethod def from_data(data): @@ -19792,7 +19804,7 @@ cdef class NvlinkFirmwareInfo: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_info_dtype` holding the data. """ - return __from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) + return _cyb_from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19807,10 +19819,10 @@ cdef class NvlinkFirmwareInfo: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareInfo obj = NvlinkFirmwareInfo.__new__(NvlinkFirmwareInfo) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) obj._owner = None obj._owned = True else: @@ -19852,7 +19864,7 @@ cdef class VgpuSchedulerLogInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") self._owner = None @@ -19864,7 +19876,7 @@ cdef class VgpuSchedulerLogInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v2 object at {hex(id(self))}>" @@ -19885,20 +19897,20 @@ cdef class VgpuSchedulerLogInfo_v2: if not isinstance(other, VgpuSchedulerLogInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19917,7 +19929,7 @@ cdef class VgpuSchedulerLogInfo_v2: cdef VgpuSchedulerLogEntry_v2 val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) @property def engine_id(self): @@ -19977,7 +19989,7 @@ cdef class VgpuSchedulerLogInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) @staticmethod def from_data(data): @@ -19986,7 +19998,7 @@ cdef class VgpuSchedulerLogInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v2_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) + return _cyb_from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20001,10 +20013,10 @@ cdef class VgpuSchedulerLogInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v2 obj = VgpuSchedulerLogInfo_v2.__new__(VgpuSchedulerLogInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -20046,7 +20058,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") self._owner = None @@ -20059,7 +20071,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuInstancesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -20080,20 +20092,20 @@ cdef class VgpuInstancesUtilizationInfo_v1: if not isinstance(other, VgpuInstancesUtilizationInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20152,7 +20164,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuInstancesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -20161,7 +20173,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_instances_utilization_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) + return _cyb_from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20176,10 +20188,10 @@ cdef class VgpuInstancesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuInstancesUtilizationInfo_v1 obj = VgpuInstancesUtilizationInfo_v1.__new__(VgpuInstancesUtilizationInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20255,10 +20267,10 @@ cdef class PRMCounter_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - cpython.PyObject_GetBuffer(self._data, buffer, flags) + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - cpython.PyBuffer_Release(buffer) + _cyb_cpython.PyBuffer_Release(buffer) @property def counter_id(self): @@ -20343,8 +20355,8 @@ cdef class PRMCounter_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PRMCounter_v1 obj = PRMCounter_v1.__new__(PRMCounter_v1) - cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE - cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlPRMCounter_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=prm_counter_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -20383,7 +20395,7 @@ cdef class VgpuSchedulerLog: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") self._owner = None @@ -20395,7 +20407,7 @@ cdef class VgpuSchedulerLog: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLog object at {hex(id(self))}>" @@ -20416,20 +20428,20 @@ cdef class VgpuSchedulerLog: if not isinstance(other, VgpuSchedulerLog): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20446,7 +20458,7 @@ cdef class VgpuSchedulerLog: if self._readonly: raise ValueError("This VgpuSchedulerLog instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -20460,7 +20472,7 @@ cdef class VgpuSchedulerLog: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def engine_id(self): @@ -20509,7 +20521,7 @@ cdef class VgpuSchedulerLog: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLog instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) @staticmethod def from_data(data): @@ -20518,7 +20530,7 @@ cdef class VgpuSchedulerLog: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) + return _cyb_from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20533,10 +20545,10 @@ cdef class VgpuSchedulerLog: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLog obj = VgpuSchedulerLog.__new__(VgpuSchedulerLog) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) obj._owner = None obj._owned = True else: @@ -20575,7 +20587,7 @@ cdef class VgpuSchedulerGetState: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") self._owner = None @@ -20587,7 +20599,7 @@ cdef class VgpuSchedulerGetState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerGetState object at {hex(id(self))}>" @@ -20608,20 +20620,20 @@ cdef class VgpuSchedulerGetState: if not isinstance(other, VgpuSchedulerGetState): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20638,7 +20650,7 @@ cdef class VgpuSchedulerGetState: if self._readonly: raise ValueError("This VgpuSchedulerGetState instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def scheduler_policy(self): @@ -20665,7 +20677,7 @@ cdef class VgpuSchedulerGetState: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerGetState instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) @staticmethod def from_data(data): @@ -20674,7 +20686,7 @@ cdef class VgpuSchedulerGetState: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_get_state_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) + return _cyb_from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20689,10 +20701,10 @@ cdef class VgpuSchedulerGetState: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerGetState obj = VgpuSchedulerGetState.__new__(VgpuSchedulerGetState) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) obj._owner = None obj._owned = True else: @@ -20733,7 +20745,7 @@ cdef class VgpuSchedulerStateInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") self._owner = None @@ -20745,7 +20757,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v1 object at {hex(id(self))}>" @@ -20766,20 +20778,20 @@ cdef class VgpuSchedulerStateInfo_v1: if not isinstance(other, VgpuSchedulerStateInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20796,7 +20808,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def version(self): @@ -20845,7 +20857,7 @@ cdef class VgpuSchedulerStateInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) @staticmethod def from_data(data): @@ -20854,7 +20866,7 @@ cdef class VgpuSchedulerStateInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) + return _cyb_from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20869,10 +20881,10 @@ cdef class VgpuSchedulerStateInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v1 obj = VgpuSchedulerStateInfo_v1.__new__(VgpuSchedulerStateInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20915,7 +20927,7 @@ cdef class VgpuSchedulerLogInfo_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") self._owner = None @@ -20927,7 +20939,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v1 object at {hex(id(self))}>" @@ -20948,20 +20960,20 @@ cdef class VgpuSchedulerLogInfo_v1: if not isinstance(other, VgpuSchedulerLogInfo_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20978,7 +20990,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -20992,7 +21004,7 @@ cdef class VgpuSchedulerLogInfo_v1: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def version(self): @@ -21052,7 +21064,7 @@ cdef class VgpuSchedulerLogInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) @staticmethod def from_data(data): @@ -21061,7 +21073,7 @@ cdef class VgpuSchedulerLogInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) + return _cyb_from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21076,10 +21088,10 @@ cdef class VgpuSchedulerLogInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v1 obj = VgpuSchedulerLogInfo_v1.__new__(VgpuSchedulerLogInfo_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -21120,7 +21132,7 @@ cdef class VgpuSchedulerState_v1: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") self._owner = None @@ -21132,7 +21144,7 @@ cdef class VgpuSchedulerState_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v1 object at {hex(id(self))}>" @@ -21153,20 +21165,20 @@ cdef class VgpuSchedulerState_v1: if not isinstance(other, VgpuSchedulerState_v1): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21183,7 +21195,7 @@ cdef class VgpuSchedulerState_v1: if self._readonly: raise ValueError("This VgpuSchedulerState_v1 instance is read-only") cdef VgpuSchedulerSetParams val_ = val - memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) @property def version(self): @@ -21232,7 +21244,7 @@ cdef class VgpuSchedulerState_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v1 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) @staticmethod def from_data(data): @@ -21241,7 +21253,7 @@ cdef class VgpuSchedulerState_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v1_dtype` holding the data. """ - return __from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) + return _cyb_from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21256,10 +21268,10 @@ cdef class VgpuSchedulerState_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v1 obj = VgpuSchedulerState_v1.__new__(VgpuSchedulerState_v1) if owner is None: - obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) obj._owner = None obj._owned = True else: @@ -21298,7 +21310,7 @@ cdef class GridLicensableFeatures: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") self._owner = None @@ -21310,7 +21322,7 @@ cdef class GridLicensableFeatures: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.GridLicensableFeatures object at {hex(id(self))}>" @@ -21331,20 +21343,20 @@ cdef class GridLicensableFeatures: if not isinstance(other, GridLicensableFeatures): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21366,7 +21378,7 @@ cdef class GridLicensableFeatures: self._ptr[0].licensableFeaturesCount = len(val) if len(val) == 0: return - memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) + _cyb_memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) @property def is_grid_license_supported(self): @@ -21382,7 +21394,7 @@ cdef class GridLicensableFeatures: @staticmethod def from_buffer(buffer): """Create an GridLicensableFeatures instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) + return _cyb_from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) @staticmethod def from_data(data): @@ -21391,7 +21403,7 @@ cdef class GridLicensableFeatures: Args: data (_numpy.ndarray): a single-element array of dtype `grid_licensable_features_dtype` holding the data. """ - return __from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) + return _cyb_from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21406,10 +21418,10 @@ cdef class GridLicensableFeatures: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeatures obj = GridLicensableFeatures.__new__(GridLicensableFeatures) if owner is None: - obj._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) obj._owner = None obj._owned = True else: @@ -21448,7 +21460,7 @@ cdef class NvLinkInfo_v2: bint _readonly def __init__(self): - self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") self._owner = None @@ -21460,7 +21472,7 @@ cdef class NvLinkInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v2 object at {hex(id(self))}>" @@ -21481,20 +21493,20 @@ cdef class NvLinkInfo_v2: if not isinstance(other, NvLinkInfo_v2): return False other_ = other - return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) - def __getbuffer__(self, Py_buffer *buffer, int flags): - __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21511,7 +21523,7 @@ cdef class NvLinkInfo_v2: if self._readonly: raise ValueError("This NvLinkInfo_v2 instance is read-only") cdef NvlinkFirmwareInfo val_ = val - memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) + _cyb_memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) @property def version(self): @@ -21538,7 +21550,7 @@ cdef class NvLinkInfo_v2: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v2 instance with the memory from the given buffer.""" - return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) + return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) @staticmethod def from_data(data): @@ -21547,7 +21559,7 @@ cdef class NvLinkInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v2_dtype` holding the data. """ - return __from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) + return _cyb_from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21562,10 +21574,10 @@ cdef class NvLinkInfo_v2: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v2 obj = NvLinkInfo_v2.__new__(NvLinkInfo_v2) if owner is None: - obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -21635,7 +21647,7 @@ cpdef str system_get_driver_version(): with nogil: __status__ = nvmlSystemGetDriverVersion(version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef str system_get_nvml_version(): @@ -21651,7 +21663,7 @@ cpdef str system_get_nvml_version(): with nogil: __status__ = nvmlSystemGetNVMLVersion(version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef int system_get_cuda_driver_version() except *: @@ -21700,7 +21712,7 @@ cpdef str system_get_process_name(unsigned int pid): with nogil: __status__ = nvmlSystemGetProcessName(pid, name, length) check_status(__status__) - return cpython.PyUnicode_FromString(name) + return _cyb_cpython.PyUnicode_FromString(name) cpdef object system_get_hic_version(): @@ -21987,7 +21999,7 @@ cpdef str device_get_name(intptr_t device): with nogil: __status__ = nvmlDeviceGetName(device, name, length) check_status(__status__) - return cpython.PyUnicode_FromString(name) + return _cyb_cpython.PyUnicode_FromString(name) cpdef int device_get_brand(intptr_t device) except? -1: @@ -22042,7 +22054,7 @@ cpdef str device_get_serial(intptr_t device): with nogil: __status__ = nvmlDeviceGetSerial(device, serial, length) check_status(__status__) - return cpython.PyUnicode_FromString(serial) + return _cyb_cpython.PyUnicode_FromString(serial) cpdef unsigned int device_get_module_id(intptr_t device) except? 0: @@ -22096,8 +22108,8 @@ cpdef object device_get_memory_affinity(intptr_t device, unsigned int node_set_s .. seealso:: `nvmlDeviceGetMemoryAffinity` """ if node_set_size == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef view.array node_set = view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef _cyb_view.array node_set = _cyb_view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *node_set_ptr = (node_set.data) with nogil: __status__ = nvmlDeviceGetMemoryAffinity(device, node_set_size, node_set_ptr, scope) @@ -22119,8 +22131,8 @@ cpdef object device_get_cpu_affinity_within_scope(intptr_t device, unsigned int .. seealso:: `nvmlDeviceGetCpuAffinityWithinScope` """ if cpu_set_size == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinityWithinScope(device, cpu_set_size, cpu_set_ptr, scope) @@ -22141,8 +22153,8 @@ cpdef object device_get_cpu_affinity(intptr_t device, unsigned int cpu_set_size) .. seealso:: `nvmlDeviceGetCpuAffinity` """ if cpu_set_size == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinity(device, cpu_set_size, cpu_set_ptr) @@ -22249,7 +22261,7 @@ cpdef str device_get_uuid(intptr_t device): with nogil: __status__ = nvmlDeviceGetUUID(device, uuid, length) check_status(__status__) - return cpython.PyUnicode_FromString(uuid) + return _cyb_cpython.PyUnicode_FromString(uuid) cpdef unsigned int device_get_minor_number(intptr_t device) except? 0: @@ -22286,7 +22298,7 @@ cpdef str device_get_board_part_number(intptr_t device): with nogil: __status__ = nvmlDeviceGetBoardPartNumber(device, part_number, length) check_status(__status__) - return cpython.PyUnicode_FromString(part_number) + return _cyb_cpython.PyUnicode_FromString(part_number) cpdef str device_get_inforom_version(intptr_t device, int object): @@ -22306,7 +22318,7 @@ cpdef str device_get_inforom_version(intptr_t device, int object): with nogil: __status__ = nvmlDeviceGetInforomVersion(device, <_InforomObject>object, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef str device_get_inforom_image_version(intptr_t device): @@ -22325,7 +22337,7 @@ cpdef str device_get_inforom_image_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetInforomImageVersion(device, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef unsigned int device_get_inforom_configuration_checksum(intptr_t device) except? 0: @@ -22712,8 +22724,8 @@ cpdef object device_get_supported_memory_clocks(intptr_t device): __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, clocks_m_hz_ptr) @@ -22738,8 +22750,8 @@ cpdef object device_get_supported_graphics_clocks(intptr_t device, unsigned int __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, clocks_m_hz_ptr) @@ -23702,7 +23714,7 @@ cpdef str device_get_vbios_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetVbiosVersion(device, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef object device_get_bridge_chip_info(intptr_t device): @@ -24262,8 +24274,8 @@ cpdef object device_get_accounting_pids(intptr_t device): __status__ = nvmlDeviceGetAccountingPids(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlDeviceGetAccountingPids(device, count, pids_ptr) @@ -24306,8 +24318,8 @@ cpdef object device_get_retired_pages(intptr_t device, int cause): __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, NULL) check_status_size(__status__) if page_count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] - cdef view.array addresses = view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] + cdef _cyb_view.array addresses = _cyb_view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") cdef unsigned long long *addresses_ptr = (addresses.data) with nogil: __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, addresses_ptr) @@ -25245,7 +25257,7 @@ cpdef str vgpu_type_get_class(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetClass(vgpu_type_id, vgpu_type_class, size) check_status(__status__) - return cpython.PyUnicode_FromString(vgpu_type_class) + return _cyb_cpython.PyUnicode_FromString(vgpu_type_class) cpdef unsigned int vgpu_type_get_gpu_instance_profile_id(unsigned int vgpu_type_id) except? 0: @@ -25363,7 +25375,7 @@ cpdef str vgpu_type_get_license(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetLicense(vgpu_type_id, vgpu_type_license_string, size) check_status(__status__) - return cpython.PyUnicode_FromString(vgpu_type_license_string) + return _cyb_cpython.PyUnicode_FromString(vgpu_type_license_string) cpdef unsigned int vgpu_type_get_frame_rate_limit(unsigned int vgpu_type_id) except? 0: @@ -25457,7 +25469,7 @@ cpdef str vgpu_instance_get_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetUUID(vgpu_instance, uuid, size) check_status(__status__) - return cpython.PyUnicode_FromString(uuid) + return _cyb_cpython.PyUnicode_FromString(uuid) cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): @@ -25476,7 +25488,7 @@ cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetVmDriverVersion(vgpu_instance, version, length) check_status(__status__) - return cpython.PyUnicode_FromString(version) + return _cyb_cpython.PyUnicode_FromString(version) cpdef unsigned long long vgpu_instance_get_fb_usage(unsigned int vgpu_instance) except? 0: @@ -25734,7 +25746,7 @@ cpdef str vgpu_instance_get_gpu_pci_id(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetGpuPciId(vgpu_instance, vgpu_pci_id, length) check_status(__status__) - return cpython.PyUnicode_FromString(vgpu_pci_id) + return _cyb_cpython.PyUnicode_FromString(vgpu_pci_id) cpdef unsigned int vgpu_type_get_capabilities(unsigned int vgpu_type_id, int capability) except? 0: @@ -25772,7 +25784,7 @@ cpdef str vgpu_instance_get_mdev_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetMdevUUID(vgpu_instance, mdev_uuid, size) check_status(__status__) - return cpython.PyUnicode_FromString(mdev_uuid) + return _cyb_cpython.PyUnicode_FromString(mdev_uuid) cpdef gpu_instance_set_vgpu_scheduler_state(intptr_t gpu_instance, intptr_t p_scheduler): @@ -25852,7 +25864,7 @@ cpdef str device_get_pgpu_metadata_string(intptr_t device): with nogil: __status__ = nvmlDeviceGetPgpuMetadataString(device, pgpu_metadata, buffer_size) check_status(__status__) - return cpython.PyUnicode_FromString(pgpu_metadata) + return _cyb_cpython.PyUnicode_FromString(pgpu_metadata) cpdef object device_get_vgpu_scheduler_log(intptr_t device): @@ -25996,8 +26008,8 @@ cpdef object vgpu_instance_get_accounting_pids(unsigned int vgpu_instance): __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, NULL) check_status_size(__status__) if count[0] == 0: - return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, pids_ptr) @@ -28452,3 +28464,4 @@ cpdef str vgpu_type_get_name(unsigned int vgpu_type_id): device_get_virtualization_mode.__doc__ = device_get_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") device_set_virtualization_mode.__doc__ = device_set_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") GpmMetricId.GPM_METRIC_DRAM_BW_UTIL.__doc__ = "Percentage of DRAM bw used vs theoretical maximum. ``0.0 - 100.0 *\u200d/``." +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvvm.pxd b/cuda_bindings/cuda/bindings/nvvm.pxd index ee2a3b8da3b..3a2caba8a85 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/nvvm.pxd @@ -1,8 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b4e10f31d2308a47fccfc9401d4f179bf61d389c1eb1491e8f9b00bf37a14ea9 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1422+gf4812259e.d20260318. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index b269bb5366f..ad117313ed8 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -1,22 +1,28 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=663773bbe4ae03ad1e170d44b06d5a924b5e4a3a0bd901c2f276976b82943bcb # -# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. + +# <<<< PREAMBLE CONTENT >>>> + +from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum + +# <<<< END OF PREAMBLE CONTENT >>>> + cimport cython # NOQA from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, nested_resource) -from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum - ############################################################################### # Enum ############################################################################### -class Result(_IntEnum): +class Result(_cyb_FastEnum): """ NVVM API call result code. @@ -321,3 +327,4 @@ cpdef int llvm_version(arch) except? 0: __status__ = nvvmLLVMVersion(_arch_, &major) check_status(__status__) return major +del _cyb_FastEnum From 2d6ae3ae33e3200beb831edd0820daf8d754469a Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 16:27:20 -0700 Subject: [PATCH 14/22] Revert "run_cybind_native 13.3.0 ../cuda-python" This reverts commit 94e42e89607a8ae6f12ab0e0ec458157593d180e. --- .../cuda/bindings/_internal/_fast_enum.py | 4 +- .../cuda/bindings/_internal/cudla.pxd | 3 +- .../cuda/bindings/_internal/cudla_linux.pyx | 3 +- .../cuda/bindings/_internal/cufile.pxd | 3 +- .../cuda/bindings/_internal/cufile_linux.pyx | 3 +- .../cuda/bindings/_internal/nvfatbin.pxd | 3 +- .../bindings/_internal/nvfatbin_linux.pyx | 3 +- .../bindings/_internal/nvfatbin_windows.pyx | 3 +- .../cuda/bindings/_internal/nvjitlink.pxd | 3 +- .../bindings/_internal/nvjitlink_linux.pyx | 3 +- .../bindings/_internal/nvjitlink_windows.pyx | 3 +- .../cuda/bindings/_internal/nvml.pxd | 3 +- .../cuda/bindings/_internal/nvml_linux.pyx | 3 +- .../cuda/bindings/_internal/nvml_windows.pyx | 3 +- .../cuda/bindings/_internal/nvvm.pxd | 3 +- .../cuda/bindings/_internal/nvvm_linux.pyx | 3 +- .../cuda/bindings/_internal/nvvm_windows.pyx | 3 +- cuda_bindings/cuda/bindings/cudla.pxd | 3 +- cuda_bindings/cuda/bindings/cudla.pyx | 333 +-- cuda_bindings/cuda/bindings/cufile.pxd | 3 +- cuda_bindings/cuda/bindings/cufile.pyx | 372 ++- cuda_bindings/cuda/bindings/cycudla.pxd | 3 +- cuda_bindings/cuda/bindings/cycudla.pyx | 3 +- cuda_bindings/cuda/bindings/cycufile.pxd | 3 +- cuda_bindings/cuda/bindings/cycufile.pyx | 3 +- cuda_bindings/cuda/bindings/cynvfatbin.pxd | 3 +- cuda_bindings/cuda/bindings/cynvfatbin.pyx | 3 +- cuda_bindings/cuda/bindings/cynvjitlink.pxd | 3 +- cuda_bindings/cuda/bindings/cynvjitlink.pyx | 3 +- cuda_bindings/cuda/bindings/cynvml.pxd | 3 +- cuda_bindings/cuda/bindings/cynvml.pyx | 3 +- cuda_bindings/cuda/bindings/cynvvm.pxd | 3 +- cuda_bindings/cuda/bindings/cynvvm.pyx | 3 +- cuda_bindings/cuda/bindings/nvfatbin.pxd | 3 +- cuda_bindings/cuda/bindings/nvfatbin.pyx | 14 +- cuda_bindings/cuda/bindings/nvjitlink.pxd | 3 +- cuda_bindings/cuda/bindings/nvjitlink.pyx | 16 +- cuda_bindings/cuda/bindings/nvml.pxd | 3 +- cuda_bindings/cuda/bindings/nvml.pyx | 2605 ++++++++--------- cuda_bindings/cuda/bindings/nvvm.pxd | 3 +- cuda_bindings/cuda/bindings/nvvm.pyx | 15 +- 41 files changed, 1686 insertions(+), 1775 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py index 67f049d2768..aa535fbc30f 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5791f341ee9bb6573f42300fbed50cc52fc5e808c1d6bb9156e6aabb9db29b17 +# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a5b4a9e0738454701ffd077f67db69d4319c686d2b49150a88c84010c7f8ae93 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. """ diff --git a/cuda_bindings/cuda/bindings/_internal/cudla.pxd b/cuda_bindings/cuda/bindings/_internal/cudla.pxd index be14bfa9b33..00bf3adc074 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cudla.pxd @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=07f18bf6993a0d962a4e844aa9ea9a335534c669992d112dd12003b77015e5ba -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. from ..cycudla cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx index 961cb14c96e..229681244ad 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2b56e5f08b7806fe10648817d36d96ce420cb5a8329615fb283f71119128d090 -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/cufile.pxd b/cuda_bindings/cuda/bindings/_internal/cufile.pxd index f05d0549512..7d0ace32466 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cufile.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b70fdd33eb00b70224c097fb28dd1031d82e8a2930356a4428c93e3bd1b52a86 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. 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 123ffcf1ac1..7d92fc8ec46 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b43946a1b7b010b7d9ee95ed67723e3dfc54b46a6dc68829e936ffad6ba852dc # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd index 12477d5f972..958e06e18af 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b52d99b7f07615d6c5ecb869a5c632e6e9cb4d0cb4f6cb1e43977d29ecd9995c # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from ..cynvfatbin cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx index 8929d4298af..99a50ff9e82 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=821fd26991431cd8e528f964b5035e1deafcddf44d2971a267d9ed11d80d5199 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx index 7963b3346b0..0a20389e291 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2052c33a9bbfdef36b362c4eedc1284ce8fa2fc905a53ac9c366218ca99f5913 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd index 1fbb30e858b..a6488994777 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fd32577c0d6b922ff30c56dc4f3dcbed2251c393098c27d972ccc8688564fa50 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. 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 c9f205c6834..0a399b244c7 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f6e8c32c0afa43fe218ae5c6f43f402bb85ab1e9898ad6270872c3e546eb4913 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. 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 2ac21a68648..ba6f1c8d2df 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9043dd9e45a69e2bd6c7984832fca8cc1ccd7c66b605b384e4cff18b0c713027 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. 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 f002aad9293..84a90694c0c 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvml.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ed4c433854399c2e4f1adc3ffcfc37901e1be29c5aa50728498c87225edf92b1 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. 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 02aca861d2d..c61a2d7e22f 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bdb56d8618b22dfcdcb3da879bbe276c3caf7c07aae6e5aa2b76de817f4baa39 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. 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 c17d2ad6893..7697b60af9d 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=56d9b790c493aea94da4c2c52e78dea025da7c698edc614c374767038d40869c # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. 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 38efdc53074..f265943dda4 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a27b041eb470b98bf5b1a0a92ace9467c5f3921d47ee10557a4f00ff1e4ac411 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from ..cynvvm cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx index ebec0c9d6c6..f82a058cfb7 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3c31adc68b8220439ea196a56ea63cf670aff0f85c0a67c8f554e1af4d07f456 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx index 95f2e73b454..27d31f96257 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=49ccc5908d39ebb526fee704591480550b5f780c05f14366531360e3ec2ac17a # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cudla.pxd b/cuda_bindings/cuda/bindings/cudla.pxd index 2501272f1ab..6126d868893 100644 --- a/cuda_bindings/cuda/bindings/cudla.pxd +++ b/cuda_bindings/cuda/bindings/cudla.pxd @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e64a78a1b3e010d167373d7c9635ff4637dfd1a6a38ffafb671dcde4e12aaaad -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index b3ac7c1e369..f1b0938f108 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -1,51 +1,25 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6e7ac86c22e602c08df8250f3b50c135945378aa8ae4ddb4e10174fd979c4aa5 - -# <<<< PREAMBLE CONTENT >>>> - -cimport cpython as _cyb_cpython -cimport cpython.buffer as _cyb_cpython_buffer -from cython cimport view as _cyb_view -from libc.stdlib cimport ( - calloc as _cyb_calloc, - free as _cyb_free, - malloc as _cyb_malloc, -) -from libc.string cimport ( - memcmp as _cyb_memcmp, - memcpy as _cyb_memcpy, -) -from enum import IntEnum as _cyb_IntEnum -import numpy as _numpy -cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. -cdef _cyb_from_buffer(buffer, size, lowpp_type): - cdef _cyb_cpython.Py_buffer view - if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - _cyb_cpython.PyBuffer_Release(&view) +cimport cython # NOQA +from libc.stdint cimport intptr_t, uintptr_t + +from ._internal.utils cimport get_buffer_pointer + +from enum import IntEnum as _IntEnum -cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): +from libc.stdlib cimport calloc, free, malloc +from cython cimport view +cimport cpython.buffer +cimport cpython.memoryview +cimport cpython +from libc.string cimport memcmp, memcpy +import numpy as _numpy + + +cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -57,16 +31,34 @@ cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) -# <<<< END OF PREAMBLE CONTENT >>>> +cdef __from_buffer(buffer, size, lowpp_type): + cdef Py_buffer view + if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + cpython.PyBuffer_Release(&view) -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. -cimport cython # NOQA -from libc.stdint cimport intptr_t, uintptr_t -from libc.stdlib cimport malloc, free +cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -from ._internal.utils cimport get_buffer_pointer @@ -102,7 +94,7 @@ cdef class ExternalMemoryHandleDesc: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = calloc(1, sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") self._owner = None @@ -114,7 +106,7 @@ cdef class ExternalMemoryHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ExternalMemoryHandleDesc object at {hex(id(self))}>" @@ -135,20 +127,20 @@ cdef class ExternalMemoryHandleDesc: if not isinstance(other, ExternalMemoryHandleDesc): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalMemoryHandleDesc_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalMemoryHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + self._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalMemoryHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -180,7 +172,7 @@ cdef class ExternalMemoryHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalMemoryHandleDesc instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) + return __from_buffer(buffer, sizeof(cudlaExternalMemoryHandleDesc_t), ExternalMemoryHandleDesc) @staticmethod def from_data(data): @@ -189,7 +181,7 @@ cdef class ExternalMemoryHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_memory_handle_desc_dtype` holding the data. """ - return _cyb_from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) + return __from_data(data, "external_memory_handle_desc_dtype", external_memory_handle_desc_dtype, ExternalMemoryHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -204,10 +196,10 @@ cdef class ExternalMemoryHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalMemoryHandleDesc obj = ExternalMemoryHandleDesc.__new__(ExternalMemoryHandleDesc) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) + obj._ptr = malloc(sizeof(cudlaExternalMemoryHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalMemoryHandleDesc") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) + memcpy((obj._ptr), ptr, sizeof(cudlaExternalMemoryHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -244,7 +236,7 @@ cdef class ExternalSemaphoreHandleDesc: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = calloc(1, sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") self._owner = None @@ -256,7 +248,7 @@ cdef class ExternalSemaphoreHandleDesc: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ExternalSemaphoreHandleDesc object at {hex(id(self))}>" @@ -277,20 +269,20 @@ cdef class ExternalSemaphoreHandleDesc: if not isinstance(other, ExternalSemaphoreHandleDesc): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaExternalSemaphoreHandleDesc_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + self._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaExternalSemaphoreHandleDesc_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -311,7 +303,7 @@ cdef class ExternalSemaphoreHandleDesc: @staticmethod def from_buffer(buffer): """Create an ExternalSemaphoreHandleDesc instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) + return __from_buffer(buffer, sizeof(cudlaExternalSemaphoreHandleDesc_t), ExternalSemaphoreHandleDesc) @staticmethod def from_data(data): @@ -320,7 +312,7 @@ cdef class ExternalSemaphoreHandleDesc: Args: data (_numpy.ndarray): a single-element array of dtype `external_semaphore_handle_desc_dtype` holding the data. """ - return _cyb_from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) + return __from_data(data, "external_semaphore_handle_desc_dtype", external_semaphore_handle_desc_dtype, ExternalSemaphoreHandleDesc) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -335,10 +327,10 @@ cdef class ExternalSemaphoreHandleDesc: raise ValueError("ptr must not be null (0)") cdef ExternalSemaphoreHandleDesc obj = ExternalSemaphoreHandleDesc.__new__(ExternalSemaphoreHandleDesc) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) + obj._ptr = malloc(sizeof(cudlaExternalSemaphoreHandleDesc_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExternalSemaphoreHandleDesc") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) + memcpy((obj._ptr), ptr, sizeof(cudlaExternalSemaphoreHandleDesc_t)) obj._owner = None obj._owned = True else: @@ -386,7 +378,7 @@ cdef class ModuleTensorDescriptor: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaModuleTensorDescriptor)) + self._ptr = calloc(1, sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") self._owner = None @@ -398,7 +390,7 @@ cdef class ModuleTensorDescriptor: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ModuleTensorDescriptor object at {hex(id(self))}>" @@ -419,20 +411,20 @@ cdef class ModuleTensorDescriptor: if not isinstance(other, ModuleTensorDescriptor): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleTensorDescriptor)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleTensorDescriptor), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) + self._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleTensorDescriptor)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -442,7 +434,7 @@ cdef class ModuleTensorDescriptor: @property def name(self): """~_numpy.int8: (array of length 81).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -452,7 +444,7 @@ cdef class ModuleTensorDescriptor: if len(buf) >= 81: raise ValueError("String too long for field name, max length is 80") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 81) + memcpy((self._ptr[0].name), ptr, 81) @property def size_(self): @@ -567,7 +559,7 @@ cdef class ModuleTensorDescriptor: @property def stride(self): """~_numpy.uint32: (array of length 8).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].stride)) return _numpy.asarray(arr) @@ -577,14 +569,14 @@ cdef class ModuleTensorDescriptor: raise ValueError("This ModuleTensorDescriptor instance is read-only") if len(val) != 8: raise ValueError(f"Expected length { 8 } for field stride, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") + cdef view.array arr = view.array(shape=(8,), itemsize=sizeof(uint32_t), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - _cyb_memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) + memcpy((&(self._ptr[0].stride)), (arr.data), sizeof(uint32_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an ModuleTensorDescriptor instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) + return __from_buffer(buffer, sizeof(cudlaModuleTensorDescriptor), ModuleTensorDescriptor) @staticmethod def from_data(data): @@ -593,7 +585,7 @@ cdef class ModuleTensorDescriptor: Args: data (_numpy.ndarray): a single-element array of dtype `module_tensor_descriptor_dtype` holding the data. """ - return _cyb_from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) + return __from_data(data, "module_tensor_descriptor_dtype", module_tensor_descriptor_dtype, ModuleTensorDescriptor) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -608,10 +600,10 @@ cdef class ModuleTensorDescriptor: raise ValueError("ptr must not be null (0)") cdef ModuleTensorDescriptor obj = ModuleTensorDescriptor.__new__(ModuleTensorDescriptor) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaModuleTensorDescriptor)) + obj._ptr = malloc(sizeof(cudlaModuleTensorDescriptor)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleTensorDescriptor") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) + memcpy((obj._ptr), ptr, sizeof(cudlaModuleTensorDescriptor)) obj._owner = None obj._owned = True else: @@ -649,7 +641,7 @@ cdef class Fence: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CudlaFence)) + self._ptr = calloc(1, sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") self._owner = None @@ -661,7 +653,7 @@ cdef class Fence: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Fence object at {hex(id(self))}>" @@ -682,20 +674,20 @@ cdef class Fence: if not isinstance(other, Fence): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CudlaFence)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CudlaFence), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CudlaFence)) + self._ptr = malloc(sizeof(CudlaFence)) if self._ptr == NULL: raise MemoryError("Error allocating Fence") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) + memcpy(self._ptr, val.ctypes.data, sizeof(CudlaFence)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -727,7 +719,7 @@ cdef class Fence: @staticmethod def from_buffer(buffer): """Create an Fence instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CudlaFence), Fence) + return __from_buffer(buffer, sizeof(CudlaFence), Fence) @staticmethod def from_data(data): @@ -736,7 +728,7 @@ cdef class Fence: Args: data (_numpy.ndarray): a single-element array of dtype `fence_dtype` holding the data. """ - return _cyb_from_data(data, "fence_dtype", fence_dtype, Fence) + return __from_data(data, "fence_dtype", fence_dtype, Fence) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -751,10 +743,10 @@ cdef class Fence: raise ValueError("ptr must not be null (0)") cdef Fence obj = Fence.__new__(Fence) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CudlaFence)) + obj._ptr = malloc(sizeof(CudlaFence)) if obj._ptr == NULL: raise MemoryError("Error allocating Fence") - _cyb_memcpy((obj._ptr), ptr, sizeof(CudlaFence)) + memcpy((obj._ptr), ptr, sizeof(CudlaFence)) obj._owner = None obj._owned = True else: @@ -786,7 +778,7 @@ cdef class DevAttribute: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaDevAttribute)) + self._ptr = calloc(1, sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") self._owner = None @@ -798,7 +790,7 @@ cdef class DevAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DevAttribute object at {hex(id(self))}>" @@ -819,20 +811,20 @@ cdef class DevAttribute: if not isinstance(other, DevAttribute): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaDevAttribute)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaDevAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) + self._ptr = malloc(sizeof(cudlaDevAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaDevAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -864,7 +856,7 @@ cdef class DevAttribute: @staticmethod def from_buffer(buffer): """Create an DevAttribute instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) + return __from_buffer(buffer, sizeof(cudlaDevAttribute), DevAttribute) @staticmethod def from_data(data): @@ -873,7 +865,7 @@ cdef class DevAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `dev_attribute_dtype` holding the data. """ - return _cyb_from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) + return __from_data(data, "dev_attribute_dtype", dev_attribute_dtype, DevAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -888,10 +880,10 @@ cdef class DevAttribute: raise ValueError("ptr must not be null (0)") cdef DevAttribute obj = DevAttribute.__new__(DevAttribute) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaDevAttribute)) + obj._ptr = malloc(sizeof(cudlaDevAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating DevAttribute") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) + memcpy((obj._ptr), ptr, sizeof(cudlaDevAttribute)) obj._owner = None obj._owned = True else: @@ -925,7 +917,7 @@ cdef class ModuleAttribute: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaModuleAttribute)) + self._ptr = calloc(1, sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") self._owner = None @@ -937,7 +929,7 @@ cdef class ModuleAttribute: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ModuleAttribute object at {hex(id(self))}>" @@ -958,20 +950,20 @@ cdef class ModuleAttribute: if not isinstance(other, ModuleAttribute): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaModuleAttribute)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaModuleAttribute), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) + self._ptr = malloc(sizeof(cudlaModuleAttribute)) if self._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaModuleAttribute)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1025,7 +1017,7 @@ cdef class ModuleAttribute: @staticmethod def from_buffer(buffer): """Create an ModuleAttribute instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) + return __from_buffer(buffer, sizeof(cudlaModuleAttribute), ModuleAttribute) @staticmethod def from_data(data): @@ -1034,7 +1026,7 @@ cdef class ModuleAttribute: Args: data (_numpy.ndarray): a single-element array of dtype `module_attribute_dtype` holding the data. """ - return _cyb_from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) + return __from_data(data, "module_attribute_dtype", module_attribute_dtype, ModuleAttribute) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1049,10 +1041,10 @@ cdef class ModuleAttribute: raise ValueError("ptr must not be null (0)") cdef ModuleAttribute obj = ModuleAttribute.__new__(ModuleAttribute) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaModuleAttribute)) + obj._ptr = malloc(sizeof(cudlaModuleAttribute)) if obj._ptr == NULL: raise MemoryError("Error allocating ModuleAttribute") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) + memcpy((obj._ptr), ptr, sizeof(cudlaModuleAttribute)) obj._owner = None obj._owned = True else: @@ -1091,7 +1083,7 @@ cdef class WaitEvents: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaWaitEvents)) + self._ptr = calloc(1, sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") self._owner = None @@ -1104,7 +1096,7 @@ cdef class WaitEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.WaitEvents object at {hex(id(self))}>" @@ -1125,20 +1117,20 @@ cdef class WaitEvents: if not isinstance(other, WaitEvents): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaWaitEvents)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaWaitEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) + self._ptr = malloc(sizeof(cudlaWaitEvents)) if self._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaWaitEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1164,7 +1156,7 @@ cdef class WaitEvents: @staticmethod def from_buffer(buffer): """Create an WaitEvents instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) + return __from_buffer(buffer, sizeof(cudlaWaitEvents), WaitEvents) @staticmethod def from_data(data): @@ -1173,7 +1165,7 @@ cdef class WaitEvents: Args: data (_numpy.ndarray): a single-element array of dtype `wait_events_dtype` holding the data. """ - return _cyb_from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) + return __from_data(data, "wait_events_dtype", wait_events_dtype, WaitEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1188,10 +1180,10 @@ cdef class WaitEvents: raise ValueError("ptr must not be null (0)") cdef WaitEvents obj = WaitEvents.__new__(WaitEvents) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaWaitEvents)) + obj._ptr = malloc(sizeof(cudlaWaitEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating WaitEvents") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) + memcpy((obj._ptr), ptr, sizeof(cudlaWaitEvents)) obj._owner = None obj._owned = True else: @@ -1232,7 +1224,7 @@ cdef class SignalEvents: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaSignalEvents)) + self._ptr = calloc(1, sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") self._owner = None @@ -1245,7 +1237,7 @@ cdef class SignalEvents: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.SignalEvents object at {hex(id(self))}>" @@ -1266,20 +1258,20 @@ cdef class SignalEvents: if not isinstance(other, SignalEvents): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaSignalEvents)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaSignalEvents), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) + self._ptr = malloc(sizeof(cudlaSignalEvents)) if self._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaSignalEvents)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1290,8 +1282,8 @@ cdef class SignalEvents: def dev_ptrs(self): """int: """ if self._ptr[0].devPtrs == NULL or self._ptr[0].numEvents == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef view.array arr = view.array(shape=(self._ptr[0].numEvents,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].devPtrs) return arr @@ -1303,7 +1295,7 @@ cdef class SignalEvents: self._ptr[0].numEvents = _n if _n == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1330,7 +1322,7 @@ cdef class SignalEvents: @staticmethod def from_buffer(buffer): """Create an SignalEvents instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) + return __from_buffer(buffer, sizeof(cudlaSignalEvents), SignalEvents) @staticmethod def from_data(data): @@ -1339,7 +1331,7 @@ cdef class SignalEvents: Args: data (_numpy.ndarray): a single-element array of dtype `signal_events_dtype` holding the data. """ - return _cyb_from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) + return __from_data(data, "signal_events_dtype", signal_events_dtype, SignalEvents) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1354,10 +1346,10 @@ cdef class SignalEvents: raise ValueError("ptr must not be null (0)") cdef SignalEvents obj = SignalEvents.__new__(SignalEvents) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaSignalEvents)) + obj._ptr = malloc(sizeof(cudlaSignalEvents)) if obj._ptr == NULL: raise MemoryError("Error allocating SignalEvents") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) + memcpy((obj._ptr), ptr, sizeof(cudlaSignalEvents)) obj._owner = None obj._owned = True else: @@ -1402,7 +1394,7 @@ cdef class Task: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cudlaTask)) + self._ptr = calloc(1, sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") self._owner = None @@ -1415,7 +1407,7 @@ cdef class Task: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Task object at {hex(id(self))}>" @@ -1436,20 +1428,20 @@ cdef class Task: if not isinstance(other, Task): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cudlaTask)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(cudlaTask), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(cudlaTask)) + self._ptr = malloc(sizeof(cudlaTask)) if self._ptr == NULL: raise MemoryError("Error allocating Task") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) + memcpy(self._ptr, val.ctypes.data, sizeof(cudlaTask)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1471,8 +1463,8 @@ cdef class Task: def output_tensor(self): """int: """ if self._ptr[0].outputTensor == NULL or self._ptr[0].numOutputTensors == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef view.array arr = view.array(shape=(self._ptr[0].numOutputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].outputTensor) return arr @@ -1484,7 +1476,7 @@ cdef class Task: self._ptr[0].numOutputTensors = _n if _n == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1496,8 +1488,8 @@ cdef class Task: def input_tensor(self): """int: """ if self._ptr[0].inputTensor == NULL or self._ptr[0].numInputTensors == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) + return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="q", mode="c")[:0] + cdef view.array arr = view.array(shape=(self._ptr[0].numInputTensors,), itemsize=sizeof(intptr_t), format="q", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].inputTensor) return arr @@ -1509,7 +1501,7 @@ cdef class Task: self._ptr[0].numInputTensors = _n if _n == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") + cdef view.array arr = view.array(shape=(_n,), itemsize=sizeof(intptr_t), format="q", mode="c") cdef intptr_t[:] mv = arr cdef Py_ssize_t i for i in range(_n): @@ -1542,7 +1534,7 @@ cdef class Task: @staticmethod def from_buffer(buffer): """Create an Task instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(cudlaTask), Task) + return __from_buffer(buffer, sizeof(cudlaTask), Task) @staticmethod def from_data(data): @@ -1551,7 +1543,7 @@ cdef class Task: Args: data (_numpy.ndarray): a single-element array of dtype `task_dtype` holding the data. """ - return _cyb_from_data(data, "task_dtype", task_dtype, Task) + return __from_data(data, "task_dtype", task_dtype, Task) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1566,10 +1558,10 @@ cdef class Task: raise ValueError("ptr must not be null (0)") cdef Task obj = Task.__new__(Task) if owner is None: - obj._ptr = _cyb_malloc(sizeof(cudlaTask)) + obj._ptr = malloc(sizeof(cudlaTask)) if obj._ptr == NULL: raise MemoryError("Error allocating Task") - _cyb_memcpy((obj._ptr), ptr, sizeof(cudlaTask)) + memcpy((obj._ptr), ptr, sizeof(cudlaTask)) obj._owner = None obj._owned = True else: @@ -1585,7 +1577,7 @@ cdef class Task: # Enum ############################################################################### -class Status(_cyb_IntEnum): +class Status(_IntEnum): """ See `cudlaStatus`. """ @@ -1614,14 +1606,14 @@ class Status(_cyb_IntEnum): ErrorDlaErrDataMismatch = cudlaErrorDlaErrDataMismatch ErrorUnknown = cudlaErrorUnknown -class Mode(_cyb_IntEnum): +class Mode(_IntEnum): """ See `cudlaMode`. """ CUDA_DLA = CUDLA_CUDA_DLA STANDALONE = CUDLA_STANDALONE -class ModuleAttributeType(_cyb_IntEnum): +class ModuleAttributeType(_IntEnum): """ See `cudlaModuleAttributeType`. """ @@ -1632,21 +1624,21 @@ class ModuleAttributeType(_cyb_IntEnum): NUM_OUTPUT_TASK_STATISTICS = CUDLA_NUM_OUTPUT_TASK_STATISTICS OUTPUT_TASK_STATISTICS_DESCRIPTORS = CUDLA_OUTPUT_TASK_STATISTICS_DESCRIPTORS -class FenceType(_cyb_IntEnum): +class FenceType(_IntEnum): """ See `cudlaFenceType`. """ NVSCISYNC_FENCE = CUDLA_NVSCISYNC_FENCE NVSCISYNC_FENCE_SOF = CUDLA_NVSCISYNC_FENCE_SOF -class ModuleLoadFlags(_cyb_IntEnum): +class ModuleLoadFlags(_IntEnum): """ See `cudlaModuleLoadFlags`. """ MODULE_DEFAULT = CUDLA_MODULE_DEFAULT MODULE_ENABLE_FAULT_DIAGNOSTICS = CUDLA_MODULE_ENABLE_FAULT_DIAGNOSTICS -class SubmissionFlags(_cyb_IntEnum): +class SubmissionFlags(_IntEnum): """ See `cudlaSubmissionFlags`. """ @@ -1654,7 +1646,7 @@ class SubmissionFlags(_cyb_IntEnum): SUBMIT_SKIP_LOCK_ACQUIRE = CUDLA_SUBMIT_SKIP_LOCK_ACQUIRE SUBMIT_DIAGNOSTICS_TASK = CUDLA_SUBMIT_DIAGNOSTICS_TASK -class AccessPermissionFlags(_cyb_IntEnum): +class AccessPermissionFlags(_IntEnum): """ See `cudlaAccessPermissionFlags`. """ @@ -1662,7 +1654,7 @@ class AccessPermissionFlags(_cyb_IntEnum): READ_ONLY_PERM = CUDLA_READ_ONLY_PERM TASK_STATISTICS = CUDLA_TASK_STATISTICS -class DevAttributeType(_cyb_IntEnum): +class DevAttributeType(_IntEnum): """ See `cudlaDevAttributeType`. """ @@ -1834,4 +1826,3 @@ cpdef module_get_attributes(intptr_t h_module, int attr_type) except *: free(desc_buf) else: raise ValueError(f"Unknown attribute type: {attr_type}") -del _cyb_IntEnum diff --git a/cuda_bindings/cuda/bindings/cufile.pxd b/cuda_bindings/cuda/bindings/cufile.pxd index 8ffbe660637..1803837a4ce 100644 --- a/cuda_bindings/cuda/bindings/cufile.pxd +++ b/cuda_bindings/cuda/bindings/cufile.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=232df43b5a8960f10286c172abc71222a3822087a1f6134e12d9341f3b53886c # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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.dev1568+g289771de9.d20260413. 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 734dbce4e06..2798a65cb3f 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -1,55 +1,29 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=359f9b42f4f97b9a74570e1f7d20eb6f5faae2df194a6161f4d5a9512c3ffbe3 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -cimport cpython as _cyb_cpython -cimport cpython.buffer as _cyb_cpython_buffer -cimport cpython.memoryview as _cyb_cpython_memoryview -from cython cimport view as _cyb_view -from libc.stdlib cimport ( - calloc as _cyb_calloc, - free as _cyb_free, - malloc as _cyb_malloc, -) -from libc.string cimport ( - memcmp as _cyb_memcmp, - memcpy as _cyb_memcpy, -) -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum -import numpy as _numpy +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. -cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +cimport cython # NOQA +from libc cimport errno +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum -cdef _cyb_from_buffer(buffer, size, lowpp_type): - cdef _cyb_cpython.Py_buffer view - if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - _cyb_cpython.PyBuffer_Release(&view) +import cython + +from cuda.bindings.driver import CUresult as pyCUresult -cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): +from libc.stdlib cimport calloc, free, malloc +from cython cimport view +cimport cpython.buffer +cimport cpython.memoryview +cimport cpython +from libc.string cimport memcmp, memcpy +import numpy as _numpy + + +cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -61,17 +35,34 @@ cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) -# <<<< END OF PREAMBLE CONTENT >>>> +cdef __from_buffer(buffer, size, lowpp_type): + cdef Py_buffer view + if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + cpython.PyBuffer_Release(&view) -cimport cython # NOQA -from libc cimport errno -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) -import cython +cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -from cuda.bindings.driver import CUresult as pyCUresult ############################################################################### # POD @@ -98,7 +89,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = _cyb_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 @@ -110,7 +101,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -131,20 +122,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).handle)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof((NULL).handle), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof((NULL).handle)) + self._ptr = malloc(sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) + memcpy(self._ptr, val.ctypes.data, sizeof((NULL).handle)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -176,7 +167,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 _cyb_from_buffer(buffer, sizeof((NULL).handle), _py_anon_pod1) + return __from_buffer(buffer, sizeof((NULL).handle), _py_anon_pod1) @staticmethod def from_data(data): @@ -185,7 +176,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -200,10 +191,10 @@ 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 = _cyb_malloc(sizeof((NULL).handle)) + obj._ptr = malloc(sizeof((NULL).handle)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).handle)) + memcpy((obj._ptr), ptr, sizeof((NULL).handle)) obj._owner = None obj._owned = True else: @@ -243,7 +234,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = _cyb_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 @@ -255,7 +246,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -276,20 +267,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u.batch)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof((NULL).u.batch), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof((NULL).u.batch)) + self._ptr = malloc(sizeof((NULL).u.batch)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u.batch)) + memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u.batch)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -343,7 +334,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 _cyb_from_buffer(buffer, sizeof((NULL).u.batch), _py_anon_pod3) + return __from_buffer(buffer, sizeof((NULL).u.batch), _py_anon_pod3) @staticmethod def from_data(data): @@ -352,7 +343,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -367,10 +358,10 @@ 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 = _cyb_malloc(sizeof((NULL).u.batch)) + obj._ptr = malloc(sizeof((NULL).u.batch)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) + memcpy((obj._ptr), ptr, sizeof((NULL).u.batch)) obj._owner = None obj._owned = True else: @@ -445,10 +436,10 @@ cdef class IOEvents: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def cookie(self): @@ -537,8 +528,8 @@ cdef class IOEvents: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOEvents obj = IOEvents.__new__(IOEvents) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOEvents_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_events_dtype) obj._data = data.view(_numpy.recarray) @@ -573,7 +564,7 @@ cdef class OpCounter: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileOpCounter_t)) + self._ptr = calloc(1, sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") self._owner = None @@ -585,7 +576,7 @@ cdef class OpCounter: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.OpCounter object at {hex(id(self))}>" @@ -606,20 +597,20 @@ cdef class OpCounter: if not isinstance(other, OpCounter): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileOpCounter_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileOpCounter_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) + self._ptr = malloc(sizeof(CUfileOpCounter_t)) if self._ptr == NULL: raise MemoryError("Error allocating OpCounter") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileOpCounter_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -651,7 +642,7 @@ cdef class OpCounter: @staticmethod def from_buffer(buffer): """Create an OpCounter instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) + return __from_buffer(buffer, sizeof(CUfileOpCounter_t), OpCounter) @staticmethod def from_data(data): @@ -660,7 +651,7 @@ cdef class OpCounter: Args: data (_numpy.ndarray): a single-element array of dtype `op_counter_dtype` holding the data. """ - return _cyb_from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) + return __from_data(data, "op_counter_dtype", op_counter_dtype, OpCounter) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -675,10 +666,10 @@ cdef class OpCounter: raise ValueError("ptr must not be null (0)") cdef OpCounter obj = OpCounter.__new__(OpCounter) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileOpCounter_t)) + obj._ptr = malloc(sizeof(CUfileOpCounter_t)) if obj._ptr == NULL: raise MemoryError("Error allocating OpCounter") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileOpCounter_t)) obj._owner = None obj._owned = True else: @@ -780,10 +771,10 @@ cdef class PerGpuStats: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def uuid(self): @@ -1167,8 +1158,8 @@ cdef class PerGpuStats: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PerGpuStats obj = PerGpuStats.__new__(PerGpuStats) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfilePerGpuStats_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=per_gpu_stats_dtype) obj._data = data.view(_numpy.recarray) @@ -1240,10 +1231,10 @@ cdef class Descr: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def type(self): @@ -1330,8 +1321,8 @@ cdef class Descr: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Descr obj = Descr.__new__(Descr) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileDescr_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=descr_dtype) obj._data = data.view(_numpy.recarray) @@ -1359,7 +1350,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = _cyb_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 +1362,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -1392,20 +1383,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof((NULL).u)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof((NULL).u), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof((NULL).u)) + self._ptr = malloc(sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) + memcpy(self._ptr, val.ctypes.data, sizeof((NULL).u)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1422,12 +1413,12 @@ cdef class _py_anon_pod2: if self._readonly: raise ValueError("This _py_anon_pod2 instance is read-only") cdef _py_anon_pod3 val_ = val - _cyb_memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(cuda_bindings_cufile__anon_pod3) * 1) + memcpy(&(self._ptr[0].batch), (val_._get_ptr()), sizeof(cuda_bindings_cufile__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an _py_anon_pod2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) + return __from_buffer(buffer, sizeof((NULL).u), _py_anon_pod2) @staticmethod def from_data(data): @@ -1436,7 +1427,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -1451,10 +1442,10 @@ 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 = _cyb_malloc(sizeof((NULL).u)) + obj._ptr = malloc(sizeof((NULL).u)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy((obj._ptr), ptr, sizeof((NULL).u)) + memcpy((obj._ptr), ptr, sizeof((NULL).u)) obj._owner = None obj._owned = True else: @@ -1533,7 +1524,7 @@ cdef class StatsLevel1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel1_t)) + self._ptr = calloc(1, sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") self._owner = None @@ -1545,7 +1536,7 @@ cdef class StatsLevel1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel1 object at {hex(id(self))}>" @@ -1566,20 +1557,20 @@ cdef class StatsLevel1: if not isinstance(other, StatsLevel1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) + self._ptr = malloc(sizeof(CUfileStatsLevel1_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -1596,7 +1587,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].read_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def write_ops(self): @@ -1608,7 +1599,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].write_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_register_ops(self): @@ -1620,7 +1611,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].hdl_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def hdl_deregister_ops(self): @@ -1632,7 +1623,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].hdl_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_register_ops(self): @@ -1644,7 +1635,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].buf_register_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def buf_deregister_ops(self): @@ -1656,7 +1647,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].buf_deregister_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_submit_ops(self): @@ -1668,7 +1659,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_complete_ops(self): @@ -1680,7 +1671,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_complete_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_setup_ops(self): @@ -1692,7 +1683,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_setup_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_cancel_ops(self): @@ -1704,7 +1695,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_cancel_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_destroy_ops(self): @@ -1716,7 +1707,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_destroy_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_enqueued_ops(self): @@ -1728,7 +1719,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_enqueued_ops(self): @@ -1740,7 +1731,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_posix_enqueued_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_processed_ops(self): @@ -1752,7 +1743,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_posix_processed_ops(self): @@ -1764,7 +1755,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_posix_processed_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_nvfs_submit_ops(self): @@ -1776,7 +1767,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_nvfs_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_p2p_submit_ops(self): @@ -1788,7 +1779,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_p2p_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_aio_submit_ops(self): @@ -1800,7 +1791,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_aio_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_iouring_submit_ops(self): @@ -1812,7 +1803,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_iouring_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_mixed_io_submit_ops(self): @@ -1824,7 +1815,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_mixed_io_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def batch_total_submit_ops(self): @@ -1836,7 +1827,7 @@ cdef class StatsLevel1: if self._readonly: raise ValueError("This StatsLevel1 instance is read-only") cdef OpCounter val_ = val - _cyb_memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) @property def read_bytes(self): @@ -2083,7 +2074,7 @@ cdef class StatsLevel1: @staticmethod def from_buffer(buffer): """Create an StatsLevel1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) + return __from_buffer(buffer, sizeof(CUfileStatsLevel1_t), StatsLevel1) @staticmethod def from_data(data): @@ -2092,7 +2083,7 @@ cdef class StatsLevel1: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level1_dtype` holding the data. """ - return _cyb_from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) + return __from_data(data, "stats_level1_dtype", stats_level1_dtype, StatsLevel1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2107,10 +2098,10 @@ cdef class StatsLevel1: raise ValueError("ptr must not be null (0)") cdef StatsLevel1 obj = StatsLevel1.__new__(StatsLevel1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel1_t)) + obj._ptr = malloc(sizeof(CUfileStatsLevel1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel1") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel1_t)) obj._owner = None obj._owned = True else: @@ -2187,10 +2178,10 @@ cdef class IOParams: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def mode(self): @@ -2299,8 +2290,8 @@ cdef class IOParams: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef IOParams obj = IOParams.__new__(IOParams) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(CUfileIOParams_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=io_params_dtype) obj._data = data.view(_numpy.recarray) @@ -2336,7 +2327,7 @@ cdef class StatsLevel2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel2_t)) + self._ptr = calloc(1, sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") self._owner = None @@ -2348,7 +2339,7 @@ cdef class StatsLevel2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel2 object at {hex(id(self))}>" @@ -2369,20 +2360,20 @@ cdef class StatsLevel2: if not isinstance(other, StatsLevel2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) + self._ptr = malloc(sizeof(CUfileStatsLevel2_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2399,12 +2390,12 @@ cdef class StatsLevel2: if self._readonly: raise ValueError("This StatsLevel2 instance is read-only") cdef StatsLevel1 val_ = val - _cyb_memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) + memcpy(&(self._ptr[0].basic), (val_._get_ptr()), sizeof(CUfileStatsLevel1_t) * 1) @property def read_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].read_size_kb_hist)) return _numpy.asarray(arr) @@ -2414,14 +2405,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field read_size_kb_hist, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - _cyb_memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @property def write_size_kb_hist(self): """~_numpy.uint64: (array of length 32).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].write_size_kb_hist)) return _numpy.asarray(arr) @@ -2431,14 +2422,14 @@ cdef class StatsLevel2: raise ValueError("This StatsLevel2 instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field write_size_kb_hist, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) - _cyb_memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) + memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @staticmethod def from_buffer(buffer): """Create an StatsLevel2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) + return __from_buffer(buffer, sizeof(CUfileStatsLevel2_t), StatsLevel2) @staticmethod def from_data(data): @@ -2447,7 +2438,7 @@ cdef class StatsLevel2: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level2_dtype` holding the data. """ - return _cyb_from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) + return __from_data(data, "stats_level2_dtype", stats_level2_dtype, StatsLevel2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2462,10 +2453,10 @@ cdef class StatsLevel2: raise ValueError("ptr must not be null (0)") cdef StatsLevel2 obj = StatsLevel2.__new__(StatsLevel2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel2_t)) + obj._ptr = malloc(sizeof(CUfileStatsLevel2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel2") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel2_t)) obj._owner = None obj._owned = True else: @@ -2504,7 +2495,7 @@ cdef class StatsLevel3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(CUfileStatsLevel3_t)) + self._ptr = calloc(1, sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") self._owner = None @@ -2516,7 +2507,7 @@ cdef class StatsLevel3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.StatsLevel3 object at {hex(id(self))}>" @@ -2537,20 +2528,20 @@ cdef class StatsLevel3: if not isinstance(other, StatsLevel3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(CUfileStatsLevel3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(CUfileStatsLevel3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) + self._ptr = malloc(sizeof(CUfileStatsLevel3_t)) if self._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(CUfileStatsLevel3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2567,7 +2558,7 @@ cdef class StatsLevel3: if self._readonly: raise ValueError("This StatsLevel3 instance is read-only") cdef StatsLevel2 val_ = val - _cyb_memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) + memcpy(&(self._ptr[0].detailed), (val_._get_ptr()), sizeof(CUfileStatsLevel2_t) * 1) @property def per_gpu_stats(self): @@ -2581,7 +2572,7 @@ cdef class StatsLevel3: cdef PerGpuStats val_ = val if len(val) != 16: raise ValueError(f"Expected length { 16 } for field per_gpu_stats, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) + memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) @property def num_gpus(self): @@ -2597,7 +2588,7 @@ cdef class StatsLevel3: @staticmethod def from_buffer(buffer): """Create an StatsLevel3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) + return __from_buffer(buffer, sizeof(CUfileStatsLevel3_t), StatsLevel3) @staticmethod def from_data(data): @@ -2606,7 +2597,7 @@ cdef class StatsLevel3: Args: data (_numpy.ndarray): a single-element array of dtype `stats_level3_dtype` holding the data. """ - return _cyb_from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) + return __from_data(data, "stats_level3_dtype", stats_level3_dtype, StatsLevel3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2621,10 +2612,10 @@ cdef class StatsLevel3: raise ValueError("ptr must not be null (0)") cdef StatsLevel3 obj = StatsLevel3.__new__(StatsLevel3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(CUfileStatsLevel3_t)) + obj._ptr = malloc(sizeof(CUfileStatsLevel3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating StatsLevel3") - _cyb_memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) + memcpy((obj._ptr), ptr, sizeof(CUfileStatsLevel3_t)) obj._owner = None obj._owned = True else: @@ -2639,7 +2630,7 @@ cdef class StatsLevel3: # Enum ############################################################################### -class OpError(_cyb_FastEnum): +class OpError(_FastEnum): """ See `CUfileOpError`. """ @@ -2693,7 +2684,7 @@ class OpError(_cyb_FastEnum): BATCH_NOCOMPAT_ERROR = CU_FILE_BATCH_NOCOMPAT_ERROR IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR -class DriverStatusFlags(_cyb_FastEnum): +class DriverStatusFlags(_FastEnum): """ See `CUfileDriverStatusFlags_t`. """ @@ -2712,7 +2703,7 @@ class DriverStatusFlags(_cyb_FastEnum): VIRTIOFS_SUPPORTED = (CU_FILE_VIRTIOFS_SUPPORTED, 'Support for VirtioFS') MAX_TARGET_TYPES = (CU_FILE_MAX_TARGET_TYPES, 'Maximum FS supported') -class DriverControlFlags(_cyb_FastEnum): +class DriverControlFlags(_FastEnum): """ See `CUfileDriverControlFlags_t`. """ @@ -2721,7 +2712,7 @@ class DriverControlFlags(_cyb_FastEnum): POSIX_IO_MODE = (CU_FILE_POSIX_IO_MODE, 'Vanilla posix io mode. properties.posix_io_mode') FALLBACK_IO_MODE = (CU_FILE_FALLBACK_IO_MODE, 'Fallback io mode. properties.gds_fallback_io') -class FeatureFlags(_cyb_FastEnum): +class FeatureFlags(_FastEnum): """ See `CUfileFeatureFlags_t`. """ @@ -2731,7 +2722,7 @@ class FeatureFlags(_cyb_FastEnum): PARALLEL_IO_SUPPORTED = (CU_FILE_PARALLEL_IO_SUPPORTED, 'Supported') P2P_SUPPORTED = (CU_FILE_P2P_SUPPORTED, 'Support for PCI P2PDMA') -class FileHandleType(_cyb_FastEnum): +class FileHandleType(_FastEnum): """ See `CUfileFileHandleType`. """ @@ -2739,14 +2730,14 @@ class FileHandleType(_cyb_FastEnum): OPAQUE_WIN32 = (CU_FILE_HANDLE_TYPE_OPAQUE_WIN32, 'Windows based handle (unsupported)') USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS -class Opcode(_cyb_FastEnum): +class Opcode(_FastEnum): """ See `CUfileOpcode_t`. """ READ = CUFILE_READ WRITE = CUFILE_WRITE -class Status(_cyb_FastEnum): +class Status(_FastEnum): """ See `CUfileStatus_t`. """ @@ -2758,13 +2749,13 @@ class Status(_cyb_FastEnum): TIMEOUT = CUFILE_TIMEOUT FAILED = CUFILE_FAILED -class BatchMode(_cyb_FastEnum): +class BatchMode(_FastEnum): """ See `CUfileBatchMode_t`. """ BATCH = CUFILE_BATCH -class SizeTConfigParameter(_cyb_FastEnum): +class SizeTConfigParameter(_FastEnum): """ See `CUFileSizeTConfigParameter_t`. """ @@ -2781,7 +2772,7 @@ class SizeTConfigParameter(_cyb_FastEnum): POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS -class BoolConfigParameter(_cyb_FastEnum): +class BoolConfigParameter(_FastEnum): """ See `CUFileBoolConfigParameter_t`. """ @@ -2798,7 +2789,7 @@ class BoolConfigParameter(_cyb_FastEnum): SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS -class StringConfigParameter(_cyb_FastEnum): +class StringConfigParameter(_FastEnum): """ See `CUFileStringConfigParameter_t`. """ @@ -2806,7 +2797,7 @@ class StringConfigParameter(_cyb_FastEnum): ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH LOG_DIR = CUFILE_PARAM_LOG_DIR -class ArrayConfigParameter(_cyb_FastEnum): +class ArrayConfigParameter(_FastEnum): """ See `CUFileArrayConfigParameter_t`. """ @@ -2815,7 +2806,7 @@ class ArrayConfigParameter(_cyb_FastEnum): GPU_BOUNCE_BUFFER_SLAB_SIZE_KB = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_SIZE_KB GPU_BOUNCE_BUFFER_SLAB_COUNT = CUFILE_PARAM_GPU_BOUNCE_BUFFER_SLAB_COUNT -class P2PFlags(_cyb_FastEnum): +class P2PFlags(_FastEnum): """ See `CUfileP2PFlags_t`. """ @@ -3103,7 +3094,7 @@ cpdef str get_parameter_string(int param, int len): with nogil: __status__ = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(desc_str) + return cpython.PyUnicode_FromString(desc_str) cpdef set_parameter_size_t(int param, size_t value): @@ -3341,4 +3332,3 @@ cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) check_status(status) return status -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/cycudla.pxd b/cuda_bindings/cuda/bindings/cycudla.pxd index 2ebaaa1ed08..8a90dd964a7 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pxd +++ b/cuda_bindings/cuda/bindings/cycudla.pxd @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c4dacd5de0bc9a6ac0cc92dabed1728cc6133d0448924ea6db4f9c740ff089b6 -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. # This layer exposes the C header to Cython as-is. from libc.stdint cimport int8_t, int16_t, int32_t, int64_t diff --git a/cuda_bindings/cuda/bindings/cycudla.pyx b/cuda_bindings/cuda/bindings/cycudla.pyx index 1f9861d593e..198ffb308a7 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pyx +++ b/cuda_bindings/cuda/bindings/cycudla.pyx @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b134ed8cb83eb5a5c6ff30be817e64d09d421d7257761e58fbc06b131690a392 -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.3.0, generator version 0.3.1.dev1465+gc5c5c8652. Do not modify it directly. from ._internal cimport cudla as _cudla diff --git a/cuda_bindings/cuda/bindings/cycufile.pxd b/cuda_bindings/cuda/bindings/cycufile.pxd index a47a09c4d13..96c93f1a54e 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pxd +++ b/cuda_bindings/cuda/bindings/cycufile.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f840820f160e36eebe6e052b5a5d3a35b55704060301ee2ab7d5cd7a7d580418 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t from libc.time cimport time_t diff --git a/cuda_bindings/cuda/bindings/cycufile.pyx b/cuda_bindings/cuda/bindings/cycufile.pyx index 60f9bf5cf00..32b0614be24 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pyx +++ b/cuda_bindings/cuda/bindings/cycufile.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=74f1f9c9443af66fdadbfeeb01e5c15c2d8f1b9b0b20eafa2a279583bcf7df00 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from ._internal cimport cufile as _cufile diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pxd b/cuda_bindings/cuda/bindings/cynvfatbin.pxd index 584d1d16a02..f810e5e0077 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fede358631d711050e04c9b0f7582773ba7012844987bc47358f1378d484a136 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pyx b/cuda_bindings/cuda/bindings/cynvfatbin.pyx index fd301a15bca..bac18e05a70 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bae30bbdaff2009b86c05de2a46bbaecad9e63327c93a10b6f2e8a2d95fd6a60 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from ._internal cimport nvfatbin as _nvfatbin diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pxd b/cuda_bindings/cuda/bindings/cynvjitlink.pxd index 058bae2f030..8f8a249acb3 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=58778b073e81f54fcf5c42775b45944d22b6e944fe6965b42d83898239f1e1b6 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. 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 a0b54a192ca..a44fedf196e 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e507515291c3bc20b88d0b58ab5b01a1cc38c5d21bca87a4f379cc846b869ed4 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. 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 95e3c92333b..21c2ca0c180 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pxd +++ b/cuda_bindings/cuda/bindings/cynvml.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5e55307c8ff89e076c29fc7c2a36bf0af7ecf3162693a4c94d7fca65454d6a9e # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport int64_t diff --git a/cuda_bindings/cuda/bindings/cynvml.pyx b/cuda_bindings/cuda/bindings/cynvml.pyx index eca48875f37..09ee2601a5b 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pyx +++ b/cuda_bindings/cuda/bindings/cynvml.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ec221879a459b2de9b3dfe54cba58613e9c08b279a95f782a450c98fd7cea532 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. 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 1b07f216479..e1f89be12cf 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pxd +++ b/cuda_bindings/cuda/bindings/cynvvm.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=79be0fd21f7c6b6112743eb60ce9e69287a66999ecaaa063d87a52ab64982bce # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. ############################################################################### diff --git a/cuda_bindings/cuda/bindings/cynvvm.pyx b/cuda_bindings/cuda/bindings/cynvvm.pyx index 23f4cc720cf..4e4b4fe5a74 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pyx +++ b/cuda_bindings/cuda/bindings/cynvvm.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7ea5803be62646c287bad43350e27d3254f35d25ab50b9c54f7ac5695b4c3114 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from ._internal cimport nvvm as _nvvm diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pxd b/cuda_bindings/cuda/bindings/nvfatbin.pxd index 6ad1678fc9d..dbfb587b7f2 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/nvfatbin.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c9d5a4b06ca92f766674f286b75dfc83dff952b5987eb88cdb2773bb28f1ea6a # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index 527792d0eca..8367cd14e83 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -1,22 +1,15 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d5a4eb978220598892471233ffd8b7caa8cee7b6b0c27d2d9c458f1d91979f8b # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum - -# <<<< END OF PREAMBLE CONTENT >>>> - +# This code was automatically generated across versions from 12.4.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) +from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum from libcpp.vector cimport vector @@ -24,7 +17,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_cyb_FastEnum): +class Result(_IntEnum): """ The enumerated type `nvFatbinResult` defines API call result codes. nvFatbin APIs return `nvFatbinResult` codes to indicate the result. @@ -330,4 +323,3 @@ cpdef add_tile_ir(intptr_t handle, code, size_t size, identifier, options_cmd_li with nogil: __status__ = nvFatbinAddTileIR(handle, _code_, size, _identifier_, _options_cmd_line_) check_status(__status__) -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pxd b/cuda_bindings/cuda/bindings/nvjitlink.pxd index 97f4a7aaafe..8c568cbc1b6 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/nvjitlink.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b847666247321f33f1f6b4c5fa92d6ee5d1022389e32eceb03c7458c45ff44ed # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. 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 e75f1552966..0f36b3afe1e 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -1,22 +1,15 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=18cc1af125a513c3867c6f2bd8e97f4b0b2d2e58565a8980223a419ae5f23b74 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum - -# <<<< END OF PREAMBLE CONTENT >>>> - +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum from libcpp.vector cimport vector @@ -24,7 +17,7 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_cyb_FastEnum): +class Result(_FastEnum): """ The enumerated type `nvJitLinkResult` defines API call result codes. nvJitLink APIs return `nvJitLinkResult` codes to indicate the result. @@ -51,7 +44,7 @@ class Result(_cyb_FastEnum): ERROR_UNSUPPORTED_ARCH = (NVJITLINK_ERROR_UNSUPPORTED_ARCH, 'Unsupported -arch value') ERROR_LTO_NOT_ENABLED = (NVJITLINK_ERROR_LTO_NOT_ENABLED, 'Requires -lto') -class InputType(_cyb_FastEnum): +class InputType(_FastEnum): """ The enumerated type `nvJitLinkInputType` defines the kind of inputs that can be passed to nvJitLinkAdd* APIs. @@ -374,4 +367,3 @@ cpdef get_linked_ltoir(intptr_t handle, ltoir): with nogil: __status__ = nvJitLinkGetLinkedLTOIR(handle, _ltoir_) check_status(__status__) -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvml.pxd b/cuda_bindings/cuda/bindings/nvml.pxd index 0f275a22935..9c0dd62d8d5 100644 --- a/cuda_bindings/cuda/bindings/nvml.pxd +++ b/cuda_bindings/cuda/bindings/nvml.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=eb901f46ca6b6930935726541c32b3ea04f7f46b6090c4c2ad9cb62386c2028b # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. 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 430c648da83..52fefd94e32 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -1,55 +1,29 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=52642c2c289dbd93191f019468630c0c7935bf99bc15c9c7c0de3797a109e8b0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -cimport cpython as _cyb_cpython -cimport cpython.buffer as _cyb_cpython_buffer -cimport cpython.memoryview as _cyb_cpython_memoryview -from cython cimport view as _cyb_view -from libc.stdlib cimport ( - calloc as _cyb_calloc, - free as _cyb_free, - malloc as _cyb_malloc, -) -from libc.string cimport ( - memcmp as _cyb_memcmp, - memcpy as _cyb_memcpy, -) -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum -import numpy as _numpy +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. -cdef _cyb___getbuffer(object self, _cyb_cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): - buffer.buf = ptr - buffer.format = 'b' - buffer.internal = NULL - buffer.itemsize = 1 - buffer.len = size - buffer.ndim = 1 - buffer.obj = self - buffer.readonly = readonly - buffer.shape = &buffer.len - buffer.strides = &buffer.itemsize - buffer.suboffsets = NULL +cimport cython # NOQA -cdef _cyb_from_buffer(buffer, size, lowpp_type): - cdef _cyb_cpython.Py_buffer view - if _cyb_cpython.PyObject_GetBuffer(buffer, &view, _cyb_cpython_buffer.PyBUF_SIMPLE) != 0: - raise TypeError("buffer argument does not support the buffer protocol") - try: - if view.itemsize != 1: - raise ValueError("buffer itemsize must be 1 byte") - if view.len != size: - raise ValueError(f"buffer length must be {size} bytes") - return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) - finally: - _cyb_cpython.PyBuffer_Release(&view) +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) + +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum + +from cuda.bindings.cydriver cimport CUDA_VERSION -cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): + +from libc.stdlib cimport calloc, free, malloc +from cython cimport view +cimport cpython.buffer +cimport cpython.memoryview +cimport cpython +from libc.string cimport memcmp, memcpy +import numpy as _numpy + + +cdef __from_data(data, dtype_name, expected_dtype, lowpp_type): # _numpy.recarray is a subclass of _numpy.ndarray, so implicitly handled here. if isinstance(data, lowpp_type): return data @@ -61,20 +35,34 @@ cdef _cyb_from_data(data, dtype_name, expected_dtype, lowpp_type): raise ValueError(f"data array must be of dtype {dtype_name}") return lowpp_type.from_ptr(data.ctypes.data, not data.flags.writeable, data) -# <<<< END OF PREAMBLE CONTENT >>>> - -cimport cython # NOQA -from cython cimport view -cimport cpython -from libc.string cimport memcpy +cdef __from_buffer(buffer, size, lowpp_type): + cdef Py_buffer view + if cpython.PyObject_GetBuffer(buffer, &view, cpython.PyBUF_SIMPLE) != 0: + raise TypeError("buffer argument does not support the buffer protocol") + try: + if view.itemsize != 1: + raise ValueError("buffer itemsize must be 1 byte") + if view.len != size: + raise ValueError(f"buffer length must be {size} bytes") + return lowpp_type.from_ptr(view.buf, not view.readonly, buffer) + finally: + cpython.PyBuffer_Release(&view) -from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, - nested_resource) -from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum +cdef __getbuffer(object self, cpython.Py_buffer *buffer, void *ptr, int size, bint readonly): + buffer.buf = ptr + buffer.format = 'b' + buffer.internal = NULL + buffer.itemsize = 1 + buffer.len = size + buffer.ndim = 1 + buffer.obj = self + buffer.readonly = readonly + buffer.shape = &buffer.len + buffer.strides = &buffer.itemsize + buffer.suboffsets = NULL -from cuda.bindings.cydriver cimport CUDA_VERSION cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsigned int ver) nogil: @@ -85,7 +73,7 @@ cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsi # Enum ############################################################################### -class BridgeChipType(_cyb_FastEnum): +class BridgeChipType(_FastEnum): """ Enum to represent type of bridge chip @@ -94,7 +82,7 @@ class BridgeChipType(_cyb_FastEnum): BRIDGE_CHIP_PLX = NVML_BRIDGE_CHIP_PLX BRIDGE_CHIP_BRO4 = NVML_BRIDGE_CHIP_BRO4 -class NvLinkUtilizationCountUnits(_cyb_FastEnum): +class NvLinkUtilizationCountUnits(_FastEnum): """ Enum to represent the NvLink utilization counter packet units @@ -106,7 +94,7 @@ class NvLinkUtilizationCountUnits(_cyb_FastEnum): NVLINK_COUNTER_UNIT_RESERVED = NVML_NVLINK_COUNTER_UNIT_RESERVED NVLINK_COUNTER_UNIT_COUNT = NVML_NVLINK_COUNTER_UNIT_COUNT -class NvLinkUtilizationCountPktTypes(_cyb_FastEnum): +class NvLinkUtilizationCountPktTypes(_FastEnum): """ Enum to represent the NvLink utilization counter packet types to count ** this is ONLY applicable with the units as packets or bytes ** as @@ -125,7 +113,7 @@ class NvLinkUtilizationCountPktTypes(_cyb_FastEnum): NVLINK_COUNTER_PKTFILTER_RESPNODATA = NVML_NVLINK_COUNTER_PKTFILTER_RESPNODATA NVLINK_COUNTER_PKTFILTER_ALL = NVML_NVLINK_COUNTER_PKTFILTER_ALL -class NvLinkCapability(_cyb_FastEnum): +class NvLinkCapability(_FastEnum): """ Enum to represent NvLink queryable capabilities @@ -139,7 +127,7 @@ class NvLinkCapability(_cyb_FastEnum): NVLINK_CAP_VALID = NVML_NVLINK_CAP_VALID NVLINK_CAP_COUNT = NVML_NVLINK_CAP_COUNT -class NvLinkErrorCounter(_cyb_FastEnum): +class NvLinkErrorCounter(_FastEnum): """ Enum to represent NvLink queryable error counters @@ -152,7 +140,7 @@ class NvLinkErrorCounter(_cyb_FastEnum): NVLINK_ERROR_DL_ECC_DATA = NVML_NVLINK_ERROR_DL_ECC_DATA NVLINK_ERROR_COUNT = NVML_NVLINK_ERROR_COUNT -class IntNvLinkDeviceType(_cyb_FastEnum): +class IntNvLinkDeviceType(_FastEnum): """ Enum to represent NvLink's remote device type @@ -163,7 +151,7 @@ class IntNvLinkDeviceType(_cyb_FastEnum): NVLINK_DEVICE_TYPE_SWITCH = NVML_NVLINK_DEVICE_TYPE_SWITCH NVLINK_DEVICE_TYPE_UNKNOWN = NVML_NVLINK_DEVICE_TYPE_UNKNOWN -class GpuTopologyLevel(_cyb_FastEnum): +class GpuTopologyLevel(_FastEnum): """ Represents level relationships within a system between two GPUs The enums are spaced to allow for future relationships @@ -177,7 +165,7 @@ class GpuTopologyLevel(_cyb_FastEnum): TOPOLOGY_NODE = NVML_TOPOLOGY_NODE TOPOLOGY_SYSTEM = NVML_TOPOLOGY_SYSTEM -class GpuP2PStatus(_cyb_FastEnum): +class GpuP2PStatus(_FastEnum): """ See `nvmlGpuP2PStatus_t`. """ @@ -190,7 +178,7 @@ class GpuP2PStatus(_cyb_FastEnum): P2P_STATUS_NOT_SUPPORTED = NVML_P2P_STATUS_NOT_SUPPORTED P2P_STATUS_UNKNOWN = NVML_P2P_STATUS_UNKNOWN -class GpuP2PCapsIndex(_cyb_FastEnum): +class GpuP2PCapsIndex(_FastEnum): """ See `nvmlGpuP2PCapsIndex_t`. """ @@ -202,7 +190,7 @@ class GpuP2PCapsIndex(_cyb_FastEnum): P2P_CAPS_INDEX_PROP = NVML_P2P_CAPS_INDEX_PROP P2P_CAPS_INDEX_UNKNOWN = NVML_P2P_CAPS_INDEX_UNKNOWN -class SamplingType(_cyb_FastEnum): +class SamplingType(_FastEnum): """ Represents Type of Sampling Event @@ -220,7 +208,7 @@ class SamplingType(_cyb_FastEnum): OFA_UTILIZATION_SAMPLES = (NVML_OFA_UTILIZATION_SAMPLES, 'To represent percent of time during which NVOFA remains busy.') SAMPLINGTYPE_COUNT = NVML_SAMPLINGTYPE_COUNT -class PcieUtilCounter(_cyb_FastEnum): +class PcieUtilCounter(_FastEnum): """ Represents the queryable PCIe utilization counters @@ -230,7 +218,7 @@ class PcieUtilCounter(_cyb_FastEnum): PCIE_UTIL_RX_BYTES = NVML_PCIE_UTIL_RX_BYTES PCIE_UTIL_COUNT = NVML_PCIE_UTIL_COUNT -class ValueType(_cyb_FastEnum): +class ValueType(_FastEnum): """ Represents the type for sample value returned @@ -245,7 +233,7 @@ class ValueType(_cyb_FastEnum): UNSIGNED_SHORT = NVML_VALUE_TYPE_UNSIGNED_SHORT COUNT = NVML_VALUE_TYPE_COUNT -class PerfPolicyType(_cyb_FastEnum): +class PerfPolicyType(_FastEnum): """ Represents type of perf policy for which violation times can be queried @@ -261,7 +249,7 @@ class PerfPolicyType(_cyb_FastEnum): PERF_POLICY_TOTAL_BASE_CLOCKS = (NVML_PERF_POLICY_TOTAL_BASE_CLOCKS, 'Total time the GPU was held below base clocks.') PERF_POLICY_COUNT = NVML_PERF_POLICY_COUNT -class ThermalTarget(_cyb_FastEnum): +class ThermalTarget(_FastEnum): """ Represents the thermal sensor targets @@ -278,7 +266,7 @@ class ThermalTarget(_cyb_FastEnum): ALL = NVML_THERMAL_TARGET_ALL UNKNOWN = NVML_THERMAL_TARGET_UNKNOWN -class ThermalController(_cyb_FastEnum): +class ThermalController(_FastEnum): """ Represents the thermal sensor controllers @@ -304,7 +292,7 @@ class ThermalController(_cyb_FastEnum): ADT7473S = NVML_THERMAL_CONTROLLER_ADT7473S UNKNOWN = NVML_THERMAL_CONTROLLER_UNKNOWN -class CoolerControl(_cyb_FastEnum): +class CoolerControl(_FastEnum): """ Cooler control type @@ -315,7 +303,7 @@ class CoolerControl(_cyb_FastEnum): THERMAL_COOLER_SIGNAL_VARIABLE = (NVML_THERMAL_COOLER_SIGNAL_VARIABLE, "This cooler's level can be adjusted from some minimum to some maximum (eg a knob).") THERMAL_COOLER_SIGNAL_COUNT = NVML_THERMAL_COOLER_SIGNAL_COUNT -class CoolerTarget(_cyb_FastEnum): +class CoolerTarget(_FastEnum): """ Cooler's target @@ -327,7 +315,7 @@ class CoolerTarget(_cyb_FastEnum): THERMAL_POWER_SUPPLY = (NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY, 'This cooler can cool the power supply.') THERMAL_GPU_RELATED = (NVML_THERMAL_COOLER_TARGET_GPU_RELATED, 'This cooler cools all of the components related to its target gpu. GPU_RELATED = GPU | MEMORY | POWER_SUPPLY.') -class UUIDType(_cyb_FastEnum): +class UUIDType(_FastEnum): """ Enum to represent different UUID types @@ -337,7 +325,7 @@ class UUIDType(_cyb_FastEnum): ASCII = (NVML_UUID_TYPE_ASCII, 'ASCII format type.') BINARY = (NVML_UUID_TYPE_BINARY, 'Binary format type.') -class EnableState(_cyb_FastEnum): +class EnableState(_FastEnum): """ Generic enable/disable enum. @@ -346,7 +334,7 @@ class EnableState(_cyb_FastEnum): FEATURE_DISABLED = (NVML_FEATURE_DISABLED, 'Feature disabled.') FEATURE_ENABLED = (NVML_FEATURE_ENABLED, 'Feature enabled.') -class BrandType(_cyb_FastEnum): +class BrandType(_FastEnum): """ - The Brand of the GPU @@ -372,7 +360,7 @@ class BrandType(_cyb_FastEnum): BRAND_TITAN_RTX = NVML_BRAND_TITAN_RTX BRAND_COUNT = NVML_BRAND_COUNT -class TemperatureThresholds(_cyb_FastEnum): +class TemperatureThresholds(_FastEnum): """ Temperature thresholds. @@ -388,7 +376,7 @@ class TemperatureThresholds(_cyb_FastEnum): TEMPERATURE_THRESHOLD_GPS_CURR = NVML_TEMPERATURE_THRESHOLD_GPS_CURR TEMPERATURE_THRESHOLD_COUNT = NVML_TEMPERATURE_THRESHOLD_COUNT -class TemperatureSensors(_cyb_FastEnum): +class TemperatureSensors(_FastEnum): """ Temperature sensors. @@ -397,7 +385,7 @@ class TemperatureSensors(_cyb_FastEnum): TEMPERATURE_GPU = (NVML_TEMPERATURE_GPU, 'Temperature sensor for the GPU die.') TEMPERATURE_COUNT = NVML_TEMPERATURE_COUNT -class ComputeMode(_cyb_FastEnum): +class ComputeMode(_FastEnum): """ Compute mode. NVML_COMPUTEMODE_EXCLUSIVE_PROCESS was added in CUDA 4.0. Earlier CUDA versions supported a single exclusive mode, which is @@ -411,7 +399,7 @@ class ComputeMode(_cyb_FastEnum): COMPUTEMODE_EXCLUSIVE_PROCESS = (NVML_COMPUTEMODE_EXCLUSIVE_PROCESS, 'Compute-exclusive-process mode -- only one context per device, usable from multiple threads at a time.') COMPUTEMODE_COUNT = NVML_COMPUTEMODE_COUNT -class MemoryErrorType(_cyb_FastEnum): +class MemoryErrorType(_FastEnum): """ Memory error types @@ -421,7 +409,7 @@ class MemoryErrorType(_cyb_FastEnum): UNCORRECTED = (NVML_MEMORY_ERROR_TYPE_UNCORRECTED, 'A memory error that was not corrected For ECC errors, these are double bit errors For Texture memory, these are errors where the resend fails') COUNT = (NVML_MEMORY_ERROR_TYPE_COUNT, 'Count of memory error types.') -class NvlinkVersion(_cyb_FastEnum): +class NvlinkVersion(_FastEnum): """ Represents Nvlink Version @@ -437,7 +425,7 @@ class NvlinkVersion(_cyb_FastEnum): VERSION_5_0 = (NVML_NVLINK_VERSION_5_0, 'NVLink Version 5.0.') VERSION_6_0 = (NVML_NVLINK_VERSION_6_0, 'NVLink Version 6.0.') -class EccCounterType(_cyb_FastEnum): +class EccCounterType(_FastEnum): """ ECC counter types. Note: Volatile counts are reset each time the driver loads. On Windows this is once per boot. On Linux this can be @@ -452,7 +440,7 @@ class EccCounterType(_cyb_FastEnum): AGGREGATE_ECC = (NVML_AGGREGATE_ECC, 'Aggregate counts persist across reboots (i.e. for the lifetime of the device).') COUNT = (NVML_ECC_COUNTER_TYPE_COUNT, 'Count of memory counter types.') -class ClockType(_cyb_FastEnum): +class ClockType(_FastEnum): """ Clock types. All speeds are in Mhz. @@ -464,7 +452,7 @@ class ClockType(_cyb_FastEnum): CLOCK_VIDEO = (NVML_CLOCK_VIDEO, 'Video encoder/decoder clock domain.') CLOCK_COUNT = (NVML_CLOCK_COUNT, 'Count of clock types.') -class ClockId(_cyb_FastEnum): +class ClockId(_FastEnum): """ Clock Ids. These are used in combination with `nvmlClockType_t` to specify a single clock value. @@ -477,7 +465,7 @@ class ClockId(_cyb_FastEnum): CUSTOMER_BOOST_MAX = (NVML_CLOCK_ID_CUSTOMER_BOOST_MAX, 'OEM-defined maximum clock rate.') COUNT = (NVML_CLOCK_ID_COUNT, 'Count of Clock Ids.') -class DriverModel(_cyb_FastEnum): +class DriverModel(_FastEnum): """ Driver models. Windows only. @@ -487,7 +475,7 @@ class DriverModel(_cyb_FastEnum): DRIVER_WDM = (NVML_DRIVER_WDM, 'WDM (TCC) model (deprecated) -- GPU treated as a generic compute device.') DRIVER_MCDM = (NVML_DRIVER_MCDM, 'MCDM driver model -- GPU treated as a Microsoft compute device.') -class Pstates(_cyb_FastEnum): +class Pstates(_FastEnum): """ Allowed PStates. @@ -511,7 +499,7 @@ class Pstates(_cyb_FastEnum): PSTATE_15 = (NVML_PSTATE_15, 'Performance state 15 -- Minimum Performance.') PSTATE_UNKNOWN = (NVML_PSTATE_UNKNOWN, 'Unknown performance state.') -class GpuOperationMode(_cyb_FastEnum): +class GpuOperationMode(_FastEnum): """ GPU Operation Mode GOM allows to reduce power usage and optimize GPU throughput by disabling GPU features. Each GOM is designed to meet @@ -523,7 +511,7 @@ class GpuOperationMode(_cyb_FastEnum): GOM_COMPUTE = (NVML_GOM_COMPUTE, 'Designed for running only compute tasks. Graphics operations are not allowed') GOM_LOW_DP = (NVML_GOM_LOW_DP, "Designed for running graphics applications that don't require high bandwidth double precision") -class InforomObject(_cyb_FastEnum): +class InforomObject(_FastEnum): """ Available infoROM objects. @@ -535,7 +523,7 @@ class InforomObject(_cyb_FastEnum): INFOROM_DEN = (NVML_INFOROM_DEN, 'DRAM Encryption object.') INFOROM_COUNT = (NVML_INFOROM_COUNT, 'This counts the number of infoROM objects the driver knows about.') -class Return(_cyb_FastEnum): +class Return(_FastEnum): """ Return values for NVML API calls. @@ -574,7 +562,7 @@ class Return(_cyb_FastEnum): ERROR_RESET_TYPE_NOT_SUPPORTED = (NVML_ERROR_RESET_TYPE_NOT_SUPPORTED, 'Reset not supported for given device/parameters.') ERROR_UNKNOWN = (NVML_ERROR_UNKNOWN, 'An internal driver error occurred.') -class MemoryLocation(_cyb_FastEnum): +class MemoryLocation(_FastEnum): """ See `nvmlDeviceGetMemoryErrorCounter` @@ -591,7 +579,7 @@ class MemoryLocation(_cyb_FastEnum): SRAM = (NVML_MEMORY_LOCATION_SRAM, 'Turing+ SRAM.') COUNT = (NVML_MEMORY_LOCATION_COUNT, 'This counts the number of memory locations the driver knows about.') -class PageRetirementCause(_cyb_FastEnum): +class PageRetirementCause(_FastEnum): """ Causes for page retirement @@ -601,7 +589,7 @@ class PageRetirementCause(_cyb_FastEnum): DOUBLE_BIT_ECC_ERROR = (NVML_PAGE_RETIREMENT_CAUSE_DOUBLE_BIT_ECC_ERROR, 'Page was retired due to double bit ECC error.') COUNT = NVML_PAGE_RETIREMENT_CAUSE_COUNT -class RestrictedAPI(_cyb_FastEnum): +class RestrictedAPI(_FastEnum): """ API types that allow changes to default permission restrictions @@ -611,7 +599,7 @@ class RestrictedAPI(_cyb_FastEnum): SET_AUTO_BOOSTED_CLOCKS = (NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS, 'APIs that enable/disable Auto Boosted clocks see nvmlDeviceSetAutoBoostedClocksEnabled') COUNT = NVML_RESTRICTED_API_COUNT -class GpuUtilizationDomainId(_cyb_FastEnum): +class GpuUtilizationDomainId(_FastEnum): """ Represents the GPU utilization domains @@ -622,7 +610,7 @@ class GpuUtilizationDomainId(_cyb_FastEnum): GPU_UTILIZATION_DOMAIN_VID = (NVML_GPU_UTILIZATION_DOMAIN_VID, 'Video engine domain.') GPU_UTILIZATION_DOMAIN_BUS = (NVML_GPU_UTILIZATION_DOMAIN_BUS, 'Bus interface domain.') -class GpuVirtualizationMode(_cyb_FastEnum): +class GpuVirtualizationMode(_FastEnum): """ GPU virtualization mode types. @@ -634,7 +622,7 @@ class GpuVirtualizationMode(_cyb_FastEnum): HOST_VGPU = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU, 'Device is associated with VGX hypervisor in vGPU mode.') HOST_VSGA = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA, 'Device is associated with VGX hypervisor in vSGA mode.') -class HostVgpuMode(_cyb_FastEnum): +class HostVgpuMode(_FastEnum): """ Host vGPU modes @@ -643,7 +631,7 @@ class HostVgpuMode(_cyb_FastEnum): NON_SRIOV = (NVML_HOST_VGPU_MODE_NON_SRIOV, 'Non SR-IOV mode.') SRIOV = (NVML_HOST_VGPU_MODE_SRIOV, 'SR-IOV mode.') -class VgpuVmIdType(_cyb_FastEnum): +class VgpuVmIdType(_FastEnum): """ Types of VM identifiers @@ -652,7 +640,7 @@ class VgpuVmIdType(_cyb_FastEnum): VGPU_VM_ID_DOMAIN_ID = (NVML_VGPU_VM_ID_DOMAIN_ID, 'VM ID represents DOMAIN ID.') VGPU_VM_ID_UUID = (NVML_VGPU_VM_ID_UUID, 'VM ID represents UUID.') -class VgpuGuestInfoState(_cyb_FastEnum): +class VgpuGuestInfoState(_FastEnum): """ vGPU GUEST info state @@ -661,7 +649,7 @@ class VgpuGuestInfoState(_cyb_FastEnum): VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED, 'Guest-dependent fields uninitialized.') VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED, 'Guest-dependent fields initialized.') -class GridLicenseFeatureCode(_cyb_FastEnum): +class GridLicenseFeatureCode(_FastEnum): """ vGPU software licensable features @@ -674,7 +662,7 @@ class GridLicenseFeatureCode(_cyb_FastEnum): GAMING = (NVML_GRID_LICENSE_FEATURE_CODE_GAMING, 'Gaming.') COMPUTE = (NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE, 'Compute.') -class VgpuCapability(_cyb_FastEnum): +class VgpuCapability(_FastEnum): """ vGPU queryable capabilities @@ -687,7 +675,7 @@ class VgpuCapability(_cyb_FastEnum): VGPU_CAP_EXCLUSIVE_SIZE = (NVML_VGPU_CAP_EXCLUSIVE_SIZE, 'vGPU profile cannot run on a GPU alongside other profiles of different size') VGPU_CAP_COUNT = NVML_VGPU_CAP_COUNT -class VgpuDriverCapability(_cyb_FastEnum): +class VgpuDriverCapability(_FastEnum): """ vGPU driver queryable capabilities @@ -697,7 +685,7 @@ class VgpuDriverCapability(_cyb_FastEnum): VGPU_DRIVER_CAP_WARM_UPDATE = (NVML_VGPU_DRIVER_CAP_WARM_UPDATE, 'Supports FSR and warm update of vGPU host driver without terminating the running guest VM.') VGPU_DRIVER_CAP_COUNT = NVML_VGPU_DRIVER_CAP_COUNT -class DeviceVgpuCapability(_cyb_FastEnum): +class DeviceVgpuCapability(_FastEnum): """ Device vGPU queryable capabilities @@ -717,7 +705,7 @@ class DeviceVgpuCapability(_cyb_FastEnum): DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = (NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED, 'Set/Get MIG timesliced mode reporting, without impacting the underlying functionality.') DEVICE_VGPU_CAP_COUNT = NVML_DEVICE_VGPU_CAP_COUNT -class DeviceGpuRecoveryAction(_cyb_FastEnum): +class DeviceGpuRecoveryAction(_FastEnum): """ Enum describing the GPU Recovery Action @@ -730,7 +718,7 @@ class DeviceGpuRecoveryAction(_cyb_FastEnum): GPU_RECOVERY_ACTION_DRAIN_AND_RESET = (NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET, 'Drain P2P and Reset Gpu.') GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN = (NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN, 'Recover IMEX Domain.') -class FanState(_cyb_FastEnum): +class FanState(_FastEnum): """ Fan state enum. @@ -739,7 +727,7 @@ class FanState(_cyb_FastEnum): FAN_NORMAL = (NVML_FAN_NORMAL, 'Fan is working properly.') FAN_FAILED = (NVML_FAN_FAILED, 'Fan has failed.') -class LedColor(_cyb_FastEnum): +class LedColor(_FastEnum): """ Led color enum. @@ -748,7 +736,7 @@ class LedColor(_cyb_FastEnum): GREEN = (NVML_LED_COLOR_GREEN, 'GREEN, indicates good health.') AMBER = (NVML_LED_COLOR_AMBER, 'AMBER, indicates problem.') -class EncoderType(_cyb_FastEnum): +class EncoderType(_FastEnum): """ Represents type of encoder for capacity can be queried @@ -759,7 +747,7 @@ class EncoderType(_cyb_FastEnum): ENCODER_QUERY_AV1 = (NVML_ENCODER_QUERY_AV1, 'AV1 encoder.') ENCODER_QUERY_UNKNOWN = (NVML_ENCODER_QUERY_UNKNOWN, 'Unknown encoder.') -class FBCSessionType(_cyb_FastEnum): +class FBCSessionType(_FastEnum): """ Represents frame buffer capture session type @@ -771,7 +759,7 @@ class FBCSessionType(_cyb_FastEnum): VID = (NVML_FBC_SESSION_TYPE_VID, 'Vid.') HWENC = (NVML_FBC_SESSION_TYPE_HWENC, 'HEnc.') -class DetachGpuState(_cyb_FastEnum): +class DetachGpuState(_FastEnum): """ Is the GPU device to be removed from the kernel by `nvmlDeviceRemoveGpu()` @@ -781,7 +769,7 @@ class DetachGpuState(_cyb_FastEnum): DETACH_GPU_KEEP = NVML_DETACH_GPU_KEEP DETACH_GPU_REMOVE = NVML_DETACH_GPU_REMOVE -class PcieLinkState(_cyb_FastEnum): +class PcieLinkState(_FastEnum): """ Parent bridge PCIe link state requested by `nvmlDeviceRemoveGpu()` @@ -790,7 +778,7 @@ class PcieLinkState(_cyb_FastEnum): PCIE_LINK_KEEP = NVML_PCIE_LINK_KEEP PCIE_LINK_SHUT_DOWN = NVML_PCIE_LINK_SHUT_DOWN -class ClockLimitId(_cyb_FastEnum): +class ClockLimitId(_FastEnum): """ See `nvmlClockLimitId_t`. """ @@ -798,7 +786,7 @@ class ClockLimitId(_cyb_FastEnum): TDP = NVML_CLOCK_LIMIT_ID_TDP UNLIMITED = NVML_CLOCK_LIMIT_ID_UNLIMITED -class VgpuVmCompatibility(_cyb_FastEnum): +class VgpuVmCompatibility(_FastEnum): """ vGPU VM compatibility codes @@ -810,7 +798,7 @@ class VgpuVmCompatibility(_cyb_FastEnum): SLEEP = (NVML_VGPU_VM_COMPATIBILITY_SLEEP, 'vGPU is runnable from a sleeped state (ACPI S3)') LIVE = (NVML_VGPU_VM_COMPATIBILITY_LIVE, 'vGPU is runnable from a live/paused (ACPI S0)') -class VgpuPgpuCompatibilityLimitCode(_cyb_FastEnum): +class VgpuPgpuCompatibilityLimitCode(_FastEnum): """ vGPU-pGPU compatibility limit codes @@ -822,7 +810,7 @@ class VgpuPgpuCompatibilityLimitCode(_cyb_FastEnum): VGPU_COMPATIBILITY_LIMIT_GPU = (NVML_VGPU_COMPATIBILITY_LIMIT_GPU, 'Compatibility is limited by GPU hardware.') VGPU_COMPATIBILITY_LIMIT_OTHER = (NVML_VGPU_COMPATIBILITY_LIMIT_OTHER, 'Compatibility is limited by an undefined factor.') -class GpmMetricId(_cyb_FastEnum): +class GpmMetricId(_FastEnum): """ GPM Metric Identifiers @@ -1132,7 +1120,7 @@ class GpmMetricId(_cyb_FastEnum): GPM_METRIC_NVLINK_L35_TX = (NVML_GPM_METRIC_NVLINK_L35_TX, 'NvLink write for link 35 in bytes since reboot.') GPM_METRIC_MAX = (NVML_GPM_METRIC_MAX, 'Maximum value above +1.') -class PowerProfileType(_cyb_FastEnum): +class PowerProfileType(_FastEnum): """ See `nvmlPowerProfileType_t`. """ @@ -1153,7 +1141,7 @@ class PowerProfileType(_cyb_FastEnum): POWER_PROFILE_MIG = NVML_POWER_PROFILE_MIG POWER_PROFILE_MAX = NVML_POWER_PROFILE_MAX -class DeviceAddressingModeType(_cyb_FastEnum): +class DeviceAddressingModeType(_FastEnum): """ Enum to represent device addressing mode values @@ -1163,7 +1151,7 @@ class DeviceAddressingModeType(_cyb_FastEnum): DEVICE_ADDRESSING_MODE_HMM = (NVML_DEVICE_ADDRESSING_MODE_HMM, 'Heterogeneous Memory Management mode.') DEVICE_ADDRESSING_MODE_ATS = (NVML_DEVICE_ADDRESSING_MODE_ATS, 'Address Translation Services mode.') -class PRMCounterId(_cyb_FastEnum): +class PRMCounterId(_FastEnum): """ PRM Counter IDs @@ -1185,7 +1173,7 @@ class PRMCounterId(_cyb_FastEnum): PPCNT_PLR_SYNC_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS PPRM_OPER_RECOVERY = NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY -class PowerProfileOperation(_cyb_FastEnum): +class PowerProfileOperation(_FastEnum): """ Enum for operation to perform on the requested profiles @@ -1196,7 +1184,7 @@ class PowerProfileOperation(_cyb_FastEnum): SET_AND_OVERWRITE = (NVML_POWER_PROFILE_OPERATION_SET_AND_OVERWRITE, 'Overwrite the existing list of requested profiles with just the requested profiles.') MAX = (NVML_POWER_PROFILE_OPERATION_MAX, 'Max value above +1.') -class ProcessMode(_cyb_FastEnum): +class ProcessMode(_FastEnum): """ Enum to represent process mode. @@ -1208,7 +1196,7 @@ class ProcessMode(_cyb_FastEnum): ALL = (NVML_PROCESS_MODE_ALL, 'All processes running on the GPU (compute, graphics, MPS, and other types).') MAX = (NVML_PROCESS_MODE_MAX, 'Maximum value for bounds checking.') -class CPERType(_cyb_FastEnum): +class CPERType(_FastEnum): """ Bitmask of CPER record types. Multiple values may be combined to request records from several sources in one call. @@ -2192,7 +2180,7 @@ cdef class PciInfoExt_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") self._owner = None @@ -2204,7 +2192,7 @@ cdef class PciInfoExt_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PciInfoExt_v1 object at {hex(id(self))}>" @@ -2225,20 +2213,20 @@ cdef class PciInfoExt_v1: if not isinstance(other, PciInfoExt_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfoExt_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfoExt_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) + self._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfoExt_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2336,7 +2324,7 @@ cdef class PciInfoExt_v1: @property def bus_id(self): """~_numpy.int8: (array of length 32).The tuple domain:bus:device.function PCI identifier (& NULL terminator).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) + return cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2346,12 +2334,12 @@ cdef class PciInfoExt_v1: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].busId), ptr, 32) + memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfoExt_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) + return __from_buffer(buffer, sizeof(nvmlPciInfoExt_v1_t), PciInfoExt_v1) @staticmethod def from_data(data): @@ -2360,7 +2348,7 @@ cdef class PciInfoExt_v1: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_ext_v1_dtype` holding the data. """ - return _cyb_from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) + return __from_data(data, "pci_info_ext_v1_dtype", pci_info_ext_v1_dtype, PciInfoExt_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2375,10 +2363,10 @@ cdef class PciInfoExt_v1: raise ValueError("ptr must not be null (0)") cdef PciInfoExt_v1 obj = PciInfoExt_v1.__new__(PciInfoExt_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPciInfoExt_v1_t)) + obj._ptr = malloc(sizeof(nvmlPciInfoExt_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfoExt_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPciInfoExt_v1_t)) obj._owner = None obj._owned = True else: @@ -2421,7 +2409,7 @@ cdef class PciInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPciInfo_t)) + self._ptr = calloc(1, sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") self._owner = None @@ -2433,7 +2421,7 @@ cdef class PciInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PciInfo object at {hex(id(self))}>" @@ -2454,20 +2442,20 @@ cdef class PciInfo: if not isinstance(other, PciInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPciInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPciInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) + self._ptr = malloc(sizeof(nvmlPciInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PciInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPciInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2477,7 +2465,7 @@ cdef class PciInfo: @property def bus_id_legacy(self): """~_numpy.int8: (array of length 16).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) + return cpython.PyUnicode_FromString(self._ptr[0].busIdLegacy) @bus_id_legacy.setter def bus_id_legacy(self, val): @@ -2487,7 +2475,7 @@ cdef class PciInfo: if len(buf) >= 16: raise ValueError("String too long for field bus_id_legacy, max length is 15") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].busIdLegacy), ptr, 16) + memcpy((self._ptr[0].busIdLegacy), ptr, 16) @property def domain(self): @@ -2547,7 +2535,7 @@ cdef class PciInfo: @property def bus_id(self): """~_numpy.int8: (array of length 32).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].busId) + return cpython.PyUnicode_FromString(self._ptr[0].busId) @bus_id.setter def bus_id(self, val): @@ -2557,12 +2545,12 @@ cdef class PciInfo: if len(buf) >= 32: raise ValueError("String too long for field bus_id, max length is 31") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].busId), ptr, 32) + memcpy((self._ptr[0].busId), ptr, 32) @staticmethod def from_buffer(buffer): """Create an PciInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) + return __from_buffer(buffer, sizeof(nvmlPciInfo_t), PciInfo) @staticmethod def from_data(data): @@ -2571,7 +2559,7 @@ cdef class PciInfo: Args: data (_numpy.ndarray): a single-element array of dtype `pci_info_dtype` holding the data. """ - return _cyb_from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) + return __from_data(data, "pci_info_dtype", pci_info_dtype, PciInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2586,10 +2574,10 @@ cdef class PciInfo: raise ValueError("ptr must not be null (0)") cdef PciInfo obj = PciInfo.__new__(PciInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPciInfo_t)) + obj._ptr = malloc(sizeof(nvmlPciInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PciInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPciInfo_t)) obj._owner = None obj._owned = True else: @@ -2627,7 +2615,7 @@ cdef class Utilization: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlUtilization_t)) + self._ptr = calloc(1, sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") self._owner = None @@ -2639,7 +2627,7 @@ cdef class Utilization: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Utilization object at {hex(id(self))}>" @@ -2660,20 +2648,20 @@ cdef class Utilization: if not isinstance(other, Utilization): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUtilization_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlUtilization_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) + self._ptr = malloc(sizeof(nvmlUtilization_t)) if self._ptr == NULL: raise MemoryError("Error allocating Utilization") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUtilization_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2705,7 +2693,7 @@ cdef class Utilization: @staticmethod def from_buffer(buffer): """Create an Utilization instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) + return __from_buffer(buffer, sizeof(nvmlUtilization_t), Utilization) @staticmethod def from_data(data): @@ -2714,7 +2702,7 @@ cdef class Utilization: Args: data (_numpy.ndarray): a single-element array of dtype `utilization_dtype` holding the data. """ - return _cyb_from_data(data, "utilization_dtype", utilization_dtype, Utilization) + return __from_data(data, "utilization_dtype", utilization_dtype, Utilization) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2729,10 +2717,10 @@ cdef class Utilization: raise ValueError("ptr must not be null (0)") cdef Utilization obj = Utilization.__new__(Utilization) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlUtilization_t)) + obj._ptr = malloc(sizeof(nvmlUtilization_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Utilization") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlUtilization_t)) obj._owner = None obj._owned = True else: @@ -2771,7 +2759,7 @@ cdef class Memory: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_t)) + self._ptr = calloc(1, sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") self._owner = None @@ -2783,7 +2771,7 @@ cdef class Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Memory object at {hex(id(self))}>" @@ -2804,20 +2792,20 @@ cdef class Memory: if not isinstance(other, Memory): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) + self._ptr = malloc(sizeof(nvmlMemory_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -2860,7 +2848,7 @@ cdef class Memory: @staticmethod def from_buffer(buffer): """Create an Memory instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlMemory_t), Memory) + return __from_buffer(buffer, sizeof(nvmlMemory_t), Memory) @staticmethod def from_data(data): @@ -2869,7 +2857,7 @@ cdef class Memory: Args: data (_numpy.ndarray): a single-element array of dtype `memory_dtype` holding the data. """ - return _cyb_from_data(data, "memory_dtype", memory_dtype, Memory) + return __from_data(data, "memory_dtype", memory_dtype, Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -2884,10 +2872,10 @@ cdef class Memory: raise ValueError("ptr must not be null (0)") cdef Memory obj = Memory.__new__(Memory) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlMemory_t)) + obj._ptr = malloc(sizeof(nvmlMemory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlMemory_t)) obj._owner = None obj._owned = True else: @@ -2928,7 +2916,7 @@ cdef class Memory_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlMemory_v2_t)) + self._ptr = calloc(1, sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") self._owner = None @@ -2940,7 +2928,7 @@ cdef class Memory_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Memory_v2 object at {hex(id(self))}>" @@ -2961,20 +2949,20 @@ cdef class Memory_v2: if not isinstance(other, Memory_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlMemory_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlMemory_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) + self._ptr = malloc(sizeof(nvmlMemory_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlMemory_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3039,7 +3027,7 @@ cdef class Memory_v2: @staticmethod def from_buffer(buffer): """Create an Memory_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) + return __from_buffer(buffer, sizeof(nvmlMemory_v2_t), Memory_v2) @staticmethod def from_data(data): @@ -3048,7 +3036,7 @@ cdef class Memory_v2: Args: data (_numpy.ndarray): a single-element array of dtype `memory_v2_dtype` holding the data. """ - return _cyb_from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) + return __from_data(data, "memory_v2_dtype", memory_v2_dtype, Memory_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3063,10 +3051,10 @@ cdef class Memory_v2: raise ValueError("ptr must not be null (0)") cdef Memory_v2 obj = Memory_v2.__new__(Memory_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlMemory_v2_t)) + obj._ptr = malloc(sizeof(nvmlMemory_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Memory_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlMemory_v2_t)) obj._owner = None obj._owned = True else: @@ -3105,7 +3093,7 @@ cdef class BAR1Memory: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlBAR1Memory_t)) + self._ptr = calloc(1, sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") self._owner = None @@ -3117,7 +3105,7 @@ cdef class BAR1Memory: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.BAR1Memory object at {hex(id(self))}>" @@ -3138,20 +3126,20 @@ cdef class BAR1Memory: if not isinstance(other, BAR1Memory): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBAR1Memory_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlBAR1Memory_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) + self._ptr = malloc(sizeof(nvmlBAR1Memory_t)) if self._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBAR1Memory_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3194,7 +3182,7 @@ cdef class BAR1Memory: @staticmethod def from_buffer(buffer): """Create an BAR1Memory instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) + return __from_buffer(buffer, sizeof(nvmlBAR1Memory_t), BAR1Memory) @staticmethod def from_data(data): @@ -3203,7 +3191,7 @@ cdef class BAR1Memory: Args: data (_numpy.ndarray): a single-element array of dtype `ba_r1memory_dtype` holding the data. """ - return _cyb_from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) + return __from_data(data, "ba_r1memory_dtype", ba_r1memory_dtype, BAR1Memory) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3218,10 +3206,10 @@ cdef class BAR1Memory: raise ValueError("ptr must not be null (0)") cdef BAR1Memory obj = BAR1Memory.__new__(BAR1Memory) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlBAR1Memory_t)) + obj._ptr = malloc(sizeof(nvmlBAR1Memory_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BAR1Memory") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlBAR1Memory_t)) obj._owner = None obj._owned = True else: @@ -3297,10 +3285,10 @@ cdef class ProcessInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3400,8 +3388,8 @@ cdef class ProcessInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessInfo obj = ProcessInfo.__new__(ProcessInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_info_dtype) obj._data = data.view(_numpy.recarray) @@ -3475,10 +3463,10 @@ cdef class ProcessDetail_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -3589,8 +3577,8 @@ cdef class ProcessDetail_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessDetail_v1 obj = ProcessDetail_v1.__new__(ProcessDetail_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessDetail_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_detail_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -3632,7 +3620,7 @@ cdef class DeviceAttributes: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAttributes_t)) + self._ptr = calloc(1, sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") self._owner = None @@ -3644,7 +3632,7 @@ cdef class DeviceAttributes: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DeviceAttributes object at {hex(id(self))}>" @@ -3665,20 +3653,20 @@ cdef class DeviceAttributes: if not isinstance(other, DeviceAttributes): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAttributes_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAttributes_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) + self._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAttributes_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3787,7 +3775,7 @@ cdef class DeviceAttributes: @staticmethod def from_buffer(buffer): """Create an DeviceAttributes instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) + return __from_buffer(buffer, sizeof(nvmlDeviceAttributes_t), DeviceAttributes) @staticmethod def from_data(data): @@ -3796,7 +3784,7 @@ cdef class DeviceAttributes: Args: data (_numpy.ndarray): a single-element array of dtype `device_attributes_dtype` holding the data. """ - return _cyb_from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) + return __from_data(data, "device_attributes_dtype", device_attributes_dtype, DeviceAttributes) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3811,10 +3799,10 @@ cdef class DeviceAttributes: raise ValueError("ptr must not be null (0)") cdef DeviceAttributes obj = DeviceAttributes.__new__(DeviceAttributes) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAttributes_t)) + obj._ptr = malloc(sizeof(nvmlDeviceAttributes_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAttributes") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAttributes_t)) obj._owner = None obj._owned = True else: @@ -3851,7 +3839,7 @@ cdef class C2cModeInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") self._owner = None @@ -3863,7 +3851,7 @@ cdef class C2cModeInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.C2cModeInfo_v1 object at {hex(id(self))}>" @@ -3884,20 +3872,20 @@ cdef class C2cModeInfo_v1: if not isinstance(other, C2cModeInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlC2cModeInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlC2cModeInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlC2cModeInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -3918,7 +3906,7 @@ cdef class C2cModeInfo_v1: @staticmethod def from_buffer(buffer): """Create an C2cModeInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) + return __from_buffer(buffer, sizeof(nvmlC2cModeInfo_v1_t), C2cModeInfo_v1) @staticmethod def from_data(data): @@ -3927,7 +3915,7 @@ cdef class C2cModeInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `c2c_mode_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) + return __from_data(data, "c2c_mode_info_v1_dtype", c2c_mode_info_v1_dtype, C2cModeInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -3942,10 +3930,10 @@ cdef class C2cModeInfo_v1: raise ValueError("ptr must not be null (0)") cdef C2cModeInfo_v1 obj = C2cModeInfo_v1.__new__(C2cModeInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlC2cModeInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlC2cModeInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating C2cModeInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlC2cModeInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -3986,7 +3974,7 @@ cdef class RowRemapperHistogramValues: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = calloc(1, sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") self._owner = None @@ -3998,7 +3986,7 @@ cdef class RowRemapperHistogramValues: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.RowRemapperHistogramValues object at {hex(id(self))}>" @@ -4019,20 +4007,20 @@ cdef class RowRemapperHistogramValues: if not isinstance(other, RowRemapperHistogramValues): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRowRemapperHistogramValues_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlRowRemapperHistogramValues_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + self._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if self._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRowRemapperHistogramValues_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4097,7 +4085,7 @@ cdef class RowRemapperHistogramValues: @staticmethod def from_buffer(buffer): """Create an RowRemapperHistogramValues instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) + return __from_buffer(buffer, sizeof(nvmlRowRemapperHistogramValues_t), RowRemapperHistogramValues) @staticmethod def from_data(data): @@ -4106,7 +4094,7 @@ cdef class RowRemapperHistogramValues: Args: data (_numpy.ndarray): a single-element array of dtype `row_remapper_histogram_values_dtype` holding the data. """ - return _cyb_from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) + return __from_data(data, "row_remapper_histogram_values_dtype", row_remapper_histogram_values_dtype, RowRemapperHistogramValues) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4121,10 +4109,10 @@ cdef class RowRemapperHistogramValues: raise ValueError("ptr must not be null (0)") cdef RowRemapperHistogramValues obj = RowRemapperHistogramValues.__new__(RowRemapperHistogramValues) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlRowRemapperHistogramValues_t)) + obj._ptr = malloc(sizeof(nvmlRowRemapperHistogramValues_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RowRemapperHistogramValues") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlRowRemapperHistogramValues_t)) obj._owner = None obj._owned = True else: @@ -4198,10 +4186,10 @@ cdef class BridgeChipInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def type(self): @@ -4279,8 +4267,8 @@ cdef class BridgeChipInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef BridgeChipInfo obj = BridgeChipInfo.__new__(BridgeChipInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlBridgeChipInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=bridge_chip_info_dtype) obj._data = data.view(_numpy.recarray) @@ -4314,7 +4302,7 @@ cdef class Value: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlValue_t)) + self._ptr = calloc(1, sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") self._owner = None @@ -4326,7 +4314,7 @@ cdef class Value: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.Value object at {hex(id(self))}>" @@ -4347,20 +4335,20 @@ cdef class Value: if not isinstance(other, Value): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlValue_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlValue_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlValue_t)) + self._ptr = malloc(sizeof(nvmlValue_t)) if self._ptr == NULL: raise MemoryError("Error allocating Value") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlValue_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4447,7 +4435,7 @@ cdef class Value: @staticmethod def from_buffer(buffer): """Create an Value instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlValue_t), Value) + return __from_buffer(buffer, sizeof(nvmlValue_t), Value) @staticmethod def from_data(data): @@ -4456,7 +4444,7 @@ cdef class Value: Args: data (_numpy.ndarray): a single-element array of dtype `value_dtype` holding the data. """ - return _cyb_from_data(data, "value_dtype", value_dtype, Value) + return __from_data(data, "value_dtype", value_dtype, Value) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4471,10 +4459,10 @@ cdef class Value: raise ValueError("ptr must not be null (0)") cdef Value obj = Value.__new__(Value) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlValue_t)) + obj._ptr = malloc(sizeof(nvmlValue_t)) if obj._ptr == NULL: raise MemoryError("Error allocating Value") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlValue_t)) obj._owner = None obj._owned = True else: @@ -4515,7 +4503,7 @@ cdef class _py_anon_pod0: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -4527,7 +4515,7 @@ cdef class _py_anon_pod0: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod0 object at {hex(id(self))}>" @@ -4548,20 +4536,20 @@ cdef class _py_anon_pod0: if not isinstance(other, _py_anon_pod0): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod0)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod0), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -4626,7 +4614,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod0), _py_anon_pod0) @staticmethod def from_data(data): @@ -4635,7 +4623,7 @@ cdef class _py_anon_pod0: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod0_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) + return __from_data(data, "_py_anon_pod0_dtype", _py_anon_pod0_dtype, _py_anon_pod0) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4650,10 +4638,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod0)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod0)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod0") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod0)) obj._owner = None obj._owned = True else: @@ -4693,7 +4681,7 @@ cdef class CoolerInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") self._owner = None @@ -4705,7 +4693,7 @@ cdef class CoolerInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.CoolerInfo_v1 object at {hex(id(self))}>" @@ -4726,20 +4714,20 @@ cdef class CoolerInfo_v1: if not isinstance(other, CoolerInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlCoolerInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlCoolerInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlCoolerInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -4793,7 +4781,7 @@ cdef class CoolerInfo_v1: @staticmethod def from_buffer(buffer): """Create an CoolerInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) + return __from_buffer(buffer, sizeof(nvmlCoolerInfo_v1_t), CoolerInfo_v1) @staticmethod def from_data(data): @@ -4802,7 +4790,7 @@ cdef class CoolerInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `cooler_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) + return __from_data(data, "cooler_info_v1_dtype", cooler_info_v1_dtype, CoolerInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -4817,10 +4805,10 @@ cdef class CoolerInfo_v1: raise ValueError("ptr must not be null (0)") cdef CoolerInfo_v1 obj = CoolerInfo_v1.__new__(CoolerInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlCoolerInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlCoolerInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating CoolerInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlCoolerInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -4894,10 +4882,10 @@ cdef class ClkMonFaultInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def clk_api_domain(self): @@ -4975,8 +4963,8 @@ cdef class ClkMonFaultInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ClkMonFaultInfo obj = ClkMonFaultInfo.__new__(ClkMonFaultInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlClkMonFaultInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=clk_mon_fault_info_dtype) obj._data = data.view(_numpy.recarray) @@ -5015,7 +5003,7 @@ cdef class ClockOffset_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlClockOffset_v1_t)) + self._ptr = calloc(1, sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") self._owner = None @@ -5027,7 +5015,7 @@ cdef class ClockOffset_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ClockOffset_v1 object at {hex(id(self))}>" @@ -5048,20 +5036,20 @@ cdef class ClockOffset_v1: if not isinstance(other, ClockOffset_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClockOffset_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlClockOffset_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) + self._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClockOffset_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5137,7 +5125,7 @@ cdef class ClockOffset_v1: @staticmethod def from_buffer(buffer): """Create an ClockOffset_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) + return __from_buffer(buffer, sizeof(nvmlClockOffset_v1_t), ClockOffset_v1) @staticmethod def from_data(data): @@ -5146,7 +5134,7 @@ cdef class ClockOffset_v1: Args: data (_numpy.ndarray): a single-element array of dtype `clock_offset_v1_dtype` holding the data. """ - return _cyb_from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) + return __from_data(data, "clock_offset_v1_dtype", clock_offset_v1_dtype, ClockOffset_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5161,10 +5149,10 @@ cdef class ClockOffset_v1: raise ValueError("ptr must not be null (0)") cdef ClockOffset_v1 obj = ClockOffset_v1.__new__(ClockOffset_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlClockOffset_v1_t)) + obj._ptr = malloc(sizeof(nvmlClockOffset_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClockOffset_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlClockOffset_v1_t)) obj._owner = None obj._owned = True else: @@ -5242,10 +5230,10 @@ cdef class ProcessUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def pid(self): @@ -5367,8 +5355,8 @@ cdef class ProcessUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationSample obj = ProcessUtilizationSample.__new__(ProcessUtilizationSample) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -5445,10 +5433,10 @@ cdef class ProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -5592,8 +5580,8 @@ cdef class ProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ProcessUtilizationInfo_v1 obj = ProcessUtilizationInfo_v1.__new__(ProcessUtilizationInfo_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -5639,7 +5627,7 @@ cdef class EccSramErrorStatus_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = calloc(1, sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") self._owner = None @@ -5651,7 +5639,7 @@ cdef class EccSramErrorStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.EccSramErrorStatus_v1 object at {hex(id(self))}>" @@ -5672,20 +5660,20 @@ cdef class EccSramErrorStatus_v1: if not isinstance(other, EccSramErrorStatus_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramErrorStatus_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramErrorStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + self._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramErrorStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5838,7 +5826,7 @@ cdef class EccSramErrorStatus_v1: @staticmethod def from_buffer(buffer): """Create an EccSramErrorStatus_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) + return __from_buffer(buffer, sizeof(nvmlEccSramErrorStatus_v1_t), EccSramErrorStatus_v1) @staticmethod def from_data(data): @@ -5847,7 +5835,7 @@ cdef class EccSramErrorStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_error_status_v1_dtype` holding the data. """ - return _cyb_from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) + return __from_data(data, "ecc_sram_error_status_v1_dtype", ecc_sram_error_status_v1_dtype, EccSramErrorStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -5862,10 +5850,10 @@ cdef class EccSramErrorStatus_v1: raise ValueError("ptr must not be null (0)") cdef EccSramErrorStatus_v1 obj = EccSramErrorStatus_v1.__new__(EccSramErrorStatus_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) + obj._ptr = malloc(sizeof(nvmlEccSramErrorStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramErrorStatus_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlEccSramErrorStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -5909,7 +5897,7 @@ cdef class PlatformInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") self._owner = None @@ -5921,7 +5909,7 @@ cdef class PlatformInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v1 object at {hex(id(self))}>" @@ -5942,20 +5930,20 @@ cdef class PlatformInfo_v1: if not isinstance(other, PlatformInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -5976,7 +5964,7 @@ cdef class PlatformInfo_v1: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -5986,14 +5974,14 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def rack_guid(self): """~_numpy.uint8: (array of length 16).GUID of the rack containing this GPU (for Blackwell rackGuid is 13 bytes so indices 13-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].rackGuid)) return _numpy.asarray(arr) @@ -6003,9 +5991,9 @@ cdef class PlatformInfo_v1: raise ValueError("This PlatformInfo_v1 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field rack_guid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].rackGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_physical_slot_number(self): @@ -6065,7 +6053,7 @@ cdef class PlatformInfo_v1: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) + return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v1_t), PlatformInfo_v1) @staticmethod def from_data(data): @@ -6074,7 +6062,7 @@ cdef class PlatformInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) + return __from_data(data, "platform_info_v1_dtype", platform_info_v1_dtype, PlatformInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6089,10 +6077,10 @@ cdef class PlatformInfo_v1: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v1 obj = PlatformInfo_v1.__new__(PlatformInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlPlatformInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -6136,7 +6124,7 @@ cdef class PlatformInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") self._owner = None @@ -6148,7 +6136,7 @@ cdef class PlatformInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PlatformInfo_v2 object at {hex(id(self))}>" @@ -6169,20 +6157,20 @@ cdef class PlatformInfo_v2: if not isinstance(other, PlatformInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPlatformInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPlatformInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPlatformInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6203,7 +6191,7 @@ cdef class PlatformInfo_v2: @property def ib_guid(self): """~_numpy.uint8: (array of length 16).Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -6213,14 +6201,14 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field ib_guid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].ibGuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def chassis_serial_number(self): """~_numpy.uint8: (array of length 16).Serial number of the chassis containing this GPU (for Blackwell it is 13 bytes so indices 13-15 are zero).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].chassisSerialNumber)) return _numpy.asarray(arr) @@ -6230,9 +6218,9 @@ cdef class PlatformInfo_v2: raise ValueError("This PlatformInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field chassis_serial_number, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].chassisSerialNumber)), (arr.data), sizeof(unsigned char) * len(val)) @property def slot_number(self): @@ -6292,7 +6280,7 @@ cdef class PlatformInfo_v2: @staticmethod def from_buffer(buffer): """Create an PlatformInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) + return __from_buffer(buffer, sizeof(nvmlPlatformInfo_v2_t), PlatformInfo_v2) @staticmethod def from_data(data): @@ -6301,7 +6289,7 @@ cdef class PlatformInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `platform_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) + return __from_data(data, "platform_info_v2_dtype", platform_info_v2_dtype, PlatformInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6316,10 +6304,10 @@ cdef class PlatformInfo_v2: raise ValueError("ptr must not be null (0)") cdef PlatformInfo_v2 obj = PlatformInfo_v2.__new__(PlatformInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPlatformInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlPlatformInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PlatformInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPlatformInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -6359,7 +6347,7 @@ cdef class _py_anon_pod1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -6371,7 +6359,7 @@ cdef class _py_anon_pod1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -6392,20 +6380,20 @@ cdef class _py_anon_pod1: if not isinstance(other, _py_anon_pod1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod1)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod1), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -6459,7 +6447,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod1), _py_anon_pod1) @staticmethod def from_data(data): @@ -6468,7 +6456,7 @@ cdef class _py_anon_pod1: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod1_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) + return __from_data(data, "_py_anon_pod1_dtype", _py_anon_pod1_dtype, _py_anon_pod1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6483,10 +6471,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod1)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod1)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod1)) obj._owner = None obj._owned = True else: @@ -6528,7 +6516,7 @@ cdef class VgpuPlacementList_v2: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") self._owner = None @@ -6541,7 +6529,7 @@ cdef class VgpuPlacementList_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuPlacementList_v2 object at {hex(id(self))}>" @@ -6562,20 +6550,20 @@ cdef class VgpuPlacementList_v2: if not isinstance(other, VgpuPlacementList_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPlacementList_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPlacementList_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPlacementList_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6609,7 +6597,7 @@ cdef class VgpuPlacementList_v2: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].count,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -6617,7 +6605,7 @@ cdef class VgpuPlacementList_v2: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuPlacementList_v2 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].count = len(val) @@ -6637,7 +6625,7 @@ cdef class VgpuPlacementList_v2: @staticmethod def from_buffer(buffer): """Create an VgpuPlacementList_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuPlacementList_v2_t), VgpuPlacementList_v2) @staticmethod def from_data(data): @@ -6646,7 +6634,7 @@ cdef class VgpuPlacementList_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_placement_list_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) + return __from_data(data, "vgpu_placement_list_v2_dtype", vgpu_placement_list_v2_dtype, VgpuPlacementList_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6661,10 +6649,10 @@ cdef class VgpuPlacementList_v2: raise ValueError("ptr must not be null (0)") cdef VgpuPlacementList_v2 obj = VgpuPlacementList_v2.__new__(VgpuPlacementList_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPlacementList_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuPlacementList_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPlacementList_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPlacementList_v2_t)) obj._owner = None obj._owned = True else: @@ -6703,7 +6691,7 @@ cdef class VgpuTypeBar1Info_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") self._owner = None @@ -6715,7 +6703,7 @@ cdef class VgpuTypeBar1Info_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeBar1Info_v1 object at {hex(id(self))}>" @@ -6736,20 +6724,20 @@ cdef class VgpuTypeBar1Info_v1: if not isinstance(other, VgpuTypeBar1Info_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeBar1Info_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeBar1Info_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -6781,7 +6769,7 @@ cdef class VgpuTypeBar1Info_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeBar1Info_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuTypeBar1Info_v1_t), VgpuTypeBar1Info_v1) @staticmethod def from_data(data): @@ -6790,7 +6778,7 @@ cdef class VgpuTypeBar1Info_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_bar1info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) + return __from_data(data, "vgpu_type_bar1info_v1_dtype", vgpu_type_bar1info_v1_dtype, VgpuTypeBar1Info_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -6805,10 +6793,10 @@ cdef class VgpuTypeBar1Info_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeBar1Info_v1 obj = VgpuTypeBar1Info_v1.__new__(VgpuTypeBar1Info_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuTypeBar1Info_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeBar1Info_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeBar1Info_v1_t)) obj._owner = None obj._owned = True else: @@ -6890,10 +6878,10 @@ cdef class VgpuProcessUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def process_name(self): @@ -7057,8 +7045,8 @@ cdef class VgpuProcessUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuProcessUtilizationInfo_v1 obj = VgpuProcessUtilizationInfo_v1.__new__(VgpuProcessUtilizationInfo_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuProcessUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_process_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -7093,7 +7081,7 @@ cdef class _py_anon_pod2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7105,7 +7093,7 @@ cdef class _py_anon_pod2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -7126,20 +7114,20 @@ cdef class _py_anon_pod2: if not isinstance(other, _py_anon_pod2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod2)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod2), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7171,7 +7159,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod2), _py_anon_pod2) @staticmethod def from_data(data): @@ -7180,7 +7168,7 @@ cdef class _py_anon_pod2: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod2_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) + return __from_data(data, "_py_anon_pod2_dtype", _py_anon_pod2_dtype, _py_anon_pod2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7195,10 +7183,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod2)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod2)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod2)) obj._owner = None obj._owned = True else: @@ -7235,7 +7223,7 @@ cdef class _py_anon_pod3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7247,7 +7235,7 @@ cdef class _py_anon_pod3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -7268,20 +7256,20 @@ cdef class _py_anon_pod3: if not isinstance(other, _py_anon_pod3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod3)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod3), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7302,7 +7290,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod3), _py_anon_pod3) @staticmethod def from_data(data): @@ -7311,7 +7299,7 @@ cdef class _py_anon_pod3: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod3_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) + return __from_data(data, "_py_anon_pod3_dtype", _py_anon_pod3_dtype, _py_anon_pod3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7326,10 +7314,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod3)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod3)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod3)) obj._owner = None obj._owned = True else: @@ -7407,10 +7395,10 @@ cdef class VgpuSchedulerLogEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -7532,8 +7520,8 @@ cdef class VgpuSchedulerLogEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry obj = VgpuSchedulerLogEntry.__new__(VgpuSchedulerLogEntry) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -7568,7 +7556,7 @@ cdef class _py_anon_pod4: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7580,7 +7568,7 @@ cdef class _py_anon_pod4: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod4 object at {hex(id(self))}>" @@ -7601,20 +7589,20 @@ cdef class _py_anon_pod4: if not isinstance(other, _py_anon_pod4): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod4)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod4), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7646,7 +7634,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod4), _py_anon_pod4) @staticmethod def from_data(data): @@ -7655,7 +7643,7 @@ cdef class _py_anon_pod4: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod4_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) + return __from_data(data, "_py_anon_pod4_dtype", _py_anon_pod4_dtype, _py_anon_pod4) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7670,10 +7658,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod4)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod4)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod4") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod4)) obj._owner = None obj._owned = True else: @@ -7710,7 +7698,7 @@ cdef class _py_anon_pod5: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__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 @@ -7722,7 +7710,7 @@ cdef class _py_anon_pod5: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod5 object at {hex(id(self))}>" @@ -7743,20 +7731,20 @@ cdef class _py_anon_pod5: if not isinstance(other, _py_anon_pod5): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod5)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod5), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + self._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__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 @@ -7777,7 +7765,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 _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) + return __from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod5), _py_anon_pod5) @staticmethod def from_data(data): @@ -7786,7 +7774,7 @@ cdef class _py_anon_pod5: Args: data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod5_dtype` holding the data. """ - return _cyb_from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) + return __from_data(data, "_py_anon_pod5_dtype", _py_anon_pod5_dtype, _py_anon_pod5) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -7801,10 +7789,10 @@ 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 = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod5)) + obj._ptr = malloc(sizeof(cuda_bindings_nvml__anon_pod5)) if obj._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod5") - _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) + memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod5)) obj._owner = None obj._owned = True else: @@ -7848,7 +7836,7 @@ cdef class VgpuSchedulerCapabilities: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") self._owner = None @@ -7860,7 +7848,7 @@ cdef class VgpuSchedulerCapabilities: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerCapabilities object at {hex(id(self))}>" @@ -7881,20 +7869,20 @@ cdef class VgpuSchedulerCapabilities: if not isinstance(other, VgpuSchedulerCapabilities): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerCapabilities_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerCapabilities_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerCapabilities_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -7904,7 +7892,7 @@ cdef class VgpuSchedulerCapabilities: @property def supported_schedulers(self): """~_numpy.uint32: (array of length 3).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].supportedSchedulers)) return _numpy.asarray(arr) @@ -7914,9 +7902,9 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("This VgpuSchedulerCapabilities instance is read-only") if len(val) != 3: raise ValueError(f"Expected length { 3 } for field supported_schedulers, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(3,), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) - _cyb_memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) + memcpy((&(self._ptr[0].supportedSchedulers)), (arr.data), sizeof(unsigned int) * len(val)) @property def max_timeslice(self): @@ -7998,7 +7986,7 @@ cdef class VgpuSchedulerCapabilities: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerCapabilities instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerCapabilities_t), VgpuSchedulerCapabilities) @staticmethod def from_data(data): @@ -8007,7 +7995,7 @@ cdef class VgpuSchedulerCapabilities: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_capabilities_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) + return __from_data(data, "vgpu_scheduler_capabilities_dtype", vgpu_scheduler_capabilities_dtype, VgpuSchedulerCapabilities) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8022,10 +8010,10 @@ cdef class VgpuSchedulerCapabilities: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerCapabilities obj = VgpuSchedulerCapabilities.__new__(VgpuSchedulerCapabilities) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerCapabilities_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerCapabilities") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerCapabilities_t)) obj._owner = None obj._owned = True else: @@ -8068,7 +8056,7 @@ cdef class VgpuLicenseExpiry: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") self._owner = None @@ -8080,7 +8068,7 @@ cdef class VgpuLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseExpiry object at {hex(id(self))}>" @@ -8101,20 +8089,20 @@ cdef class VgpuLicenseExpiry: if not isinstance(other, VgpuLicenseExpiry): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseExpiry_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + self._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8201,7 +8189,7 @@ cdef class VgpuLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseExpiry instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) + return __from_buffer(buffer, sizeof(nvmlVgpuLicenseExpiry_t), VgpuLicenseExpiry) @staticmethod def from_data(data): @@ -8210,7 +8198,7 @@ cdef class VgpuLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_expiry_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) + return __from_data(data, "vgpu_license_expiry_dtype", vgpu_license_expiry_dtype, VgpuLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8225,10 +8213,10 @@ cdef class VgpuLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseExpiry obj = VgpuLicenseExpiry.__new__(VgpuLicenseExpiry) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseExpiry_t)) + obj._ptr = malloc(sizeof(nvmlVgpuLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseExpiry") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8271,7 +8259,7 @@ cdef class GridLicenseExpiry: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = calloc(1, sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") self._owner = None @@ -8283,7 +8271,7 @@ cdef class GridLicenseExpiry: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GridLicenseExpiry object at {hex(id(self))}>" @@ -8304,20 +8292,20 @@ cdef class GridLicenseExpiry: if not isinstance(other, GridLicenseExpiry): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicenseExpiry_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicenseExpiry_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) + self._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicenseExpiry_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8404,7 +8392,7 @@ cdef class GridLicenseExpiry: @staticmethod def from_buffer(buffer): """Create an GridLicenseExpiry instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) + return __from_buffer(buffer, sizeof(nvmlGridLicenseExpiry_t), GridLicenseExpiry) @staticmethod def from_data(data): @@ -8413,7 +8401,7 @@ cdef class GridLicenseExpiry: Args: data (_numpy.ndarray): a single-element array of dtype `grid_license_expiry_dtype` holding the data. """ - return _cyb_from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) + return __from_data(data, "grid_license_expiry_dtype", grid_license_expiry_dtype, GridLicenseExpiry) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8428,10 +8416,10 @@ cdef class GridLicenseExpiry: raise ValueError("ptr must not be null (0)") cdef GridLicenseExpiry obj = GridLicenseExpiry.__new__(GridLicenseExpiry) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGridLicenseExpiry_t)) + obj._ptr = malloc(sizeof(nvmlGridLicenseExpiry_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicenseExpiry") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGridLicenseExpiry_t)) obj._owner = None obj._owned = True else: @@ -8471,7 +8459,7 @@ cdef class VgpuTypeIdInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") self._owner = None @@ -8484,7 +8472,7 @@ cdef class VgpuTypeIdInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuTypeIdInfo_v1 object at {hex(id(self))}>" @@ -8505,20 +8493,20 @@ cdef class VgpuTypeIdInfo_v1: if not isinstance(other, VgpuTypeIdInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuTypeIdInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuTypeIdInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8541,7 +8529,7 @@ cdef class VgpuTypeIdInfo_v1: """int: OUT: List of vGPU type IDs.""" if self._ptr[0].vgpuTypeIds == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuTypeIds) return _numpy.asarray(arr) @@ -8549,7 +8537,7 @@ cdef class VgpuTypeIdInfo_v1: def vgpu_type_ids(self, val): if self._readonly: raise ValueError("This VgpuTypeIdInfo_v1 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuTypeIds = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8558,7 +8546,7 @@ cdef class VgpuTypeIdInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuTypeIdInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuTypeIdInfo_v1_t), VgpuTypeIdInfo_v1) @staticmethod def from_data(data): @@ -8567,7 +8555,7 @@ cdef class VgpuTypeIdInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_type_id_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) + return __from_data(data, "vgpu_type_id_info_v1_dtype", vgpu_type_id_info_v1_dtype, VgpuTypeIdInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8582,10 +8570,10 @@ cdef class VgpuTypeIdInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuTypeIdInfo_v1 obj = VgpuTypeIdInfo_v1.__new__(VgpuTypeIdInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuTypeIdInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuTypeIdInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuTypeIdInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8626,7 +8614,7 @@ cdef class ActiveVgpuInstanceInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") self._owner = None @@ -8639,7 +8627,7 @@ cdef class ActiveVgpuInstanceInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ActiveVgpuInstanceInfo_v1 object at {hex(id(self))}>" @@ -8660,20 +8648,20 @@ cdef class ActiveVgpuInstanceInfo_v1: if not isinstance(other, ActiveVgpuInstanceInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8696,7 +8684,7 @@ cdef class ActiveVgpuInstanceInfo_v1: """int: IN/OUT: list of active vGPU instances.""" if self._ptr[0].vgpuInstances == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].vgpuCount,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].vgpuInstances) return _numpy.asarray(arr) @@ -8704,7 +8692,7 @@ cdef class ActiveVgpuInstanceInfo_v1: def vgpu_instances(self, val): if self._readonly: raise ValueError("This ActiveVgpuInstanceInfo_v1 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].vgpuInstances = (arr.data) self._ptr[0].vgpuCount = len(val) @@ -8713,7 +8701,7 @@ cdef class ActiveVgpuInstanceInfo_v1: @staticmethod def from_buffer(buffer): """Create an ActiveVgpuInstanceInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) + return __from_buffer(buffer, sizeof(nvmlActiveVgpuInstanceInfo_v1_t), ActiveVgpuInstanceInfo_v1) @staticmethod def from_data(data): @@ -8722,7 +8710,7 @@ cdef class ActiveVgpuInstanceInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `active_vgpu_instance_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) + return __from_data(data, "active_vgpu_instance_info_v1_dtype", active_vgpu_instance_info_v1_dtype, ActiveVgpuInstanceInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8737,10 +8725,10 @@ cdef class ActiveVgpuInstanceInfo_v1: raise ValueError("ptr must not be null (0)") cdef ActiveVgpuInstanceInfo_v1 obj = ActiveVgpuInstanceInfo_v1.__new__(ActiveVgpuInstanceInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ActiveVgpuInstanceInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlActiveVgpuInstanceInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8783,7 +8771,7 @@ cdef class VgpuCreatablePlacementInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") self._owner = None @@ -8796,7 +8784,7 @@ cdef class VgpuCreatablePlacementInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuCreatablePlacementInfo_v1 object at {hex(id(self))}>" @@ -8817,20 +8805,20 @@ cdef class VgpuCreatablePlacementInfo_v1: if not isinstance(other, VgpuCreatablePlacementInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -8875,7 +8863,7 @@ cdef class VgpuCreatablePlacementInfo_v1: """int: IN/OUT: Placement IDs for the vGPU type.""" if self._ptr[0].placementIds == NULL: return [] - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].placementSize,), itemsize=sizeof(unsigned int), format="I", mode="c", allocate_buffer=False) arr.data = (self._ptr[0].placementIds) return _numpy.asarray(arr) @@ -8883,7 +8871,7 @@ cdef class VgpuCreatablePlacementInfo_v1: def placement_ids(self, val): if self._readonly: raise ValueError("This VgpuCreatablePlacementInfo_v1 instance is read-only") - cdef _cyb_view.array arr = _cyb_view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") + cdef view.array arr = view.array(shape=(len(val),), itemsize=sizeof(unsigned int), format="I", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint32) self._ptr[0].placementIds = (arr.data) self._ptr[0].placementSize = len(val) @@ -8892,7 +8880,7 @@ cdef class VgpuCreatablePlacementInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuCreatablePlacementInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t), VgpuCreatablePlacementInfo_v1) @staticmethod def from_data(data): @@ -8901,7 +8889,7 @@ cdef class VgpuCreatablePlacementInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_creatable_placement_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) + return __from_data(data, "vgpu_creatable_placement_info_v1_dtype", vgpu_creatable_placement_info_v1_dtype, VgpuCreatablePlacementInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -8916,10 +8904,10 @@ cdef class VgpuCreatablePlacementInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuCreatablePlacementInfo_v1 obj = VgpuCreatablePlacementInfo_v1.__new__(VgpuCreatablePlacementInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuCreatablePlacementInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuCreatablePlacementInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -8994,10 +8982,10 @@ cdef class HwbcEntry: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def hwbc_id(self): @@ -9073,8 +9061,8 @@ cdef class HwbcEntry: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef HwbcEntry obj = HwbcEntry.__new__(HwbcEntry) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlHwbcEntry_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=hwbc_entry_dtype) obj._data = data.view(_numpy.recarray) @@ -9109,7 +9097,7 @@ cdef class LedState: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlLedState_t)) + self._ptr = calloc(1, sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") self._owner = None @@ -9121,7 +9109,7 @@ cdef class LedState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.LedState object at {hex(id(self))}>" @@ -9142,20 +9130,20 @@ cdef class LedState: if not isinstance(other, LedState): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlLedState_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlLedState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) + self._ptr = malloc(sizeof(nvmlLedState_t)) if self._ptr == NULL: raise MemoryError("Error allocating LedState") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlLedState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9165,7 +9153,7 @@ cdef class LedState: @property def cause(self): """~_numpy.int8: (array of length 256).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].cause) + return cpython.PyUnicode_FromString(self._ptr[0].cause) @cause.setter def cause(self, val): @@ -9175,7 +9163,7 @@ cdef class LedState: if len(buf) >= 256: raise ValueError("String too long for field cause, max length is 255") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].cause), ptr, 256) + memcpy((self._ptr[0].cause), ptr, 256) @property def color(self): @@ -9191,7 +9179,7 @@ cdef class LedState: @staticmethod def from_buffer(buffer): """Create an LedState instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlLedState_t), LedState) + return __from_buffer(buffer, sizeof(nvmlLedState_t), LedState) @staticmethod def from_data(data): @@ -9200,7 +9188,7 @@ cdef class LedState: Args: data (_numpy.ndarray): a single-element array of dtype `led_state_dtype` holding the data. """ - return _cyb_from_data(data, "led_state_dtype", led_state_dtype, LedState) + return __from_data(data, "led_state_dtype", led_state_dtype, LedState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9215,10 +9203,10 @@ cdef class LedState: raise ValueError("ptr must not be null (0)") cdef LedState obj = LedState.__new__(LedState) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlLedState_t)) + obj._ptr = malloc(sizeof(nvmlLedState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating LedState") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlLedState_t)) obj._owner = None obj._owned = True else: @@ -9258,7 +9246,7 @@ cdef class UnitInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlUnitInfo_t)) + self._ptr = calloc(1, sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") self._owner = None @@ -9270,7 +9258,7 @@ cdef class UnitInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.UnitInfo object at {hex(id(self))}>" @@ -9291,20 +9279,20 @@ cdef class UnitInfo: if not isinstance(other, UnitInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) + self._ptr = malloc(sizeof(nvmlUnitInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9314,7 +9302,7 @@ cdef class UnitInfo: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -9324,12 +9312,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @property def id(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].id) + return cpython.PyUnicode_FromString(self._ptr[0].id) @id.setter def id(self, val): @@ -9339,12 +9327,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field id, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].id), ptr, 96) + memcpy((self._ptr[0].id), ptr, 96) @property def serial(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].serial) + return cpython.PyUnicode_FromString(self._ptr[0].serial) @serial.setter def serial(self, val): @@ -9354,12 +9342,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field serial, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].serial), ptr, 96) + memcpy((self._ptr[0].serial), ptr, 96) @property def firmware_version(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) + return cpython.PyUnicode_FromString(self._ptr[0].firmwareVersion) @firmware_version.setter def firmware_version(self, val): @@ -9369,12 +9357,12 @@ cdef class UnitInfo: if len(buf) >= 96: raise ValueError("String too long for field firmware_version, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].firmwareVersion), ptr, 96) + memcpy((self._ptr[0].firmwareVersion), ptr, 96) @staticmethod def from_buffer(buffer): """Create an UnitInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) + return __from_buffer(buffer, sizeof(nvmlUnitInfo_t), UnitInfo) @staticmethod def from_data(data): @@ -9383,7 +9371,7 @@ cdef class UnitInfo: Args: data (_numpy.ndarray): a single-element array of dtype `unit_info_dtype` holding the data. """ - return _cyb_from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) + return __from_data(data, "unit_info_dtype", unit_info_dtype, UnitInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9398,10 +9386,10 @@ cdef class UnitInfo: raise ValueError("ptr must not be null (0)") cdef UnitInfo obj = UnitInfo.__new__(UnitInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlUnitInfo_t)) + obj._ptr = malloc(sizeof(nvmlUnitInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlUnitInfo_t)) obj._owner = None obj._owned = True else: @@ -9441,7 +9429,7 @@ cdef class PSUInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPSUInfo_t)) + self._ptr = calloc(1, sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") self._owner = None @@ -9453,7 +9441,7 @@ cdef class PSUInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PSUInfo object at {hex(id(self))}>" @@ -9474,20 +9462,20 @@ cdef class PSUInfo: if not isinstance(other, PSUInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPSUInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPSUInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) + self._ptr = malloc(sizeof(nvmlPSUInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPSUInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9497,7 +9485,7 @@ cdef class PSUInfo: @property def state(self): """~_numpy.int8: (array of length 256).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].state) + return cpython.PyUnicode_FromString(self._ptr[0].state) @state.setter def state(self, val): @@ -9507,7 +9495,7 @@ cdef class PSUInfo: if len(buf) >= 256: raise ValueError("String too long for field state, max length is 255") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].state), ptr, 256) + memcpy((self._ptr[0].state), ptr, 256) @property def current(self): @@ -9545,7 +9533,7 @@ cdef class PSUInfo: @staticmethod def from_buffer(buffer): """Create an PSUInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) + return __from_buffer(buffer, sizeof(nvmlPSUInfo_t), PSUInfo) @staticmethod def from_data(data): @@ -9554,7 +9542,7 @@ cdef class PSUInfo: Args: data (_numpy.ndarray): a single-element array of dtype `psu_info_dtype` holding the data. """ - return _cyb_from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) + return __from_data(data, "psu_info_dtype", psu_info_dtype, PSUInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9569,10 +9557,10 @@ cdef class PSUInfo: raise ValueError("ptr must not be null (0)") cdef PSUInfo obj = PSUInfo.__new__(PSUInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPSUInfo_t)) + obj._ptr = malloc(sizeof(nvmlPSUInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PSUInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPSUInfo_t)) obj._owner = None obj._owned = True else: @@ -9646,10 +9634,10 @@ cdef class UnitFanInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def speed(self): @@ -9727,8 +9715,8 @@ cdef class UnitFanInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef UnitFanInfo obj = UnitFanInfo.__new__(UnitFanInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlUnitFanInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=unit_fan_info_dtype) obj._data = data.view(_numpy.recarray) @@ -9766,7 +9754,7 @@ cdef class EventData: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlEventData_t)) + self._ptr = calloc(1, sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") self._owner = None @@ -9778,7 +9766,7 @@ cdef class EventData: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.EventData object at {hex(id(self))}>" @@ -9799,20 +9787,20 @@ cdef class EventData: if not isinstance(other, EventData): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventData_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlEventData_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) + self._ptr = malloc(sizeof(nvmlEventData_t)) if self._ptr == NULL: raise MemoryError("Error allocating EventData") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventData_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -9877,7 +9865,7 @@ cdef class EventData: @staticmethod def from_buffer(buffer): """Create an EventData instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlEventData_t), EventData) + return __from_buffer(buffer, sizeof(nvmlEventData_t), EventData) @staticmethod def from_data(data): @@ -9886,7 +9874,7 @@ cdef class EventData: Args: data (_numpy.ndarray): a single-element array of dtype `event_data_dtype` holding the data. """ - return _cyb_from_data(data, "event_data_dtype", event_data_dtype, EventData) + return __from_data(data, "event_data_dtype", event_data_dtype, EventData) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -9901,10 +9889,10 @@ cdef class EventData: raise ValueError("ptr must not be null (0)") cdef EventData obj = EventData.__new__(EventData) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlEventData_t)) + obj._ptr = malloc(sizeof(nvmlEventData_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EventData") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlEventData_t)) obj._owner = None obj._owned = True else: @@ -9978,10 +9966,10 @@ cdef class SystemEventData_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def event_type(self): @@ -10059,8 +10047,8 @@ cdef class SystemEventData_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef SystemEventData_v1 obj = SystemEventData_v1.__new__(SystemEventData_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSystemEventData_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=system_event_data_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -10100,7 +10088,7 @@ cdef class AccountingStats: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlAccountingStats_t)) + self._ptr = calloc(1, sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") self._owner = None @@ -10112,7 +10100,7 @@ cdef class AccountingStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.AccountingStats object at {hex(id(self))}>" @@ -10133,20 +10121,20 @@ cdef class AccountingStats: if not isinstance(other, AccountingStats): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlAccountingStats_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlAccountingStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) + self._ptr = malloc(sizeof(nvmlAccountingStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAccountingStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10222,7 +10210,7 @@ cdef class AccountingStats: @staticmethod def from_buffer(buffer): """Create an AccountingStats instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) + return __from_buffer(buffer, sizeof(nvmlAccountingStats_t), AccountingStats) @staticmethod def from_data(data): @@ -10231,7 +10219,7 @@ cdef class AccountingStats: Args: data (_numpy.ndarray): a single-element array of dtype `accounting_stats_dtype` holding the data. """ - return _cyb_from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) + return __from_data(data, "accounting_stats_dtype", accounting_stats_dtype, AccountingStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10246,10 +10234,10 @@ cdef class AccountingStats: raise ValueError("ptr must not be null (0)") cdef AccountingStats obj = AccountingStats.__new__(AccountingStats) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlAccountingStats_t)) + obj._ptr = malloc(sizeof(nvmlAccountingStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating AccountingStats") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlAccountingStats_t)) obj._owner = None obj._owned = True else: @@ -10329,10 +10317,10 @@ cdef class EncoderSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10476,8 +10464,8 @@ cdef class EncoderSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EncoderSessionInfo obj = EncoderSessionInfo.__new__(EncoderSessionInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEncoderSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=encoder_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10513,7 +10501,7 @@ cdef class FBCStats: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlFBCStats_t)) + self._ptr = calloc(1, sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") self._owner = None @@ -10525,7 +10513,7 @@ cdef class FBCStats: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.FBCStats object at {hex(id(self))}>" @@ -10546,20 +10534,20 @@ cdef class FBCStats: if not isinstance(other, FBCStats): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlFBCStats_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlFBCStats_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) + self._ptr = malloc(sizeof(nvmlFBCStats_t)) if self._ptr == NULL: raise MemoryError("Error allocating FBCStats") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlFBCStats_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -10602,7 +10590,7 @@ cdef class FBCStats: @staticmethod def from_buffer(buffer): """Create an FBCStats instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) + return __from_buffer(buffer, sizeof(nvmlFBCStats_t), FBCStats) @staticmethod def from_data(data): @@ -10611,7 +10599,7 @@ cdef class FBCStats: Args: data (_numpy.ndarray): a single-element array of dtype `fbc_stats_dtype` holding the data. """ - return _cyb_from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) + return __from_data(data, "fbc_stats_dtype", fbc_stats_dtype, FBCStats) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -10626,10 +10614,10 @@ cdef class FBCStats: raise ValueError("ptr must not be null (0)") cdef FBCStats obj = FBCStats.__new__(FBCStats) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlFBCStats_t)) + obj._ptr = malloc(sizeof(nvmlFBCStats_t)) if obj._ptr == NULL: raise MemoryError("Error allocating FBCStats") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlFBCStats_t)) obj._owner = None obj._owned = True else: @@ -10713,10 +10701,10 @@ cdef class FBCSessionInfo: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def session_id(self): @@ -10904,8 +10892,8 @@ cdef class FBCSessionInfo: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FBCSessionInfo obj = FBCSessionInfo.__new__(FBCSessionInfo) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFBCSessionInfo_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=fbc_session_info_dtype) obj._data = data.view(_numpy.recarray) @@ -10940,7 +10928,7 @@ cdef class ConfComputeSystemCaps: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") self._owner = None @@ -10952,7 +10940,7 @@ cdef class ConfComputeSystemCaps: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemCaps object at {hex(id(self))}>" @@ -10973,20 +10961,20 @@ cdef class ConfComputeSystemCaps: if not isinstance(other, ConfComputeSystemCaps): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemCaps_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemCaps_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) + self._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemCaps_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11018,7 +11006,7 @@ cdef class ConfComputeSystemCaps: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemCaps instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) + return __from_buffer(buffer, sizeof(nvmlConfComputeSystemCaps_t), ConfComputeSystemCaps) @staticmethod def from_data(data): @@ -11027,7 +11015,7 @@ cdef class ConfComputeSystemCaps: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_caps_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) + return __from_data(data, "conf_compute_system_caps_dtype", conf_compute_system_caps_dtype, ConfComputeSystemCaps) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11042,10 +11030,10 @@ cdef class ConfComputeSystemCaps: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemCaps obj = ConfComputeSystemCaps.__new__(ConfComputeSystemCaps) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemCaps_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeSystemCaps_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemCaps") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemCaps_t)) obj._owner = None obj._owned = True else: @@ -11084,7 +11072,7 @@ cdef class ConfComputeSystemState: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeSystemState_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") self._owner = None @@ -11096,7 +11084,7 @@ cdef class ConfComputeSystemState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeSystemState object at {hex(id(self))}>" @@ -11117,20 +11105,20 @@ cdef class ConfComputeSystemState: if not isinstance(other, ConfComputeSystemState): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeSystemState_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeSystemState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) + self._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeSystemState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11173,7 +11161,7 @@ cdef class ConfComputeSystemState: @staticmethod def from_buffer(buffer): """Create an ConfComputeSystemState instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) + return __from_buffer(buffer, sizeof(nvmlConfComputeSystemState_t), ConfComputeSystemState) @staticmethod def from_data(data): @@ -11182,7 +11170,7 @@ cdef class ConfComputeSystemState: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_system_state_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) + return __from_data(data, "conf_compute_system_state_dtype", conf_compute_system_state_dtype, ConfComputeSystemState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11197,10 +11185,10 @@ cdef class ConfComputeSystemState: raise ValueError("ptr must not be null (0)") cdef ConfComputeSystemState obj = ConfComputeSystemState.__new__(ConfComputeSystemState) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeSystemState_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeSystemState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeSystemState") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeSystemState_t)) obj._owner = None obj._owned = True else: @@ -11241,7 +11229,7 @@ cdef class SystemConfComputeSettings_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = calloc(1, sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") self._owner = None @@ -11253,7 +11241,7 @@ cdef class SystemConfComputeSettings_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.SystemConfComputeSettings_v1 object at {hex(id(self))}>" @@ -11274,20 +11262,20 @@ cdef class SystemConfComputeSettings_v1: if not isinstance(other, SystemConfComputeSettings_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlSystemConfComputeSettings_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlSystemConfComputeSettings_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + self._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSystemConfComputeSettings_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11352,7 +11340,7 @@ cdef class SystemConfComputeSettings_v1: @staticmethod def from_buffer(buffer): """Create an SystemConfComputeSettings_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) + return __from_buffer(buffer, sizeof(nvmlSystemConfComputeSettings_v1_t), SystemConfComputeSettings_v1) @staticmethod def from_data(data): @@ -11361,7 +11349,7 @@ cdef class SystemConfComputeSettings_v1: Args: data (_numpy.ndarray): a single-element array of dtype `system_conf_compute_settings_v1_dtype` holding the data. """ - return _cyb_from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) + return __from_data(data, "system_conf_compute_settings_v1_dtype", system_conf_compute_settings_v1_dtype, SystemConfComputeSettings_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11376,10 +11364,10 @@ cdef class SystemConfComputeSettings_v1: raise ValueError("ptr must not be null (0)") cdef SystemConfComputeSettings_v1 obj = SystemConfComputeSettings_v1.__new__(SystemConfComputeSettings_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) + obj._ptr = malloc(sizeof(nvmlSystemConfComputeSettings_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating SystemConfComputeSettings_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlSystemConfComputeSettings_v1_t)) obj._owner = None obj._owned = True else: @@ -11417,7 +11405,7 @@ cdef class ConfComputeMemSizeInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") self._owner = None @@ -11429,7 +11417,7 @@ cdef class ConfComputeMemSizeInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeMemSizeInfo object at {hex(id(self))}>" @@ -11450,20 +11438,20 @@ cdef class ConfComputeMemSizeInfo: if not isinstance(other, ConfComputeMemSizeInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeMemSizeInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeMemSizeInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + self._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeMemSizeInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11495,7 +11483,7 @@ cdef class ConfComputeMemSizeInfo: @staticmethod def from_buffer(buffer): """Create an ConfComputeMemSizeInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) + return __from_buffer(buffer, sizeof(nvmlConfComputeMemSizeInfo_t), ConfComputeMemSizeInfo) @staticmethod def from_data(data): @@ -11504,7 +11492,7 @@ cdef class ConfComputeMemSizeInfo: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_mem_size_info_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) + return __from_data(data, "conf_compute_mem_size_info_dtype", conf_compute_mem_size_info_dtype, ConfComputeMemSizeInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11519,10 +11507,10 @@ cdef class ConfComputeMemSizeInfo: raise ValueError("ptr must not be null (0)") cdef ConfComputeMemSizeInfo obj = ConfComputeMemSizeInfo.__new__(ConfComputeMemSizeInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeMemSizeInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeMemSizeInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeMemSizeInfo_t)) obj._owner = None obj._owned = True else: @@ -11562,7 +11550,7 @@ cdef class ConfComputeGpuCertificate: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") self._owner = None @@ -11574,7 +11562,7 @@ cdef class ConfComputeGpuCertificate: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuCertificate object at {hex(id(self))}>" @@ -11595,20 +11583,20 @@ cdef class ConfComputeGpuCertificate: if not isinstance(other, ConfComputeGpuCertificate): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuCertificate_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuCertificate_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + self._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuCertificate_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11620,7 +11608,7 @@ cdef class ConfComputeGpuCertificate: """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].certChainSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].certChain)) return _numpy.asarray(arr) @@ -11633,16 +11621,16 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].certChainSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].certChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].certChain)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_cert_chain(self): """~_numpy.uint8: (array of length 5120).""" if self._ptr[0].attestationCertChainSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationCertChain)) return _numpy.asarray(arr) @@ -11655,14 +11643,14 @@ cdef class ConfComputeGpuCertificate: self._ptr[0].attestationCertChainSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].attestationCertChainSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].attestationCertChain)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuCertificate instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) + return __from_buffer(buffer, sizeof(nvmlConfComputeGpuCertificate_t), ConfComputeGpuCertificate) @staticmethod def from_data(data): @@ -11671,7 +11659,7 @@ cdef class ConfComputeGpuCertificate: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_certificate_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) + return __from_data(data, "conf_compute_gpu_certificate_dtype", conf_compute_gpu_certificate_dtype, ConfComputeGpuCertificate) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11686,10 +11674,10 @@ cdef class ConfComputeGpuCertificate: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuCertificate obj = ConfComputeGpuCertificate.__new__(ConfComputeGpuCertificate) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuCertificate_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeGpuCertificate_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuCertificate") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuCertificate_t)) obj._owner = None obj._owned = True else: @@ -11731,7 +11719,7 @@ cdef class ConfComputeGpuAttestationReport: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = calloc(1, sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") self._owner = None @@ -11743,7 +11731,7 @@ cdef class ConfComputeGpuAttestationReport: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ConfComputeGpuAttestationReport object at {hex(id(self))}>" @@ -11764,20 +11752,20 @@ cdef class ConfComputeGpuAttestationReport: if not isinstance(other, ConfComputeGpuAttestationReport): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlConfComputeGpuAttestationReport_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlConfComputeGpuAttestationReport_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + self._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if self._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlConfComputeGpuAttestationReport_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11798,7 +11786,7 @@ cdef class ConfComputeGpuAttestationReport: @property def nonce(self): """~_numpy.uint8: (array of length 32).""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].nonce)) return _numpy.asarray(arr) @@ -11808,16 +11796,16 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("This ConfComputeGpuAttestationReport instance is read-only") if len(val) != 32: raise ValueError(f"Expected length { 32 } for field nonce, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].nonce)), (arr.data), sizeof(unsigned char) * len(val)) @property def attestation_report(self): """~_numpy.uint8: (array of length 8192).""" if self._ptr[0].attestationReportSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].attestationReport)) return _numpy.asarray(arr) @@ -11830,16 +11818,16 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].attestationReportSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].attestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].attestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @property def cec_attestation_report(self): """~_numpy.uint8: (array of length 4096).""" if self._ptr[0].cecAttestationReportSize == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].cecAttestationReport)) return _numpy.asarray(arr) @@ -11852,14 +11840,14 @@ cdef class ConfComputeGpuAttestationReport: self._ptr[0].cecAttestationReportSize = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].cecAttestationReportSize,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].cecAttestationReport)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an ConfComputeGpuAttestationReport instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) + return __from_buffer(buffer, sizeof(nvmlConfComputeGpuAttestationReport_t), ConfComputeGpuAttestationReport) @staticmethod def from_data(data): @@ -11868,7 +11856,7 @@ cdef class ConfComputeGpuAttestationReport: Args: data (_numpy.ndarray): a single-element array of dtype `conf_compute_gpu_attestation_report_dtype` holding the data. """ - return _cyb_from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) + return __from_data(data, "conf_compute_gpu_attestation_report_dtype", conf_compute_gpu_attestation_report_dtype, ConfComputeGpuAttestationReport) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -11883,10 +11871,10 @@ cdef class ConfComputeGpuAttestationReport: raise ValueError("ptr must not be null (0)") cdef ConfComputeGpuAttestationReport obj = ConfComputeGpuAttestationReport.__new__(ConfComputeGpuAttestationReport) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) + obj._ptr = malloc(sizeof(nvmlConfComputeGpuAttestationReport_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ConfComputeGpuAttestationReport") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlConfComputeGpuAttestationReport_t)) obj._owner = None obj._owned = True else: @@ -11928,7 +11916,7 @@ cdef class GpuFabricInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") self._owner = None @@ -11940,7 +11928,7 @@ cdef class GpuFabricInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v2 object at {hex(id(self))}>" @@ -11961,20 +11949,20 @@ cdef class GpuFabricInfo_v2: if not isinstance(other, GpuFabricInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -11995,7 +11983,7 @@ cdef class GpuFabricInfo_v2: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -12005,9 +11993,9 @@ cdef class GpuFabricInfo_v2: raise ValueError("This GpuFabricInfo_v2 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -12056,7 +12044,7 @@ cdef class GpuFabricInfo_v2: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) + return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v2_t), GpuFabricInfo_v2) @staticmethod def from_data(data): @@ -12065,7 +12053,7 @@ cdef class GpuFabricInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) + return __from_data(data, "gpu_fabric_info_v2_dtype", gpu_fabric_info_v2_dtype, GpuFabricInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12080,10 +12068,10 @@ cdef class GpuFabricInfo_v2: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v2 obj = GpuFabricInfo_v2.__new__(GpuFabricInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -12122,7 +12110,7 @@ cdef class NvlinkSupportedBwModes_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") self._owner = None @@ -12134,7 +12122,7 @@ cdef class NvlinkSupportedBwModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSupportedBwModes_v1 object at {hex(id(self))}>" @@ -12155,20 +12143,20 @@ cdef class NvlinkSupportedBwModes_v1: if not isinstance(other, NvlinkSupportedBwModes_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSupportedBwModes_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + self._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12191,7 +12179,7 @@ cdef class NvlinkSupportedBwModes_v1: """~_numpy.uint8: (array of length 23).""" if self._ptr[0].totalBwModes == 0: return _numpy.array([]) - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].bwModes)) return _numpy.asarray(arr) @@ -12204,14 +12192,14 @@ cdef class NvlinkSupportedBwModes_v1: self._ptr[0].totalBwModes = len(val) if len(val) == 0: return - cdef _cyb_view.array arr = _cyb_view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(self._ptr[0].totalBwModes,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].bwModes)), (arr.data), sizeof(unsigned char) * len(val)) @staticmethod def from_buffer(buffer): """Create an NvlinkSupportedBwModes_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) + return __from_buffer(buffer, sizeof(nvmlNvlinkSupportedBwModes_v1_t), NvlinkSupportedBwModes_v1) @staticmethod def from_data(data): @@ -12220,7 +12208,7 @@ cdef class NvlinkSupportedBwModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_supported_bw_modes_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) + return __from_data(data, "nvlink_supported_bw_modes_v1_dtype", nvlink_supported_bw_modes_v1_dtype, NvlinkSupportedBwModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12235,10 +12223,10 @@ cdef class NvlinkSupportedBwModes_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSupportedBwModes_v1 obj = NvlinkSupportedBwModes_v1.__new__(NvlinkSupportedBwModes_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkSupportedBwModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSupportedBwModes_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSupportedBwModes_v1_t)) obj._owner = None obj._owned = True else: @@ -12277,7 +12265,7 @@ cdef class NvlinkGetBwMode_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") self._owner = None @@ -12289,7 +12277,7 @@ cdef class NvlinkGetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkGetBwMode_v1 object at {hex(id(self))}>" @@ -12310,20 +12298,20 @@ cdef class NvlinkGetBwMode_v1: if not isinstance(other, NvlinkGetBwMode_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkGetBwMode_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkGetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + self._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkGetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12366,7 +12354,7 @@ cdef class NvlinkGetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkGetBwMode_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) + return __from_buffer(buffer, sizeof(nvmlNvlinkGetBwMode_v1_t), NvlinkGetBwMode_v1) @staticmethod def from_data(data): @@ -12375,7 +12363,7 @@ cdef class NvlinkGetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_get_bw_mode_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) + return __from_data(data, "nvlink_get_bw_mode_v1_dtype", nvlink_get_bw_mode_v1_dtype, NvlinkGetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12390,10 +12378,10 @@ cdef class NvlinkGetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkGetBwMode_v1 obj = NvlinkGetBwMode_v1.__new__(NvlinkGetBwMode_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkGetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkGetBwMode_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkGetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12432,7 +12420,7 @@ cdef class NvlinkSetBwMode_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") self._owner = None @@ -12444,7 +12432,7 @@ cdef class NvlinkSetBwMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkSetBwMode_v1 object at {hex(id(self))}>" @@ -12465,20 +12453,20 @@ cdef class NvlinkSetBwMode_v1: if not isinstance(other, NvlinkSetBwMode_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwMode_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + self._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12521,7 +12509,7 @@ cdef class NvlinkSetBwMode_v1: @staticmethod def from_buffer(buffer): """Create an NvlinkSetBwMode_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) + return __from_buffer(buffer, sizeof(nvmlNvlinkSetBwMode_v1_t), NvlinkSetBwMode_v1) @staticmethod def from_data(data): @@ -12530,7 +12518,7 @@ cdef class NvlinkSetBwMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_set_bw_mode_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) + return __from_data(data, "nvlink_set_bw_mode_v1_dtype", nvlink_set_bw_mode_v1_dtype, NvlinkSetBwMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12545,10 +12533,10 @@ cdef class NvlinkSetBwMode_v1: raise ValueError("ptr must not be null (0)") cdef NvlinkSetBwMode_v1 obj = NvlinkSetBwMode_v1.__new__(NvlinkSetBwMode_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkSetBwMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkSetBwMode_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwMode_v1_t)) obj._owner = None obj._owned = True else: @@ -12586,7 +12574,7 @@ cdef class VgpuVersion: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuVersion_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") self._owner = None @@ -12598,7 +12586,7 @@ cdef class VgpuVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuVersion object at {hex(id(self))}>" @@ -12619,20 +12607,20 @@ cdef class VgpuVersion: if not isinstance(other, VgpuVersion): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuVersion_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) + self._ptr = malloc(sizeof(nvmlVgpuVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12664,7 +12652,7 @@ cdef class VgpuVersion: @staticmethod def from_buffer(buffer): """Create an VgpuVersion instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) + return __from_buffer(buffer, sizeof(nvmlVgpuVersion_t), VgpuVersion) @staticmethod def from_data(data): @@ -12673,7 +12661,7 @@ cdef class VgpuVersion: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_version_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) + return __from_data(data, "vgpu_version_dtype", vgpu_version_dtype, VgpuVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12688,10 +12676,10 @@ cdef class VgpuVersion: raise ValueError("ptr must not be null (0)") cdef VgpuVersion obj = VgpuVersion.__new__(VgpuVersion) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuVersion_t)) + obj._ptr = malloc(sizeof(nvmlVgpuVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuVersion") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuVersion_t)) obj._owner = None obj._owned = True else: @@ -12737,7 +12725,7 @@ cdef class VgpuMetadata: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuMetadata_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") self._owner = None @@ -12749,7 +12737,7 @@ cdef class VgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuMetadata object at {hex(id(self))}>" @@ -12770,20 +12758,20 @@ cdef class VgpuMetadata: if not isinstance(other, VgpuMetadata): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuMetadata_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) + self._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -12826,7 +12814,7 @@ cdef class VgpuMetadata: @property def guest_driver_version(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) + return cpython.PyUnicode_FromString(self._ptr[0].guestDriverVersion) @guest_driver_version.setter def guest_driver_version(self, val): @@ -12836,12 +12824,12 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field guest_driver_version, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].guestDriverVersion), ptr, 80) + memcpy((self._ptr[0].guestDriverVersion), ptr, 80) @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -12851,7 +12839,7 @@ cdef class VgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def vgpu_virtualization_caps(self): @@ -12889,7 +12877,7 @@ cdef class VgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -12899,12 +12887,12 @@ cdef class VgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) + memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuMetadata instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) + return __from_buffer(buffer, sizeof(nvmlVgpuMetadata_t), VgpuMetadata) @staticmethod def from_data(data): @@ -12913,7 +12901,7 @@ cdef class VgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_metadata_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) + return __from_data(data, "vgpu_metadata_dtype", vgpu_metadata_dtype, VgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -12928,10 +12916,10 @@ cdef class VgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuMetadata obj = VgpuMetadata.__new__(VgpuMetadata) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuMetadata_t)) + obj._ptr = malloc(sizeof(nvmlVgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuMetadata") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -12969,7 +12957,7 @@ cdef class VgpuPgpuCompatibility: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") self._owner = None @@ -12981,7 +12969,7 @@ cdef class VgpuPgpuCompatibility: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuCompatibility object at {hex(id(self))}>" @@ -13002,20 +12990,20 @@ cdef class VgpuPgpuCompatibility: if not isinstance(other, VgpuPgpuCompatibility): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuCompatibility_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuCompatibility_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + self._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuCompatibility_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13047,7 +13035,7 @@ cdef class VgpuPgpuCompatibility: @staticmethod def from_buffer(buffer): """Create an VgpuPgpuCompatibility instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) + return __from_buffer(buffer, sizeof(nvmlVgpuPgpuCompatibility_t), VgpuPgpuCompatibility) @staticmethod def from_data(data): @@ -13056,7 +13044,7 @@ cdef class VgpuPgpuCompatibility: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_compatibility_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) + return __from_data(data, "vgpu_pgpu_compatibility_dtype", vgpu_pgpu_compatibility_dtype, VgpuPgpuCompatibility) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13071,10 +13059,10 @@ cdef class VgpuPgpuCompatibility: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuCompatibility obj = VgpuPgpuCompatibility.__new__(VgpuPgpuCompatibility) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) + obj._ptr = malloc(sizeof(nvmlVgpuPgpuCompatibility_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuCompatibility") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuCompatibility_t)) obj._owner = None obj._owned = True else: @@ -13148,10 +13136,10 @@ cdef class GpuInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13229,8 +13217,8 @@ cdef class GpuInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GpuInstancePlacement obj = GpuInstancePlacement.__new__(GpuInstancePlacement) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGpuInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=gpu_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13276,7 +13264,7 @@ cdef class GpuInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = calloc(1, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") self._owner = None @@ -13288,7 +13276,7 @@ cdef class GpuInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13309,20 +13297,20 @@ cdef class GpuInstanceProfileInfo_v3: if not isinstance(other, GpuInstanceProfileInfo_v3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + self._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13453,7 +13441,7 @@ cdef class GpuInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13463,7 +13451,7 @@ cdef class GpuInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -13479,7 +13467,7 @@ cdef class GpuInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) + return __from_buffer(buffer, sizeof(nvmlGpuInstanceProfileInfo_v3_t), GpuInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -13488,7 +13476,7 @@ cdef class GpuInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_profile_info_v3_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) + return __from_data(data, "gpu_instance_profile_info_v3_dtype", gpu_instance_profile_info_v3_dtype, GpuInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13503,10 +13491,10 @@ cdef class GpuInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuInstanceProfileInfo_v3 obj = GpuInstanceProfileInfo_v3.__new__(GpuInstanceProfileInfo_v3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + obj._ptr = malloc(sizeof(nvmlGpuInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceProfileInfo_v3") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -13580,10 +13568,10 @@ cdef class ComputeInstancePlacement: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def start(self): @@ -13661,8 +13649,8 @@ cdef class ComputeInstancePlacement: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef ComputeInstancePlacement obj = ComputeInstancePlacement.__new__(ComputeInstancePlacement) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlComputeInstancePlacement_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=compute_instance_placement_dtype) obj._data = data.view(_numpy.recarray) @@ -13706,7 +13694,7 @@ cdef class ComputeInstanceProfileInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") self._owner = None @@ -13718,7 +13706,7 @@ cdef class ComputeInstanceProfileInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v2 object at {hex(id(self))}>" @@ -13739,20 +13727,20 @@ cdef class ComputeInstanceProfileInfo_v2: if not isinstance(other, ComputeInstanceProfileInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -13872,7 +13860,7 @@ cdef class ComputeInstanceProfileInfo_v2: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -13882,12 +13870,12 @@ cdef class ComputeInstanceProfileInfo_v2: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) + return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v2_t), ComputeInstanceProfileInfo_v2) @staticmethod def from_data(data): @@ -13896,7 +13884,7 @@ cdef class ComputeInstanceProfileInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) + return __from_data(data, "compute_instance_profile_info_v2_dtype", compute_instance_profile_info_v2_dtype, ComputeInstanceProfileInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -13911,10 +13899,10 @@ cdef class ComputeInstanceProfileInfo_v2: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v2 obj = ComputeInstanceProfileInfo_v2.__new__(ComputeInstanceProfileInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -13962,7 +13950,7 @@ cdef class ComputeInstanceProfileInfo_v3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = calloc(1, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") self._owner = None @@ -13974,7 +13962,7 @@ cdef class ComputeInstanceProfileInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceProfileInfo_v3 object at {hex(id(self))}>" @@ -13995,20 +13983,20 @@ cdef class ComputeInstanceProfileInfo_v3: if not isinstance(other, ComputeInstanceProfileInfo_v3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceProfileInfo_v3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + self._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14128,7 +14116,7 @@ cdef class ComputeInstanceProfileInfo_v3: @property def name(self): """~_numpy.int8: (array of length 96).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].name) + return cpython.PyUnicode_FromString(self._ptr[0].name) @name.setter def name(self, val): @@ -14138,7 +14126,7 @@ cdef class ComputeInstanceProfileInfo_v3: if len(buf) >= 96: raise ValueError("String too long for field name, max length is 95") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].name), ptr, 96) + memcpy((self._ptr[0].name), ptr, 96) @property def capabilities(self): @@ -14154,7 +14142,7 @@ cdef class ComputeInstanceProfileInfo_v3: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceProfileInfo_v3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) + return __from_buffer(buffer, sizeof(nvmlComputeInstanceProfileInfo_v3_t), ComputeInstanceProfileInfo_v3) @staticmethod def from_data(data): @@ -14163,7 +14151,7 @@ cdef class ComputeInstanceProfileInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_profile_info_v3_dtype` holding the data. """ - return _cyb_from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) + return __from_data(data, "compute_instance_profile_info_v3_dtype", compute_instance_profile_info_v3_dtype, ComputeInstanceProfileInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14178,10 +14166,10 @@ cdef class ComputeInstanceProfileInfo_v3: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceProfileInfo_v3 obj = ComputeInstanceProfileInfo_v3.__new__(ComputeInstanceProfileInfo_v3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + obj._ptr = malloc(sizeof(nvmlComputeInstanceProfileInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceProfileInfo_v3") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceProfileInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -14219,7 +14207,7 @@ cdef class DeviceAddressingMode_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = calloc(1, sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") self._owner = None @@ -14231,7 +14219,7 @@ cdef class DeviceAddressingMode_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DeviceAddressingMode_v1 object at {hex(id(self))}>" @@ -14252,20 +14240,20 @@ cdef class DeviceAddressingMode_v1: if not isinstance(other, DeviceAddressingMode_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDeviceAddressingMode_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlDeviceAddressingMode_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + self._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDeviceAddressingMode_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14297,7 +14285,7 @@ cdef class DeviceAddressingMode_v1: @staticmethod def from_buffer(buffer): """Create an DeviceAddressingMode_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) + return __from_buffer(buffer, sizeof(nvmlDeviceAddressingMode_v1_t), DeviceAddressingMode_v1) @staticmethod def from_data(data): @@ -14306,7 +14294,7 @@ cdef class DeviceAddressingMode_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_addressing_mode_v1_dtype` holding the data. """ - return _cyb_from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) + return __from_data(data, "device_addressing_mode_v1_dtype", device_addressing_mode_v1_dtype, DeviceAddressingMode_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14321,10 +14309,10 @@ cdef class DeviceAddressingMode_v1: raise ValueError("ptr must not be null (0)") cdef DeviceAddressingMode_v1 obj = DeviceAddressingMode_v1.__new__(DeviceAddressingMode_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) + obj._ptr = malloc(sizeof(nvmlDeviceAddressingMode_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DeviceAddressingMode_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlDeviceAddressingMode_v1_t)) obj._owner = None obj._owned = True else: @@ -14363,7 +14351,7 @@ cdef class RepairStatus_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlRepairStatus_v1_t)) + self._ptr = calloc(1, sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") self._owner = None @@ -14375,7 +14363,7 @@ cdef class RepairStatus_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.RepairStatus_v1 object at {hex(id(self))}>" @@ -14396,20 +14384,20 @@ cdef class RepairStatus_v1: if not isinstance(other, RepairStatus_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlRepairStatus_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlRepairStatus_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) + self._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlRepairStatus_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14452,7 +14440,7 @@ cdef class RepairStatus_v1: @staticmethod def from_buffer(buffer): """Create an RepairStatus_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) + return __from_buffer(buffer, sizeof(nvmlRepairStatus_v1_t), RepairStatus_v1) @staticmethod def from_data(data): @@ -14461,7 +14449,7 @@ cdef class RepairStatus_v1: Args: data (_numpy.ndarray): a single-element array of dtype `repair_status_v1_dtype` holding the data. """ - return _cyb_from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) + return __from_data(data, "repair_status_v1_dtype", repair_status_v1_dtype, RepairStatus_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14476,10 +14464,10 @@ cdef class RepairStatus_v1: raise ValueError("ptr must not be null (0)") cdef RepairStatus_v1 obj = RepairStatus_v1.__new__(RepairStatus_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlRepairStatus_v1_t)) + obj._ptr = malloc(sizeof(nvmlRepairStatus_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating RepairStatus_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlRepairStatus_v1_t)) obj._owner = None obj._owned = True else: @@ -14518,7 +14506,7 @@ cdef class DevicePowerMizerModes_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = calloc(1, sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") self._owner = None @@ -14530,7 +14518,7 @@ cdef class DevicePowerMizerModes_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.DevicePowerMizerModes_v1 object at {hex(id(self))}>" @@ -14551,20 +14539,20 @@ cdef class DevicePowerMizerModes_v1: if not isinstance(other, DevicePowerMizerModes_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlDevicePowerMizerModes_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlDevicePowerMizerModes_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + self._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlDevicePowerMizerModes_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14607,7 +14595,7 @@ cdef class DevicePowerMizerModes_v1: @staticmethod def from_buffer(buffer): """Create an DevicePowerMizerModes_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) + return __from_buffer(buffer, sizeof(nvmlDevicePowerMizerModes_v1_t), DevicePowerMizerModes_v1) @staticmethod def from_data(data): @@ -14616,7 +14604,7 @@ cdef class DevicePowerMizerModes_v1: Args: data (_numpy.ndarray): a single-element array of dtype `device_power_mizer_modes_v1_dtype` holding the data. """ - return _cyb_from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) + return __from_data(data, "device_power_mizer_modes_v1_dtype", device_power_mizer_modes_v1_dtype, DevicePowerMizerModes_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -14631,10 +14619,10 @@ cdef class DevicePowerMizerModes_v1: raise ValueError("ptr must not be null (0)") cdef DevicePowerMizerModes_v1 obj = DevicePowerMizerModes_v1.__new__(DevicePowerMizerModes_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) + obj._ptr = malloc(sizeof(nvmlDevicePowerMizerModes_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating DevicePowerMizerModes_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlDevicePowerMizerModes_v1_t)) obj._owner = None obj._owned = True else: @@ -14713,10 +14701,10 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def unit(self): @@ -14849,8 +14837,8 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorEntry_v1 obj = EccSramUniqueUncorrectedErrorEntry_v1.__new__(EccSramUniqueUncorrectedErrorEntry_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorEntry_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=ecc_sram_unique_uncorrected_error_entry_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -14890,7 +14878,7 @@ cdef class GpuFabricInfo_v3: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = calloc(1, sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") self._owner = None @@ -14902,7 +14890,7 @@ cdef class GpuFabricInfo_v3: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuFabricInfo_v3 object at {hex(id(self))}>" @@ -14923,20 +14911,20 @@ cdef class GpuFabricInfo_v3: if not isinstance(other, GpuFabricInfo_v3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v3_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + self._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -14957,7 +14945,7 @@ cdef class GpuFabricInfo_v3: @property def cluster_uuid(self): """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) arr.data = (&(self._ptr[0].clusterUuid)) return _numpy.asarray(arr) @@ -14967,9 +14955,9 @@ cdef class GpuFabricInfo_v3: raise ValueError("This GpuFabricInfo_v3 instance is read-only") if len(val) != 16: raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") - cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + cdef view.array arr = view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) - _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) @property def status(self): @@ -15029,7 +15017,7 @@ cdef class GpuFabricInfo_v3: @staticmethod def from_buffer(buffer): """Create an GpuFabricInfo_v3 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) + return __from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v3_t), GpuFabricInfo_v3) @staticmethod def from_data(data): @@ -15038,7 +15026,7 @@ cdef class GpuFabricInfo_v3: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v3_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) + return __from_data(data, "gpu_fabric_info_v3_dtype", gpu_fabric_info_v3_dtype, GpuFabricInfo_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15053,10 +15041,10 @@ cdef class GpuFabricInfo_v3: raise ValueError("ptr must not be null (0)") cdef GpuFabricInfo_v3 obj = GpuFabricInfo_v3.__new__(GpuFabricInfo_v3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v3_t)) + obj._ptr = malloc(sizeof(nvmlGpuFabricInfo_v3_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuFabricInfo_v3") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v3_t)) obj._owner = None obj._owned = True else: @@ -15094,7 +15082,7 @@ cdef class NvLinkInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") self._owner = None @@ -15106,7 +15094,7 @@ cdef class NvLinkInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v1 object at {hex(id(self))}>" @@ -15127,20 +15115,20 @@ cdef class NvLinkInfo_v1: if not isinstance(other, NvLinkInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15172,7 +15160,7 @@ cdef class NvLinkInfo_v1: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) + return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v1_t), NvLinkInfo_v1) @staticmethod def from_data(data): @@ -15181,7 +15169,7 @@ cdef class NvLinkInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) + return __from_data(data, "nv_link_info_v1_dtype", nv_link_info_v1_dtype, NvLinkInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15196,10 +15184,10 @@ cdef class NvLinkInfo_v1: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v1 obj = NvLinkInfo_v1.__new__(NvLinkInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -15239,7 +15227,7 @@ cdef class NvlinkFirmwareVersion: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") self._owner = None @@ -15251,7 +15239,7 @@ cdef class NvlinkFirmwareVersion: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareVersion object at {hex(id(self))}>" @@ -15272,20 +15260,20 @@ cdef class NvlinkFirmwareVersion: if not isinstance(other, NvlinkFirmwareVersion): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareVersion_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareVersion_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + self._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareVersion_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15339,7 +15327,7 @@ cdef class NvlinkFirmwareVersion: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareVersion instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) + return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareVersion_t), NvlinkFirmwareVersion) @staticmethod def from_data(data): @@ -15348,7 +15336,7 @@ cdef class NvlinkFirmwareVersion: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_version_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) + return __from_data(data, "nvlink_firmware_version_dtype", nvlink_firmware_version_dtype, NvlinkFirmwareVersion) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15363,10 +15351,10 @@ cdef class NvlinkFirmwareVersion: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareVersion obj = NvlinkFirmwareVersion.__new__(NvlinkFirmwareVersion) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareVersion_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareVersion") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareVersion_t)) obj._owner = None obj._owned = True else: @@ -15403,7 +15391,7 @@ cdef class PRMCounterInput_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") self._owner = None @@ -15415,7 +15403,7 @@ cdef class PRMCounterInput_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterInput_v1 object at {hex(id(self))}>" @@ -15436,20 +15424,20 @@ cdef class PRMCounterInput_v1: if not isinstance(other, PRMCounterInput_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterInput_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterInput_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) + self._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterInput_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15470,7 +15458,7 @@ cdef class PRMCounterInput_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterInput_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) + return __from_buffer(buffer, sizeof(nvmlPRMCounterInput_v1_t), PRMCounterInput_v1) @staticmethod def from_data(data): @@ -15479,7 +15467,7 @@ cdef class PRMCounterInput_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_input_v1_dtype` holding the data. """ - return _cyb_from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) + return __from_data(data, "prm_counter_input_v1_dtype", prm_counter_input_v1_dtype, PRMCounterInput_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15494,10 +15482,10 @@ cdef class PRMCounterInput_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterInput_v1 obj = PRMCounterInput_v1.__new__(PRMCounterInput_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterInput_v1_t)) + obj._ptr = malloc(sizeof(nvmlPRMCounterInput_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterInput_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterInput_v1_t)) obj._owner = None obj._owned = True else: @@ -15537,7 +15525,7 @@ cdef class VgpuSchedulerStateInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") self._owner = None @@ -15549,7 +15537,7 @@ cdef class VgpuSchedulerStateInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v2 object at {hex(id(self))}>" @@ -15570,20 +15558,20 @@ cdef class VgpuSchedulerStateInfo_v2: if not isinstance(other, VgpuSchedulerStateInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -15637,7 +15625,7 @@ cdef class VgpuSchedulerStateInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v2_t), VgpuSchedulerStateInfo_v2) @staticmethod def from_data(data): @@ -15646,7 +15634,7 @@ cdef class VgpuSchedulerStateInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) + return __from_data(data, "vgpu_scheduler_state_info_v2_dtype", vgpu_scheduler_state_info_v2_dtype, VgpuSchedulerStateInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -15661,10 +15649,10 @@ cdef class VgpuSchedulerStateInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v2 obj = VgpuSchedulerStateInfo_v2.__new__(VgpuSchedulerStateInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -15743,10 +15731,10 @@ cdef class VgpuSchedulerLogEntry_v2: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def timestamp(self): @@ -15879,8 +15867,8 @@ cdef class VgpuSchedulerLogEntry_v2: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogEntry_v2 obj = VgpuSchedulerLogEntry_v2.__new__(VgpuSchedulerLogEntry_v2) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_scheduler_log_entry_v2_dtype) obj._data = data.view(_numpy.recarray) @@ -15917,7 +15905,7 @@ cdef class VgpuSchedulerState_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") self._owner = None @@ -15929,7 +15917,7 @@ cdef class VgpuSchedulerState_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v2 object at {hex(id(self))}>" @@ -15950,20 +15938,20 @@ cdef class VgpuSchedulerState_v2: if not isinstance(other, VgpuSchedulerState_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16017,7 +16005,7 @@ cdef class VgpuSchedulerState_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v2_t), VgpuSchedulerState_v2) @staticmethod def from_data(data): @@ -16026,7 +16014,7 @@ cdef class VgpuSchedulerState_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) + return __from_data(data, "vgpu_scheduler_state_v2_dtype", vgpu_scheduler_state_v2_dtype, VgpuSchedulerState_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16041,10 +16029,10 @@ cdef class VgpuSchedulerState_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v2 obj = VgpuSchedulerState_v2.__new__(VgpuSchedulerState_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v2_t)) obj._owner = None obj._owned = True else: @@ -16082,7 +16070,7 @@ cdef class ExcludedDeviceInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") self._owner = None @@ -16094,7 +16082,7 @@ cdef class ExcludedDeviceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ExcludedDeviceInfo object at {hex(id(self))}>" @@ -16115,20 +16103,20 @@ cdef class ExcludedDeviceInfo: if not isinstance(other, ExcludedDeviceInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16145,12 +16133,12 @@ cdef class ExcludedDeviceInfo: if self._readonly: raise ValueError("This ExcludedDeviceInfo instance is read-only") cdef PciInfo val_ = val - _cyb_memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) + memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) @property def uuid(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].uuid) + return cpython.PyUnicode_FromString(self._ptr[0].uuid) @uuid.setter def uuid(self, val): @@ -16160,12 +16148,12 @@ cdef class ExcludedDeviceInfo: if len(buf) >= 80: raise ValueError("String too long for field uuid, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].uuid), ptr, 80) + memcpy((self._ptr[0].uuid), ptr, 80) @staticmethod def from_buffer(buffer): """Create an ExcludedDeviceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) + return __from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) @staticmethod def from_data(data): @@ -16174,7 +16162,7 @@ cdef class ExcludedDeviceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `excluded_device_info_dtype` holding the data. """ - return _cyb_from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) + return __from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16189,10 +16177,10 @@ cdef class ExcludedDeviceInfo: raise ValueError("ptr must not be null (0)") cdef ExcludedDeviceInfo obj = ExcludedDeviceInfo.__new__(ExcludedDeviceInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) + obj._ptr = malloc(sizeof(nvmlExcludedDeviceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ExcludedDeviceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) obj._owner = None obj._owned = True else: @@ -16233,7 +16221,7 @@ cdef class ProcessDetailList_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = calloc(1, sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") self._owner = None @@ -16246,7 +16234,7 @@ cdef class ProcessDetailList_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ProcessDetailList_v1 object at {hex(id(self))}>" @@ -16267,20 +16255,20 @@ cdef class ProcessDetailList_v1: if not isinstance(other, ProcessDetailList_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16328,7 +16316,7 @@ cdef class ProcessDetailList_v1: @staticmethod def from_buffer(buffer): """Create an ProcessDetailList_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) + return __from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) @staticmethod def from_data(data): @@ -16337,7 +16325,7 @@ cdef class ProcessDetailList_v1: Args: data (_numpy.ndarray): a single-element array of dtype `process_detail_list_v1_dtype` holding the data. """ - return _cyb_from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) + return __from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16352,10 +16340,10 @@ cdef class ProcessDetailList_v1: raise ValueError("ptr must not be null (0)") cdef ProcessDetailList_v1 obj = ProcessDetailList_v1.__new__(ProcessDetailList_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) + obj._ptr = malloc(sizeof(nvmlProcessDetailList_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessDetailList_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) obj._owner = None obj._owned = True else: @@ -16394,7 +16382,7 @@ cdef class BridgeChipHierarchy: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") self._owner = None @@ -16406,7 +16394,7 @@ cdef class BridgeChipHierarchy: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.BridgeChipHierarchy object at {hex(id(self))}>" @@ -16427,20 +16415,20 @@ cdef class BridgeChipHierarchy: if not isinstance(other, BridgeChipHierarchy): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) + self._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16462,12 +16450,12 @@ cdef class BridgeChipHierarchy: self._ptr[0].bridgeCount = len(val) if len(val) == 0: return - _cyb_memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) + memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) @staticmethod def from_buffer(buffer): """Create an BridgeChipHierarchy instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) + return __from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) @staticmethod def from_data(data): @@ -16476,7 +16464,7 @@ cdef class BridgeChipHierarchy: Args: data (_numpy.ndarray): a single-element array of dtype `bridge_chip_hierarchy_dtype` holding the data. """ - return _cyb_from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) + return __from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -16491,10 +16479,10 @@ cdef class BridgeChipHierarchy: raise ValueError("ptr must not be null (0)") cdef BridgeChipHierarchy obj = BridgeChipHierarchy.__new__(BridgeChipHierarchy) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) + obj._ptr = malloc(sizeof(nvmlBridgeChipHierarchy_t)) if obj._ptr == NULL: raise MemoryError("Error allocating BridgeChipHierarchy") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) obj._owner = None obj._owned = True else: @@ -16568,10 +16556,10 @@ cdef class Sample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -16647,8 +16635,8 @@ cdef class Sample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef Sample obj = Sample.__new__(Sample) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16723,10 +16711,10 @@ cdef class VgpuInstanceUtilizationSample: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def vgpu_instance(self): @@ -16840,8 +16828,8 @@ cdef class VgpuInstanceUtilizationSample: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationSample obj = VgpuInstanceUtilizationSample.__new__(VgpuInstanceUtilizationSample) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationSample_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_sample_dtype) obj._data = data.view(_numpy.recarray) @@ -16918,10 +16906,10 @@ cdef class VgpuInstanceUtilizationInfo_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def time_stamp(self): @@ -17053,8 +17041,8 @@ cdef class VgpuInstanceUtilizationInfo_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef VgpuInstanceUtilizationInfo_v1 obj = VgpuInstanceUtilizationInfo_v1.__new__(VgpuInstanceUtilizationInfo_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_info_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -17130,10 +17118,10 @@ cdef class FieldValue: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def field_id(self): @@ -17264,8 +17252,8 @@ cdef class FieldValue: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef FieldValue obj = FieldValue.__new__(FieldValue) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlFieldValue_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=field_value_dtype) obj._data = data.view(_numpy.recarray) @@ -17301,7 +17289,7 @@ cdef class PRMCounterValue_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") self._owner = None @@ -17313,7 +17301,7 @@ cdef class PRMCounterValue_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.PRMCounterValue_v1 object at {hex(id(self))}>" @@ -17334,20 +17322,20 @@ cdef class PRMCounterValue_v1: if not isinstance(other, PRMCounterValue_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17364,7 +17352,7 @@ cdef class PRMCounterValue_v1: if self._readonly: raise ValueError("This PRMCounterValue_v1 instance is read-only") cdef Value val_ = val - _cyb_memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) + memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) @property def status(self): @@ -17391,7 +17379,7 @@ cdef class PRMCounterValue_v1: @staticmethod def from_buffer(buffer): """Create an PRMCounterValue_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) + return __from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) @staticmethod def from_data(data): @@ -17400,7 +17388,7 @@ cdef class PRMCounterValue_v1: Args: data (_numpy.ndarray): a single-element array of dtype `prm_counter_value_v1_dtype` holding the data. """ - return _cyb_from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) + return __from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17415,10 +17403,10 @@ cdef class PRMCounterValue_v1: raise ValueError("ptr must not be null (0)") cdef PRMCounterValue_v1 obj = PRMCounterValue_v1.__new__(PRMCounterValue_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) + obj._ptr = malloc(sizeof(nvmlPRMCounterValue_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating PRMCounterValue_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) obj._owner = None obj._owned = True else: @@ -17456,7 +17444,7 @@ cdef class GpuThermalSettings: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuThermalSettings_t)) + self._ptr = calloc(1, sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") self._owner = None @@ -17468,7 +17456,7 @@ cdef class GpuThermalSettings: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuThermalSettings object at {hex(id(self))}>" @@ -17489,20 +17477,20 @@ cdef class GpuThermalSettings: if not isinstance(other, GpuThermalSettings): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) + self._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17521,7 +17509,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)}") - _cyb_memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) + memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) @property def count(self): @@ -17537,7 +17525,7 @@ cdef class GpuThermalSettings: @staticmethod def from_buffer(buffer): """Create an GpuThermalSettings instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) + return __from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) @staticmethod def from_data(data): @@ -17546,7 +17534,7 @@ cdef class GpuThermalSettings: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_thermal_settings_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) + return __from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17561,10 +17549,10 @@ cdef class GpuThermalSettings: raise ValueError("ptr must not be null (0)") cdef GpuThermalSettings obj = GpuThermalSettings.__new__(GpuThermalSettings) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) + obj._ptr = malloc(sizeof(nvmlGpuThermalSettings_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuThermalSettings") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) obj._owner = None obj._owned = True else: @@ -17603,7 +17591,7 @@ cdef class ClkMonStatus: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlClkMonStatus_t)) + self._ptr = calloc(1, sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") self._owner = None @@ -17615,7 +17603,7 @@ cdef class ClkMonStatus: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ClkMonStatus object at {hex(id(self))}>" @@ -17636,20 +17624,20 @@ cdef class ClkMonStatus: if not isinstance(other, ClkMonStatus): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) + self._ptr = malloc(sizeof(nvmlClkMonStatus_t)) if self._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17671,7 +17659,7 @@ cdef class ClkMonStatus: self._ptr[0].clkMonListSize = len(val) if len(val) == 0: return - _cyb_memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) + memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) @property def b_global_status(self): @@ -17687,7 +17675,7 @@ cdef class ClkMonStatus: @staticmethod def from_buffer(buffer): """Create an ClkMonStatus instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) + return __from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) @staticmethod def from_data(data): @@ -17696,7 +17684,7 @@ cdef class ClkMonStatus: Args: data (_numpy.ndarray): a single-element array of dtype `clk_mon_status_dtype` holding the data. """ - return _cyb_from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) + return __from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17711,10 +17699,10 @@ cdef class ClkMonStatus: raise ValueError("ptr must not be null (0)") cdef ClkMonStatus obj = ClkMonStatus.__new__(ClkMonStatus) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) + obj._ptr = malloc(sizeof(nvmlClkMonStatus_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ClkMonStatus") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) obj._owner = None obj._owned = True else: @@ -17755,7 +17743,7 @@ cdef class ProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") self._owner = None @@ -17768,7 +17756,7 @@ cdef class ProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -17789,20 +17777,20 @@ cdef class ProcessesUtilizationInfo_v1: if not isinstance(other, ProcessesUtilizationInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17850,7 +17838,7 @@ cdef class ProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an ProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) + return __from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -17859,7 +17847,7 @@ cdef class ProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `processes_utilization_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) + return __from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -17874,10 +17862,10 @@ cdef class ProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef ProcessesUtilizationInfo_v1 obj = ProcessesUtilizationInfo_v1.__new__(ProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -17916,7 +17904,7 @@ cdef class GpuDynamicPstatesInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") self._owner = None @@ -17928,7 +17916,7 @@ cdef class GpuDynamicPstatesInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuDynamicPstatesInfo object at {hex(id(self))}>" @@ -17949,20 +17937,20 @@ cdef class GpuDynamicPstatesInfo: if not isinstance(other, GpuDynamicPstatesInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17981,7 +17969,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)}") - _cyb_memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) + memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) @property def flags_(self): @@ -17997,7 +17985,7 @@ cdef class GpuDynamicPstatesInfo: @staticmethod def from_buffer(buffer): """Create an GpuDynamicPstatesInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) + return __from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) @staticmethod def from_data(data): @@ -18006,7 +17994,7 @@ cdef class GpuDynamicPstatesInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_dynamic_pstates_info_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) + return __from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18021,10 +18009,10 @@ cdef class GpuDynamicPstatesInfo: raise ValueError("ptr must not be null (0)") cdef GpuDynamicPstatesInfo obj = GpuDynamicPstatesInfo.__new__(GpuDynamicPstatesInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + obj._ptr = malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuDynamicPstatesInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) obj._owner = None obj._owned = True else: @@ -18065,7 +18053,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") self._owner = None @@ -18078,7 +18066,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuProcessesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -18099,20 +18087,20 @@ cdef class VgpuProcessesUtilizationInfo_v1: if not isinstance(other, VgpuProcessesUtilizationInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18160,7 +18148,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -18169,7 +18157,7 @@ cdef class VgpuProcessesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_processes_utilization_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) + return __from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18184,10 +18172,10 @@ cdef class VgpuProcessesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuProcessesUtilizationInfo_v1 obj = VgpuProcessesUtilizationInfo_v1.__new__(VgpuProcessesUtilizationInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -18220,7 +18208,7 @@ cdef class VgpuSchedulerParams: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") self._owner = None @@ -18232,7 +18220,7 @@ cdef class VgpuSchedulerParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerParams object at {hex(id(self))}>" @@ -18253,20 +18241,20 @@ cdef class VgpuSchedulerParams: if not isinstance(other, VgpuSchedulerParams): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18283,7 +18271,7 @@ cdef class VgpuSchedulerParams: if self._readonly: raise ValueError("This VgpuSchedulerParams instance is read-only") cdef _py_anon_pod2 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) + memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) @property def vgpu_sched_data(self): @@ -18295,12 +18283,12 @@ cdef class VgpuSchedulerParams: if self._readonly: raise ValueError("This VgpuSchedulerParams instance is read-only") cdef _py_anon_pod3 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) + memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerParams instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) @staticmethod def from_data(data): @@ -18309,7 +18297,7 @@ cdef class VgpuSchedulerParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_params_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) + return __from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18324,10 +18312,10 @@ cdef class VgpuSchedulerParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerParams obj = VgpuSchedulerParams.__new__(VgpuSchedulerParams) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerParams") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) obj._owner = None obj._owned = True else: @@ -18359,7 +18347,7 @@ cdef class VgpuSchedulerSetParams: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") self._owner = None @@ -18371,7 +18359,7 @@ cdef class VgpuSchedulerSetParams: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerSetParams object at {hex(id(self))}>" @@ -18392,20 +18380,20 @@ cdef class VgpuSchedulerSetParams: if not isinstance(other, VgpuSchedulerSetParams): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18422,7 +18410,7 @@ cdef class VgpuSchedulerSetParams: if self._readonly: raise ValueError("This VgpuSchedulerSetParams instance is read-only") cdef _py_anon_pod4 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) + memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) @property def vgpu_sched_data(self): @@ -18434,12 +18422,12 @@ cdef class VgpuSchedulerSetParams: if self._readonly: raise ValueError("This VgpuSchedulerSetParams instance is read-only") cdef _py_anon_pod5 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) + memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerSetParams instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) @staticmethod def from_data(data): @@ -18448,7 +18436,7 @@ cdef class VgpuSchedulerSetParams: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_set_params_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) + return __from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18463,10 +18451,10 @@ cdef class VgpuSchedulerSetParams: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerSetParams obj = VgpuSchedulerSetParams.__new__(VgpuSchedulerSetParams) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerSetParams") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) obj._owner = None obj._owned = True else: @@ -18505,7 +18493,7 @@ cdef class VgpuLicenseInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") self._owner = None @@ -18517,7 +18505,7 @@ cdef class VgpuLicenseInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuLicenseInfo object at {hex(id(self))}>" @@ -18538,20 +18526,20 @@ cdef class VgpuLicenseInfo: if not isinstance(other, VgpuLicenseInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18568,7 +18556,7 @@ cdef class VgpuLicenseInfo: if self._readonly: raise ValueError("This VgpuLicenseInfo instance is read-only") cdef VgpuLicenseExpiry val_ = val - _cyb_memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) + memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) @property def is_licensed(self): @@ -18595,7 +18583,7 @@ cdef class VgpuLicenseInfo: @staticmethod def from_buffer(buffer): """Create an VgpuLicenseInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) + return __from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) @staticmethod def from_data(data): @@ -18604,7 +18592,7 @@ cdef class VgpuLicenseInfo: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_license_info_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) + return __from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18619,10 +18607,10 @@ cdef class VgpuLicenseInfo: raise ValueError("ptr must not be null (0)") cdef VgpuLicenseInfo obj = VgpuLicenseInfo.__new__(VgpuLicenseInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) + obj._ptr = malloc(sizeof(nvmlVgpuLicenseInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuLicenseInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) obj._owner = None obj._owned = True else: @@ -18700,10 +18688,10 @@ cdef class GridLicensableFeature: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def feature_code(self): @@ -18819,8 +18807,8 @@ cdef class GridLicensableFeature: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeature obj = GridLicensableFeature.__new__(GridLicensableFeature) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlGridLicensableFeature_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=grid_licensable_feature_dtype) obj._data = data.view(_numpy.recarray) @@ -18855,7 +18843,7 @@ cdef class UnitFanSpeeds: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = calloc(1, sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") self._owner = None @@ -18867,7 +18855,7 @@ cdef class UnitFanSpeeds: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.UnitFanSpeeds object at {hex(id(self))}>" @@ -18888,20 +18876,20 @@ cdef class UnitFanSpeeds: if not isinstance(other, UnitFanSpeeds): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) if self._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18920,7 +18908,7 @@ cdef class UnitFanSpeeds: cdef UnitFanInfo val_ = val if len(val) != 24: raise ValueError(f"Expected length { 24 } for field fans, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) + memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) @property def count(self): @@ -18936,7 +18924,7 @@ cdef class UnitFanSpeeds: @staticmethod def from_buffer(buffer): """Create an UnitFanSpeeds instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) + return __from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) @staticmethod def from_data(data): @@ -18945,7 +18933,7 @@ cdef class UnitFanSpeeds: Args: data (_numpy.ndarray): a single-element array of dtype `unit_fan_speeds_dtype` holding the data. """ - return _cyb_from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) + return __from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -18960,10 +18948,10 @@ cdef class UnitFanSpeeds: raise ValueError("ptr must not be null (0)") cdef UnitFanSpeeds obj = UnitFanSpeeds.__new__(UnitFanSpeeds) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) + obj._ptr = malloc(sizeof(nvmlUnitFanSpeeds_t)) if obj._ptr == NULL: raise MemoryError("Error allocating UnitFanSpeeds") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) obj._owner = None obj._owned = True else: @@ -19007,7 +18995,7 @@ cdef class VgpuPgpuMetadata: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") self._owner = None @@ -19019,7 +19007,7 @@ cdef class VgpuPgpuMetadata: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuPgpuMetadata object at {hex(id(self))}>" @@ -19040,20 +19028,20 @@ cdef class VgpuPgpuMetadata: if not isinstance(other, VgpuPgpuMetadata): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19070,7 +19058,7 @@ cdef class VgpuPgpuMetadata: if self._readonly: raise ValueError("This VgpuPgpuMetadata instance is read-only") cdef VgpuVersion val_ = val - _cyb_memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) + memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) @property def version(self): @@ -19097,7 +19085,7 @@ cdef class VgpuPgpuMetadata: @property def host_driver_version(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) @host_driver_version.setter def host_driver_version(self, val): @@ -19107,7 +19095,7 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 80: raise ValueError("String too long for field host_driver_version, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + memcpy((self._ptr[0].hostDriverVersion), ptr, 80) @property def pgpu_virtualization_caps(self): @@ -19134,7 +19122,7 @@ cdef class VgpuPgpuMetadata: @property def opaque_data(self): """~_numpy.int8: (array of length 4).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + return cpython.PyUnicode_FromString(self._ptr[0].opaqueData) @opaque_data.setter def opaque_data(self, val): @@ -19144,12 +19132,12 @@ cdef class VgpuPgpuMetadata: if len(buf) >= 4: raise ValueError("String too long for field opaque_data, max length is 3") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) + memcpy((self._ptr[0].opaqueData), ptr, 4) @staticmethod def from_buffer(buffer): """Create an VgpuPgpuMetadata instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) + return __from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) @staticmethod def from_data(data): @@ -19158,7 +19146,7 @@ cdef class VgpuPgpuMetadata: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_metadata_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) + return __from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19173,10 +19161,10 @@ cdef class VgpuPgpuMetadata: raise ValueError("ptr must not be null (0)") cdef VgpuPgpuMetadata obj = VgpuPgpuMetadata.__new__(VgpuPgpuMetadata) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + obj._ptr = malloc(sizeof(nvmlVgpuPgpuMetadata_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuPgpuMetadata") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) obj._owner = None obj._owned = True else: @@ -19216,7 +19204,7 @@ cdef class GpuInstanceInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = calloc(1, sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") self._owner = None @@ -19228,7 +19216,7 @@ cdef class GpuInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GpuInstanceInfo object at {hex(id(self))}>" @@ -19249,20 +19237,20 @@ cdef class GpuInstanceInfo: if not isinstance(other, GpuInstanceInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19279,7 +19267,7 @@ cdef class GpuInstanceInfo: if self._readonly: raise ValueError("This GpuInstanceInfo instance is read-only") cdef GpuInstancePlacement val_ = val - _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) + memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) @property def device_(self): @@ -19317,7 +19305,7 @@ cdef class GpuInstanceInfo: @staticmethod def from_buffer(buffer): """Create an GpuInstanceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) + return __from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) @staticmethod def from_data(data): @@ -19326,7 +19314,7 @@ cdef class GpuInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `gpu_instance_info_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) + return __from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19341,10 +19329,10 @@ cdef class GpuInstanceInfo: raise ValueError("ptr must not be null (0)") cdef GpuInstanceInfo obj = GpuInstanceInfo.__new__(GpuInstanceInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) + obj._ptr = malloc(sizeof(nvmlGpuInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GpuInstanceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19385,7 +19373,7 @@ cdef class ComputeInstanceInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = calloc(1, sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") self._owner = None @@ -19397,7 +19385,7 @@ cdef class ComputeInstanceInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.ComputeInstanceInfo object at {hex(id(self))}>" @@ -19418,20 +19406,20 @@ cdef class ComputeInstanceInfo: if not isinstance(other, ComputeInstanceInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19448,7 +19436,7 @@ cdef class ComputeInstanceInfo: if self._readonly: raise ValueError("This ComputeInstanceInfo instance is read-only") cdef ComputeInstancePlacement val_ = val - _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) + memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) @property def device_(self): @@ -19497,7 +19485,7 @@ cdef class ComputeInstanceInfo: @staticmethod def from_buffer(buffer): """Create an ComputeInstanceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) + return __from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) @staticmethod def from_data(data): @@ -19506,7 +19494,7 @@ cdef class ComputeInstanceInfo: Args: data (_numpy.ndarray): a single-element array of dtype `compute_instance_info_dtype` holding the data. """ - return _cyb_from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) + return __from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19521,10 +19509,10 @@ cdef class ComputeInstanceInfo: raise ValueError("ptr must not be null (0)") cdef ComputeInstanceInfo obj = ComputeInstanceInfo.__new__(ComputeInstanceInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) + obj._ptr = malloc(sizeof(nvmlComputeInstanceInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating ComputeInstanceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) obj._owner = None obj._owned = True else: @@ -19564,7 +19552,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") self._owner = None @@ -19577,7 +19565,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.EccSramUniqueUncorrectedErrorCounts_v1 object at {hex(id(self))}>" @@ -19598,20 +19586,20 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: if not isinstance(other, EccSramUniqueUncorrectedErrorCounts_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19648,7 +19636,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: @staticmethod def from_buffer(buffer): """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) + return __from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_data(data): @@ -19657,7 +19645,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: Args: data (_numpy.ndarray): a single-element array of dtype `ecc_sram_unique_uncorrected_error_counts_v1_dtype` holding the data. """ - return _cyb_from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) + return __from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19672,10 +19660,10 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: raise ValueError("ptr must not be null (0)") cdef EccSramUniqueUncorrectedErrorCounts_v1 obj = EccSramUniqueUncorrectedErrorCounts_v1.__new__(EccSramUniqueUncorrectedErrorCounts_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + obj._ptr = malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) obj._owner = None obj._owned = True else: @@ -19714,7 +19702,7 @@ cdef class NvlinkFirmwareInfo: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") self._owner = None @@ -19726,7 +19714,7 @@ cdef class NvlinkFirmwareInfo: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvlinkFirmwareInfo object at {hex(id(self))}>" @@ -19747,20 +19735,20 @@ cdef class NvlinkFirmwareInfo: if not isinstance(other, NvlinkFirmwareInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19779,7 +19767,7 @@ cdef class NvlinkFirmwareInfo: cdef NvlinkFirmwareVersion val_ = val if len(val) != 100: raise ValueError(f"Expected length { 100 } for field firmware_version, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) + memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) @property def num_valid_entries(self): @@ -19795,7 +19783,7 @@ cdef class NvlinkFirmwareInfo: @staticmethod def from_buffer(buffer): """Create an NvlinkFirmwareInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) + return __from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) @staticmethod def from_data(data): @@ -19804,7 +19792,7 @@ cdef class NvlinkFirmwareInfo: Args: data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_info_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) + return __from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -19819,10 +19807,10 @@ cdef class NvlinkFirmwareInfo: raise ValueError("ptr must not be null (0)") cdef NvlinkFirmwareInfo obj = NvlinkFirmwareInfo.__new__(NvlinkFirmwareInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + obj._ptr = malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvlinkFirmwareInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) obj._owner = None obj._owned = True else: @@ -19864,7 +19852,7 @@ cdef class VgpuSchedulerLogInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") self._owner = None @@ -19876,7 +19864,7 @@ cdef class VgpuSchedulerLogInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v2 object at {hex(id(self))}>" @@ -19897,20 +19885,20 @@ cdef class VgpuSchedulerLogInfo_v2: if not isinstance(other, VgpuSchedulerLogInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19929,7 +19917,7 @@ cdef class VgpuSchedulerLogInfo_v2: cdef VgpuSchedulerLogEntry_v2 val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) + memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) @property def engine_id(self): @@ -19989,7 +19977,7 @@ cdef class VgpuSchedulerLogInfo_v2: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) @staticmethod def from_data(data): @@ -19998,7 +19986,7 @@ cdef class VgpuSchedulerLogInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) + return __from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20013,10 +20001,10 @@ cdef class VgpuSchedulerLogInfo_v2: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v2 obj = VgpuSchedulerLogInfo_v2.__new__(VgpuSchedulerLogInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -20058,7 +20046,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") self._owner = None @@ -20071,7 +20059,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuInstancesUtilizationInfo_v1 object at {hex(id(self))}>" @@ -20092,20 +20080,20 @@ cdef class VgpuInstancesUtilizationInfo_v1: if not isinstance(other, VgpuInstancesUtilizationInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20164,7 +20152,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuInstancesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) @staticmethod def from_data(data): @@ -20173,7 +20161,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_instances_utilization_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) + return __from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20188,10 +20176,10 @@ cdef class VgpuInstancesUtilizationInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuInstancesUtilizationInfo_v1 obj = VgpuInstancesUtilizationInfo_v1.__new__(VgpuInstancesUtilizationInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20267,10 +20255,10 @@ cdef class PRMCounter_v1: return bool((self_data == other._data).all()) def __getbuffer__(self, Py_buffer *buffer, int flags): - _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - _cyb_cpython.PyBuffer_Release(buffer) + cpython.PyBuffer_Release(buffer) @property def counter_id(self): @@ -20355,8 +20343,8 @@ cdef class PRMCounter_v1: if ptr == 0: raise ValueError("ptr must not be null (0)") cdef PRMCounter_v1 obj = PRMCounter_v1.__new__(PRMCounter_v1) - cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE - cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + cdef flag = cpython.buffer.PyBUF_READ if readonly else cpython.buffer.PyBUF_WRITE + cdef object buf = cpython.memoryview.PyMemoryView_FromMemory( ptr, sizeof(nvmlPRMCounter_v1_t) * size, flag) data = _numpy.ndarray(size, buffer=buf, dtype=prm_counter_v1_dtype) obj._data = data.view(_numpy.recarray) @@ -20395,7 +20383,7 @@ cdef class VgpuSchedulerLog: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") self._owner = None @@ -20407,7 +20395,7 @@ cdef class VgpuSchedulerLog: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLog object at {hex(id(self))}>" @@ -20428,20 +20416,20 @@ cdef class VgpuSchedulerLog: if not isinstance(other, VgpuSchedulerLog): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20458,7 +20446,7 @@ cdef class VgpuSchedulerLog: if self._readonly: raise ValueError("This VgpuSchedulerLog instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -20472,7 +20460,7 @@ cdef class VgpuSchedulerLog: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def engine_id(self): @@ -20521,7 +20509,7 @@ cdef class VgpuSchedulerLog: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLog instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) @staticmethod def from_data(data): @@ -20530,7 +20518,7 @@ cdef class VgpuSchedulerLog: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) + return __from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20545,10 +20533,10 @@ cdef class VgpuSchedulerLog: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLog obj = VgpuSchedulerLog.__new__(VgpuSchedulerLog) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLog_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLog") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) obj._owner = None obj._owned = True else: @@ -20587,7 +20575,7 @@ cdef class VgpuSchedulerGetState: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") self._owner = None @@ -20599,7 +20587,7 @@ cdef class VgpuSchedulerGetState: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerGetState object at {hex(id(self))}>" @@ -20620,20 +20608,20 @@ cdef class VgpuSchedulerGetState: if not isinstance(other, VgpuSchedulerGetState): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20650,7 +20638,7 @@ cdef class VgpuSchedulerGetState: if self._readonly: raise ValueError("This VgpuSchedulerGetState instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def scheduler_policy(self): @@ -20677,7 +20665,7 @@ cdef class VgpuSchedulerGetState: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerGetState instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) @staticmethod def from_data(data): @@ -20686,7 +20674,7 @@ cdef class VgpuSchedulerGetState: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_get_state_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) + return __from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20701,10 +20689,10 @@ cdef class VgpuSchedulerGetState: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerGetState obj = VgpuSchedulerGetState.__new__(VgpuSchedulerGetState) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerGetState_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerGetState") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) obj._owner = None obj._owned = True else: @@ -20745,7 +20733,7 @@ cdef class VgpuSchedulerStateInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") self._owner = None @@ -20757,7 +20745,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerStateInfo_v1 object at {hex(id(self))}>" @@ -20778,20 +20766,20 @@ cdef class VgpuSchedulerStateInfo_v1: if not isinstance(other, VgpuSchedulerStateInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20808,7 +20796,7 @@ cdef class VgpuSchedulerStateInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def version(self): @@ -20857,7 +20845,7 @@ cdef class VgpuSchedulerStateInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerStateInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) @staticmethod def from_data(data): @@ -20866,7 +20854,7 @@ cdef class VgpuSchedulerStateInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) + return __from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -20881,10 +20869,10 @@ cdef class VgpuSchedulerStateInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerStateInfo_v1 obj = VgpuSchedulerStateInfo_v1.__new__(VgpuSchedulerStateInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -20927,7 +20915,7 @@ cdef class VgpuSchedulerLogInfo_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") self._owner = None @@ -20939,7 +20927,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerLogInfo_v1 object at {hex(id(self))}>" @@ -20960,20 +20948,20 @@ cdef class VgpuSchedulerLogInfo_v1: if not isinstance(other, VgpuSchedulerLogInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20990,7 +20978,7 @@ cdef class VgpuSchedulerLogInfo_v1: if self._readonly: raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property def log_entries(self): @@ -21004,7 +20992,7 @@ cdef class VgpuSchedulerLogInfo_v1: cdef VgpuSchedulerLogEntry val_ = val if len(val) != 200: raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) @property def version(self): @@ -21064,7 +21052,7 @@ cdef class VgpuSchedulerLogInfo_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerLogInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) @staticmethod def from_data(data): @@ -21073,7 +21061,7 @@ cdef class VgpuSchedulerLogInfo_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) + return __from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21088,10 +21076,10 @@ cdef class VgpuSchedulerLogInfo_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerLogInfo_v1 obj = VgpuSchedulerLogInfo_v1.__new__(VgpuSchedulerLogInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) obj._owner = None obj._owned = True else: @@ -21132,7 +21120,7 @@ cdef class VgpuSchedulerState_v1: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") self._owner = None @@ -21144,7 +21132,7 @@ cdef class VgpuSchedulerState_v1: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.VgpuSchedulerState_v1 object at {hex(id(self))}>" @@ -21165,20 +21153,20 @@ cdef class VgpuSchedulerState_v1: if not isinstance(other, VgpuSchedulerState_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21195,7 +21183,7 @@ cdef class VgpuSchedulerState_v1: if self._readonly: raise ValueError("This VgpuSchedulerState_v1 instance is read-only") cdef VgpuSchedulerSetParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) + memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) @property def version(self): @@ -21244,7 +21232,7 @@ cdef class VgpuSchedulerState_v1: @staticmethod def from_buffer(buffer): """Create an VgpuSchedulerState_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) + return __from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) @staticmethod def from_data(data): @@ -21253,7 +21241,7 @@ cdef class VgpuSchedulerState_v1: Args: data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) + return __from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21268,10 +21256,10 @@ cdef class VgpuSchedulerState_v1: raise ValueError("ptr must not be null (0)") cdef VgpuSchedulerState_v1 obj = VgpuSchedulerState_v1.__new__(VgpuSchedulerState_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + obj._ptr = malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if obj._ptr == NULL: raise MemoryError("Error allocating VgpuSchedulerState_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) obj._owner = None obj._owned = True else: @@ -21310,7 +21298,7 @@ cdef class GridLicensableFeatures: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = calloc(1, sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") self._owner = None @@ -21322,7 +21310,7 @@ cdef class GridLicensableFeatures: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.GridLicensableFeatures object at {hex(id(self))}>" @@ -21343,20 +21331,20 @@ cdef class GridLicensableFeatures: if not isinstance(other, GridLicensableFeatures): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) + self._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21378,7 +21366,7 @@ cdef class GridLicensableFeatures: self._ptr[0].licensableFeaturesCount = len(val) if len(val) == 0: return - _cyb_memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) + memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) @property def is_grid_license_supported(self): @@ -21394,7 +21382,7 @@ cdef class GridLicensableFeatures: @staticmethod def from_buffer(buffer): """Create an GridLicensableFeatures instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) + return __from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) @staticmethod def from_data(data): @@ -21403,7 +21391,7 @@ cdef class GridLicensableFeatures: Args: data (_numpy.ndarray): a single-element array of dtype `grid_licensable_features_dtype` holding the data. """ - return _cyb_from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) + return __from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21418,10 +21406,10 @@ cdef class GridLicensableFeatures: raise ValueError("ptr must not be null (0)") cdef GridLicensableFeatures obj = GridLicensableFeatures.__new__(GridLicensableFeatures) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) + obj._ptr = malloc(sizeof(nvmlGridLicensableFeatures_t)) if obj._ptr == NULL: raise MemoryError("Error allocating GridLicensableFeatures") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) obj._owner = None obj._owned = True else: @@ -21460,7 +21448,7 @@ cdef class NvLinkInfo_v2: bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") self._owner = None @@ -21472,7 +21460,7 @@ cdef class NvLinkInfo_v2: if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - _cyb_free(ptr) + free(ptr) def __repr__(self): return f"<{__name__}.NvLinkInfo_v2 object at {hex(id(self))}>" @@ -21493,20 +21481,20 @@ cdef class NvLinkInfo_v2: if not isinstance(other, NvLinkInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) + return (memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + __getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) + memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21523,7 +21511,7 @@ cdef class NvLinkInfo_v2: if self._readonly: raise ValueError("This NvLinkInfo_v2 instance is read-only") cdef NvlinkFirmwareInfo val_ = val - _cyb_memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) + memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) @property def version(self): @@ -21550,7 +21538,7 @@ cdef class NvLinkInfo_v2: @staticmethod def from_buffer(buffer): """Create an NvLinkInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) + return __from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) @staticmethod def from_data(data): @@ -21559,7 +21547,7 @@ cdef class NvLinkInfo_v2: Args: data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) + return __from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): @@ -21574,10 +21562,10 @@ cdef class NvLinkInfo_v2: raise ValueError("ptr must not be null (0)") cdef NvLinkInfo_v2 obj = NvLinkInfo_v2.__new__(NvLinkInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) + obj._ptr = malloc(sizeof(nvmlNvLinkInfo_v2_t)) if obj._ptr == NULL: raise MemoryError("Error allocating NvLinkInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) + memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) obj._owner = None obj._owned = True else: @@ -21647,7 +21635,7 @@ cpdef str system_get_driver_version(): with nogil: __status__ = nvmlSystemGetDriverVersion(version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef str system_get_nvml_version(): @@ -21663,7 +21651,7 @@ cpdef str system_get_nvml_version(): with nogil: __status__ = nvmlSystemGetNVMLVersion(version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef int system_get_cuda_driver_version() except *: @@ -21712,7 +21700,7 @@ cpdef str system_get_process_name(unsigned int pid): with nogil: __status__ = nvmlSystemGetProcessName(pid, name, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(name) + return cpython.PyUnicode_FromString(name) cpdef object system_get_hic_version(): @@ -21999,7 +21987,7 @@ cpdef str device_get_name(intptr_t device): with nogil: __status__ = nvmlDeviceGetName(device, name, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(name) + return cpython.PyUnicode_FromString(name) cpdef int device_get_brand(intptr_t device) except? -1: @@ -22054,7 +22042,7 @@ cpdef str device_get_serial(intptr_t device): with nogil: __status__ = nvmlDeviceGetSerial(device, serial, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(serial) + return cpython.PyUnicode_FromString(serial) cpdef unsigned int device_get_module_id(intptr_t device) except? 0: @@ -22108,8 +22096,8 @@ cpdef object device_get_memory_affinity(intptr_t device, unsigned int node_set_s .. seealso:: `nvmlDeviceGetMemoryAffinity` """ if node_set_size == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef _cyb_view.array node_set = _cyb_view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef view.array node_set = view.array(shape=(node_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *node_set_ptr = (node_set.data) with nogil: __status__ = nvmlDeviceGetMemoryAffinity(device, node_set_size, node_set_ptr, scope) @@ -22131,8 +22119,8 @@ cpdef object device_get_cpu_affinity_within_scope(intptr_t device, unsigned int .. seealso:: `nvmlDeviceGetCpuAffinityWithinScope` """ if cpu_set_size == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinityWithinScope(device, cpu_set_size, cpu_set_ptr, scope) @@ -22153,8 +22141,8 @@ cpdef object device_get_cpu_affinity(intptr_t device, unsigned int cpu_set_size) .. seealso:: `nvmlDeviceGetCpuAffinity` """ if cpu_set_size == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] - cdef _cyb_view.array cpu_set = _cyb_view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long), format="L", mode="c")[:0] + cdef view.array cpu_set = view.array(shape=(cpu_set_size,), itemsize=sizeof(unsigned long), format="L", mode="c") cdef unsigned long *cpu_set_ptr = (cpu_set.data) with nogil: __status__ = nvmlDeviceGetCpuAffinity(device, cpu_set_size, cpu_set_ptr) @@ -22261,7 +22249,7 @@ cpdef str device_get_uuid(intptr_t device): with nogil: __status__ = nvmlDeviceGetUUID(device, uuid, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(uuid) + return cpython.PyUnicode_FromString(uuid) cpdef unsigned int device_get_minor_number(intptr_t device) except? 0: @@ -22298,7 +22286,7 @@ cpdef str device_get_board_part_number(intptr_t device): with nogil: __status__ = nvmlDeviceGetBoardPartNumber(device, part_number, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(part_number) + return cpython.PyUnicode_FromString(part_number) cpdef str device_get_inforom_version(intptr_t device, int object): @@ -22318,7 +22306,7 @@ cpdef str device_get_inforom_version(intptr_t device, int object): with nogil: __status__ = nvmlDeviceGetInforomVersion(device, <_InforomObject>object, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef str device_get_inforom_image_version(intptr_t device): @@ -22337,7 +22325,7 @@ cpdef str device_get_inforom_image_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetInforomImageVersion(device, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef unsigned int device_get_inforom_configuration_checksum(intptr_t device) except? 0: @@ -22724,8 +22712,8 @@ cpdef object device_get_supported_memory_clocks(intptr_t device): __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedMemoryClocks(device, count, clocks_m_hz_ptr) @@ -22750,8 +22738,8 @@ cpdef object device_get_supported_graphics_clocks(intptr_t device, unsigned int __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array clocks_m_hz = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array clocks_m_hz = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *clocks_m_hz_ptr = (clocks_m_hz.data) with nogil: __status__ = nvmlDeviceGetSupportedGraphicsClocks(device, memory_clock_m_hz, count, clocks_m_hz_ptr) @@ -23714,7 +23702,7 @@ cpdef str device_get_vbios_version(intptr_t device): with nogil: __status__ = nvmlDeviceGetVbiosVersion(device, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef object device_get_bridge_chip_info(intptr_t device): @@ -24274,8 +24262,8 @@ cpdef object device_get_accounting_pids(intptr_t device): __status__ = nvmlDeviceGetAccountingPids(device, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlDeviceGetAccountingPids(device, count, pids_ptr) @@ -24318,8 +24306,8 @@ cpdef object device_get_retired_pages(intptr_t device, int cause): __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, NULL) check_status_size(__status__) if page_count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] - cdef _cyb_view.array addresses = _cyb_view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned long long), format="Q", mode="c")[:0] + cdef view.array addresses = view.array(shape=(page_count[0],), itemsize=sizeof(unsigned long long), format="Q", mode="c") cdef unsigned long long *addresses_ptr = (addresses.data) with nogil: __status__ = nvmlDeviceGetRetiredPages(device, <_PageRetirementCause>cause, page_count, addresses_ptr) @@ -25257,7 +25245,7 @@ cpdef str vgpu_type_get_class(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetClass(vgpu_type_id, vgpu_type_class, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(vgpu_type_class) + return cpython.PyUnicode_FromString(vgpu_type_class) cpdef unsigned int vgpu_type_get_gpu_instance_profile_id(unsigned int vgpu_type_id) except? 0: @@ -25375,7 +25363,7 @@ cpdef str vgpu_type_get_license(unsigned int vgpu_type_id): with nogil: __status__ = nvmlVgpuTypeGetLicense(vgpu_type_id, vgpu_type_license_string, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(vgpu_type_license_string) + return cpython.PyUnicode_FromString(vgpu_type_license_string) cpdef unsigned int vgpu_type_get_frame_rate_limit(unsigned int vgpu_type_id) except? 0: @@ -25469,7 +25457,7 @@ cpdef str vgpu_instance_get_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetUUID(vgpu_instance, uuid, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(uuid) + return cpython.PyUnicode_FromString(uuid) cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): @@ -25488,7 +25476,7 @@ cpdef str vgpu_instance_get_vm_driver_version(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetVmDriverVersion(vgpu_instance, version, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(version) + return cpython.PyUnicode_FromString(version) cpdef unsigned long long vgpu_instance_get_fb_usage(unsigned int vgpu_instance) except? 0: @@ -25746,7 +25734,7 @@ cpdef str vgpu_instance_get_gpu_pci_id(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetGpuPciId(vgpu_instance, vgpu_pci_id, length) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(vgpu_pci_id) + return cpython.PyUnicode_FromString(vgpu_pci_id) cpdef unsigned int vgpu_type_get_capabilities(unsigned int vgpu_type_id, int capability) except? 0: @@ -25784,7 +25772,7 @@ cpdef str vgpu_instance_get_mdev_uuid(unsigned int vgpu_instance): with nogil: __status__ = nvmlVgpuInstanceGetMdevUUID(vgpu_instance, mdev_uuid, size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(mdev_uuid) + return cpython.PyUnicode_FromString(mdev_uuid) cpdef gpu_instance_set_vgpu_scheduler_state(intptr_t gpu_instance, intptr_t p_scheduler): @@ -25864,7 +25852,7 @@ cpdef str device_get_pgpu_metadata_string(intptr_t device): with nogil: __status__ = nvmlDeviceGetPgpuMetadataString(device, pgpu_metadata, buffer_size) check_status(__status__) - return _cyb_cpython.PyUnicode_FromString(pgpu_metadata) + return cpython.PyUnicode_FromString(pgpu_metadata) cpdef object device_get_vgpu_scheduler_log(intptr_t device): @@ -26008,8 +25996,8 @@ cpdef object vgpu_instance_get_accounting_pids(unsigned int vgpu_instance): __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, NULL) check_status_size(__status__) if count[0] == 0: - return _cyb_view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] - cdef _cyb_view.array pids = _cyb_view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") + return view.array(shape=(1,), itemsize=sizeof(unsigned int), format="I", mode="c")[:0] + cdef view.array pids = view.array(shape=(count[0],), itemsize=sizeof(unsigned int), format="I", mode="c") cdef unsigned int *pids_ptr = (pids.data) with nogil: __status__ = nvmlVgpuInstanceGetAccountingPids(vgpu_instance, count, pids_ptr) @@ -28464,4 +28452,3 @@ cpdef str vgpu_type_get_name(unsigned int vgpu_type_id): device_get_virtualization_mode.__doc__ = device_get_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") device_set_virtualization_mode.__doc__ = device_set_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``") GpmMetricId.GPM_METRIC_DRAM_BW_UTIL.__doc__ = "Percentage of DRAM bw used vs theoretical maximum. ``0.0 - 100.0 *\u200d/``." -del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvvm.pxd b/cuda_bindings/cuda/bindings/nvvm.pxd index 3a2caba8a85..ee2a3b8da3b 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/nvvm.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b4e10f31d2308a47fccfc9401d4f179bf61d389c1eb1491e8f9b00bf37a14ea9 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. 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.dev1422+gf4812259e.d20260318. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index ad117313ed8..b269bb5366f 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -1,28 +1,22 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=663773bbe4ae03ad1e170d44b06d5a924b5e4a3a0bd901c2f276976b82943bcb # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. - -# <<<< PREAMBLE CONTENT >>>> - -from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum - -# <<<< END OF PREAMBLE CONTENT >>>> - +# This code was automatically generated across versions from 12.0.1 to 13.3.0, generator version 0.3.1.dev1844+ge04b6a4af. Do not modify it directly. cimport cython # NOQA from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, nested_resource) +from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum + ############################################################################### # Enum ############################################################################### -class Result(_cyb_FastEnum): +class Result(_IntEnum): """ NVVM API call result code. @@ -327,4 +321,3 @@ cpdef int llvm_version(arch) except? 0: __status__ = nvvmLLVMVersion(_arch_, &major) check_status(__status__) return major -del _cyb_FastEnum From 34b29e7508f58722c7200fe066693572ccd8cdce Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 16:27:22 -0700 Subject: [PATCH 15/22] Revert "run_cybind_cython_gen 13.3.0 ../cuda-python" This reverts commit cc82446318f566629e0d6c6bc422ac9c1f92d574. --- cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in | 3 +-- cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in | 3 +-- cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in | 3 +-- cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in | 3 +-- cuda_bindings/cuda/bindings/_internal/_fast_enum.py | 3 +-- cuda_bindings/cuda/bindings/_internal/driver.pxd | 3 +-- cuda_bindings/cuda/bindings/_internal/driver_linux.pyx | 3 +-- cuda_bindings/cuda/bindings/_internal/driver_windows.pyx | 3 +-- cuda_bindings/cuda/bindings/_internal/nvrtc.pxd | 3 +-- cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx | 3 +-- cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx | 3 +-- cuda_bindings/cuda/bindings/cydriver.pxd | 3 +-- cuda_bindings/cuda/bindings/cydriver.pyx | 3 +-- cuda_bindings/cuda/bindings/cynvrtc.pxd | 3 +-- cuda_bindings/cuda/bindings/cynvrtc.pyx | 3 +-- cuda_bindings/cuda/bindings/cyruntime.pxd.in | 3 +-- cuda_bindings/cuda/bindings/cyruntime.pyx.in | 3 +-- cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in | 3 +-- cuda_bindings/cuda/bindings/cyruntime_types.pxi.in | 3 +-- cuda_bindings/cuda/bindings/driver.pxd | 3 +-- cuda_bindings/cuda/bindings/driver.pyx | 3 +-- cuda_bindings/cuda/bindings/nvrtc.pxd | 3 +-- cuda_bindings/cuda/bindings/nvrtc.pyx | 3 +-- cuda_bindings/cuda/bindings/runtime.pxd.in | 3 +-- cuda_bindings/cuda/bindings/runtime.pyx.in | 3 +-- cuda_bindings/docs/source/module/driver.rst | 1 - cuda_bindings/docs/source/module/nvrtc.rst | 1 - cuda_bindings/docs/source/module/runtime.rst | 1 - 28 files changed, 25 insertions(+), 53 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in index 4111d3026d8..f3e7ad72c3f 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a99a543be62e221f4b4b43249719b689c33ea030adef3dfa012b31efac555ece -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. include "../cyruntime_types.pxi" include "../_lib/cyruntime/cyruntime.pxd" diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in index 6917512cb82..565e158cf45 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ccadd478eafb421b735d8fc0c44e1c03e873885646a81381f1d995bd573b5120 -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. include "../cyruntime_functions.pxi" import os diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in index 516424d9d81..f44b806d829 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=005e8f266f43a90c73b382df384f4143abf0e82b26d8ad69cb8aa58fbafa13ef -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in index d64be7623f8..ceb7e0ac3c4 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=1e1b93a907c72767d54e7b740e3e3a1b7b629b111af47d22c94b587b769bab9c -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py index aa535fbc30f..c69c822588c 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a5b4a9e0738454701ffd077f67db69d4319c686d2b49150a88c84010c7f8ae93 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.3.0, generator version 0.3.1.dev1719+g565f73f4e. Do not modify it directly. """ diff --git a/cuda_bindings/cuda/bindings/_internal/driver.pxd b/cuda_bindings/cuda/bindings/_internal/driver.pxd index 2bc885df0f7..dd221d2598d 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver.pxd +++ b/cuda_bindings/cuda/bindings/_internal/driver.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a82b3f5dcb30b13294f6896a4d9d9f2f8d7be6b29c8f0a0c61677b1c622d4480 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from ..cydriver cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx index 04ff330ff4f..26d88842946 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5707b0fec0518992a2e1a55400a030c3921e5443dc65094af083b8845b41b0e5 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx index eed81cc1bcd..e199aa78ffb 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=51232c67845ad8bb70e4d63f8f48ed1246b27d371b929f229fa09c27b23235c8 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd index 7779dac2cdf..95a8f5c560e 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ff79428bd0afac112d0a9f6131f9ed097b8d0ebc4574444a0e4a41e7f6e260d0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from ..cynvrtc cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx index c29b9b4adfa..c5b283f1ebb 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6e54cb56384256b65cc962fbb478f7fac87523f222a141785b66881d8f554c64 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx index 4e85392c5cb..13cfbed4725 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7e496ceaaaf75ed29455bb670e3b3af9ab7d4ba1ea155a129088c04aab9b3c16 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd b/cuda_bindings/cuda/bindings/cydriver.pxd index 6633fb7f715..29819407112 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd +++ b/cuda_bindings/cuda/bindings/cydriver.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=be542bd43838a355344b0cdedcf3496368dd3cf0ebdfeda22b5963f384f4d06d # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx b/cuda_bindings/cuda/bindings/cydriver.pyx index abc901d0a0d..b558e3afd7f 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx +++ b/cuda_bindings/cuda/bindings/cydriver.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5b828e2ee0de9b245c71a6ba9361656ab10f7564caa7e3d9c162b2c6a07fb3df # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from ._internal cimport driver as _driver diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pxd b/cuda_bindings/cuda/bindings/cynvrtc.pxd index 061a77f1477..f3066f12130 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pxd +++ b/cuda_bindings/cuda/bindings/cynvrtc.pxd @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0da658de603326899002d26fdbea39e6f469626207e7b40435f7f24a7e5accf0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pyx b/cuda_bindings/cuda/bindings/cynvrtc.pyx index 2e0f8af1c94..936e4eff18a 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pyx +++ b/cuda_bindings/cuda/bindings/cynvrtc.pyx @@ -1,9 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9725757222bfc514253ab6a6113b4e6b1c33fab841fe2fff8ebb1012ecf7715b # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from ._internal cimport nvrtc as _nvrtc diff --git a/cuda_bindings/cuda/bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/cyruntime.pxd.in index 1f6c90a2874..b714d32bb00 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pxd.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2d7f136277c2cc633450e22e7833a0cab63cdfc70e07719a2e46d3812cd11a2f -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/cyruntime.pyx.in index a4d781dc64c..9b8324f1139 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8eaac6db08318ecc59f425f779f230fc18f12a64d077e6c9b3d0197725b747a4 -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cimport cuda.bindings._bindings.cyruntime as cyruntime cimport cython diff --git a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in index ee3571ee8cb..81e54abed07 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=29630fb8d40658dc3ed853407f00b4618688984d4227aae877e2f32807fef519 -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "cuda_runtime_api.h": {{if 'cudaDeviceReset' in found_functions}} diff --git a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in index 69e5d4b490b..d6ae085f5d4 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=93953ce179542f5c6172446b305a7568ce2b5190b3bfba1f1c9da282c3b965f0 -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cdef extern from "vector_types.h": diff --git a/cuda_bindings/cuda/bindings/driver.pxd b/cuda_bindings/cuda/bindings/driver.pxd index 1aba8b96cc4..e22a9007115 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd +++ b/cuda_bindings/cuda/bindings/driver.pxd @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f4b08b7f4b26966f9f462562819700500a100748c5b34ab47de79836e6bec3f2 -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1622+g48467ab08.d20260421. Do not modify it directly. cimport cuda.bindings.cydriver as cydriver include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/driver.pyx b/cuda_bindings/cuda/bindings/driver.pyx index 7f588984d84..e427814ac55 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx +++ b/cuda_bindings/cuda/bindings/driver.pyx @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4a70be46627269cff03a2b89504463158d6e50d738cfde91e8c3ed1bf88fd9e0 -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/nvrtc.pxd b/cuda_bindings/cuda/bindings/nvrtc.pxd index 10ac2cfedd0..c2e410d1aa2 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/nvrtc.pxd @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=06a058e3c626563f034714cce129fd58b33dd80c0e4a954723e92d0ae61c7c58 -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. cimport cuda.bindings.cynvrtc as cynvrtc include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx b/cuda_bindings/cuda/bindings/nvrtc.pyx index d2c71ca0c57..94808e0deda 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ac1af34ecd1468ac91074ce7f18423af19fbc7727653cdfc1cd9b6f33f6cec72 -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/runtime.pxd.in b/cuda_bindings/cuda/bindings/runtime.pxd.in index c6b9ec47ffb..5d9a9fe9fea 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd.in +++ b/cuda_bindings/cuda/bindings/runtime.pxd.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=532f673750b6344c789f7947449c1d99e3587792ba3b110e9dcc36396decbb67 -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. cimport cuda.bindings.cyruntime as cyruntime include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index 4c783d2ad00..8654e52fea4 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -1,8 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6fe2ed828d10a452e3b9a6c2b27e9f606eb6aec3dae2613d0a6eae475c7744a2 -# This code was automatically generated with version 13.3.0. Do not modify it directly. +# This code was automatically generated with version 13.3.0, generator version 0.3.1.dev1853+g2b0a94a68. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/docs/source/module/driver.rst b/cuda_bindings/docs/source/module/driver.rst index edd1fd212b9..4f3df8fbf38 100644 --- a/cuda_bindings/docs/source/module/driver.rst +++ b/cuda_bindings/docs/source/module/driver.rst @@ -1,6 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 -.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=15f77ea651a2deffa7f7ae710189546cff9c23ba311b693207743eaf339a0a9c ------ driver diff --git a/cuda_bindings/docs/source/module/nvrtc.rst b/cuda_bindings/docs/source/module/nvrtc.rst index 963551fce26..0432493d47f 100644 --- a/cuda_bindings/docs/source/module/nvrtc.rst +++ b/cuda_bindings/docs/source/module/nvrtc.rst @@ -1,6 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 -.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9f44170e12fd85fa04fcd599a18d0b6474ec7920be8f28a5c097000eb3ccb0e0 ----- nvrtc diff --git a/cuda_bindings/docs/source/module/runtime.rst b/cuda_bindings/docs/source/module/runtime.rst index fb1c0bb9015..3e86a79e267 100644 --- a/cuda_bindings/docs/source/module/runtime.rst +++ b/cuda_bindings/docs/source/module/runtime.rst @@ -1,6 +1,5 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 -.. CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0eccd5db44f7406acb693f5dd95ad2fa17c787c11659578cf54e116eb0b06e01 ------- runtime From df920f5e6d96ba6e08f7f8b49192985e79ea460d Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 16:30:08 -0700 Subject: [PATCH 16/22] run_cybind_cython_gen 13.3.0 ../cuda-python --- cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in | 1 + cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in | 1 + cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in | 1 + cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in | 1 + cuda_bindings/cuda/bindings/_internal/_fast_enum.py | 3 ++- cuda_bindings/cuda/bindings/_internal/driver.pxd | 1 + cuda_bindings/cuda/bindings/_internal/driver_linux.pyx | 1 + cuda_bindings/cuda/bindings/_internal/driver_windows.pyx | 1 + cuda_bindings/cuda/bindings/_internal/nvrtc.pxd | 1 + cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx | 1 + cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx | 1 + cuda_bindings/cuda/bindings/cydriver.pxd | 1 + cuda_bindings/cuda/bindings/cydriver.pyx | 1 + cuda_bindings/cuda/bindings/cynvrtc.pxd | 1 + cuda_bindings/cuda/bindings/cynvrtc.pyx | 1 + cuda_bindings/cuda/bindings/cyruntime.pxd.in | 1 + cuda_bindings/cuda/bindings/cyruntime.pyx.in | 1 + cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in | 1 + cuda_bindings/cuda/bindings/cyruntime_types.pxi.in | 1 + cuda_bindings/cuda/bindings/driver.pxd | 1 + cuda_bindings/cuda/bindings/driver.pyx | 1 + cuda_bindings/cuda/bindings/nvrtc.pxd | 1 + cuda_bindings/cuda/bindings/nvrtc.pyx | 1 + cuda_bindings/cuda/bindings/runtime.pxd.in | 1 + cuda_bindings/cuda/bindings/runtime.pyx.in | 1 + cuda_bindings/docs/source/module/driver.rst | 1 + cuda_bindings/docs/source/module/nvrtc.rst | 1 + cuda_bindings/docs/source/module/runtime.rst | 1 + 28 files changed, 29 insertions(+), 1 deletion(-) diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in index 085c4a08334..5432ab70c8a 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a99a543be62e221f4b4b43249719b689c33ea030adef3dfa012b31efac555ece include "../cyruntime_types.pxi" include "../_lib/cyruntime/cyruntime.pxd" diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in index 4c20b87d96f..58388d3dd92 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ccadd478eafb421b735d8fc0c44e1c03e873885646a81381f1d995bd573b5120 include "../cyruntime_functions.pxi" import os diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in index 7f699b95b2a..d12c7be7141 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=005e8f266f43a90c73b382df384f4143abf0e82b26d8ad69cb8aa58fbafa13ef cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM diff --git a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in index 4e0324f6ce6..c69f8a4fda2 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=1e1b93a907c72767d54e7b740e3e3a1b7b629b111af47d22c94b587b769bab9c cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py index a11477ea73b..43655da6a23 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -1,9 +1,10 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a5b4a9e0738454701ffd077f67db69d4319c686d2b49150a88c84010c7f8ae93 """ This is a replacement for the stdlib enum.IntEnum. diff --git a/cuda_bindings/cuda/bindings/_internal/driver.pxd b/cuda_bindings/cuda/bindings/_internal/driver.pxd index c10a279efc2..d0d183d034c 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver.pxd +++ b/cuda_bindings/cuda/bindings/_internal/driver.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a82b3f5dcb30b13294f6896a4d9d9f2f8d7be6b29c8f0a0c61677b1c622d4480 from ..cydriver cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx index d90e6346d8d..59a0dbc0b32 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5707b0fec0518992a2e1a55400a030c3921e5443dc65094af083b8845b41b0e5 from libc.stdint cimport intptr_t, uintptr_t import os diff --git a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx index aeb7aee0ac9..96c7545dd11 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=51232c67845ad8bb70e4d63f8f48ed1246b27d371b929f229fa09c27b23235c8 from libc.stdint cimport intptr_t import os diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd index dbb03f54a1e..020f113c03b 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ff79428bd0afac112d0a9f6131f9ed097b8d0ebc4574444a0e4a41e7f6e260d0 from ..cynvrtc cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx index 24d9d92cece..43efa40e4d8 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6e54cb56384256b65cc962fbb478f7fac87523f222a141785b66881d8f554c64 from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx index b31d57a66ff..2aef3b145d4 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7e496ceaaaf75ed29455bb670e3b3af9ab7d4ba1ea155a129088c04aab9b3c16 from libc.stdint cimport intptr_t import threading diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd b/cuda_bindings/cuda/bindings/cydriver.pxd index f1962d0c1f0..090ac5417ef 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd +++ b/cuda_bindings/cuda/bindings/cydriver.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=be542bd43838a355344b0cdedcf3496368dd3cf0ebdfeda22b5963f384f4d06d from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx b/cuda_bindings/cuda/bindings/cydriver.pyx index 4dbbab4449e..2ca1d97644e 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx +++ b/cuda_bindings/cuda/bindings/cydriver.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5b828e2ee0de9b245c71a6ba9361656ab10f7564caa7e3d9c162b2c6a07fb3df from ._internal cimport driver as _driver cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pxd b/cuda_bindings/cuda/bindings/cynvrtc.pxd index dd810928b63..0c0ec2f624d 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pxd +++ b/cuda_bindings/cuda/bindings/cynvrtc.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0da658de603326899002d26fdbea39e6f469626207e7b40435f7f24a7e5accf0 from libc.stdint cimport uint32_t, uint64_t diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pyx b/cuda_bindings/cuda/bindings/cynvrtc.pyx index 180831ed437..6289a40092a 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pyx +++ b/cuda_bindings/cuda/bindings/cynvrtc.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9725757222bfc514253ab6a6113b4e6b1c33fab841fe2fff8ebb1012ecf7715b from ._internal cimport nvrtc as _nvrtc cdef const char* nvrtcGetErrorString(nvrtcResult result) except?NULL nogil: diff --git a/cuda_bindings/cuda/bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/cyruntime.pxd.in index 5b3b67b60a3..952d5137f42 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pxd.in @@ -3,6 +3,7 @@ # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2d7f136277c2cc633450e22e7833a0cab63cdfc70e07719a2e46d3812cd11a2f from libc.stdint cimport uint32_t, uint64_t include "cyruntime_types.pxi" diff --git a/cuda_bindings/cuda/bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/cyruntime.pyx.in index 998f431fcfc..0d6e5c1b490 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx.in @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8eaac6db08318ecc59f425f779f230fc18f12a64d077e6c9b3d0197725b747a4 cimport cuda.bindings._bindings.cyruntime as cyruntime cimport cython diff --git a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in index 693ae78ec3b..69c75821056 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=29630fb8d40658dc3ed853407f00b4618688984d4227aae877e2f32807fef519 cdef extern from "cuda_runtime_api.h": {{if 'cudaDeviceReset' in found_functions}} diff --git a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in index 45cd39eb7e4..fa881e951dc 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in @@ -3,6 +3,7 @@ # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=93953ce179542f5c6172446b305a7568ce2b5190b3bfba1f1c9da282c3b965f0 cdef extern from "vector_types.h": cdef struct dim3: diff --git a/cuda_bindings/cuda/bindings/driver.pxd b/cuda_bindings/cuda/bindings/driver.pxd index 1aaeefb00d6..9f4d912a3c4 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd +++ b/cuda_bindings/cuda/bindings/driver.pxd @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f4b08b7f4b26966f9f462562819700500a100748c5b34ab47de79836e6bec3f2 cimport cuda.bindings.cydriver as cydriver include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/driver.pyx b/cuda_bindings/cuda/bindings/driver.pyx index a56dde69b7e..44b7c4c567c 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx +++ b/cuda_bindings/cuda/bindings/driver.pyx @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4a70be46627269cff03a2b89504463158d6e50d738cfde91e8c3ed1bf88fd9e0 from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/nvrtc.pxd b/cuda_bindings/cuda/bindings/nvrtc.pxd index fc19329aa1c..a17faea0763 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/nvrtc.pxd @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=06a058e3c626563f034714cce129fd58b33dd80c0e4a954723e92d0ae61c7c58 cimport cuda.bindings.cynvrtc as cynvrtc include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx b/cuda_bindings/cuda/bindings/nvrtc.pyx index e4314f832cd..d963b48f791 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ac1af34ecd1468ac91074ce7f18423af19fbc7727653cdfc1cd9b6f33f6cec72 from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/runtime.pxd.in b/cuda_bindings/cuda/bindings/runtime.pxd.in index 4be280ac200..7881587683b 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd.in +++ b/cuda_bindings/cuda/bindings/runtime.pxd.in @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=532f673750b6344c789f7947449c1d99e3587792ba3b110e9dcc36396decbb67 cimport cuda.bindings.cyruntime as cyruntime include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index 709dabc5ff3..a2cb9ed6b39 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # This code was automatically generated with version 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6fe2ed828d10a452e3b9a6c2b27e9f606eb6aec3dae2613d0a6eae475c7744a2 from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/docs/source/module/driver.rst b/cuda_bindings/docs/source/module/driver.rst index 4f3df8fbf38..8d9490f54a7 100644 --- a/cuda_bindings/docs/source/module/driver.rst +++ b/cuda_bindings/docs/source/module/driver.rst @@ -1,6 +1,7 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 +.. CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=15f77ea651a2deffa7f7ae710189546cff9c23ba311b693207743eaf339a0a9c ------ driver ------ diff --git a/cuda_bindings/docs/source/module/nvrtc.rst b/cuda_bindings/docs/source/module/nvrtc.rst index 0432493d47f..c879f49dc88 100644 --- a/cuda_bindings/docs/source/module/nvrtc.rst +++ b/cuda_bindings/docs/source/module/nvrtc.rst @@ -1,6 +1,7 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 +.. CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9f44170e12fd85fa04fcd599a18d0b6474ec7920be8f28a5c097000eb3ccb0e0 ----- nvrtc ----- diff --git a/cuda_bindings/docs/source/module/runtime.rst b/cuda_bindings/docs/source/module/runtime.rst index 3e86a79e267..80b11f16644 100644 --- a/cuda_bindings/docs/source/module/runtime.rst +++ b/cuda_bindings/docs/source/module/runtime.rst @@ -1,6 +1,7 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 +.. CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0eccd5db44f7406acb693f5dd95ad2fa17c787c11659578cf54e116eb0b06e01 ------- runtime ------- From b020ee4847da1babe8703ef02d19c7907cd64892 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 16:31:04 -0700 Subject: [PATCH 17/22] run_cybind_native 13.3.0 ../cuda-python --- cuda_bindings/cuda/bindings/_internal/_fast_enum.py | 4 ++-- cuda_bindings/cuda/bindings/_internal/cudla.pxd | 1 + cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx | 1 + cuda_bindings/cuda/bindings/_internal/cufile.pxd | 1 + cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx | 1 + cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd | 1 + cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx | 1 + cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx | 1 + cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd | 1 + cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx | 1 + cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx | 1 + cuda_bindings/cuda/bindings/_internal/nvml.pxd | 1 + cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx | 1 + cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx | 1 + cuda_bindings/cuda/bindings/_internal/nvvm.pxd | 1 + cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx | 1 + cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx | 1 + cuda_bindings/cuda/bindings/cudla.pxd | 1 + cuda_bindings/cuda/bindings/cudla.pyx | 1 + cuda_bindings/cuda/bindings/cufile.pxd | 1 + cuda_bindings/cuda/bindings/cufile.pyx | 1 + cuda_bindings/cuda/bindings/cycudla.pxd | 1 + cuda_bindings/cuda/bindings/cycudla.pyx | 1 + cuda_bindings/cuda/bindings/cycufile.pxd | 1 + cuda_bindings/cuda/bindings/cycufile.pyx | 1 + cuda_bindings/cuda/bindings/cynvfatbin.pxd | 1 + cuda_bindings/cuda/bindings/cynvfatbin.pyx | 1 + cuda_bindings/cuda/bindings/cynvjitlink.pxd | 1 + cuda_bindings/cuda/bindings/cynvjitlink.pyx | 1 + cuda_bindings/cuda/bindings/cynvml.pxd | 1 + cuda_bindings/cuda/bindings/cynvml.pyx | 1 + cuda_bindings/cuda/bindings/cynvvm.pxd | 1 + cuda_bindings/cuda/bindings/cynvvm.pyx | 1 + cuda_bindings/cuda/bindings/nvfatbin.pxd | 1 + cuda_bindings/cuda/bindings/nvfatbin.pyx | 1 + cuda_bindings/cuda/bindings/nvjitlink.pxd | 1 + cuda_bindings/cuda/bindings/nvjitlink.pyx | 1 + cuda_bindings/cuda/bindings/nvml.pxd | 1 + cuda_bindings/cuda/bindings/nvml.pyx | 1 + cuda_bindings/cuda/bindings/nvvm.pxd | 1 + cuda_bindings/cuda/bindings/nvvm.pyx | 1 + 41 files changed, 42 insertions(+), 2 deletions(-) diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py index 43655da6a23..cb3e6e900a3 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -1,10 +1,10 @@ # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a5b4a9e0738454701ffd077f67db69d4319c686d2b49150a88c84010c7f8ae93 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5791f341ee9bb6573f42300fbed50cc52fc5e808c1d6bb9156e6aabb9db29b17 """ This is a replacement for the stdlib enum.IntEnum. diff --git a/cuda_bindings/cuda/bindings/_internal/cudla.pxd b/cuda_bindings/cuda/bindings/_internal/cudla.pxd index a106bd3b0d2..359cf8f486a 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cudla.pxd @@ -3,6 +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=07f18bf6993a0d962a4e844aa9ea9a335534c669992d112dd12003b77015e5ba from ..cycudla cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx index d14c69efaf6..93ebdfa927d 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx @@ -3,6 +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=2b56e5f08b7806fe10648817d36d96ce420cb5a8329615fb283f71119128d090 from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/cufile.pxd b/cuda_bindings/cuda/bindings/_internal/cufile.pxd index 1942dce0612..b8fe03b779d 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cufile.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b70fdd33eb00b70224c097fb28dd1031d82e8a2930356a4428c93e3bd1b52a86 from ..cycufile cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx index 5a7f52af473..0917a2b368b 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b43946a1b7b010b7d9ee95ed67723e3dfc54b46a6dc68829e936ffad6ba852dc from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd index c93d43badae..b712a3087b8 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b52d99b7f07615d6c5ecb869a5c632e6e9cb4d0cb4f6cb1e43977d29ecd9995c from ..cynvfatbin cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx index 34d84da5e7e..e30e9ee145d 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=821fd26991431cd8e528f964b5035e1deafcddf44d2971a267d9ed11d80d5199 from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx index a52733389fb..b82882cfd76 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2052c33a9bbfdef36b362c4eedc1284ce8fa2fc905a53ac9c366218ca99f5913 from libc.stdint cimport intptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd index 29b6e6568c5..edfe717e649 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fd32577c0d6b922ff30c56dc4f3dcbed2251c393098c27d972ccc8688564fa50 from ..cynvjitlink cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx index 7af8d3a0176..33cea546ee4 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f6e8c32c0afa43fe218ae5c6f43f402bb85ab1e9898ad6270872c3e546eb4913 from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx index 26537b5a059..1385f2df077 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9043dd9e45a69e2bd6c7984832fca8cc1ccd7c66b605b384e4cff18b0c713027 from libc.stdint cimport intptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvml.pxd b/cuda_bindings/cuda/bindings/_internal/nvml.pxd index c83348fd358..eea80739f07 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvml.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ed4c433854399c2e4f1adc3ffcfc37901e1be29c5aa50728498c87225edf92b1 from ..cynvml cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx index 948be266843..05e7ede4929 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bdb56d8618b22dfcdcb3da879bbe276c3caf7c07aae6e5aa2b76de817f4baa39 from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx index 02294da79c9..6de3a0e8671 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=56d9b790c493aea94da4c2c52e78dea025da7c698edc614c374767038d40869c from libc.stdint cimport intptr_t import os diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd index 6c48b41efbf..e4ac3cf1258 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a27b041eb470b98bf5b1a0a92ace9467c5f3921d47ee10557a4f00ff1e4ac411 from ..cynvvm cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx index 40be61a91a3..d4cd73399a4 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3c31adc68b8220439ea196a56ea63cf670aff0f85c0a67c8f554e1af4d07f456 from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx index 8d3894c39d5..25b9d1cc674 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=49ccc5908d39ebb526fee704591480550b5f780c05f14366531360e3ec2ac17a from libc.stdint cimport intptr_t import threading diff --git a/cuda_bindings/cuda/bindings/cudla.pxd b/cuda_bindings/cuda/bindings/cudla.pxd index 03190bf3e64..cb58d685a24 100644 --- a/cuda_bindings/cuda/bindings/cudla.pxd +++ b/cuda_bindings/cuda/bindings/cudla.pxd @@ -3,6 +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 from libc.stdint cimport intptr_t from .cycudla cimport * diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index 7955e71132b..b8b79d43fbf 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -3,6 +3,7 @@ # <<<< PREAMBLE CONTENT >>>> +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6e7ac86c22e602c08df8250f3b50c135945378aa8ae4ddb4e10174fd979c4aa5 cimport cpython as _cyb_cpython cimport cpython.buffer as _cyb_cpython_buffer from cython cimport view as _cyb_view diff --git a/cuda_bindings/cuda/bindings/cufile.pxd b/cuda_bindings/cuda/bindings/cufile.pxd index d8f2feaad15..2bd8c7489ca 100644 --- a/cuda_bindings/cuda/bindings/cufile.pxd +++ b/cuda_bindings/cuda/bindings/cufile.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=232df43b5a8960f10286c172abc71222a3822087a1f6134e12d9341f3b53886c from libc.stdint cimport intptr_t from .cycufile cimport * diff --git a/cuda_bindings/cuda/bindings/cufile.pyx b/cuda_bindings/cuda/bindings/cufile.pyx index 0894d3754d9..6e178890e4f 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -6,6 +6,7 @@ # <<<< PREAMBLE CONTENT >>>> +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=359f9b42f4f97b9a74570e1f7d20eb6f5faae2df194a6161f4d5a9512c3ffbe3 cimport cpython as _cyb_cpython cimport cpython.buffer as _cyb_cpython_buffer cimport cpython.memoryview as _cyb_cpython_memoryview diff --git a/cuda_bindings/cuda/bindings/cycudla.pxd b/cuda_bindings/cuda/bindings/cycudla.pxd index d81f58b0380..6eee248e7d5 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pxd +++ b/cuda_bindings/cuda/bindings/cycudla.pxd @@ -4,6 +4,7 @@ # This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. # This layer exposes the C header to Cython as-is. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c4dacd5de0bc9a6ac0cc92dabed1728cc6133d0448924ea6db4f9c740ff089b6 from libc.stdint cimport int8_t, int16_t, int32_t, int64_t from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t from libc.stdint cimport intptr_t, uintptr_t diff --git a/cuda_bindings/cuda/bindings/cycudla.pyx b/cuda_bindings/cuda/bindings/cycudla.pyx index ef4ad78200b..42a7bd651c6 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pyx +++ b/cuda_bindings/cuda/bindings/cycudla.pyx @@ -3,6 +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=b134ed8cb83eb5a5c6ff30be817e64d09d421d7257761e58fbc06b131690a392 from ._internal cimport cudla as _cudla diff --git a/cuda_bindings/cuda/bindings/cycufile.pxd b/cuda_bindings/cuda/bindings/cycufile.pxd index 909870be9db..b5a0c9cb884 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pxd +++ b/cuda_bindings/cuda/bindings/cycufile.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f840820f160e36eebe6e052b5a5d3a35b55704060301ee2ab7d5cd7a7d580418 from libc.stdint cimport uint32_t, uint64_t from libc.time cimport time_t from libcpp cimport bool as cpp_bool diff --git a/cuda_bindings/cuda/bindings/cycufile.pyx b/cuda_bindings/cuda/bindings/cycufile.pyx index f5ad2d5e9f1..e457aa2c63b 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pyx +++ b/cuda_bindings/cuda/bindings/cycufile.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=74f1f9c9443af66fdadbfeeb01e5c15c2d8f1b9b0b20eafa2a279583bcf7df00 from ._internal cimport cufile as _cufile import cython diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pxd b/cuda_bindings/cuda/bindings/cynvfatbin.pxd index d6550352a6f..ef8951fbcc3 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fede358631d711050e04c9b0f7582773ba7012844987bc47358f1378d484a136 from libc.stdint cimport intptr_t, uint32_t diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pyx b/cuda_bindings/cuda/bindings/cynvfatbin.pyx index 20e3b31d553..86bdd89f0f3 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bae30bbdaff2009b86c05de2a46bbaecad9e63327c93a10b6f2e8a2d95fd6a60 from ._internal cimport nvfatbin as _nvfatbin diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pxd b/cuda_bindings/cuda/bindings/cynvjitlink.pxd index 0098c055655..ff80a17c5ab 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=58778b073e81f54fcf5c42775b45944d22b6e944fe6965b42d83898239f1e1b6 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 8bdb0409a8b..cf4ee0332a0 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e507515291c3bc20b88d0b58ab5b01a1cc38c5d21bca87a4f379cc846b869ed4 from ._internal cimport nvjitlink as _nvjitlink diff --git a/cuda_bindings/cuda/bindings/cynvml.pxd b/cuda_bindings/cuda/bindings/cynvml.pxd index d48ad47c439..61ac3fa0da7 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pxd +++ b/cuda_bindings/cuda/bindings/cynvml.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5e55307c8ff89e076c29fc7c2a36bf0af7ecf3162693a4c94d7fca65454d6a9e from libc.stdint cimport int64_t diff --git a/cuda_bindings/cuda/bindings/cynvml.pyx b/cuda_bindings/cuda/bindings/cynvml.pyx index d664707eb77..612368c7736 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pyx +++ b/cuda_bindings/cuda/bindings/cynvml.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ec221879a459b2de9b3dfe54cba58613e9c08b279a95f782a450c98fd7cea532 from ._internal cimport nvml as _nvml diff --git a/cuda_bindings/cuda/bindings/cynvvm.pxd b/cuda_bindings/cuda/bindings/cynvvm.pxd index 09a9b48bd36..f25e7e84b3b 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pxd +++ b/cuda_bindings/cuda/bindings/cynvvm.pxd @@ -10,6 +10,7 @@ ############################################################################### # enums +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=79be0fd21f7c6b6112743eb60ce9e69287a66999ecaaa063d87a52ab64982bce ctypedef enum nvvmResult "nvvmResult": NVVM_SUCCESS "NVVM_SUCCESS" = 0 NVVM_ERROR_OUT_OF_MEMORY "NVVM_ERROR_OUT_OF_MEMORY" = 1 diff --git a/cuda_bindings/cuda/bindings/cynvvm.pyx b/cuda_bindings/cuda/bindings/cynvvm.pyx index 1b4f48c1bd9..43f036a36c0 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pyx +++ b/cuda_bindings/cuda/bindings/cynvvm.pyx @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7ea5803be62646c287bad43350e27d3254f35d25ab50b9c54f7ac5695b4c3114 from ._internal cimport nvvm as _nvvm diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pxd b/cuda_bindings/cuda/bindings/nvfatbin.pxd index 6be36a6ecd0..facc2dfeeb4 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/nvfatbin.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c9d5a4b06ca92f766674f286b75dfc83dff952b5987eb88cdb2773bb28f1ea6a from libc.stdint cimport intptr_t, uint32_t from .cynvfatbin cimport * diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index 11178f79c5a..683e623facf 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -6,6 +6,7 @@ # <<<< PREAMBLE CONTENT >>>> +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d5a4eb978220598892471233ffd8b7caa8cee7b6b0c27d2d9c458f1d91979f8b from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum # <<<< END OF PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pxd b/cuda_bindings/cuda/bindings/nvjitlink.pxd index 0958496df47..ac697049088 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/nvjitlink.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b847666247321f33f1f6b4c5fa92d6ee5d1022389e32eceb03c7458c45ff44ed from libc.stdint cimport intptr_t, uint32_t from .cynvjitlink cimport * diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pyx b/cuda_bindings/cuda/bindings/nvjitlink.pyx index 718ede05d78..51f1f8adbe3 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -6,6 +6,7 @@ # <<<< PREAMBLE CONTENT >>>> +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=18cc1af125a513c3867c6f2bd8e97f4b0b2d2e58565a8980223a419ae5f23b74 from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum # <<<< END OF PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/nvml.pxd b/cuda_bindings/cuda/bindings/nvml.pxd index 85c57c8c4b4..acc9900f069 100644 --- a/cuda_bindings/cuda/bindings/nvml.pxd +++ b/cuda_bindings/cuda/bindings/nvml.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=eb901f46ca6b6930935726541c32b3ea04f7f46b6090c4c2ad9cb62386c2028b from libc.stdint cimport intptr_t from .cynvml cimport * diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index ded83bdaba6..d0370b6d0f4 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -6,6 +6,7 @@ # <<<< PREAMBLE CONTENT >>>> +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=52642c2c289dbd93191f019468630c0c7935bf99bc15c9c7c0de3797a109e8b0 cimport cpython as _cyb_cpython cimport cpython.buffer as _cyb_cpython_buffer cimport cpython.memoryview as _cyb_cpython_memoryview diff --git a/cuda_bindings/cuda/bindings/nvvm.pxd b/cuda_bindings/cuda/bindings/nvvm.pxd index 1844ea1e7a7..cb97bd48714 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/nvvm.pxd @@ -4,6 +4,7 @@ # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b4e10f31d2308a47fccfc9401d4f179bf61d389c1eb1491e8f9b00bf37a14ea9 from libc.stdint cimport intptr_t from .cynvvm cimport * diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index 8ead1e19998..fc6f9fa1020 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -6,6 +6,7 @@ # <<<< PREAMBLE CONTENT >>>> +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=663773bbe4ae03ad1e170d44b06d5a924b5e4a3a0bd901c2f276976b82943bcb from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum # <<<< END OF PREAMBLE CONTENT >>>> From d8733610ed9e7c41cb6226aa585dda9a4f16c435 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 17:01:19 -0700 Subject: [PATCH 18/22] Use resolved nvcc path for RDC library fixtures --- cuda_core/tests/test_binaries/build_test_binaries.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cuda_core/tests/test_binaries/build_test_binaries.sh b/cuda_core/tests/test_binaries/build_test_binaries.sh index 22c21585755..077dd8e90cb 100755 --- a/cuda_core/tests/test_binaries/build_test_binaries.sh +++ b/cuda_core/tests/test_binaries/build_test_binaries.sh @@ -20,9 +20,9 @@ NVCC="${NVCC:-nvcc}" -o "${SCRIPTPATH}/saxpy.o" "${SCRIPTPATH}/saxpy.cu" if [[ "${OS:-}" == "Windows_NT" ]]; then - nvcc -lib -o "${SCRIPTPATH}/saxpy.lib" "${SCRIPTPATH}/saxpy.o" + "${NVCC}" -lib -o "${SCRIPTPATH}/saxpy.lib" "${SCRIPTPATH}/saxpy.o" ls -lah "${SCRIPTPATH}/saxpy.o" "${SCRIPTPATH}/saxpy.lib" else - nvcc -lib -o "${SCRIPTPATH}/saxpy.a" "${SCRIPTPATH}/saxpy.o" + "${NVCC}" -lib -o "${SCRIPTPATH}/saxpy.a" "${SCRIPTPATH}/saxpy.o" ls -lah "${SCRIPTPATH}/saxpy.o" "${SCRIPTPATH}/saxpy.a" fi From 703f9de49a8a51a722ad3e5bbce230e0d1bbb834 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 17:07:12 -0700 Subject: [PATCH 19/22] Generalize generated-file seal validation --- .pre-commit-config.yaml | 6 +++--- ..._seals.py => check_generated_file_seals.py} | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) rename toolshed/{check_cybind-generated_file_seals.py => check_generated_file_seals.py} (81%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3833c89be7c..37f41831fa9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,9 +43,9 @@ repos: exclude: '(.*pixi\.lock)|(\.git_archival\.txt)|(.*\.patch$)|(^cuda_core/cuda/core/_vendored/)' args: ["--fix"] - - id: check-cybind-generated-file-seals - name: Check cybind-generated file seals - entry: python ./toolshed/check_cybind-generated_file_seals.py + - id: check-generated-file-seals + name: Check generated-file seals + entry: python ./toolshed/check_generated_file_seals.py language: python files: ^cuda_bindings/ types: [text] diff --git a/toolshed/check_cybind-generated_file_seals.py b/toolshed/check_generated_file_seals.py similarity index 81% rename from toolshed/check_cybind-generated_file_seals.py rename to toolshed/check_generated_file_seals.py index 400b6bda049..62cebf18f0a 100644 --- a/toolshed/check_cybind-generated_file_seals.py +++ b/toolshed/check_generated_file_seals.py @@ -8,9 +8,11 @@ import sys from pathlib import Path, PureWindowsPath -GENERATED_FILE_SEAL_TOKEN = "CYBIND-GENERATED-DO-NOT-MODIFY-THIS-FILE:" # noqa: S105 +GENERATED_FILE_MARKER_FRAGMENT = "-GENERATED-DO-NOT-MODIFY-THIS-FILE" +GENERATED_FILE_SEAL_TOKEN = "CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE:" # noqa: S105 SUPPORTED_GENERATED_FILE_SEAL_FORMATS = frozenset({1}) +assert GENERATED_FILE_MARKER_FRAGMENT in GENERATED_FILE_SEAL_TOKEN _TOKEN_BYTES = GENERATED_FILE_SEAL_TOKEN.encode("ascii") _MARKER_REGEX = re.compile( rb"^(?P#|\.\.) " @@ -38,7 +40,7 @@ def expected_comment_prefix(filepath): def load_previously_sealed_paths(): process = subprocess.run( # noqa: S603 - ["git", "grep", "-l", "-I", "-F", GENERATED_FILE_SEAL_TOKEN, "HEAD", "--"], # noqa: S607 + ["git", "grep", "-l", "-I", "-F", "-e", GENERATED_FILE_MARKER_FRAGMENT, "HEAD", "--"], # noqa: S607 capture_output=True, text=True, ) @@ -67,23 +69,23 @@ def validate_generated_file_seal(filepath, previously_sealed_paths): if not marker_indexes: if normalized_path in previously_sealed_paths: - print(f"MISSING cybind-generated file seal in {filepath!r}") + print(f"MISSING generated-file seal in {filepath!r}") return False return True if len(marker_indexes) != 1: - print(f"INVALID cybind-generated file seal count in {filepath!r}: found {len(marker_indexes)}, expected 1") + print(f"INVALID generated-file seal count in {filepath!r}: found {len(marker_indexes)}, expected 1") return False marker_index = marker_indexes[0] match = _MARKER_REGEX.fullmatch(lines[marker_index]) if match is None: - print(f"MALFORMED cybind-generated file seal in {filepath!r}") + print(f"MALFORMED generated-file seal in {filepath!r}") return False seal_format = int(match.group("format")) if seal_format not in SUPPORTED_GENERATED_FILE_SEAL_FORMATS: - print(f"UNSUPPORTED cybind-generated file seal format {seal_format} in {filepath!r}") + print(f"UNSUPPORTED generated-file seal format {seal_format} in {filepath!r}") return False expected_prefix = expected_comment_prefix(filepath) @@ -91,7 +93,7 @@ def validate_generated_file_seal(filepath, previously_sealed_paths): print(f"UNSUPPORTED sealed generated-file extension in {filepath!r}") return False if match.group("prefix") != expected_prefix: - print(f"INVALID cybind-generated file seal comment prefix in {filepath!r}") + print(f"INVALID generated-file seal comment prefix in {filepath!r}") return False unsealed_blob = b"".join(lines[:marker_index] + lines[marker_index + 1 :]) @@ -99,7 +101,7 @@ def validate_generated_file_seal(filepath, previously_sealed_paths): recorded_digest = match.group("digest") if recorded_digest != computed_digest: print( - f"MISMATCHED cybind-generated file seal in {filepath!r}: " + f"MISMATCHED generated-file seal in {filepath!r}: " f"recorded {recorded_digest.decode()}, computed {computed_digest.decode()}" ) return False From 8bde2a56601d181fd793ebaf4aa6c4302236f235 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 7 Jul 2026 17:25:16 -0700 Subject: [PATCH 20/22] Address generated-file seal review feedback --- toolshed/check_generated_file_seals.py | 44 +++++++++++++++++++------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/toolshed/check_generated_file_seals.py b/toolshed/check_generated_file_seals.py index 62cebf18f0a..d3227033759 100644 --- a/toolshed/check_generated_file_seals.py +++ b/toolshed/check_generated_file_seals.py @@ -19,7 +19,19 @@ + re.escape(_TOKEN_BYTES) + rb" format=(?P[0-9]+); content-sha256=(?P[0-9a-f]{64})\n$" ) -_SOURCE_SUFFIXES = frozenset({".py", ".pxd", ".pxi", ".pyx"}) +_COMMENT_CHARS = { + ".py": b"#", + ".pxd": b"#", + ".pxi": b"#", + ".pyx": b"#", + ".pyx.in": b"#", + ".pxd.in": b"#", + ".pxi.in": b"#", + ".rst": b"..", + ".c": b"//", + ".cpp": b"//", + ".h": b"//", +} def normalize_repo_path(filepath): @@ -27,20 +39,27 @@ def normalize_repo_path(filepath): def expected_comment_prefix(filepath): - suffixes = Path(normalize_repo_path(filepath)).suffixes - if suffixes and suffixes[-1] == ".in": - suffixes = suffixes[:-1] - suffix = suffixes[-1] if suffixes else "" - if suffix in _SOURCE_SUFFIXES: - return b"#" - if suffix == ".rst": - return b".." + normalized_path = normalize_repo_path(filepath) + for suffix, comment_char in _COMMENT_CHARS.items(): + if normalized_path.endswith(suffix): + return comment_char return None def load_previously_sealed_paths(): process = subprocess.run( # noqa: S603 - ["git", "grep", "-l", "-I", "-F", "-e", GENERATED_FILE_MARKER_FRAGMENT, "HEAD", "--"], # noqa: S607 + [ # noqa: S607 + "git", + "grep", + "-l", + "-I", + "-F", + "-e", + GENERATED_FILE_MARKER_FRAGMENT, + "HEAD", + "--", + "cuda_bindings", + ], capture_output=True, text=True, ) @@ -100,9 +119,10 @@ def validate_generated_file_seal(filepath, previously_sealed_paths): computed_digest = hashlib.sha256(unsealed_blob).hexdigest().encode("ascii") recorded_digest = match.group("digest") if recorded_digest != computed_digest: + print(f"Manual changes detected in {filepath!r}. It is a generated file and should not be edited directly.") print( - f"MISMATCHED generated-file seal in {filepath!r}: " - f"recorded {recorded_digest.decode()}, computed {computed_digest.decode()}" + f"Recorded content SHA-256: {recorded_digest.decode()}\n" + f"Computed content SHA-256: {computed_digest.decode()}" ) return False From 89bccba8f05be2dd44bf6a3fcdf4c578c4c8f9c6 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 8 Jul 2026 09:20:55 -0700 Subject: [PATCH 21/22] Exclude seal checker from generated-file grep --- toolshed/check_generated_file_seals.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/toolshed/check_generated_file_seals.py b/toolshed/check_generated_file_seals.py index d3227033759..1a9c45de61b 100644 --- a/toolshed/check_generated_file_seals.py +++ b/toolshed/check_generated_file_seals.py @@ -8,8 +8,10 @@ import sys from pathlib import Path, PureWindowsPath -GENERATED_FILE_MARKER_FRAGMENT = "-GENERATED-DO-NOT-MODIFY-THIS-FILE" -GENERATED_FILE_SEAL_TOKEN = "CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE:" # noqa: S105 +# Intentionally assemble these markers so git grep finds only generated files, +# not the checker that validates them. +GENERATED_FILE_MARKER_FRAGMENT = "-" + "-".join(("GENERATED", "DO", "NOT", "MODIFY", "THIS", "FILE")) +GENERATED_FILE_SEAL_TOKEN = "-".join(("CYTHON", "BINDINGS")) + GENERATED_FILE_MARKER_FRAGMENT + ":" SUPPORTED_GENERATED_FILE_SEAL_FORMATS = frozenset({1}) assert GENERATED_FILE_MARKER_FRAGMENT in GENERATED_FILE_SEAL_TOKEN From 9e91f7ad5193fbcc2296275b4cc8ad427c18f83a Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 8 Jul 2026 09:25:14 -0700 Subject: [PATCH 22/22] run_cybind_cython_gen 13.3.0 ../cuda-python && run_cybind_native 13.3.0 ../cuda-python Before running cybind: rm $(git grep -l -F CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE) --- cuda_bindings/cuda/bindings/cudla.pyx | 2 +- cuda_bindings/cuda/bindings/cufile.pyx | 2 +- cuda_bindings/cuda/bindings/nvfatbin.pyx | 2 +- cuda_bindings/cuda/bindings/nvjitlink.pyx | 2 +- cuda_bindings/cuda/bindings/nvml.pyx | 2 +- cuda_bindings/cuda/bindings/nvvm.pyx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index b8b79d43fbf..ce92c2deef9 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -1,9 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6e7ac86c22e602c08df8250f3b50c135945378aa8ae4ddb4e10174fd979c4aa5 # <<<< PREAMBLE CONTENT >>>> -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6e7ac86c22e602c08df8250f3b50c135945378aa8ae4ddb4e10174fd979c4aa5 cimport cpython as _cyb_cpython cimport cpython.buffer as _cyb_cpython_buffer from cython cimport view as _cyb_view diff --git a/cuda_bindings/cuda/bindings/cufile.pyx b/cuda_bindings/cuda/bindings/cufile.pyx index 6e178890e4f..b3b875d2018 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -3,10 +3,10 @@ # SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=359f9b42f4f97b9a74570e1f7d20eb6f5faae2df194a6161f4d5a9512c3ffbe3 # <<<< PREAMBLE CONTENT >>>> -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=359f9b42f4f97b9a74570e1f7d20eb6f5faae2df194a6161f4d5a9512c3ffbe3 cimport cpython as _cyb_cpython cimport cpython.buffer as _cyb_cpython_buffer cimport cpython.memoryview as _cyb_cpython_memoryview diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index 683e623facf..f1bdb927a5f 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -3,10 +3,10 @@ # SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d5a4eb978220598892471233ffd8b7caa8cee7b6b0c27d2d9c458f1d91979f8b # <<<< PREAMBLE CONTENT >>>> -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d5a4eb978220598892471233ffd8b7caa8cee7b6b0c27d2d9c458f1d91979f8b from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum # <<<< END OF PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pyx b/cuda_bindings/cuda/bindings/nvjitlink.pyx index 51f1f8adbe3..89dea49e4ad 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -3,10 +3,10 @@ # SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=18cc1af125a513c3867c6f2bd8e97f4b0b2d2e58565a8980223a419ae5f23b74 # <<<< PREAMBLE CONTENT >>>> -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=18cc1af125a513c3867c6f2bd8e97f4b0b2d2e58565a8980223a419ae5f23b74 from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum # <<<< END OF PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index d0370b6d0f4..26b63f1f6a7 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -3,10 +3,10 @@ # SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=52642c2c289dbd93191f019468630c0c7935bf99bc15c9c7c0de3797a109e8b0 # <<<< PREAMBLE CONTENT >>>> -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=52642c2c289dbd93191f019468630c0c7935bf99bc15c9c7c0de3797a109e8b0 cimport cpython as _cyb_cpython cimport cpython.buffer as _cyb_cpython_buffer cimport cpython.memoryview as _cyb_cpython_memoryview diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index fc6f9fa1020..eec2fd8556a 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -3,10 +3,10 @@ # SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=663773bbe4ae03ad1e170d44b06d5a924b5e4a3a0bd901c2f276976b82943bcb # <<<< PREAMBLE CONTENT >>>> -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=663773bbe4ae03ad1e170d44b06d5a924b5e4a3a0bd901c2f276976b82943bcb from cuda.bindings._internal._fast_enum import FastEnum as _cyb_FastEnum # <<<< END OF PREAMBLE CONTENT >>>>