diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bdfd9a427d9..3a0c78ab290 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -# 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: Apache-2.0 @@ -32,6 +32,7 @@ repos: additional_dependencies: - https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl exclude: '(.*pixi\.lock)|(\.git_archival\.txt)' + args: ["--fix"] - repo: https://github.com/PyCQA/bandit rev: 2d0b675b04c80ae42277e10500db06a0a37bae17 # frozen: 1.8.6 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aac13021866..c6828d76b41 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,6 +37,29 @@ Some contributors prefer to commit intermediate or work-in-progress changes that Choose the setup that best fits your workflow and development style. +## Signing Your Work + +Contributions to files licensed under Apache 2.0 must be certified under the +[Developer Certificate of Origin (DCO)](#developer-certificate-of-origin-dco). +Sign off every commit with the `-s` option: + +```console +git commit -s -m "Describe your change" +``` + +Git uses your configured name and email address to add a trailer like this to +the commit message: + +```text +Signed-off-by: Your Name +``` + +Use your real name and an email address associated with your contribution. The +sign-off certifies that you have the right to submit the contribution under the +DCO below. DCO sign-off is separate from the cryptographic commit signing +described in the next section; both requirements apply. + + ## Code signing This repository implements a security check to prevent the CI system from running untrusted code. A part of the security check consists of checking if the git commits are signed. Please ensure that your commits are signed [following GitHub’s instruction](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification). diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000000..d6f74778be8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,178 @@ +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/LICENSE.md b/LICENSE.md deleted file mode 100644 index f5b0c2e2699..00000000000 --- a/LICENSE.md +++ /dev/null @@ -1,4 +0,0 @@ -This repository is structured in a way that files are licensed differently - - [`cuda.python`](./cuda_python/LICENSE): NVIDIA Software License - - [`cuda.bindings`](./cuda_bindings/LICENSE): NVIDIA Software License - - [`cuda.core`](./cuda_core/LICENSE) and everything else in this repository: Apache 2.0 diff --git a/README.md b/README.md index 97d9800ccea..d7a639cc0c6 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,7 @@ The list of available interfaces is: * NVRTC * nvJitLink * NVVM + +## License + +CUDA Python is licensed under the [Apache License 2.0](./LICENSE). diff --git a/cuda_bindings/DESCRIPTION.rst b/cuda_bindings/DESCRIPTION.rst index 30bcb9a7c50..ca0297523e0 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 b7d042fcee3..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 a98aa53f222..d381e04d59e 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 # at least with setuptools 75.0.0 this folder was added erroneously diff --git a/cuda_bindings/benchmarks/conftest.py b/cuda_bindings/benchmarks/conftest.py index 4c075122cc8..0719dca47b8 100644 --- a/cuda_bindings/benchmarks/conftest.py +++ b/cuda_bindings/benchmarks/conftest.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/benchmarks/kernels.py b/cuda_bindings/benchmarks/kernels.py index 36646fba003..89f1e1a0a87 100644 --- a/cuda_bindings/benchmarks/kernels.py +++ b/cuda_bindings/benchmarks/kernels.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 kernel_string = """\ #define ITEM_PARAM(x, T) T x diff --git a/cuda_bindings/benchmarks/pytest.ini b/cuda_bindings/benchmarks/pytest.ini index e4b51877886..99da0054320 100644 --- a/cuda_bindings/benchmarks/pytest.ini +++ b/cuda_bindings/benchmarks/pytest.ini @@ -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 [pytest] required_plugins = pytest-benchmark diff --git a/cuda_bindings/benchmarks/test_cupy.py b/cuda_bindings/benchmarks/test_cupy.py index 76dd6e6a45f..cd6c6740350 100644 --- a/cuda_bindings/benchmarks/test_cupy.py +++ b/cuda_bindings/benchmarks/test_cupy.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/benchmarks/test_launch_latency.py b/cuda_bindings/benchmarks/test_launch_latency.py index aea251108f4..541db98d556 100755 --- a/cuda_bindings/benchmarks/test_launch_latency.py +++ b/cuda_bindings/benchmarks/test_launch_latency.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/benchmarks/test_numba.py b/cuda_bindings/benchmarks/test_numba.py index dfe084c6b1c..4f708bf69d7 100644 --- a/cuda_bindings/benchmarks/test_numba.py +++ b/cuda_bindings/benchmarks/test_numba.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/benchmarks/test_pointer_attributes.py b/cuda_bindings/benchmarks/test_pointer_attributes.py index c34ee4f70f6..136d4be19f0 100644 --- a/cuda_bindings/benchmarks/test_pointer_attributes.py +++ b/cuda_bindings/benchmarks/test_pointer_attributes.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 random diff --git a/cuda_bindings/build_hooks.py b/cuda_bindings/build_hooks.py index 2187c1e9d4d..f09ee822a50 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 33fcc1545ca..0bd2dc0d0f6 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 49a8141. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 6ef5e9b1b9b..b905efad239 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 0.3.1.dev1630+gadce055ea.d20260422. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 90ce787843b..e53d833f569 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 49a8141. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 4854d5361f3..14c3b0e6c54 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 49a8141. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 fbc6eacd7f7..256774aeb74 100644 --- a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -1,7 +1,7 @@ # 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.0 to 13.3.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. """ diff --git a/cuda_bindings/cuda/bindings/_internal/cufile.pxd b/cuda_bindings/cuda/bindings/_internal/cufile.pxd index 51f0429e64a..1e6f963ec66 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cufile.pxd @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1862+g538a87a98. 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 78ea77b283e..5bbf72ccc0b 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t import threading diff --git a/cuda_bindings/cuda/bindings/_internal/driver.pxd b/cuda_bindings/cuda/bindings/_internal/driver.pxd index e93f7af99d4..d0d9583220b 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver.pxd +++ b/cuda_bindings/cuda/bindings/_internal/driver.pxd @@ -1,8 +1,8 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from ..cydriver cimport * @@ -493,4 +493,4 @@ cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil -cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil \ No newline at end of file +cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, 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 80b9f4b2e5a..3a13be76535 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx @@ -1,8 +1,8 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 37c2b234540..703498f0d9f 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx @@ -1,8 +1,8 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from libc.stdint cimport intptr_t @@ -594,7 +594,7 @@ cdef int _init_driver() except -1 nogil: if __cuGetProcAddress_v2 == NULL: raise RuntimeError("Failed to get __cuGetProcAddress_v2") _F_cuGetProcAddress_v2 = <__cuGetProcAddress_v2_T>__cuGetProcAddress_v2 - + if bool(int(os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0))): ptds_mode = CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM else: diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd index 15617f8ad54..5110abedcd9 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd @@ -1,8 +1,8 @@ # 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from ..cynvfatbin cimport * @@ -20,5 +20,6 @@ cdef nvFatbinResult _nvFatbinAddLTOIR(nvFatbinHandle handle, const void* code, s cdef nvFatbinResult _nvFatbinSize(nvFatbinHandle handle, size_t* size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil cdef nvFatbinResult _nvFatbinGet(nvFatbinHandle handle, void* buffer) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil cdef nvFatbinResult _nvFatbinVersion(unsigned int* major, unsigned int* minor) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult _nvFatbinAddIndex(nvFatbinHandle handle, const void* code, size_t size, const char* identifier) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil cdef nvFatbinResult _nvFatbinAddReloc(nvFatbinHandle handle, const void* code, size_t size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil cdef nvFatbinResult _nvFatbinAddTileIR(nvFatbinHandle handle, const void* code, size_t size, const char* identifier, const char* optionsCmdLine) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx index f5a9bbd2180..eabebf44003 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx @@ -1,8 +1,8 @@ # 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from libc.stdint cimport intptr_t, uintptr_t @@ -68,6 +68,7 @@ cdef void* __nvFatbinAddLTOIR = NULL cdef void* __nvFatbinSize = NULL cdef void* __nvFatbinGet = NULL cdef void* __nvFatbinVersion = NULL +cdef void* __nvFatbinAddIndex = NULL cdef void* __nvFatbinAddReloc = NULL cdef void* __nvFatbinAddTileIR = NULL @@ -151,6 +152,13 @@ cdef int _init_nvfatbin() except -1 nogil: handle = load_library() __nvFatbinVersion = dlsym(handle, 'nvFatbinVersion') + global __nvFatbinAddIndex + __nvFatbinAddIndex = dlsym(RTLD_DEFAULT, 'nvFatbinAddIndex') + if __nvFatbinAddIndex == NULL: + if handle == NULL: + handle = load_library() + __nvFatbinAddIndex = dlsym(handle, 'nvFatbinAddIndex') + global __nvFatbinAddReloc __nvFatbinAddReloc = dlsym(RTLD_DEFAULT, 'nvFatbinAddReloc') if __nvFatbinAddReloc == NULL: @@ -213,6 +221,9 @@ cpdef dict _inspect_function_pointers(): global __nvFatbinVersion data["__nvFatbinVersion"] = __nvFatbinVersion + global __nvFatbinAddIndex + data["__nvFatbinAddIndex"] = __nvFatbinAddIndex + global __nvFatbinAddReloc data["__nvFatbinAddReloc"] = __nvFatbinAddReloc @@ -324,6 +335,16 @@ cdef nvFatbinResult _nvFatbinVersion(unsigned int* major, unsigned int* minor) e major, minor) +cdef nvFatbinResult _nvFatbinAddIndex(nvFatbinHandle handle, const void* code, size_t size, const char* identifier) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvFatbinAddIndex + _check_or_init_nvfatbin() + if __nvFatbinAddIndex == NULL: + with gil: + raise FunctionNotFoundError("function nvFatbinAddIndex is not found") + return (__nvFatbinAddIndex)( + handle, code, size, identifier) + + cdef nvFatbinResult _nvFatbinAddReloc(nvFatbinHandle handle, const void* code, size_t size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil: global __nvFatbinAddReloc _check_or_init_nvfatbin() diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx index add15de5617..97c8dfd9493 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx @@ -1,8 +1,8 @@ # 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from libc.stdint cimport intptr_t @@ -86,6 +86,7 @@ cdef void* __nvFatbinAddLTOIR = NULL cdef void* __nvFatbinSize = NULL cdef void* __nvFatbinGet = NULL cdef void* __nvFatbinVersion = NULL +cdef void* __nvFatbinAddIndex = NULL cdef void* __nvFatbinAddReloc = NULL cdef void* __nvFatbinAddTileIR = NULL @@ -129,6 +130,9 @@ cdef int _init_nvfatbin() except -1 nogil: global __nvFatbinVersion __nvFatbinVersion = GetProcAddress(handle, 'nvFatbinVersion') + global __nvFatbinAddIndex + __nvFatbinAddIndex = GetProcAddress(handle, 'nvFatbinAddIndex') + global __nvFatbinAddReloc __nvFatbinAddReloc = GetProcAddress(handle, 'nvFatbinAddReloc') @@ -184,6 +188,9 @@ cpdef dict _inspect_function_pointers(): global __nvFatbinVersion data["__nvFatbinVersion"] = __nvFatbinVersion + global __nvFatbinAddIndex + data["__nvFatbinAddIndex"] = __nvFatbinAddIndex + global __nvFatbinAddReloc data["__nvFatbinAddReloc"] = __nvFatbinAddReloc @@ -295,6 +302,16 @@ cdef nvFatbinResult _nvFatbinVersion(unsigned int* major, unsigned int* minor) e major, minor) +cdef nvFatbinResult _nvFatbinAddIndex(nvFatbinHandle handle, const void* code, size_t size, const char* identifier) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvFatbinAddIndex + _check_or_init_nvfatbin() + if __nvFatbinAddIndex == NULL: + with gil: + raise FunctionNotFoundError("function nvFatbinAddIndex is not found") + return (__nvFatbinAddIndex)( + handle, code, size, identifier) + + cdef nvFatbinResult _nvFatbinAddReloc(nvFatbinHandle handle, const void* code, size_t size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil: global __nvFatbinAddReloc _check_or_init_nvfatbin() diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd index 6fd75c86822..e67e60b9a1d 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd @@ -1,8 +1,8 @@ -# 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. 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 d676aac3727..e1fe587fce2 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx @@ -1,8 +1,8 @@ -# 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. 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 4ee6859bdbd..8fe889f7270 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx @@ -1,8 +1,8 @@ -# 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. 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 2a725ade744..f907c891b84 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvml.pxd @@ -1,8 +1,8 @@ # 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.dev1588+g61faef43a. 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.dev1862+g538a87a98. 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 51f6e8205bf..7a230c18bb0 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx @@ -1,8 +1,8 @@ # 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.dev1588+g61faef43a. 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.dev1862+g538a87a98. 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 5bdc45a482a..a51a3e8554e 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx @@ -1,8 +1,8 @@ # 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.dev1588+g61faef43a. 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.dev1862+g538a87a98. 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 256e9f13805..d349d140dcb 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd @@ -1,8 +1,8 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 f20754cea9d..8a39ba2ef3a 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx @@ -1,8 +1,8 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 c4e4da2fe43..9801edea5af 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx @@ -1,8 +1,8 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 3c992309189..32e2d6a00dc 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. 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.dev1862+g538a87a98. 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 03ade4f9393..93d97debec4 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. 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.dev1862+g538a87a98. 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 7502613e4bb..e5d1e070ea8 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. 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.dev1862+g538a87a98. Do not modify it directly. from libc.stdint cimport intptr_t diff --git a/cuda_bindings/cuda/bindings/_internal/utils.pxd b/cuda_bindings/cuda/bindings/_internal/utils.pxd index 30f7935afb9..dfbb85bd85c 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 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 aa78e6cff01..df17a9e47df 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 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 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 6ef1c92c48e..ec761534970 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 770ee16cb9f..89ea70296bb 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-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 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 9b1e5e23a72..6dec8da7fbd 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/cufile.pxd b/cuda_bindings/cuda/bindings/cufile.pxd index 1c52ddd979e..67c7bf06e18 100644 --- a/cuda_bindings/cuda/bindings/cufile.pxd +++ b/cuda_bindings/cuda/bindings/cufile.pxd @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1862+g538a87a98. 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 278af28a54c..b285d1efafd 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -1,29 +1,53 @@ -# 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 # -# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1364+ged01d643e. 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 with version 12.9.1, generator version 0.3.1.dev1862+g538a87a98. 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 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 +59,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 @@ -75,21 +83,20 @@ _py_anon_pod1_dtype = _numpy.dtype(( } )) - cdef class _py_anon_pod1: - """Empty-initialize an instance of `_anon_pod1`. + """Empty-initialize an instance of `cuda_bindings_cufile__anon_pod1`. - .. seealso:: `_anon_pod1` + .. seealso:: `cuda_bindings_cufile__anon_pod1` """ cdef: - _anon_pod1 *_ptr + cuda_bindings_cufile__anon_pod1 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod1 *>calloc(1, sizeof((NULL).handle)) + self._ptr = _cyb_calloc(1, sizeof((NULL).handle)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod1") self._owner = None @@ -97,11 +104,11 @@ cdef class _py_anon_pod1: self._readonly = False def __dealloc__(self): - cdef _anon_pod1 *ptr + cdef cuda_bindings_cufile__anon_pod1 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" @@ -122,20 +129,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 = <_anon_pod1 *>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 +174,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 +183,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,14 +198,14 @@ cdef class _py_anon_pod1: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) if owner is None: - obj._ptr = <_anon_pod1 *>malloc(sizeof((NULL).handle)) + obj._ptr = _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: - obj._ptr = <_anon_pod1 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -206,7 +213,7 @@ cdef class _py_anon_pod1: cdef _get__py_anon_pod3_dtype_offsets(): - cdef _anon_pod3 pod = _anon_pod3() + cdef cuda_bindings_cufile__anon_pod3 pod return _numpy.dtype({ 'names': ['dev_ptr_base', 'file_offset', 'dev_ptr_offset', 'size_'], 'formats': [_numpy.intp, _numpy.int64, _numpy.int64, _numpy.uint64], @@ -222,19 +229,19 @@ cdef _get__py_anon_pod3_dtype_offsets(): _py_anon_pod3_dtype = _get__py_anon_pod3_dtype_offsets() cdef class _py_anon_pod3: - """Empty-initialize an instance of `_anon_pod3`. + """Empty-initialize an instance of `cuda_bindings_cufile__anon_pod3`. - .. seealso:: `_anon_pod3` + .. seealso:: `cuda_bindings_cufile__anon_pod3` """ cdef: - _anon_pod3 *_ptr + cuda_bindings_cufile__anon_pod3 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod3 *>calloc(1, sizeof((NULL).u.batch)) + self._ptr = _cyb_calloc(1, sizeof((NULL).u.batch)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod3") self._owner = None @@ -242,11 +249,11 @@ cdef class _py_anon_pod3: self._readonly = False def __dealloc__(self): - cdef _anon_pod3 *ptr + cdef cuda_bindings_cufile__anon_pod3 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" @@ -267,20 +274,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 = <_anon_pod3 *>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 +341,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 +350,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,14 +365,14 @@ cdef class _py_anon_pod3: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) if owner is None: - obj._ptr = <_anon_pod3 *>malloc(sizeof((NULL).u.batch)) + obj._ptr = _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: - obj._ptr = <_anon_pod3 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -373,7 +380,7 @@ cdef class _py_anon_pod3: cdef _get_io_events_dtype_offsets(): - cdef CUfileIOEvents_t pod = CUfileIOEvents_t() + cdef CUfileIOEvents_t pod return _numpy.dtype({ 'names': ['cookie', 'status', 'ret'], 'formats': [_numpy.intp, _numpy.int32, _numpy.uint64], @@ -389,21 +396,17 @@ io_events_dtype = _get_io_events_dtype_offsets() cdef class IOEvents: """Empty-initialize an array of `CUfileIOEvents_t`. - The resulting object is of length `size` and of dtype `io_events_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `CUfileIOEvents_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=io_events_dtype) self._data = arr.view(_numpy.recarray) @@ -440,10 +443,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): @@ -532,8 +535,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) @@ -542,7 +545,7 @@ cdef class IOEvents: cdef _get_descr_dtype_offsets(): - cdef CUfileDescr_t pod = CUfileDescr_t() + cdef CUfileDescr_t pod return _numpy.dtype({ 'names': ['type', 'handle', 'fs_ops'], 'formats': [_numpy.int32, _py_anon_pod1_dtype, _numpy.intp], @@ -558,21 +561,17 @@ descr_dtype = _get_descr_dtype_offsets() cdef class Descr: """Empty-initialize an array of `CUfileDescr_t`. - The resulting object is of length `size` and of dtype `descr_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `CUfileDescr_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=descr_dtype) self._data = arr.view(_numpy.recarray) @@ -609,10 +608,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): @@ -699,8 +698,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) @@ -715,21 +714,20 @@ _py_anon_pod2_dtype = _numpy.dtype(( } )) - cdef class _py_anon_pod2: - """Empty-initialize an instance of `_anon_pod2`. + """Empty-initialize an instance of `cuda_bindings_cufile__anon_pod2`. - .. seealso:: `_anon_pod2` + .. seealso:: `cuda_bindings_cufile__anon_pod2` """ cdef: - _anon_pod2 *_ptr + cuda_bindings_cufile__anon_pod2 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = <_anon_pod2 *>calloc(1, sizeof((NULL).u)) + self._ptr = _cyb_calloc(1, sizeof((NULL).u)) if self._ptr == NULL: raise MemoryError("Error allocating _py_anon_pod2") self._owner = None @@ -737,11 +735,11 @@ cdef class _py_anon_pod2: self._readonly = False def __dealloc__(self): - cdef _anon_pod2 *ptr + cdef cuda_bindings_cufile__anon_pod2 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL - free(ptr) + _cyb_free(ptr) def __repr__(self): return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" @@ -762,20 +760,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 = <_anon_pod2 *>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 @@ -792,12 +790,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(_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): @@ -806,7 +804,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): @@ -821,14 +819,14 @@ cdef class _py_anon_pod2: raise ValueError("ptr must not be null (0)") cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) if owner is None: - obj._ptr = <_anon_pod2 *>malloc(sizeof((NULL).u)) + obj._ptr = _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: - obj._ptr = <_anon_pod2 *>ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -836,7 +834,7 @@ cdef class _py_anon_pod2: cdef _get_io_params_dtype_offsets(): - cdef CUfileIOParams_t pod = CUfileIOParams_t() + cdef CUfileIOParams_t pod return _numpy.dtype({ 'names': ['mode', 'u', 'fh', 'opcode', 'cookie'], 'formats': [_numpy.int32, _py_anon_pod2_dtype, _numpy.intp, _numpy.int32, _numpy.intp], @@ -854,21 +852,17 @@ io_params_dtype = _get_io_params_dtype_offsets() cdef class IOParams: """Empty-initialize an array of `CUfileIOParams_t`. - The resulting object is of length `size` and of dtype `io_params_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `CUfileIOParams_t` """ cdef: readonly object _data - - def __init__(self, size=1): arr = _numpy.empty(size, dtype=io_params_dtype) self._data = arr.view(_numpy.recarray) @@ -905,10 +899,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): @@ -1017,8 +1011,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) @@ -1026,12 +1020,11 @@ cdef class IOParams: return obj - ############################################################################### # Enum ############################################################################### -class OpError(_FastEnum): +class OpError(_cyb_FastEnum): """ See `CUfileOpError`. """ @@ -1074,7 +1067,7 @@ class OpError(_FastEnum): ASYNC_NOT_SUPPORTED = CU_FILE_ASYNC_NOT_SUPPORTED IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR -class DriverStatusFlags(_FastEnum): +class DriverStatusFlags(_cyb_FastEnum): """ See `CUfileDriverStatusFlags_t`. """ @@ -1091,14 +1084,14 @@ class DriverStatusFlags(_FastEnum): NVME_P2P_SUPPORTED = (CU_FILE_NVME_P2P_SUPPORTED, 'Support for NVMe using PCI P2PDMA') SCATEFS_SUPPORTED = (CU_FILE_SCATEFS_SUPPORTED, 'Support for ScateFS') -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') -class FeatureFlags(_FastEnum): +class FeatureFlags(_cyb_FastEnum): """ See `CUfileFeatureFlags_t`. """ @@ -1107,7 +1100,7 @@ class FeatureFlags(_FastEnum): STREAMS_SUPPORTED = (CU_FILE_STREAMS_SUPPORTED, 'Unsupported') PARALLEL_IO_SUPPORTED = (CU_FILE_PARALLEL_IO_SUPPORTED, 'Unsupported') -class FileHandleType(_FastEnum): +class FileHandleType(_cyb_FastEnum): """ See `CUfileFileHandleType`. """ @@ -1115,14 +1108,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`. """ @@ -1134,13 +1127,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`. """ @@ -1157,7 +1150,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`. """ @@ -1174,7 +1167,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`. """ @@ -1460,7 +1453,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): @@ -1541,3 +1534,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/cycufile.pxd b/cuda_bindings/cuda/bindings/cycufile.pxd index f6697316372..17cc7c87582 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pxd +++ b/cuda_bindings/cuda/bindings/cycufile.pxd @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t from libc.time cimport time_t @@ -33,7 +33,7 @@ cdef extern from "": # enums -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUfileOpError: CU_FILE_SUCCESS CU_FILE_DRIVER_NOT_INITIALIZED @@ -74,7 +74,7 @@ cdef extern from '': CU_FILE_ASYNC_NOT_SUPPORTED CU_FILE_IO_MAX_ERROR -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUfileDriverStatusFlags_t: CU_FILE_LUSTRE_SUPPORTED CU_FILE_WEKAFS_SUPPORTED @@ -89,30 +89,30 @@ cdef extern from '': CU_FILE_NVME_P2P_SUPPORTED CU_FILE_SCATEFS_SUPPORTED -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUfileDriverControlFlags_t: CU_FILE_USE_POLL_MODE CU_FILE_ALLOW_COMPAT_MODE -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUfileFeatureFlags_t: CU_FILE_DYN_ROUTING_SUPPORTED CU_FILE_BATCH_IO_SUPPORTED CU_FILE_STREAMS_SUPPORTED CU_FILE_PARALLEL_IO_SUPPORTED -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUfileFileHandleType: CU_FILE_HANDLE_TYPE_OPAQUE_FD CU_FILE_HANDLE_TYPE_OPAQUE_WIN32 CU_FILE_HANDLE_TYPE_USERSPACE_FS -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUfileOpcode_t: CUFILE_READ CUFILE_WRITE -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUfileStatus_t: CUFILE_WAITING CUFILE_PENDING @@ -122,11 +122,11 @@ cdef extern from '': CUFILE_TIMEOUT CUFILE_FAILED -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUfileBatchMode_t: CUFILE_BATCH -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUFileSizeTConfigParameter_t: CUFILE_PARAM_PROFILE_STATS CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH @@ -141,7 +141,7 @@ cdef extern from '': CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUFileBoolConfigParameter_t: CUFILE_PARAM_PROPERTIES_USE_POLL_MODE CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE @@ -156,25 +156,28 @@ cdef extern from '': CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION CUFILE_PARAM_STREAM_MEMOPS_BYPASS -cdef extern from '': +cdef extern from 'cufile.h': ctypedef enum CUFileStringConfigParameter_t: CUFILE_PARAM_LOGGING_LEVEL CUFILE_PARAM_ENV_LOGFILE_PATH CUFILE_PARAM_LOG_DIR +cdef enum: _CUFILEERROR_T_INTERNAL_LOADING_ERROR = -42 # types -cdef extern from '': +cdef extern from 'cufile.h': ctypedef void* CUfileHandle_t 'CUfileHandle_t' -cdef extern from '': + +cdef extern from 'cufile.h': ctypedef void* CUfileBatchHandle_t 'CUfileBatchHandle_t' -cdef extern from '': + +cdef extern from 'cufile.h': ctypedef struct CUfileError_t 'CUfileError_t': CUfileOpError err CUresult cu_err -cdef struct _anon_pod0 '_anon_pod0': +cdef struct cuda_bindings_cufile__anon_pod0: unsigned int major_version unsigned int minor_version size_t poll_thresh_size @@ -182,13 +185,13 @@ cdef struct _anon_pod0 '_anon_pod0': unsigned int dstatusflags unsigned int dcontrolflags -cdef extern from '': +cdef extern from 'cufile.h': ctypedef struct cufileRDMAInfo_t 'cufileRDMAInfo_t': int version int desc_len char* desc_str -cdef extern from '': +cdef extern from 'cufile.h': ctypedef struct CUfileFSOps_t 'CUfileFSOps_t': char* (*fs_type)(void*) int (*getRDMADeviceList)(void*, sockaddr_t**) @@ -196,25 +199,25 @@ cdef extern from '': ssize_t (*read)(void*, char*, size_t, loff_t, cufileRDMAInfo_t*) ssize_t (*write)(void*, const char*, size_t, loff_t, cufileRDMAInfo_t*) -cdef union _anon_pod1 '_anon_pod1': +cdef union cuda_bindings_cufile__anon_pod1: int fd void* handle -cdef struct _anon_pod3 '_anon_pod3': +cdef struct cuda_bindings_cufile__anon_pod3: void* devPtr_base off_t file_offset off_t devPtr_offset size_t size -cdef extern from '': +cdef extern from 'cufile.h': ctypedef struct CUfileIOEvents_t 'CUfileIOEvents_t': void* cookie CUfileStatus_t status size_t ret -cdef extern from '': +cdef extern from 'cufile.h': ctypedef struct CUfileDrvProps_t 'CUfileDrvProps_t': - _anon_pod0 nvfs + cuda_bindings_cufile__anon_pod0 nvfs unsigned int fflags unsigned int max_device_cache_size unsigned int per_buffer_cache_size @@ -222,25 +225,24 @@ cdef extern from '': unsigned int max_batch_io_size unsigned int max_batch_io_timeout_msecs -cdef extern from '': +cdef extern from 'cufile.h': ctypedef struct CUfileDescr_t 'CUfileDescr_t': CUfileFileHandleType type - _anon_pod1 handle + cuda_bindings_cufile__anon_pod1 handle CUfileFSOps_t* fs_ops -cdef union _anon_pod2 '_anon_pod2': - _anon_pod3 batch +cdef union cuda_bindings_cufile__anon_pod2: + cuda_bindings_cufile__anon_pod3 batch -cdef extern from '': +cdef extern from 'cufile.h': ctypedef struct CUfileIOParams_t 'CUfileIOParams_t': CUfileBatchMode_t mode - _anon_pod2 u + cuda_bindings_cufile__anon_pod2 u CUfileHandle_t fh CUfileOpcode_t opcode void* cookie - cdef extern from *: """ // This is the missing piece we need to supply to help Cython & C++ compilers. diff --git a/cuda_bindings/cuda/bindings/cycufile.pyx b/cuda_bindings/cuda/bindings/cycufile.pyx index c5aa36fc964..2572a6c2f3a 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pyx +++ b/cuda_bindings/cuda/bindings/cycufile.pyx @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated with version 12.9.1, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from ._internal cimport cufile as _cufile diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd b/cuda_bindings/cuda/bindings/cydriver.pxd index 4afe37d5fc0..97f0af0d211 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd +++ b/cuda_bindings/cuda/bindings/cydriver.pxd @@ -1,8 +1,8 @@ # 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 12.9.0, generator version 0.3.1.dev1602+g3c8d84404. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t @@ -3473,4 +3473,4 @@ cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 cdef enum: RESOURCE_ABI_VERSION = 1 -cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 42 \ No newline at end of file +cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 42 diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx b/cuda_bindings/cuda/bindings/cydriver.pyx index 9e3723277c8..7a20b40186c 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx +++ b/cuda_bindings/cuda/bindings/cydriver.pyx @@ -1,8 +1,8 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from ._internal cimport driver as _driver diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pxd b/cuda_bindings/cuda/bindings/cynvfatbin.pxd index 3cf5c542e25..8530b65b26c 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pxd @@ -1,8 +1,8 @@ # 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t @@ -51,5 +51,6 @@ cdef nvFatbinResult nvFatbinAddLTOIR(nvFatbinHandle handle, const void* code, si cdef nvFatbinResult nvFatbinSize(nvFatbinHandle handle, size_t* size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil cdef nvFatbinResult nvFatbinGet(nvFatbinHandle handle, void* buffer) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil cdef nvFatbinResult nvFatbinVersion(unsigned int* major, unsigned int* minor) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvFatbinResult nvFatbinAddIndex(nvFatbinHandle handle, const void* code, size_t size, const char* identifier) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil cdef nvFatbinResult nvFatbinAddReloc(nvFatbinHandle handle, const void* code, size_t size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil cdef nvFatbinResult nvFatbinAddTileIR(nvFatbinHandle handle, const void* code, size_t size, const char* identifier, const char* optionsCmdLine) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pyx b/cuda_bindings/cuda/bindings/cynvfatbin.pyx index 07492e51a94..8057ac1e84e 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pyx @@ -1,8 +1,8 @@ # 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from ._internal cimport nvfatbin as _nvfatbin @@ -47,6 +47,10 @@ cdef nvFatbinResult nvFatbinVersion(unsigned int* major, unsigned int* minor) ex return _nvfatbin._nvFatbinVersion(major, minor) +cdef nvFatbinResult nvFatbinAddIndex(nvFatbinHandle handle, const void* code, size_t size, const char* identifier) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvfatbin._nvFatbinAddIndex(handle, code, size, identifier) + + cdef nvFatbinResult nvFatbinAddReloc(nvFatbinHandle handle, const void* code, size_t size) except?_NVFATBINRESULT_INTERNAL_LOADING_ERROR nogil: return _nvfatbin._nvFatbinAddReloc(handle, code, size) diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pxd b/cuda_bindings/cuda/bindings/cynvjitlink.pxd index 50d817f13bd..b8bc3586e56 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pxd @@ -1,8 +1,8 @@ -# 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. 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 53639e64a95..b4b1e000eaa 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pyx @@ -1,8 +1,8 @@ -# 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. 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 58f6c4de218..0737e2a48fa 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pxd +++ b/cuda_bindings/cuda/bindings/cynvml.pxd @@ -1,8 +1,8 @@ # 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.dev1588+g61faef43a. 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.dev1862+g538a87a98. 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 c83faa005c2..31225939d91 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pyx +++ b/cuda_bindings/cuda/bindings/cynvml.pyx @@ -1,8 +1,8 @@ # 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.dev1588+g61faef43a. 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.dev1862+g538a87a98. Do not modify it directly. from ._internal cimport nvml as _nvml diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pxd b/cuda_bindings/cuda/bindings/cynvrtc.pxd index adee5b767af..fc8f8302bd6 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pxd +++ b/cuda_bindings/cuda/bindings/cynvrtc.pxd @@ -1,8 +1,8 @@ # 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 12.9.0, generator version 0.3.1.dev1602+g3c8d84404. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 6fe067bc97d..2f4a7a38093 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pyx +++ b/cuda_bindings/cuda/bindings/cynvrtc.pyx @@ -1,8 +1,8 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from ._internal cimport nvrtc as _nvrtc diff --git a/cuda_bindings/cuda/bindings/cynvvm.pxd b/cuda_bindings/cuda/bindings/cynvvm.pxd index b4204a3cbd5..5da19af4fba 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pxd +++ b/cuda_bindings/cuda/bindings/cynvvm.pxd @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. 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.dev1862+g538a87a98. Do not modify it directly. ############################################################################### diff --git a/cuda_bindings/cuda/bindings/cynvvm.pyx b/cuda_bindings/cuda/bindings/cynvvm.pyx index 75a50a69e34..596c30be5bd 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pyx +++ b/cuda_bindings/cuda/bindings/cynvvm.pyx @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. 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.dev1862+g538a87a98. Do not modify it directly. from ._internal cimport nvvm as _nvvm diff --git a/cuda_bindings/cuda/bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/cyruntime.pxd.in index ede539e3172..c1904356cb6 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pxd.in @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 2d6faa4230c..b51f964e946 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx.in @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 47726c353e6..d7950130946 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_functions.pxi.in @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 f4a59fc3ddd..b57ced62470 100644 --- a/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in +++ b/cuda_bindings/cuda/bindings/cyruntime_types.pxi.in @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 181239525d5..7d28afdc720 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd +++ b/cuda_bindings/cuda/bindings/driver.pxd @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 0.3.1.dev1602+g3c8d84404. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 8566a795ecd..f89cd68893a 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx +++ b/cuda_bindings/cuda/bindings/driver.pyx @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 0.3.1.dev1602+g3c8d84404. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pxd b/cuda_bindings/cuda/bindings/nvfatbin.pxd index b117da600cf..119fa402414 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/nvfatbin.pxd @@ -1,8 +1,8 @@ # 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from libc.stdint cimport intptr_t, uint32_t @@ -34,5 +34,6 @@ cpdef add_ltoir(intptr_t handle, code, size_t size, arch, identifier, options_cm cpdef size_t size(intptr_t handle) except? 0 cpdef get(intptr_t handle, buffer) cpdef tuple version() +cpdef add_index(intptr_t handle, code, size_t size, identifier) cpdef add_reloc(intptr_t handle, code, size_t size) cpdef add_tile_ir(intptr_t handle, code, size_t size, identifier, options_cmd_line) diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index d11f7378749..e639052f138 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -1,15 +1,21 @@ # 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. 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,10 +23,10 @@ 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. + The enumerated type `nvFatbinResult` defines API call result codes. + nvFatbin APIs return `nvFatbinResult` codes to indicate the result. See `nvFatbinResult`. """ @@ -272,6 +278,17 @@ cpdef tuple version(): return (major, minor) +cpdef add_index(intptr_t handle, code, size_t size, identifier): + cdef void* _code_ = get_buffer_pointer(code, size, readonly=True) + if not isinstance(identifier, str): + raise TypeError("identifier must be a Python str") + cdef bytes _temp_identifier_ = (identifier).encode() + cdef char* _identifier_ = _temp_identifier_ + with nogil: + __status__ = nvFatbinAddIndex(handle, _code_, size, _identifier_) + check_status(__status__) + + cpdef add_reloc(intptr_t handle, code, size_t size): """nvFatbinAddReloc adds relocatable PTX entries from a host object to the fatbinary. @@ -312,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.pxd b/cuda_bindings/cuda/bindings/nvjitlink.pxd index e9090a66872..246a41f8a50 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/nvjitlink.pxd @@ -1,8 +1,8 @@ -# 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. 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 9466b41c9bb..af8eb4ca53b 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -1,15 +1,21 @@ -# 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.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1862+g538a87a98. 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,10 +23,10 @@ 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. + The enumerated type `nvJitLinkResult` defines API call result codes. + nvJitLink APIs return `nvJitLinkResult` codes to indicate the result. See `nvJitLinkResult`. """ @@ -44,10 +50,10 @@ 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. + The enumerated type `nvJitLinkInputType` defines the kind of inputs + that can be passed to nvJitLinkAdd* APIs. See `nvJitLinkInputType`. """ @@ -105,7 +111,7 @@ cpdef destroy(intptr_t handle): cpdef intptr_t create(uint32_t num_options, options) except -1: - """nvJitLinkCreate creates an instance of nvJitLinkHandle with the given input options, and sets the output parameter ``handle``. + """nvJitLinkCreate creates an instance of ``nvJitLinkHandle`` with the given input options, and sets the output parameter ``handle``. Args: num_options (uint32_t): Number of options passed. @@ -334,3 +340,4 @@ cpdef tuple version(): __status__ = nvJitLinkVersion(&major, &minor) check_status(__status__) return (major, minor) +del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvml.pxd b/cuda_bindings/cuda/bindings/nvml.pxd index 964073f49f0..8e6fb44b582 100644 --- a/cuda_bindings/cuda/bindings/nvml.pxd +++ b/cuda_bindings/cuda/bindings/nvml.pxd @@ -1,8 +1,8 @@ # 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.dev1588+g61faef43a. 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.dev1862+g538a87a98. 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 47db8169345..ad36ef8c00a 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -1,29 +1,54 @@ # 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.dev1588+g61faef43a. 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.2.0, generator version 0.3.1.dev1862+g538a87a98. 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,11 +105,11 @@ 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 - specified in `nvmlNvLinkUtilizationCountUnits_t` ** all packet filter + specified in ``nvmlNvLinkUtilizationCountUnits_t`` ** all packet filter descriptions are target GPU centric ** these can be "OR'd" together See `nvmlNvLinkUtilizationCountPktTypes_t`. @@ -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 @@ -244,11 +256,11 @@ class PerfPolicyType(_FastEnum): PERF_POLICY_BOARD_LIMIT = (NVML_PERF_POLICY_BOARD_LIMIT, 'How long did the board limit cause the GPU to be below application clocks.') PERF_POLICY_LOW_UTILIZATION = (NVML_PERF_POLICY_LOW_UTILIZATION, 'How long did low utilization cause the GPU to be below application clocks.') PERF_POLICY_RELIABILITY = (NVML_PERF_POLICY_RELIABILITY, 'How long did the board reliability limit cause the GPU to be below application clocks.') - PERF_POLICY_TOTAL_APP_CLOCKS = (NVML_PERF_POLICY_TOTAL_APP_CLOCKS, 'Total time the GPU was held below application clocks by any limiter (0 - 5 above)') + PERF_POLICY_TOTAL_APP_CLOCKS = (NVML_PERF_POLICY_TOTAL_APP_CLOCKS, 'Total time the GPU was held below application clocks by any limiter (0 - 5 above).') 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 @@ -423,7 +435,7 @@ class NvlinkVersion(_FastEnum): VERSION_4_0 = (NVML_NVLINK_VERSION_4_0, 'NVLink Version 4.0.') VERSION_5_0 = (NVML_NVLINK_VERSION_5_0, 'NVLink Version 5.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 @@ -435,10 +447,10 @@ class EccCounterType(_FastEnum): See `nvmlEccCounterType_t`. """ VOLATILE_ECC = (NVML_VOLATILE_ECC, 'Volatile counts are reset each time the driver loads.') - AGGREGATE_ECC = (NVML_AGGREGATE_ECC, 'Aggregate counts persist across reboots (i.e. for the lifetime of the device)') + 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. @@ -450,9 +462,9 @@ 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 + Clock Ids. These are used in combination with `nvmlClockType_t` to specify a single clock value. See `nvmlClockId_t`. @@ -463,7 +475,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. @@ -473,7 +485,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. @@ -497,7 +509,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 @@ -509,7 +521,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. @@ -521,14 +533,14 @@ 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. See `nvmlReturn_t`. """ SUCCESS = (NVML_SUCCESS, 'The operation was successful.') - ERROR_UNINITIALIZED = (NVML_ERROR_UNINITIALIZED, 'NVML was not first initialized with `nvmlInit()`') + ERROR_UNINITIALIZED = (NVML_ERROR_UNINITIALIZED, 'NVML was not first initialized with `nvmlInit()`.') ERROR_INVALID_ARGUMENT = (NVML_ERROR_INVALID_ARGUMENT, 'A supplied argument is invalid.') ERROR_NOT_SUPPORTED = (NVML_ERROR_NOT_SUPPORTED, 'The requested operation is not available on target device.') ERROR_NO_PERMISSION = (NVML_ERROR_NO_PERMISSION, 'The current user does not have permission for operation.') @@ -560,7 +572,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` @@ -577,7 +589,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 @@ -587,7 +599,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 @@ -597,7 +609,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 @@ -608,7 +620,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. @@ -620,7 +632,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 @@ -629,7 +641,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 @@ -638,7 +650,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 @@ -647,7 +659,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 @@ -660,7 +672,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 @@ -673,7 +685,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 @@ -683,7 +695,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 @@ -703,7 +715,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 @@ -715,7 +727,7 @@ class DeviceGpuRecoveryAction(_FastEnum): GPU_RECOVERY_ACTION_DRAIN_P2P = (NVML_GPU_RECOVERY_ACTION_DRAIN_P2P, 'Drain P2P.') GPU_RECOVERY_ACTION_DRAIN_AND_RESET = (NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET, 'Drain P2P and Reset Gpu.') -class FanState(_FastEnum): +class FanState(_cyb_FastEnum): """ Fan state enum. @@ -724,7 +736,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. @@ -733,7 +745,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 @@ -744,7 +756,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 @@ -756,7 +768,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()` @@ -766,7 +778,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()` @@ -775,7 +787,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`. """ @@ -783,7 +795,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 @@ -795,7 +807,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 @@ -807,7 +819,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 @@ -1045,7 +1057,7 @@ class GpmMetricId(_FastEnum): GPM_METRIC_NVLINK_L17_TX = (NVML_GPM_METRIC_NVLINK_L17_TX, 'NvLink write for link 17 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`. """ @@ -1066,7 +1078,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 @@ -1076,7 +1088,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 @@ -1098,7 +1110,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 @@ -2051,7 +2063,7 @@ cpdef int check_status_size(int status) except 1 nogil: cdef _get_pci_info_ext_v1_dtype_offsets(): - cdef nvmlPciInfoExt_v1_t pod = nvmlPciInfoExt_v1_t() + cdef nvmlPciInfoExt_v1_t pod return _numpy.dtype({ 'names': ['version', 'domain', 'bus', 'device_', 'pci_device_id', 'pci_sub_system_id', 'base_class', 'sub_class', 'bus_id'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, (_numpy.int8, 32)], @@ -2084,7 +2096,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 @@ -2096,7 +2108,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))}>" @@ -2117,20 +2129,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 @@ -2227,8 +2239,8 @@ 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) + """~_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) @bus_id.setter def bus_id(self, val): @@ -2238,12 +2250,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): @@ -2252,7 +2264,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): @@ -2267,10 +2279,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: @@ -2282,7 +2294,7 @@ cdef class PciInfoExt_v1: cdef _get_pci_info_dtype_offsets(): - cdef nvmlPciInfo_t pod = nvmlPciInfo_t() + cdef nvmlPciInfo_t pod return _numpy.dtype({ 'names': ['bus_id_legacy', 'domain', 'bus', 'device_', 'pci_device_id', 'pci_sub_system_id', 'bus_id'], 'formats': [(_numpy.int8, 16), _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, (_numpy.int8, 32)], @@ -2313,7 +2325,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 @@ -2325,7 +2337,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))}>" @@ -2346,20 +2358,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 @@ -2369,7 +2381,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): @@ -2379,7 +2391,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): @@ -2439,7 +2451,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): @@ -2449,12 +2461,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): @@ -2463,7 +2475,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): @@ -2478,10 +2490,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: @@ -2493,7 +2505,7 @@ cdef class PciInfo: cdef _get_utilization_dtype_offsets(): - cdef nvmlUtilization_t pod = nvmlUtilization_t() + cdef nvmlUtilization_t pod return _numpy.dtype({ 'names': ['gpu', 'memory'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -2519,7 +2531,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 @@ -2531,7 +2543,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))}>" @@ -2552,20 +2564,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 @@ -2597,7 +2609,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): @@ -2606,7 +2618,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): @@ -2621,10 +2633,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: @@ -2636,7 +2648,7 @@ cdef class Utilization: cdef _get_memory_dtype_offsets(): - cdef nvmlMemory_t pod = nvmlMemory_t() + cdef nvmlMemory_t pod return _numpy.dtype({ 'names': ['total', 'free', 'used'], 'formats': [_numpy.uint64, _numpy.uint64, _numpy.uint64], @@ -2663,7 +2675,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 @@ -2675,7 +2687,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))}>" @@ -2696,20 +2708,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 @@ -2752,7 +2764,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): @@ -2761,7 +2773,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): @@ -2776,10 +2788,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: @@ -2791,7 +2803,7 @@ cdef class Memory: cdef _get_memory_v2_dtype_offsets(): - cdef nvmlMemory_v2_t pod = nvmlMemory_v2_t() + cdef nvmlMemory_v2_t pod return _numpy.dtype({ 'names': ['version', 'total', 'reserved', 'free', 'used'], 'formats': [_numpy.uint32, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64], @@ -2820,7 +2832,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 @@ -2832,7 +2844,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))}>" @@ -2853,20 +2865,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 @@ -2931,7 +2943,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): @@ -2940,7 +2952,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): @@ -2955,10 +2967,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: @@ -2970,7 +2982,7 @@ cdef class Memory_v2: cdef _get_ba_r1memory_dtype_offsets(): - cdef nvmlBAR1Memory_t pod = nvmlBAR1Memory_t() + cdef nvmlBAR1Memory_t pod return _numpy.dtype({ 'names': ['bar1_total', 'bar1_free', 'bar1_used'], 'formats': [_numpy.uint64, _numpy.uint64, _numpy.uint64], @@ -2997,7 +3009,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 @@ -3009,7 +3021,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))}>" @@ -3030,20 +3042,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 @@ -3086,7 +3098,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): @@ -3095,7 +3107,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): @@ -3110,10 +3122,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: @@ -3125,7 +3137,7 @@ cdef class BAR1Memory: cdef _get_process_info_dtype_offsets(): - cdef nvmlProcessInfo_t pod = nvmlProcessInfo_t() + cdef nvmlProcessInfo_t pod return _numpy.dtype({ 'names': ['pid', 'used_gpu_memory', 'gpu_instance_id', 'compute_instance_id'], 'formats': [_numpy.uint32, _numpy.uint64, _numpy.uint32, _numpy.uint32], @@ -3189,10 +3201,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): @@ -3292,8 +3304,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) @@ -3302,7 +3314,7 @@ cdef class ProcessInfo: cdef _get_process_detail_v1_dtype_offsets(): - cdef nvmlProcessDetail_v1_t pod = nvmlProcessDetail_v1_t() + cdef nvmlProcessDetail_v1_t pod return _numpy.dtype({ 'names': ['pid', 'used_gpu_memory', 'gpu_instance_id', 'compute_instance_id', 'used_gpu_cc_protected_memory'], 'formats': [_numpy.uint32, _numpy.uint64, _numpy.uint32, _numpy.uint32, _numpy.uint64], @@ -3367,10 +3379,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): @@ -3481,8 +3493,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) @@ -3491,7 +3503,7 @@ cdef class ProcessDetail_v1: cdef _get_device_attributes_dtype_offsets(): - cdef nvmlDeviceAttributes_t pod = nvmlDeviceAttributes_t() + cdef nvmlDeviceAttributes_t pod return _numpy.dtype({ 'names': ['multiprocessor_count', 'shared_copy_engine_count', 'shared_decoder_count', 'shared_encoder_count', 'shared_jpeg_count', 'shared_ofa_count', 'gpu_instance_slice_count', 'compute_instance_slice_count', 'memory_size_mb'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint64], @@ -3524,7 +3536,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 @@ -3536,7 +3548,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))}>" @@ -3557,20 +3569,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 @@ -3679,7 +3691,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): @@ -3688,7 +3700,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): @@ -3703,10 +3715,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: @@ -3718,7 +3730,7 @@ cdef class DeviceAttributes: cdef _get_c2c_mode_info_v1_dtype_offsets(): - cdef nvmlC2cModeInfo_v1_t pod = nvmlC2cModeInfo_v1_t() + cdef nvmlC2cModeInfo_v1_t pod return _numpy.dtype({ 'names': ['is_c2c_enabled'], 'formats': [_numpy.uint32], @@ -3743,7 +3755,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 @@ -3755,7 +3767,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))}>" @@ -3776,20 +3788,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 @@ -3810,7 +3822,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): @@ -3819,7 +3831,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): @@ -3834,10 +3846,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: @@ -3849,7 +3861,7 @@ cdef class C2cModeInfo_v1: cdef _get_row_remapper_histogram_values_dtype_offsets(): - cdef nvmlRowRemapperHistogramValues_t pod = nvmlRowRemapperHistogramValues_t() + cdef nvmlRowRemapperHistogramValues_t pod return _numpy.dtype({ 'names': ['max_', 'high', 'partial', 'low', 'none'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -3878,7 +3890,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 @@ -3890,7 +3902,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))}>" @@ -3911,20 +3923,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 @@ -3989,7 +4001,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): @@ -3998,7 +4010,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): @@ -4013,10 +4025,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: @@ -4028,7 +4040,7 @@ cdef class RowRemapperHistogramValues: cdef _get_bridge_chip_info_dtype_offsets(): - cdef nvmlBridgeChipInfo_t pod = nvmlBridgeChipInfo_t() + cdef nvmlBridgeChipInfo_t pod return _numpy.dtype({ 'names': ['type', 'fw_version'], 'formats': [_numpy.int32, _numpy.uint32], @@ -4090,10 +4102,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): @@ -4171,8 +4183,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) @@ -4206,7 +4218,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 @@ -4218,7 +4230,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))}>" @@ -4239,20 +4251,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 @@ -4339,7 +4351,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): @@ -4348,7 +4360,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): @@ -4363,10 +4375,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: @@ -4378,7 +4390,7 @@ cdef class Value: cdef _get__py_anon_pod0_dtype_offsets(): - cdef cuda_bindings_nvml__anon_pod0 pod = cuda_bindings_nvml__anon_pod0() + cdef cuda_bindings_nvml__anon_pod0 pod return _numpy.dtype({ 'names': ['controller', 'default_min_temp', 'default_max_temp', 'current_temp', 'target'], 'formats': [_numpy.int32, _numpy.int32, _numpy.int32, _numpy.int32, _numpy.int32], @@ -4407,7 +4419,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 @@ -4419,7 +4431,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))}>" @@ -4440,20 +4452,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 @@ -4518,7 +4530,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): @@ -4527,7 +4539,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): @@ -4542,10 +4554,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: @@ -4557,7 +4569,7 @@ cdef class _py_anon_pod0: cdef _get_cooler_info_v1_dtype_offsets(): - cdef nvmlCoolerInfo_v1_t pod = nvmlCoolerInfo_v1_t() + cdef nvmlCoolerInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'index', 'signal_type', 'target'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.int32, _numpy.int32], @@ -4585,7 +4597,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 @@ -4597,7 +4609,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))}>" @@ -4618,20 +4630,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 @@ -4685,7 +4697,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): @@ -4694,7 +4706,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): @@ -4709,10 +4721,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: @@ -4724,7 +4736,7 @@ cdef class CoolerInfo_v1: cdef _get_clk_mon_fault_info_dtype_offsets(): - cdef nvmlClkMonFaultInfo_t pod = nvmlClkMonFaultInfo_t() + cdef nvmlClkMonFaultInfo_t pod return _numpy.dtype({ 'names': ['clk_api_domain', 'clk_domain_fault_mask'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -4786,10 +4798,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): @@ -4867,8 +4879,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) @@ -4877,7 +4889,7 @@ cdef class ClkMonFaultInfo: cdef _get_clock_offset_v1_dtype_offsets(): - cdef nvmlClockOffset_v1_t pod = nvmlClockOffset_v1_t() + cdef nvmlClockOffset_v1_t pod return _numpy.dtype({ 'names': ['version', 'type', 'pstate', 'clock_offset_m_hz', 'min_clock_offset_m_hz', 'max_clock_offset_m_hz'], 'formats': [_numpy.uint32, _numpy.int32, _numpy.int32, _numpy.int32, _numpy.int32, _numpy.int32], @@ -4907,7 +4919,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 @@ -4919,7 +4931,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))}>" @@ -4940,20 +4952,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 @@ -5029,7 +5041,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): @@ -5038,7 +5050,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): @@ -5053,10 +5065,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: @@ -5068,7 +5080,7 @@ cdef class ClockOffset_v1: cdef _get_process_utilization_sample_dtype_offsets(): - cdef nvmlProcessUtilizationSample_t pod = nvmlProcessUtilizationSample_t() + cdef nvmlProcessUtilizationSample_t pod return _numpy.dtype({ 'names': ['pid', 'time_stamp', 'sm_util', 'mem_util', 'enc_util', 'dec_util'], 'formats': [_numpy.uint32, _numpy.uint64, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -5134,10 +5146,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): @@ -5259,8 +5271,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) @@ -5269,7 +5281,7 @@ cdef class ProcessUtilizationSample: cdef _get_process_utilization_info_v1_dtype_offsets(): - cdef nvmlProcessUtilizationInfo_v1_t pod = nvmlProcessUtilizationInfo_v1_t() + cdef nvmlProcessUtilizationInfo_v1_t pod return _numpy.dtype({ 'names': ['time_stamp', 'pid', 'sm_util', 'mem_util', 'enc_util', 'dec_util', 'jpg_util', 'ofa_util'], 'formats': [_numpy.uint64, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -5337,10 +5349,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): @@ -5484,8 +5496,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) @@ -5494,7 +5506,7 @@ cdef class ProcessUtilizationInfo_v1: cdef _get_ecc_sram_error_status_v1_dtype_offsets(): - cdef nvmlEccSramErrorStatus_v1_t pod = nvmlEccSramErrorStatus_v1_t() + cdef nvmlEccSramErrorStatus_v1_t pod return _numpy.dtype({ 'names': ['version', 'aggregate_unc_parity', 'aggregate_unc_sec_ded', 'aggregate_cor', 'volatile_unc_parity', 'volatile_unc_sec_ded', 'volatile_cor', 'aggregate_unc_bucket_l2', 'aggregate_unc_bucket_sm', 'aggregate_unc_bucket_pcie', 'aggregate_unc_bucket_mcu', 'aggregate_unc_bucket_other', 'b_threshold_exceeded'], 'formats': [_numpy.uint32, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint32], @@ -5531,7 +5543,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 @@ -5543,7 +5555,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))}>" @@ -5564,20 +5576,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 @@ -5730,7 +5742,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): @@ -5739,7 +5751,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): @@ -5754,10 +5766,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: @@ -5769,7 +5781,7 @@ cdef class EccSramErrorStatus_v1: cdef _get_platform_info_v1_dtype_offsets(): - cdef nvmlPlatformInfo_v1_t pod = nvmlPlatformInfo_v1_t() + cdef nvmlPlatformInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'ib_guid', 'rack_guid', 'chassis_physical_slot_number', 'compute_slot_index', 'node_index', 'peer_type', 'module_id'], 'formats': [_numpy.uint32, (_numpy.uint8, 16), (_numpy.uint8, 16), _numpy.uint8, _numpy.uint8, _numpy.uint8, _numpy.uint8, _numpy.uint8], @@ -5801,7 +5813,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 @@ -5813,7 +5825,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))}>" @@ -5834,20 +5846,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 @@ -5867,8 +5879,8 @@ 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) + """~_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) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -5878,14 +5890,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) + """~_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) arr.data = (&(self._ptr[0].rackGuid)) return _numpy.asarray(arr) @@ -5895,13 +5907,13 @@ 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): - """int: The slot number in the rack containing this GPU (includes switches)""" + """int: The slot number in the rack containing this GPU (includes switches).""" return self._ptr[0].chassisPhysicalSlotNumber @chassis_physical_slot_number.setter @@ -5912,7 +5924,7 @@ cdef class PlatformInfo_v1: @property def compute_slot_index(self): - """int: The index within the compute slots in the rack containing this GPU (does not include switches)""" + """int: The index within the compute slots in the rack containing this GPU (does not include switches).""" return self._ptr[0].computeSlotIndex @compute_slot_index.setter @@ -5934,7 +5946,7 @@ cdef class PlatformInfo_v1: @property def peer_type(self): - """int: Platform indicated NVLink-peer type (e.g. switch present or not)""" + """int: Platform indicated NVLink-peer type (e.g. switch present or not).""" return self._ptr[0].peerType @peer_type.setter @@ -5957,7 +5969,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): @@ -5966,7 +5978,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): @@ -5981,10 +5993,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: @@ -5996,7 +6008,7 @@ cdef class PlatformInfo_v1: cdef _get_platform_info_v2_dtype_offsets(): - cdef nvmlPlatformInfo_v2_t pod = nvmlPlatformInfo_v2_t() + cdef nvmlPlatformInfo_v2_t pod return _numpy.dtype({ 'names': ['version', 'ib_guid', 'chassis_serial_number', 'slot_number', 'tray_index', 'host_id', 'peer_type', 'module_id'], 'formats': [_numpy.uint32, (_numpy.uint8, 16), (_numpy.uint8, 16), _numpy.uint8, _numpy.uint8, _numpy.uint8, _numpy.uint8, _numpy.uint8], @@ -6028,7 +6040,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 @@ -6040,7 +6052,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))}>" @@ -6061,20 +6073,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 @@ -6094,8 +6106,8 @@ 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) + """~_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) arr.data = (&(self._ptr[0].ibGuid)) return _numpy.asarray(arr) @@ -6105,14 +6117,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) + """~_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) arr.data = (&(self._ptr[0].chassisSerialNumber)) return _numpy.asarray(arr) @@ -6122,13 +6134,13 @@ 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): - """int: The slot number in the chassis containing this GPU (includes switches)""" + """int: The slot number in the chassis containing this GPU (includes switches).""" return self._ptr[0].slotNumber @slot_number.setter @@ -6139,7 +6151,7 @@ cdef class PlatformInfo_v2: @property def tray_index(self): - """int: The tray index within the compute slots in the chassis containing this GPU (does not include switches)""" + """int: The tray index within the compute slots in the chassis containing this GPU (does not include switches).""" return self._ptr[0].trayIndex @tray_index.setter @@ -6161,7 +6173,7 @@ cdef class PlatformInfo_v2: @property def peer_type(self): - """int: Platform indicated NVLink-peer type (e.g. switch present or not)""" + """int: Platform indicated NVLink-peer type (e.g. switch present or not).""" return self._ptr[0].peerType @peer_type.setter @@ -6184,7 +6196,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): @@ -6193,7 +6205,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): @@ -6208,10 +6220,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: @@ -6223,7 +6235,7 @@ cdef class PlatformInfo_v2: cdef _get__py_anon_pod1_dtype_offsets(): - cdef cuda_bindings_nvml__anon_pod1 pod = cuda_bindings_nvml__anon_pod1() + cdef cuda_bindings_nvml__anon_pod1 pod return _numpy.dtype({ 'names': ['b_is_present', 'percentage', 'inc_threshold', 'dec_threshold'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -6251,7 +6263,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 @@ -6263,7 +6275,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))}>" @@ -6284,20 +6296,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 @@ -6351,7 +6363,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): @@ -6360,7 +6372,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): @@ -6375,10 +6387,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: @@ -6390,7 +6402,7 @@ cdef class _py_anon_pod1: cdef _get_vgpu_placement_list_v2_dtype_offsets(): - cdef nvmlVgpuPlacementList_v2_t pod = nvmlVgpuPlacementList_v2_t() + cdef nvmlVgpuPlacementList_v2_t pod return _numpy.dtype({ 'names': ['version', 'placement_size', 'count', 'placement_ids', 'mode'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.intp, _numpy.uint32], @@ -6420,7 +6432,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 @@ -6433,7 +6445,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))}>" @@ -6454,20 +6466,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 @@ -6501,7 +6513,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) @@ -6509,7 +6521,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) @@ -6529,7 +6541,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): @@ -6538,7 +6550,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): @@ -6553,10 +6565,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: @@ -6569,7 +6581,7 @@ cdef class VgpuPlacementList_v2: cdef _get_vgpu_type_bar1info_v1_dtype_offsets(): - cdef nvmlVgpuTypeBar1Info_v1_t pod = nvmlVgpuTypeBar1Info_v1_t() + cdef nvmlVgpuTypeBar1Info_v1_t pod return _numpy.dtype({ 'names': ['version', 'bar1size'], 'formats': [_numpy.uint32, _numpy.uint64], @@ -6595,7 +6607,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 @@ -6607,7 +6619,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))}>" @@ -6628,20 +6640,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 @@ -6673,7 +6685,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): @@ -6682,7 +6694,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): @@ -6697,10 +6709,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: @@ -6712,7 +6724,7 @@ cdef class VgpuTypeBar1Info_v1: cdef _get_vgpu_process_utilization_info_v1_dtype_offsets(): - cdef nvmlVgpuProcessUtilizationInfo_v1_t pod = nvmlVgpuProcessUtilizationInfo_v1_t() + cdef nvmlVgpuProcessUtilizationInfo_v1_t pod return _numpy.dtype({ 'names': ['process_name', 'time_stamp', 'vgpu_instance', 'pid', 'sm_util', 'mem_util', 'enc_util', 'dec_util', 'jpg_util', 'ofa_util'], 'formats': [(_numpy.int8, 64), _numpy.uint64, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -6782,10 +6794,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): @@ -6949,8 +6961,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) @@ -6959,7 +6971,7 @@ cdef class VgpuProcessUtilizationInfo_v1: cdef _get__py_anon_pod2_dtype_offsets(): - cdef cuda_bindings_nvml__anon_pod2 pod = cuda_bindings_nvml__anon_pod2() + cdef cuda_bindings_nvml__anon_pod2 pod return _numpy.dtype({ 'names': ['avg_factor', 'timeslice'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -6985,7 +6997,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 @@ -6997,7 +7009,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))}>" @@ -7018,20 +7030,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 @@ -7063,7 +7075,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): @@ -7072,7 +7084,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): @@ -7087,10 +7099,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: @@ -7102,7 +7114,7 @@ cdef class _py_anon_pod2: cdef _get__py_anon_pod3_dtype_offsets(): - cdef cuda_bindings_nvml__anon_pod3 pod = cuda_bindings_nvml__anon_pod3() + cdef cuda_bindings_nvml__anon_pod3 pod return _numpy.dtype({ 'names': ['timeslice'], 'formats': [_numpy.uint32], @@ -7127,7 +7139,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 @@ -7139,7 +7151,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))}>" @@ -7160,20 +7172,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 @@ -7194,7 +7206,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): @@ -7203,7 +7215,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): @@ -7218,10 +7230,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: @@ -7233,7 +7245,7 @@ cdef class _py_anon_pod3: cdef _get_vgpu_scheduler_log_entry_dtype_offsets(): - cdef nvmlVgpuSchedulerLogEntry_t pod = nvmlVgpuSchedulerLogEntry_t() + cdef nvmlVgpuSchedulerLogEntry_t pod return _numpy.dtype({ 'names': ['timestamp', 'time_run_total', 'time_run', 'sw_runlist_id', 'target_time_slice', 'cumulative_preemption_time'], 'formats': [_numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint32, _numpy.uint64, _numpy.uint64], @@ -7299,10 +7311,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): @@ -7424,8 +7436,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) @@ -7434,7 +7446,7 @@ cdef class VgpuSchedulerLogEntry: cdef _get__py_anon_pod4_dtype_offsets(): - cdef cuda_bindings_nvml__anon_pod4 pod = cuda_bindings_nvml__anon_pod4() + cdef cuda_bindings_nvml__anon_pod4 pod return _numpy.dtype({ 'names': ['avg_factor', 'frequency'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -7460,7 +7472,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 @@ -7472,7 +7484,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))}>" @@ -7493,20 +7505,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 @@ -7538,7 +7550,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): @@ -7547,7 +7559,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): @@ -7562,10 +7574,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: @@ -7577,7 +7589,7 @@ cdef class _py_anon_pod4: cdef _get__py_anon_pod5_dtype_offsets(): - cdef cuda_bindings_nvml__anon_pod5 pod = cuda_bindings_nvml__anon_pod5() + cdef cuda_bindings_nvml__anon_pod5 pod return _numpy.dtype({ 'names': ['timeslice'], 'formats': [_numpy.uint32], @@ -7602,7 +7614,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 @@ -7614,7 +7626,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))}>" @@ -7635,20 +7647,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 @@ -7669,7 +7681,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): @@ -7678,7 +7690,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): @@ -7693,10 +7705,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: @@ -7708,7 +7720,7 @@ cdef class _py_anon_pod5: cdef _get_vgpu_scheduler_capabilities_dtype_offsets(): - cdef nvmlVgpuSchedulerCapabilities_t pod = nvmlVgpuSchedulerCapabilities_t() + cdef nvmlVgpuSchedulerCapabilities_t pod return _numpy.dtype({ 'names': ['supported_schedulers', 'max_timeslice', 'min_timeslice', 'is_arr_mode_supported', 'max_frequency_for_arr', 'min_frequency_for_arr', 'max_avg_factor_for_arr', 'min_avg_factor_for_arr'], 'formats': [(_numpy.uint32, 3), _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -7740,7 +7752,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 @@ -7752,7 +7764,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))}>" @@ -7773,20 +7785,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 @@ -7796,7 +7808,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) @@ -7806,9 +7818,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): @@ -7890,7 +7902,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): @@ -7899,7 +7911,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): @@ -7914,10 +7926,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: @@ -7929,7 +7941,7 @@ cdef class VgpuSchedulerCapabilities: cdef _get_vgpu_license_expiry_dtype_offsets(): - cdef nvmlVgpuLicenseExpiry_t pod = nvmlVgpuLicenseExpiry_t() + cdef nvmlVgpuLicenseExpiry_t pod return _numpy.dtype({ 'names': ['year', 'month', 'day', 'hour', 'min_', 'sec', 'status'], 'formats': [_numpy.uint32, _numpy.uint16, _numpy.uint16, _numpy.uint16, _numpy.uint16, _numpy.uint16, _numpy.uint8], @@ -7960,7 +7972,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 @@ -7972,7 +7984,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))}>" @@ -7993,20 +8005,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 @@ -8093,7 +8105,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): @@ -8102,7 +8114,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): @@ -8117,10 +8129,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: @@ -8132,7 +8144,7 @@ cdef class VgpuLicenseExpiry: cdef _get_grid_license_expiry_dtype_offsets(): - cdef nvmlGridLicenseExpiry_t pod = nvmlGridLicenseExpiry_t() + cdef nvmlGridLicenseExpiry_t pod return _numpy.dtype({ 'names': ['year', 'month', 'day', 'hour', 'min_', 'sec', 'status'], 'formats': [_numpy.uint32, _numpy.uint16, _numpy.uint16, _numpy.uint16, _numpy.uint16, _numpy.uint16, _numpy.uint8], @@ -8163,7 +8175,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 @@ -8175,7 +8187,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))}>" @@ -8196,20 +8208,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 @@ -8296,7 +8308,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): @@ -8305,7 +8317,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): @@ -8320,10 +8332,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: @@ -8335,7 +8347,7 @@ cdef class GridLicenseExpiry: cdef _get_vgpu_type_id_info_v1_dtype_offsets(): - cdef nvmlVgpuTypeIdInfo_v1_t pod = nvmlVgpuTypeIdInfo_v1_t() + cdef nvmlVgpuTypeIdInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'vgpu_count', 'vgpu_type_ids'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.intp], @@ -8363,7 +8375,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 @@ -8376,7 +8388,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))}>" @@ -8397,20 +8409,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 @@ -8433,7 +8445,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) @@ -8441,7 +8453,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) @@ -8450,7 +8462,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): @@ -8459,7 +8471,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): @@ -8474,10 +8486,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: @@ -8490,7 +8502,7 @@ cdef class VgpuTypeIdInfo_v1: cdef _get_active_vgpu_instance_info_v1_dtype_offsets(): - cdef nvmlActiveVgpuInstanceInfo_v1_t pod = nvmlActiveVgpuInstanceInfo_v1_t() + cdef nvmlActiveVgpuInstanceInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'vgpu_count', 'vgpu_instances'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.intp], @@ -8518,7 +8530,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 @@ -8531,7 +8543,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))}>" @@ -8552,20 +8564,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 @@ -8588,7 +8600,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) @@ -8596,7 +8608,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) @@ -8605,7 +8617,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): @@ -8614,7 +8626,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): @@ -8629,10 +8641,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: @@ -8645,7 +8657,7 @@ cdef class ActiveVgpuInstanceInfo_v1: cdef _get_vgpu_creatable_placement_info_v1_dtype_offsets(): - cdef nvmlVgpuCreatablePlacementInfo_v1_t pod = nvmlVgpuCreatablePlacementInfo_v1_t() + cdef nvmlVgpuCreatablePlacementInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'vgpu_type_id', 'count', 'placement_ids', 'placement_size'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.intp, _numpy.uint32], @@ -8675,7 +8687,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 @@ -8688,7 +8700,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))}>" @@ -8709,20 +8721,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 @@ -8767,7 +8779,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) @@ -8775,7 +8787,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) @@ -8784,7 +8796,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): @@ -8793,7 +8805,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): @@ -8808,10 +8820,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: @@ -8824,7 +8836,7 @@ cdef class VgpuCreatablePlacementInfo_v1: cdef _get_hwbc_entry_dtype_offsets(): - cdef nvmlHwbcEntry_t pod = nvmlHwbcEntry_t() + cdef nvmlHwbcEntry_t pod return _numpy.dtype({ 'names': ['hwbc_id', 'firmware_version'], 'formats': [_numpy.uint32, (_numpy.int8, 32)], @@ -8886,10 +8898,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): @@ -8965,8 +8977,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) @@ -8975,7 +8987,7 @@ cdef class HwbcEntry: cdef _get_led_state_dtype_offsets(): - cdef nvmlLedState_t pod = nvmlLedState_t() + cdef nvmlLedState_t pod return _numpy.dtype({ 'names': ['cause', 'color'], 'formats': [(_numpy.int8, 256), _numpy.int32], @@ -9001,7 +9013,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 @@ -9013,7 +9025,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))}>" @@ -9034,20 +9046,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 @@ -9057,7 +9069,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): @@ -9067,7 +9079,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): @@ -9083,7 +9095,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): @@ -9092,7 +9104,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): @@ -9107,10 +9119,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: @@ -9122,7 +9134,7 @@ cdef class LedState: cdef _get_unit_info_dtype_offsets(): - cdef nvmlUnitInfo_t pod = nvmlUnitInfo_t() + cdef nvmlUnitInfo_t pod return _numpy.dtype({ 'names': ['name', 'id', 'serial', 'firmware_version'], 'formats': [(_numpy.int8, 96), (_numpy.int8, 96), (_numpy.int8, 96), (_numpy.int8, 96)], @@ -9150,7 +9162,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 @@ -9162,7 +9174,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))}>" @@ -9183,20 +9195,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 @@ -9206,7 +9218,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): @@ -9216,12 +9228,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): @@ -9231,12 +9243,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): @@ -9246,12 +9258,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): @@ -9261,12 +9273,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): @@ -9275,7 +9287,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): @@ -9290,10 +9302,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: @@ -9305,7 +9317,7 @@ cdef class UnitInfo: cdef _get_psu_info_dtype_offsets(): - cdef nvmlPSUInfo_t pod = nvmlPSUInfo_t() + cdef nvmlPSUInfo_t pod return _numpy.dtype({ 'names': ['state', 'current', 'voltage', 'power'], 'formats': [(_numpy.int8, 256), _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -9333,7 +9345,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 @@ -9345,7 +9357,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))}>" @@ -9366,20 +9378,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 @@ -9389,7 +9401,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): @@ -9399,7 +9411,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): @@ -9437,7 +9449,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): @@ -9446,7 +9458,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): @@ -9461,10 +9473,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: @@ -9476,7 +9488,7 @@ cdef class PSUInfo: cdef _get_unit_fan_info_dtype_offsets(): - cdef nvmlUnitFanInfo_t pod = nvmlUnitFanInfo_t() + cdef nvmlUnitFanInfo_t pod return _numpy.dtype({ 'names': ['speed', 'state'], 'formats': [_numpy.uint32, _numpy.int32], @@ -9538,10 +9550,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): @@ -9619,8 +9631,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) @@ -9629,7 +9641,7 @@ cdef class UnitFanInfo: cdef _get_event_data_dtype_offsets(): - cdef nvmlEventData_t pod = nvmlEventData_t() + cdef nvmlEventData_t pod return _numpy.dtype({ 'names': ['device_', 'event_type', 'event_data', 'gpu_instance_id', 'compute_instance_id'], 'formats': [_numpy.intp, _numpy.uint64, _numpy.uint64, _numpy.uint32, _numpy.uint32], @@ -9658,7 +9670,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 @@ -9670,7 +9682,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))}>" @@ -9691,20 +9703,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 @@ -9769,7 +9781,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): @@ -9778,7 +9790,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): @@ -9793,10 +9805,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: @@ -9808,7 +9820,7 @@ cdef class EventData: cdef _get_system_event_data_v1_dtype_offsets(): - cdef nvmlSystemEventData_v1_t pod = nvmlSystemEventData_v1_t() + cdef nvmlSystemEventData_v1_t pod return _numpy.dtype({ 'names': ['event_type', 'gpu_id'], 'formats': [_numpy.uint64, _numpy.uint32], @@ -9870,10 +9882,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): @@ -9951,8 +9963,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) @@ -9961,7 +9973,7 @@ cdef class SystemEventData_v1: cdef _get_accounting_stats_dtype_offsets(): - cdef nvmlAccountingStats_t pod = nvmlAccountingStats_t() + cdef nvmlAccountingStats_t pod return _numpy.dtype({ 'names': ['gpu_utilization', 'memory_utilization', 'max_memory_usage', 'time', 'start_time', 'is_running', 'reserved'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint32, (_numpy.uint32, 5)], @@ -9992,7 +10004,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 @@ -10004,7 +10016,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))}>" @@ -10025,20 +10037,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 @@ -10114,7 +10126,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): @@ -10123,7 +10135,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): @@ -10138,10 +10150,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: @@ -10153,7 +10165,7 @@ cdef class AccountingStats: cdef _get_encoder_session_info_dtype_offsets(): - cdef nvmlEncoderSessionInfo_t pod = nvmlEncoderSessionInfo_t() + cdef nvmlEncoderSessionInfo_t pod return _numpy.dtype({ 'names': ['session_id', 'pid', 'vgpu_instance', 'codec_type', 'h_resolution', 'v_resolution', 'average_fps', 'average_latency'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.int32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -10221,10 +10233,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): @@ -10368,8 +10380,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) @@ -10378,7 +10390,7 @@ cdef class EncoderSessionInfo: cdef _get_fbc_stats_dtype_offsets(): - cdef nvmlFBCStats_t pod = nvmlFBCStats_t() + cdef nvmlFBCStats_t pod return _numpy.dtype({ 'names': ['sessions_count', 'average_fps', 'average_latency'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -10405,7 +10417,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 @@ -10417,7 +10429,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))}>" @@ -10438,20 +10450,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 @@ -10494,7 +10506,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): @@ -10503,7 +10515,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): @@ -10518,10 +10530,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: @@ -10533,7 +10545,7 @@ cdef class FBCStats: cdef _get_fbc_session_info_dtype_offsets(): - cdef nvmlFBCSessionInfo_t pod = nvmlFBCSessionInfo_t() + cdef nvmlFBCSessionInfo_t pod return _numpy.dtype({ 'names': ['session_id', 'pid', 'vgpu_instance', 'display_ordinal', 'session_type', 'session_flags', 'h_max_resolution', 'v_max_resolution', 'h_resolution', 'v_resolution', 'average_fps', 'average_latency'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.int32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -10605,10 +10617,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): @@ -10796,8 +10808,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) @@ -10806,7 +10818,7 @@ cdef class FBCSessionInfo: cdef _get_conf_compute_system_caps_dtype_offsets(): - cdef nvmlConfComputeSystemCaps_t pod = nvmlConfComputeSystemCaps_t() + cdef nvmlConfComputeSystemCaps_t pod return _numpy.dtype({ 'names': ['cpu_caps', 'gpus_caps'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -10832,7 +10844,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 @@ -10844,7 +10856,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))}>" @@ -10865,20 +10877,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 @@ -10910,7 +10922,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): @@ -10919,7 +10931,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): @@ -10934,10 +10946,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: @@ -10949,7 +10961,7 @@ cdef class ConfComputeSystemCaps: cdef _get_conf_compute_system_state_dtype_offsets(): - cdef nvmlConfComputeSystemState_t pod = nvmlConfComputeSystemState_t() + cdef nvmlConfComputeSystemState_t pod return _numpy.dtype({ 'names': ['environment', 'cc_feature', 'dev_tools_mode'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -10976,7 +10988,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 @@ -10988,7 +11000,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))}>" @@ -11009,20 +11021,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 @@ -11065,7 +11077,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): @@ -11074,7 +11086,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): @@ -11089,10 +11101,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: @@ -11104,7 +11116,7 @@ cdef class ConfComputeSystemState: cdef _get_system_conf_compute_settings_v1_dtype_offsets(): - cdef nvmlSystemConfComputeSettings_v1_t pod = nvmlSystemConfComputeSettings_v1_t() + cdef nvmlSystemConfComputeSettings_v1_t pod return _numpy.dtype({ 'names': ['version', 'environment', 'cc_feature', 'dev_tools_mode', 'multi_gpu_mode'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -11133,7 +11145,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 @@ -11145,7 +11157,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))}>" @@ -11166,20 +11178,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 @@ -11244,7 +11256,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): @@ -11253,7 +11265,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): @@ -11268,10 +11280,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: @@ -11283,7 +11295,7 @@ cdef class SystemConfComputeSettings_v1: cdef _get_conf_compute_mem_size_info_dtype_offsets(): - cdef nvmlConfComputeMemSizeInfo_t pod = nvmlConfComputeMemSizeInfo_t() + cdef nvmlConfComputeMemSizeInfo_t pod return _numpy.dtype({ 'names': ['protected_mem_size_kib', 'unprotected_mem_size_kib'], 'formats': [_numpy.uint64, _numpy.uint64], @@ -11309,7 +11321,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 @@ -11321,7 +11333,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))}>" @@ -11342,20 +11354,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 @@ -11387,7 +11399,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): @@ -11396,7 +11408,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): @@ -11411,10 +11423,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: @@ -11426,7 +11438,7 @@ cdef class ConfComputeMemSizeInfo: cdef _get_conf_compute_gpu_certificate_dtype_offsets(): - cdef nvmlConfComputeGpuCertificate_t pod = nvmlConfComputeGpuCertificate_t() + cdef nvmlConfComputeGpuCertificate_t pod return _numpy.dtype({ 'names': ['cert_chain_size', 'attestation_cert_chain_size', 'cert_chain', 'attestation_cert_chain'], 'formats': [_numpy.uint32, _numpy.uint32, (_numpy.uint8, 4096), (_numpy.uint8, 5120)], @@ -11454,7 +11466,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 @@ -11466,7 +11478,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))}>" @@ -11487,20 +11499,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 @@ -11512,7 +11524,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) @@ -11525,16 +11537,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) @@ -11547,14 +11559,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): @@ -11563,7 +11575,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): @@ -11578,10 +11590,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: @@ -11593,7 +11605,7 @@ cdef class ConfComputeGpuCertificate: cdef _get_conf_compute_gpu_attestation_report_dtype_offsets(): - cdef nvmlConfComputeGpuAttestationReport_t pod = nvmlConfComputeGpuAttestationReport_t() + cdef nvmlConfComputeGpuAttestationReport_t pod return _numpy.dtype({ 'names': ['is_cec_attestation_report_present', 'attestation_report_size', 'cec_attestation_report_size', 'nonce', 'attestation_report', 'cec_attestation_report'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, (_numpy.uint8, 32), (_numpy.uint8, 8192), (_numpy.uint8, 4096)], @@ -11623,7 +11635,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 @@ -11635,7 +11647,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))}>" @@ -11656,20 +11668,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 @@ -11690,7 +11702,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) @@ -11700,16 +11712,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) @@ -11722,16 +11734,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) @@ -11744,14 +11756,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): @@ -11760,7 +11772,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): @@ -11775,10 +11787,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: @@ -11790,7 +11802,7 @@ cdef class ConfComputeGpuAttestationReport: cdef _get_gpu_fabric_info_v2_dtype_offsets(): - cdef nvmlGpuFabricInfo_v2_t pod = nvmlGpuFabricInfo_v2_t() + cdef nvmlGpuFabricInfo_v2_t pod return _numpy.dtype({ 'names': ['version', 'cluster_uuid', 'status', 'clique_id', 'state', 'health_mask'], 'formats': [_numpy.uint32, (_numpy.uint8, 16), _numpy.int32, _numpy.uint32, _numpy.uint8, _numpy.uint32], @@ -11820,7 +11832,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 @@ -11832,7 +11844,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))}>" @@ -11853,20 +11865,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 @@ -11875,7 +11887,7 @@ cdef class GpuFabricInfo_v2: @property def version(self): - """int: Structure version identifier (set to nvmlGpuFabricInfo_v2)""" + """int: Structure version identifier (set to nvmlGpuFabricInfo_v2).""" return self._ptr[0].version @version.setter @@ -11887,7 +11899,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) @@ -11897,9 +11909,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): @@ -11948,7 +11960,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): @@ -11957,7 +11969,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): @@ -11972,10 +11984,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: @@ -11987,7 +11999,7 @@ cdef class GpuFabricInfo_v2: cdef _get_nvlink_supported_bw_modes_v1_dtype_offsets(): - cdef nvmlNvlinkSupportedBwModes_v1_t pod = nvmlNvlinkSupportedBwModes_v1_t() + cdef nvmlNvlinkSupportedBwModes_v1_t pod return _numpy.dtype({ 'names': ['version', 'bw_modes', 'total_bw_modes'], 'formats': [_numpy.uint32, (_numpy.uint8, 23), _numpy.uint8], @@ -12014,7 +12026,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 @@ -12026,7 +12038,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))}>" @@ -12047,20 +12059,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 @@ -12083,7 +12095,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) @@ -12096,14 +12108,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): @@ -12112,7 +12124,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): @@ -12127,10 +12139,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: @@ -12142,7 +12154,7 @@ cdef class NvlinkSupportedBwModes_v1: cdef _get_nvlink_get_bw_mode_v1_dtype_offsets(): - cdef nvmlNvlinkGetBwMode_v1_t pod = nvmlNvlinkGetBwMode_v1_t() + cdef nvmlNvlinkGetBwMode_v1_t pod return _numpy.dtype({ 'names': ['version', 'b_is_best', 'bw_mode'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint8], @@ -12169,7 +12181,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 @@ -12181,7 +12193,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))}>" @@ -12202,20 +12214,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 @@ -12258,7 +12270,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): @@ -12267,7 +12279,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): @@ -12282,10 +12294,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: @@ -12297,7 +12309,7 @@ cdef class NvlinkGetBwMode_v1: cdef _get_nvlink_set_bw_mode_v1_dtype_offsets(): - cdef nvmlNvlinkSetBwMode_v1_t pod = nvmlNvlinkSetBwMode_v1_t() + cdef nvmlNvlinkSetBwMode_v1_t pod return _numpy.dtype({ 'names': ['version', 'b_set_best', 'bw_mode'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint8], @@ -12324,7 +12336,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 @@ -12336,7 +12348,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))}>" @@ -12357,20 +12369,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 @@ -12413,7 +12425,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): @@ -12422,7 +12434,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): @@ -12437,10 +12449,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: @@ -12452,7 +12464,7 @@ cdef class NvlinkSetBwMode_v1: cdef _get_vgpu_version_dtype_offsets(): - cdef nvmlVgpuVersion_t pod = nvmlVgpuVersion_t() + cdef nvmlVgpuVersion_t pod return _numpy.dtype({ 'names': ['min_version', 'max_version'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -12478,7 +12490,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 @@ -12490,7 +12502,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))}>" @@ -12511,20 +12523,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 @@ -12556,7 +12568,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): @@ -12565,7 +12577,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): @@ -12580,10 +12592,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: @@ -12595,7 +12607,7 @@ cdef class VgpuVersion: cdef _get_vgpu_metadata_dtype_offsets(): - cdef nvmlVgpuMetadata_t pod = nvmlVgpuMetadata_t() + cdef nvmlVgpuMetadata_t pod return _numpy.dtype({ 'names': ['version', 'revision', 'guest_info_state', 'guest_driver_version', 'host_driver_version', 'reserved', 'vgpu_virtualization_caps', 'guest_vgpu_version', 'opaque_data_size', 'opaque_data'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.int32, (_numpy.int8, 80), (_numpy.int8, 80), (_numpy.uint32, 6), _numpy.uint32, _numpy.uint32, _numpy.uint32, (_numpy.int8, 4)], @@ -12629,7 +12641,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 @@ -12641,7 +12653,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))}>" @@ -12662,20 +12674,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 @@ -12718,7 +12730,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): @@ -12728,12 +12740,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): @@ -12743,7 +12755,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): @@ -12781,7 +12793,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): @@ -12791,12 +12803,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): @@ -12805,7 +12817,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): @@ -12820,10 +12832,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: @@ -12835,7 +12847,7 @@ cdef class VgpuMetadata: cdef _get_vgpu_pgpu_compatibility_dtype_offsets(): - cdef nvmlVgpuPgpuCompatibility_t pod = nvmlVgpuPgpuCompatibility_t() + cdef nvmlVgpuPgpuCompatibility_t pod return _numpy.dtype({ 'names': ['vgpu_vm_compatibility', 'compatibility_limit_code'], 'formats': [_numpy.int32, _numpy.int32], @@ -12861,7 +12873,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 @@ -12873,7 +12885,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))}>" @@ -12894,20 +12906,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 @@ -12939,7 +12951,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): @@ -12948,7 +12960,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): @@ -12963,10 +12975,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: @@ -12978,7 +12990,7 @@ cdef class VgpuPgpuCompatibility: cdef _get_gpu_instance_placement_dtype_offsets(): - cdef nvmlGpuInstancePlacement_t pod = nvmlGpuInstancePlacement_t() + cdef nvmlGpuInstancePlacement_t pod return _numpy.dtype({ 'names': ['start', 'size_'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -13040,10 +13052,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): @@ -13121,8 +13133,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) @@ -13131,7 +13143,7 @@ cdef class GpuInstancePlacement: cdef _get_gpu_instance_profile_info_v3_dtype_offsets(): - cdef nvmlGpuInstanceProfileInfo_v3_t pod = nvmlGpuInstanceProfileInfo_v3_t() + cdef nvmlGpuInstanceProfileInfo_v3_t pod return _numpy.dtype({ 'names': ['version', 'id', 'slice_count', 'instance_count', 'multiprocessor_count', 'copy_engine_count', 'decoder_count', 'encoder_count', 'jpeg_count', 'ofa_count', 'memory_size_mb', 'name', 'capabilities'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint64, (_numpy.int8, 96), _numpy.uint32], @@ -13168,7 +13180,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 @@ -13180,7 +13192,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))}>" @@ -13201,20 +13213,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 @@ -13345,7 +13357,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): @@ -13355,7 +13367,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): @@ -13371,7 +13383,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): @@ -13380,7 +13392,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): @@ -13395,10 +13407,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: @@ -13410,7 +13422,7 @@ cdef class GpuInstanceProfileInfo_v3: cdef _get_compute_instance_placement_dtype_offsets(): - cdef nvmlComputeInstancePlacement_t pod = nvmlComputeInstancePlacement_t() + cdef nvmlComputeInstancePlacement_t pod return _numpy.dtype({ 'names': ['start', 'size_'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -13472,10 +13484,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): @@ -13553,8 +13565,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) @@ -13563,7 +13575,7 @@ cdef class ComputeInstancePlacement: cdef _get_compute_instance_profile_info_v2_dtype_offsets(): - cdef nvmlComputeInstanceProfileInfo_v2_t pod = nvmlComputeInstanceProfileInfo_v2_t() + cdef nvmlComputeInstanceProfileInfo_v2_t pod return _numpy.dtype({ 'names': ['version', 'id', 'slice_count', 'instance_count', 'multiprocessor_count', 'shared_copy_engine_count', 'shared_decoder_count', 'shared_encoder_count', 'shared_jpeg_count', 'shared_ofa_count', 'name'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, (_numpy.int8, 96)], @@ -13598,7 +13610,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 @@ -13610,7 +13622,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))}>" @@ -13631,20 +13643,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 @@ -13764,7 +13776,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): @@ -13774,12 +13786,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): @@ -13788,7 +13800,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): @@ -13803,10 +13815,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: @@ -13818,7 +13830,7 @@ cdef class ComputeInstanceProfileInfo_v2: cdef _get_compute_instance_profile_info_v3_dtype_offsets(): - cdef nvmlComputeInstanceProfileInfo_v3_t pod = nvmlComputeInstanceProfileInfo_v3_t() + cdef nvmlComputeInstanceProfileInfo_v3_t pod return _numpy.dtype({ 'names': ['version', 'id', 'slice_count', 'instance_count', 'multiprocessor_count', 'shared_copy_engine_count', 'shared_decoder_count', 'shared_encoder_count', 'shared_jpeg_count', 'shared_ofa_count', 'name', 'capabilities'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, (_numpy.int8, 96), _numpy.uint32], @@ -13854,7 +13866,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 @@ -13866,7 +13878,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))}>" @@ -13887,20 +13899,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 @@ -14020,7 +14032,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): @@ -14030,7 +14042,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): @@ -14046,7 +14058,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): @@ -14055,7 +14067,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): @@ -14070,10 +14082,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: @@ -14085,7 +14097,7 @@ cdef class ComputeInstanceProfileInfo_v3: cdef _get_device_addressing_mode_v1_dtype_offsets(): - cdef nvmlDeviceAddressingMode_v1_t pod = nvmlDeviceAddressingMode_v1_t() + cdef nvmlDeviceAddressingMode_v1_t pod return _numpy.dtype({ 'names': ['version', 'value'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -14111,7 +14123,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 @@ -14123,7 +14135,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))}>" @@ -14144,20 +14156,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 @@ -14189,7 +14201,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): @@ -14198,7 +14210,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): @@ -14213,10 +14225,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: @@ -14228,7 +14240,7 @@ cdef class DeviceAddressingMode_v1: cdef _get_repair_status_v1_dtype_offsets(): - cdef nvmlRepairStatus_v1_t pod = nvmlRepairStatus_v1_t() + cdef nvmlRepairStatus_v1_t pod return _numpy.dtype({ 'names': ['version', 'b_channel_repair_pending', 'b_tpc_repair_pending'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -14255,7 +14267,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 @@ -14267,7 +14279,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))}>" @@ -14288,20 +14300,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 @@ -14344,7 +14356,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): @@ -14353,7 +14365,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): @@ -14368,10 +14380,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: @@ -14383,7 +14395,7 @@ cdef class RepairStatus_v1: cdef _get_device_power_mizer_modes_v1_dtype_offsets(): - cdef nvmlDevicePowerMizerModes_v1_t pod = nvmlDevicePowerMizerModes_v1_t() + cdef nvmlDevicePowerMizerModes_v1_t pod return _numpy.dtype({ 'names': ['current_mode', 'mode', 'supported_power_mizer_modes'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -14410,7 +14422,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 @@ -14422,7 +14434,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))}>" @@ -14443,20 +14455,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 @@ -14499,7 +14511,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): @@ -14508,7 +14520,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): @@ -14523,10 +14535,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: @@ -14538,7 +14550,7 @@ cdef class DevicePowerMizerModes_v1: cdef _get_ecc_sram_unique_uncorrected_error_entry_v1_dtype_offsets(): - cdef nvmlEccSramUniqueUncorrectedErrorEntry_v1_t pod = nvmlEccSramUniqueUncorrectedErrorEntry_v1_t() + cdef nvmlEccSramUniqueUncorrectedErrorEntry_v1_t pod return _numpy.dtype({ 'names': ['unit', 'location', 'sublocation', 'extlocation', 'address', 'is_parity', 'count'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -14605,10 +14617,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): @@ -14741,8 +14753,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) @@ -14751,7 +14763,7 @@ cdef class EccSramUniqueUncorrectedErrorEntry_v1: cdef _get_gpu_fabric_info_v3_dtype_offsets(): - cdef nvmlGpuFabricInfo_v3_t pod = nvmlGpuFabricInfo_v3_t() + cdef nvmlGpuFabricInfo_v3_t pod return _numpy.dtype({ 'names': ['version', 'cluster_uuid', 'status', 'clique_id', 'state', 'health_mask', 'health_summary'], 'formats': [_numpy.uint32, (_numpy.uint8, 16), _numpy.int32, _numpy.uint32, _numpy.uint8, _numpy.uint32, _numpy.uint8], @@ -14782,7 +14794,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 @@ -14794,7 +14806,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))}>" @@ -14815,20 +14827,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 @@ -14837,7 +14849,7 @@ cdef class GpuFabricInfo_v3: @property def version(self): - """int: Structure version identifier (set to nvmlGpuFabricInfo_v2)""" + """int: Structure version identifier (set to nvmlGpuFabricInfo_v2).""" return self._ptr[0].version @version.setter @@ -14849,7 +14861,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) @@ -14859,9 +14871,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): @@ -14921,7 +14933,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): @@ -14930,7 +14942,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): @@ -14945,10 +14957,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: @@ -14960,7 +14972,7 @@ cdef class GpuFabricInfo_v3: cdef _get_nv_link_info_v1_dtype_offsets(): - cdef nvmlNvLinkInfo_v1_t pod = nvmlNvLinkInfo_v1_t() + cdef nvmlNvLinkInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'is_nvle_enabled'], 'formats': [_numpy.uint32, _numpy.uint32], @@ -14986,7 +14998,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 @@ -14998,7 +15010,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))}>" @@ -15019,20 +15031,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 @@ -15064,7 +15076,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): @@ -15073,7 +15085,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): @@ -15088,10 +15100,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: @@ -15103,7 +15115,7 @@ cdef class NvLinkInfo_v1: cdef _get_nvlink_firmware_version_dtype_offsets(): - cdef nvmlNvlinkFirmwareVersion_t pod = nvmlNvlinkFirmwareVersion_t() + cdef nvmlNvlinkFirmwareVersion_t pod return _numpy.dtype({ 'names': ['ucode_type', 'major', 'minor', 'sub_minor'], 'formats': [_numpy.uint8, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -15131,7 +15143,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 @@ -15143,7 +15155,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))}>" @@ -15164,20 +15176,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 @@ -15231,7 +15243,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): @@ -15240,7 +15252,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): @@ -15255,10 +15267,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: @@ -15270,7 +15282,7 @@ cdef class NvlinkFirmwareVersion: cdef _get_prm_counter_input_v1_dtype_offsets(): - cdef nvmlPRMCounterInput_v1_t pod = nvmlPRMCounterInput_v1_t() + cdef nvmlPRMCounterInput_v1_t pod return _numpy.dtype({ 'names': ['local_port'], 'formats': [_numpy.uint32], @@ -15295,7 +15307,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 @@ -15307,7 +15319,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))}>" @@ -15328,20 +15340,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 @@ -15362,7 +15374,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): @@ -15371,7 +15383,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): @@ -15386,10 +15398,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: @@ -15401,7 +15413,7 @@ cdef class PRMCounterInput_v1: cdef _get_vgpu_scheduler_state_info_v2_dtype_offsets(): - cdef nvmlVgpuSchedulerStateInfo_v2_t pod = nvmlVgpuSchedulerStateInfo_v2_t() + cdef nvmlVgpuSchedulerStateInfo_v2_t pod return _numpy.dtype({ 'names': ['engine_id', 'scheduler_policy', 'avg_factor', 'timeslice'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -15429,7 +15441,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 @@ -15441,7 +15453,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))}>" @@ -15462,20 +15474,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 @@ -15529,7 +15541,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): @@ -15538,7 +15550,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): @@ -15553,10 +15565,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: @@ -15568,7 +15580,7 @@ cdef class VgpuSchedulerStateInfo_v2: cdef _get_vgpu_scheduler_log_entry_v2_dtype_offsets(): - cdef nvmlVgpuSchedulerLogEntry_v2_t pod = nvmlVgpuSchedulerLogEntry_v2_t() + cdef nvmlVgpuSchedulerLogEntry_v2_t pod return _numpy.dtype({ 'names': ['timestamp', 'time_run_total', 'time_run', 'sw_runlist_id', 'target_time_slice', 'cumulative_preemption_time', 'weight'], 'formats': [_numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint32, _numpy.uint64, _numpy.uint64, _numpy.uint32], @@ -15635,10 +15647,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): @@ -15771,8 +15783,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) @@ -15781,7 +15793,7 @@ cdef class VgpuSchedulerLogEntry_v2: cdef _get_vgpu_scheduler_state_v2_dtype_offsets(): - cdef nvmlVgpuSchedulerState_v2_t pod = nvmlVgpuSchedulerState_v2_t() + cdef nvmlVgpuSchedulerState_v2_t pod return _numpy.dtype({ 'names': ['engine_id', 'scheduler_policy', 'avg_factor', 'frequency'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32], @@ -15809,7 +15821,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 @@ -15821,7 +15833,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))}>" @@ -15842,20 +15854,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 @@ -15909,7 +15921,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): @@ -15918,7 +15930,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): @@ -15933,10 +15945,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: @@ -15948,7 +15960,7 @@ cdef class VgpuSchedulerState_v2: cdef _get_excluded_device_info_dtype_offsets(): - cdef nvmlExcludedDeviceInfo_t pod = nvmlExcludedDeviceInfo_t() + cdef nvmlExcludedDeviceInfo_t pod return _numpy.dtype({ 'names': ['pci_info', 'uuid'], 'formats': [pci_info_dtype, (_numpy.int8, 80)], @@ -15974,7 +15986,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 @@ -15986,7 +15998,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))}>" @@ -16007,20 +16019,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 @@ -16037,12 +16049,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): @@ -16052,12 +16064,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): @@ -16066,7 +16078,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): @@ -16081,10 +16093,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: @@ -16096,7 +16108,7 @@ cdef class ExcludedDeviceInfo: cdef _get_process_detail_list_v1_dtype_offsets(): - cdef nvmlProcessDetailList_v1_t pod = nvmlProcessDetailList_v1_t() + cdef nvmlProcessDetailList_v1_t pod return _numpy.dtype({ 'names': ['version', 'mode', 'num_proc_array_entries', 'proc_array'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.intp], @@ -16125,7 +16137,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 @@ -16138,7 +16150,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))}>" @@ -16159,20 +16171,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 @@ -16192,7 +16204,7 @@ cdef class ProcessDetailList_v1: @property def mode(self): - """int: Process mode(Compute/Graphics/MPSCompute)""" + """int: Process mode(Compute/Graphics/MPSCompute).""" return self._ptr[0].mode @mode.setter @@ -16220,7 +16232,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): @@ -16229,7 +16241,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): @@ -16244,10 +16256,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: @@ -16260,7 +16272,7 @@ cdef class ProcessDetailList_v1: cdef _get_bridge_chip_hierarchy_dtype_offsets(): - cdef nvmlBridgeChipHierarchy_t pod = nvmlBridgeChipHierarchy_t() + cdef nvmlBridgeChipHierarchy_t pod return _numpy.dtype({ 'names': ['bridge_count', 'bridge_chip_info'], 'formats': [_numpy.uint8, (bridge_chip_info_dtype, 128)], @@ -16286,7 +16298,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 @@ -16298,7 +16310,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))}>" @@ -16319,20 +16331,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 @@ -16354,12 +16366,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): @@ -16368,7 +16380,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): @@ -16383,10 +16395,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: @@ -16398,7 +16410,7 @@ cdef class BridgeChipHierarchy: cdef _get_sample_dtype_offsets(): - cdef nvmlSample_t pod = nvmlSample_t() + cdef nvmlSample_t pod return _numpy.dtype({ 'names': ['time_stamp', 'sample_value'], 'formats': [_numpy.uint64, value_dtype], @@ -16460,10 +16472,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): @@ -16539,8 +16551,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) @@ -16549,7 +16561,7 @@ cdef class Sample: cdef _get_vgpu_instance_utilization_sample_dtype_offsets(): - cdef nvmlVgpuInstanceUtilizationSample_t pod = nvmlVgpuInstanceUtilizationSample_t() + cdef nvmlVgpuInstanceUtilizationSample_t pod return _numpy.dtype({ 'names': ['vgpu_instance', 'time_stamp', 'sm_util', 'mem_util', 'enc_util', 'dec_util'], 'formats': [_numpy.uint32, _numpy.uint64, value_dtype, value_dtype, value_dtype, value_dtype], @@ -16615,10 +16627,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): @@ -16732,8 +16744,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) @@ -16742,7 +16754,7 @@ cdef class VgpuInstanceUtilizationSample: cdef _get_vgpu_instance_utilization_info_v1_dtype_offsets(): - cdef nvmlVgpuInstanceUtilizationInfo_v1_t pod = nvmlVgpuInstanceUtilizationInfo_v1_t() + cdef nvmlVgpuInstanceUtilizationInfo_v1_t pod return _numpy.dtype({ 'names': ['time_stamp', 'vgpu_instance', 'sm_util', 'mem_util', 'enc_util', 'dec_util', 'jpg_util', 'ofa_util'], 'formats': [_numpy.uint64, _numpy.uint32, value_dtype, value_dtype, value_dtype, value_dtype, value_dtype, value_dtype], @@ -16810,10 +16822,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): @@ -16945,8 +16957,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) @@ -16955,7 +16967,7 @@ cdef class VgpuInstanceUtilizationInfo_v1: cdef _get_field_value_dtype_offsets(): - cdef nvmlFieldValue_t pod = nvmlFieldValue_t() + cdef nvmlFieldValue_t pod return _numpy.dtype({ 'names': ['field_id', 'scope_id', 'timestamp', 'latency_usec', 'value_type', 'nvml_return', 'value'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.int64, _numpy.int64, _numpy.int32, _numpy.int32, value_dtype], @@ -17022,10 +17034,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): @@ -17156,8 +17168,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) @@ -17166,7 +17178,7 @@ cdef class FieldValue: cdef _get_prm_counter_value_v1_dtype_offsets(): - cdef nvmlPRMCounterValue_v1_t pod = nvmlPRMCounterValue_v1_t() + cdef nvmlPRMCounterValue_v1_t pod return _numpy.dtype({ 'names': ['status', 'output_type', 'output_value'], 'formats': [_numpy.int32, _numpy.int32, value_dtype], @@ -17193,7 +17205,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 @@ -17205,7 +17217,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))}>" @@ -17226,20 +17238,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 @@ -17256,7 +17268,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): @@ -17283,7 +17295,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): @@ -17292,7 +17304,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): @@ -17307,10 +17319,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: @@ -17322,7 +17334,7 @@ cdef class PRMCounterValue_v1: cdef _get_gpu_thermal_settings_dtype_offsets(): - cdef nvmlGpuThermalSettings_t pod = nvmlGpuThermalSettings_t() + cdef nvmlGpuThermalSettings_t pod return _numpy.dtype({ 'names': ['count', 'sensor'], 'formats': [_numpy.uint32, (_py_anon_pod0_dtype, 3)], @@ -17348,7 +17360,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 @@ -17360,7 +17372,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))}>" @@ -17381,20 +17393,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 @@ -17413,7 +17425,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): @@ -17429,7 +17441,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): @@ -17438,7 +17450,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): @@ -17453,10 +17465,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: @@ -17468,7 +17480,7 @@ cdef class GpuThermalSettings: cdef _get_clk_mon_status_dtype_offsets(): - cdef nvmlClkMonStatus_t pod = nvmlClkMonStatus_t() + cdef nvmlClkMonStatus_t pod return _numpy.dtype({ 'names': ['b_global_status', 'clk_mon_list_size', 'clk_mon_list'], 'formats': [_numpy.uint32, _numpy.uint32, (clk_mon_fault_info_dtype, 32)], @@ -17495,7 +17507,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 @@ -17507,7 +17519,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))}>" @@ -17528,20 +17540,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 @@ -17563,7 +17575,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): @@ -17579,7 +17591,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): @@ -17588,7 +17600,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): @@ -17603,10 +17615,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: @@ -17618,7 +17630,7 @@ cdef class ClkMonStatus: cdef _get_processes_utilization_info_v1_dtype_offsets(): - cdef nvmlProcessesUtilizationInfo_v1_t pod = nvmlProcessesUtilizationInfo_v1_t() + cdef nvmlProcessesUtilizationInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'process_samples_count', 'last_seen_time_stamp', 'proc_util_array'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint64, _numpy.intp], @@ -17647,7 +17659,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 @@ -17660,7 +17672,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))}>" @@ -17681,20 +17693,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 @@ -17742,7 +17754,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): @@ -17751,7 +17763,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): @@ -17766,10 +17778,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: @@ -17782,7 +17794,7 @@ cdef class ProcessesUtilizationInfo_v1: cdef _get_gpu_dynamic_pstates_info_dtype_offsets(): - cdef nvmlGpuDynamicPstatesInfo_t pod = nvmlGpuDynamicPstatesInfo_t() + cdef nvmlGpuDynamicPstatesInfo_t pod return _numpy.dtype({ 'names': ['flags_', 'utilization'], 'formats': [_numpy.uint32, (_py_anon_pod1_dtype, 8)], @@ -17808,7 +17820,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 @@ -17820,7 +17832,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))}>" @@ -17841,20 +17853,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 @@ -17873,7 +17885,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): @@ -17889,7 +17901,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): @@ -17898,7 +17910,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): @@ -17913,10 +17925,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: @@ -17928,7 +17940,7 @@ cdef class GpuDynamicPstatesInfo: cdef _get_vgpu_processes_utilization_info_v1_dtype_offsets(): - cdef nvmlVgpuProcessesUtilizationInfo_v1_t pod = nvmlVgpuProcessesUtilizationInfo_v1_t() + cdef nvmlVgpuProcessesUtilizationInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'vgpu_process_count', 'last_seen_time_stamp', 'vgpu_proc_util_array'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint64, _numpy.intp], @@ -17957,7 +17969,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 @@ -17970,7 +17982,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))}>" @@ -17991,20 +18003,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 @@ -18052,7 +18064,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): @@ -18061,7 +18073,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): @@ -18076,10 +18088,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: @@ -18112,7 +18124,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 @@ -18124,7 +18136,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))}>" @@ -18145,20 +18157,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 @@ -18175,7 +18187,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): @@ -18187,12 +18199,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): @@ -18201,7 +18213,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): @@ -18216,10 +18228,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: @@ -18251,7 +18263,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 @@ -18263,7 +18275,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))}>" @@ -18284,20 +18296,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 @@ -18314,7 +18326,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): @@ -18326,12 +18338,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): @@ -18340,7 +18352,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): @@ -18355,10 +18367,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: @@ -18370,7 +18382,7 @@ cdef class VgpuSchedulerSetParams: cdef _get_vgpu_license_info_dtype_offsets(): - cdef nvmlVgpuLicenseInfo_t pod = nvmlVgpuLicenseInfo_t() + cdef nvmlVgpuLicenseInfo_t pod return _numpy.dtype({ 'names': ['is_licensed', 'license_expiry', 'current_state'], 'formats': [_numpy.uint8, vgpu_license_expiry_dtype, _numpy.uint32], @@ -18397,7 +18409,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 @@ -18409,7 +18421,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))}>" @@ -18430,20 +18442,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 @@ -18460,7 +18472,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): @@ -18487,7 +18499,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): @@ -18496,7 +18508,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): @@ -18511,10 +18523,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: @@ -18526,7 +18538,7 @@ cdef class VgpuLicenseInfo: cdef _get_grid_licensable_feature_dtype_offsets(): - cdef nvmlGridLicensableFeature_t pod = nvmlGridLicensableFeature_t() + cdef nvmlGridLicensableFeature_t pod return _numpy.dtype({ 'names': ['feature_code', 'feature_state', 'license_info', 'product_name', 'feature_enabled', 'license_expiry'], 'formats': [_numpy.int32, _numpy.uint32, (_numpy.int8, 128), (_numpy.int8, 128), _numpy.uint32, grid_license_expiry_dtype], @@ -18592,10 +18604,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): @@ -18711,8 +18723,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) @@ -18721,7 +18733,7 @@ cdef class GridLicensableFeature: cdef _get_unit_fan_speeds_dtype_offsets(): - cdef nvmlUnitFanSpeeds_t pod = nvmlUnitFanSpeeds_t() + cdef nvmlUnitFanSpeeds_t pod return _numpy.dtype({ 'names': ['fans', 'count'], 'formats': [(unit_fan_info_dtype, 24), _numpy.uint32], @@ -18747,7 +18759,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 @@ -18759,7 +18771,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))}>" @@ -18780,20 +18792,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 @@ -18812,7 +18824,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): @@ -18828,7 +18840,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): @@ -18837,7 +18849,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): @@ -18852,10 +18864,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: @@ -18867,7 +18879,7 @@ cdef class UnitFanSpeeds: cdef _get_vgpu_pgpu_metadata_dtype_offsets(): - cdef nvmlVgpuPgpuMetadata_t pod = nvmlVgpuPgpuMetadata_t() + cdef nvmlVgpuPgpuMetadata_t pod return _numpy.dtype({ 'names': ['version', 'revision', 'host_driver_version', 'pgpu_virtualization_caps', 'reserved', 'host_supported_vgpu_range', 'opaque_data_size', 'opaque_data'], 'formats': [_numpy.uint32, _numpy.uint32, (_numpy.int8, 80), _numpy.uint32, (_numpy.uint32, 5), vgpu_version_dtype, _numpy.uint32, (_numpy.int8, 4)], @@ -18899,7 +18911,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 @@ -18911,7 +18923,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))}>" @@ -18932,20 +18944,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 @@ -18962,7 +18974,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): @@ -18989,7 +19001,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): @@ -18999,7 +19011,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): @@ -19026,7 +19038,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): @@ -19036,12 +19048,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): @@ -19050,7 +19062,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): @@ -19065,10 +19077,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: @@ -19080,7 +19092,7 @@ cdef class VgpuPgpuMetadata: cdef _get_gpu_instance_info_dtype_offsets(): - cdef nvmlGpuInstanceInfo_t pod = nvmlGpuInstanceInfo_t() + cdef nvmlGpuInstanceInfo_t pod return _numpy.dtype({ 'names': ['device_', 'id', 'profile_id', 'placement'], 'formats': [_numpy.intp, _numpy.uint32, _numpy.uint32, gpu_instance_placement_dtype], @@ -19108,7 +19120,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 @@ -19120,7 +19132,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))}>" @@ -19141,20 +19153,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 @@ -19171,7 +19183,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): @@ -19209,7 +19221,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): @@ -19218,7 +19230,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): @@ -19233,10 +19245,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: @@ -19248,7 +19260,7 @@ cdef class GpuInstanceInfo: cdef _get_compute_instance_info_dtype_offsets(): - cdef nvmlComputeInstanceInfo_t pod = nvmlComputeInstanceInfo_t() + cdef nvmlComputeInstanceInfo_t pod return _numpy.dtype({ 'names': ['device_', 'gpu_instance', 'id', 'profile_id', 'placement'], 'formats': [_numpy.intp, _numpy.intp, _numpy.uint32, _numpy.uint32, compute_instance_placement_dtype], @@ -19277,7 +19289,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 @@ -19289,7 +19301,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))}>" @@ -19310,20 +19322,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 @@ -19340,7 +19352,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): @@ -19389,7 +19401,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): @@ -19398,7 +19410,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): @@ -19413,10 +19425,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: @@ -19428,7 +19440,7 @@ cdef class ComputeInstanceInfo: cdef _get_ecc_sram_unique_uncorrected_error_counts_v1_dtype_offsets(): - cdef nvmlEccSramUniqueUncorrectedErrorCounts_v1_t pod = nvmlEccSramUniqueUncorrectedErrorCounts_v1_t() + cdef nvmlEccSramUniqueUncorrectedErrorCounts_v1_t pod return _numpy.dtype({ 'names': ['version', 'entry_count', 'entries'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.intp], @@ -19456,7 +19468,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 @@ -19469,7 +19481,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))}>" @@ -19490,20 +19502,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 @@ -19540,7 +19552,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): @@ -19549,7 +19561,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): @@ -19564,10 +19576,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: @@ -19580,7 +19592,7 @@ cdef class EccSramUniqueUncorrectedErrorCounts_v1: cdef _get_nvlink_firmware_info_dtype_offsets(): - cdef nvmlNvlinkFirmwareInfo_t pod = nvmlNvlinkFirmwareInfo_t() + cdef nvmlNvlinkFirmwareInfo_t pod return _numpy.dtype({ 'names': ['firmware_version', 'num_valid_entries'], 'formats': [(nvlink_firmware_version_dtype, 100), _numpy.uint32], @@ -19606,7 +19618,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 @@ -19618,7 +19630,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))}>" @@ -19639,20 +19651,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 @@ -19671,7 +19683,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): @@ -19687,7 +19699,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): @@ -19696,7 +19708,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): @@ -19711,10 +19723,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: @@ -19726,7 +19738,7 @@ cdef class NvlinkFirmwareInfo: cdef _get_vgpu_scheduler_log_info_v2_dtype_offsets(): - cdef nvmlVgpuSchedulerLogInfo_v2_t pod = nvmlVgpuSchedulerLogInfo_v2_t() + cdef nvmlVgpuSchedulerLogInfo_v2_t pod return _numpy.dtype({ 'names': ['engine_id', 'scheduler_policy', 'avg_factor', 'timeslice', 'entries_count', 'log_entries'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, (vgpu_scheduler_log_entry_v2_dtype, 200)], @@ -19756,7 +19768,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 @@ -19768,7 +19780,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))}>" @@ -19789,20 +19801,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 @@ -19821,7 +19833,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): @@ -19881,7 +19893,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): @@ -19890,7 +19902,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): @@ -19905,10 +19917,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: @@ -19920,7 +19932,7 @@ cdef class VgpuSchedulerLogInfo_v2: cdef _get_vgpu_instances_utilization_info_v1_dtype_offsets(): - cdef nvmlVgpuInstancesUtilizationInfo_v1_t pod = nvmlVgpuInstancesUtilizationInfo_v1_t() + cdef nvmlVgpuInstancesUtilizationInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'sample_val_type', 'vgpu_instance_count', 'last_seen_time_stamp', 'vgpu_util_array'], 'formats': [_numpy.uint32, _numpy.int32, _numpy.uint32, _numpy.uint64, _numpy.intp], @@ -19950,7 +19962,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 @@ -19963,7 +19975,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))}>" @@ -19984,20 +19996,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 @@ -20056,7 +20068,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): @@ -20065,7 +20077,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): @@ -20080,10 +20092,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: @@ -20096,7 +20108,7 @@ cdef class VgpuInstancesUtilizationInfo_v1: cdef _get_prm_counter_v1_dtype_offsets(): - cdef nvmlPRMCounter_v1_t pod = nvmlPRMCounter_v1_t() + cdef nvmlPRMCounter_v1_t pod return _numpy.dtype({ 'names': ['counter_id', 'in_data', 'counter_value'], 'formats': [_numpy.uint32, prm_counter_input_v1_dtype, prm_counter_value_v1_dtype], @@ -20159,10 +20171,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): @@ -20247,8 +20259,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) @@ -20257,7 +20269,7 @@ cdef class PRMCounter_v1: cdef _get_vgpu_scheduler_log_dtype_offsets(): - cdef nvmlVgpuSchedulerLog_t pod = nvmlVgpuSchedulerLog_t() + cdef nvmlVgpuSchedulerLog_t pod return _numpy.dtype({ 'names': ['engine_id', 'scheduler_policy', 'arr_mode', 'scheduler_params', 'entries_count', 'log_entries'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype, _numpy.uint32, (vgpu_scheduler_log_entry_dtype, 200)], @@ -20287,7 +20299,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 @@ -20299,7 +20311,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))}>" @@ -20320,20 +20332,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 @@ -20350,7 +20362,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): @@ -20364,7 +20376,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): @@ -20413,7 +20425,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): @@ -20422,7 +20434,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): @@ -20437,10 +20449,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: @@ -20452,7 +20464,7 @@ cdef class VgpuSchedulerLog: cdef _get_vgpu_scheduler_get_state_dtype_offsets(): - cdef nvmlVgpuSchedulerGetState_t pod = nvmlVgpuSchedulerGetState_t() + cdef nvmlVgpuSchedulerGetState_t pod return _numpy.dtype({ 'names': ['scheduler_policy', 'arr_mode', 'scheduler_params'], 'formats': [_numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype], @@ -20479,7 +20491,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 @@ -20491,7 +20503,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))}>" @@ -20512,20 +20524,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 @@ -20542,7 +20554,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): @@ -20569,7 +20581,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): @@ -20578,7 +20590,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): @@ -20593,10 +20605,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: @@ -20608,7 +20620,7 @@ cdef class VgpuSchedulerGetState: cdef _get_vgpu_scheduler_state_info_v1_dtype_offsets(): - cdef nvmlVgpuSchedulerStateInfo_v1_t pod = nvmlVgpuSchedulerStateInfo_v1_t() + cdef nvmlVgpuSchedulerStateInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'engine_id', 'scheduler_policy', 'arr_mode', 'scheduler_params'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype], @@ -20637,7 +20649,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 @@ -20649,7 +20661,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))}>" @@ -20670,20 +20682,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 @@ -20700,7 +20712,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): @@ -20749,7 +20761,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): @@ -20758,7 +20770,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): @@ -20773,10 +20785,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: @@ -20788,7 +20800,7 @@ cdef class VgpuSchedulerStateInfo_v1: cdef _get_vgpu_scheduler_log_info_v1_dtype_offsets(): - cdef nvmlVgpuSchedulerLogInfo_v1_t pod = nvmlVgpuSchedulerLogInfo_v1_t() + cdef nvmlVgpuSchedulerLogInfo_v1_t pod return _numpy.dtype({ 'names': ['version', 'engine_id', 'scheduler_policy', 'arr_mode', 'scheduler_params', 'entries_count', 'log_entries'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype, _numpy.uint32, (vgpu_scheduler_log_entry_dtype, 200)], @@ -20819,7 +20831,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 @@ -20831,7 +20843,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))}>" @@ -20852,20 +20864,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 @@ -20882,7 +20894,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): @@ -20896,7 +20908,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): @@ -20956,7 +20968,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): @@ -20965,7 +20977,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): @@ -20980,10 +20992,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: @@ -20995,7 +21007,7 @@ cdef class VgpuSchedulerLogInfo_v1: cdef _get_vgpu_scheduler_state_v1_dtype_offsets(): - cdef nvmlVgpuSchedulerState_v1_t pod = nvmlVgpuSchedulerState_v1_t() + cdef nvmlVgpuSchedulerState_v1_t pod return _numpy.dtype({ 'names': ['version', 'engine_id', 'scheduler_policy', 'enable_arr_mode', 'scheduler_params'], 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_set_params_dtype], @@ -21024,7 +21036,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 @@ -21036,7 +21048,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))}>" @@ -21057,20 +21069,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 @@ -21087,7 +21099,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): @@ -21136,7 +21148,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): @@ -21145,7 +21157,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): @@ -21160,10 +21172,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: @@ -21175,7 +21187,7 @@ cdef class VgpuSchedulerState_v1: cdef _get_grid_licensable_features_dtype_offsets(): - cdef nvmlGridLicensableFeatures_t pod = nvmlGridLicensableFeatures_t() + cdef nvmlGridLicensableFeatures_t pod return _numpy.dtype({ 'names': ['is_grid_license_supported', 'licensable_features_count', 'grid_licensable_features'], 'formats': [_numpy.int32, _numpy.uint32, (grid_licensable_feature_dtype, 3)], @@ -21202,7 +21214,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 @@ -21214,7 +21226,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))}>" @@ -21235,20 +21247,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 @@ -21270,7 +21282,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): @@ -21286,7 +21298,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): @@ -21295,7 +21307,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): @@ -21310,10 +21322,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: @@ -21325,7 +21337,7 @@ cdef class GridLicensableFeatures: cdef _get_nv_link_info_v2_dtype_offsets(): - cdef nvmlNvLinkInfo_v2_t pod = nvmlNvLinkInfo_v2_t() + cdef nvmlNvLinkInfo_v2_t pod return _numpy.dtype({ 'names': ['version', 'is_nvle_enabled', 'firmware_info'], 'formats': [_numpy.uint32, _numpy.uint32, nvlink_firmware_info_dtype], @@ -21352,7 +21364,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 @@ -21364,7 +21376,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))}>" @@ -21385,20 +21397,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 @@ -21415,7 +21427,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): @@ -21442,7 +21454,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): @@ -21451,7 +21463,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): @@ -21466,10 +21478,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: @@ -21539,7 +21551,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(): @@ -21555,7 +21567,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 *: @@ -21604,7 +21616,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(): @@ -21891,7 +21903,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: @@ -21946,7 +21958,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: @@ -22000,8 +22012,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) @@ -22023,8 +22035,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) @@ -22045,8 +22057,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) @@ -22153,7 +22165,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: @@ -22190,7 +22202,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): @@ -22210,7 +22222,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): @@ -22229,7 +22241,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: @@ -22616,8 +22628,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) @@ -22642,8 +22654,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) @@ -23531,7 +23543,7 @@ cpdef object device_get_fbc_stats(intptr_t device): device (intptr_t): The identifier of the target device. Returns: - nvmlFBCStats_t: Reference to nvmlFBCStats_t structure containing NvFBC stats. + nvmlFBCStats_t: Reference to ``nvmlFBCStats_t`` structure containing NvFBC stats. .. seealso:: `nvmlDeviceGetFBCStats` """ @@ -23606,7 +23618,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): @@ -24166,8 +24178,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) @@ -24210,8 +24222,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) @@ -25149,7 +25161,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: @@ -25267,7 +25279,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: @@ -25361,7 +25373,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): @@ -25380,7 +25392,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: @@ -25561,7 +25573,7 @@ cpdef object vgpu_instance_get_fbc_stats(unsigned int vgpu_instance): vgpu_instance (unsigned int): Identifier of the target vGPU instance. Returns: - nvmlFBCStats_t: Reference to nvmlFBCStats_t structure containing NvFBC stats. + nvmlFBCStats_t: Reference to ``nvmlFBCStats_t`` structure containing NvFBC stats. .. seealso:: `nvmlVgpuInstanceGetFBCStats` """ @@ -25638,7 +25650,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: @@ -25676,7 +25688,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): @@ -25684,7 +25696,7 @@ cpdef gpu_instance_set_vgpu_scheduler_state(intptr_t gpu_instance, intptr_t p_sc Args: gpu_instance (intptr_t): The GPU instance handle. - p_scheduler (intptr_t): Pointer to the caller-provided structure of nvmlVgpuSchedulerState_t. + p_scheduler (intptr_t): Pointer to the caller-provided structure of ``nvmlVgpuSchedulerState_t``. .. seealso:: `nvmlGpuInstanceSetVgpuSchedulerState` """ @@ -25756,7 +25768,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): @@ -25900,8 +25912,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) @@ -26720,13 +26732,13 @@ cpdef object unit_get_devices(intptr_t unit): """ cdef unsigned int[1] deviceCount = [0] with nogil: - __status__ = nvmlUnitGetDevices(unit, deviceCount, NULL) + __status__ = nvmlUnitGetDevices(unit, deviceCount, NULL) check_status_size(__status__) if deviceCount[0] == 0: return view.array(shape=(1,), itemsize=sizeof(intptr_t), format="P", mode="c")[:0] cdef view.array deviceArray = view.array(shape=(deviceCount[0],), itemsize=sizeof(intptr_t), format="P", mode="c") with nogil: - __status__ = nvmlUnitGetDevices(unit, deviceCount, deviceArray.data) + __status__ = nvmlUnitGetDevices(unit, deviceCount, deviceArray.data) check_status(__status__) return deviceArray @@ -26999,6 +27011,11 @@ cpdef object device_get_field_values(intptr_t device, values): cdef FieldValue values_ = _cast_field_values(values) cdef nvmlFieldValue_t *ptr = values_._get_ptr() cdef unsigned int valuesCount = len(values) + + # Passing a valuesCount of 0 to nvmlDeviceGetFieldValues returns NVML_INVALID_ARGUMENT + if valuesCount == 0: + return values_ + with nogil: __status__ = nvmlDeviceGetFieldValues(device, valuesCount, ptr) check_status(__status__) @@ -27019,6 +27036,10 @@ cpdef device_clear_field_values(intptr_t device, values): cdef nvmlFieldValue_t *ptr = values_._get_ptr() cdef unsigned int valuesCount = len(values) + # Passing a valuesCount of 0 to nvmlDeviceClearFieldValues returns NVML_INVALID_ARGUMENT + if valuesCount == 0: + return values_ + with nogil: __status__ = nvmlDeviceClearFieldValues(device, valuesCount, ptr) check_status(__status__) @@ -28346,4 +28367,5 @@ cpdef str vgpu_type_get_name(unsigned int vgpu_type_id): # Cleanup some docstrings that don't parse as rst. 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/``." \ No newline at end of file +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/nvrtc.pxd b/cuda_bindings/cuda/bindings/nvrtc.pxd index 4b056be2e75..dcf1aed6e65 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/nvrtc.pxd @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 0.3.1.dev1602+g3c8d84404. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 75fcfcd1791..74fdc546204 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 0.3.1.dev1602+g3c8d84404. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. Do not modify it directly. from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/nvvm.pxd b/cuda_bindings/cuda/bindings/nvvm.pxd index 2ef677c0a8e..5ddbfe97748 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/nvvm.pxd @@ -1,8 +1,8 @@ -# 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 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. 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.dev1862+g538a87a98. 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 cab4a61d1a6..287943c1b02 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -1,22 +1,27 @@ -# 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 # -# This code was automatically generated across versions from 12.0.1 to 13.2.0, generator version 0.3.1.dev1588+g61faef43a. 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.dev1862+g538a87a98. 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 diff --git a/cuda_bindings/cuda/bindings/runtime.pxd.in b/cuda_bindings/cuda/bindings/runtime.pxd.in index 1c0cc0cb4fa..4afc33f643a 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd.in +++ b/cuda_bindings/cuda/bindings/runtime.pxd.in @@ -1,7 +1,7 @@ # 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 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 f3809b765f4..a01c2fd4341 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: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1752+g89e531539. Do not modify it directly. +# This code was automatically generated with version 12.9.0, generator version 0.3.1.dev1862+g538a87a98. 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 @@ -3542,7 +3541,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/cuda/bindings/utils/__init__.py b/cuda_bindings/cuda/bindings/utils/__init__.py index 5f9288b81e4..62d083dc7c6 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 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 typing import Any, Callable diff --git a/cuda_bindings/cuda/bindings/utils/_ptx_utils.py b/cuda_bindings/cuda/bindings/utils/_ptx_utils.py index d303d5980bc..091fb1fc6f9 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/ccuda.pxd b/cuda_bindings/cuda/ccuda.pxd index 33920d37db7..3b3eae369bd 100644 --- a/cuda_bindings/cuda/ccuda.pxd +++ b/cuda_bindings/cuda/ccuda.pxd @@ -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 cuda.bindings.cydriver cimport * diff --git a/cuda_bindings/cuda/ccuda.pyx b/cuda_bindings/cuda/ccuda.pyx index 668c003795c..1ca31b9f28a 100644 --- a/cuda_bindings/cuda/ccuda.pyx +++ b/cuda_bindings/cuda/ccuda.pyx @@ -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 cuda.bindings.cydriver cimport * from cuda.bindings import cydriver diff --git a/cuda_bindings/cuda/ccudart.pxd b/cuda_bindings/cuda/ccudart.pxd index fa1adaff807..b6e5c9b307a 100644 --- a/cuda_bindings/cuda/ccudart.pxd +++ b/cuda_bindings/cuda/ccudart.pxd @@ -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 cuda.bindings.cyruntime cimport * diff --git a/cuda_bindings/cuda/ccudart.pyx b/cuda_bindings/cuda/ccudart.pyx index 4dc06b2507e..bdaa609f2d0 100644 --- a/cuda_bindings/cuda/ccudart.pyx +++ b/cuda_bindings/cuda/ccudart.pyx @@ -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 cuda.bindings.cyruntime cimport * from cuda.bindings import cyruntime diff --git a/cuda_bindings/cuda/cnvrtc.pxd b/cuda_bindings/cuda/cnvrtc.pxd index 032846b8d9b..c773d667051 100644 --- a/cuda_bindings/cuda/cnvrtc.pxd +++ b/cuda_bindings/cuda/cnvrtc.pxd @@ -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 cuda.bindings.cynvrtc cimport * diff --git a/cuda_bindings/cuda/cnvrtc.pyx b/cuda_bindings/cuda/cnvrtc.pyx index 391a1c0bd93..54f74128843 100644 --- a/cuda_bindings/cuda/cnvrtc.pyx +++ b/cuda_bindings/cuda/cnvrtc.pyx @@ -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 cuda.bindings.cynvrtc cimport * from cuda.bindings import cynvrtc diff --git a/cuda_bindings/cuda/cuda.pyx b/cuda_bindings/cuda/cuda.pyx index 8a1c13ddd08..dfa9d73ed8a 100644 --- a/cuda_bindings/cuda/cuda.pyx +++ b/cuda_bindings/cuda/cuda.pyx @@ -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 import warnings as _warnings diff --git a/cuda_bindings/cuda/cudart.pyx b/cuda_bindings/cuda/cudart.pyx index e3232975a0f..bba378fe76a 100644 --- a/cuda_bindings/cuda/cudart.pyx +++ b/cuda_bindings/cuda/cudart.pyx @@ -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 import warnings as _warnings diff --git a/cuda_bindings/cuda/nvrtc.pyx b/cuda_bindings/cuda/nvrtc.pyx index 96b907069cc..769392a3ce6 100644 --- a/cuda_bindings/cuda/nvrtc.pyx +++ b/cuda_bindings/cuda/nvrtc.pyx @@ -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 import warnings as _warnings 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 d5c00c386cf..826e9fbb6fd 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-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_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/_static/javascripts/version_dropdown.js b/cuda_bindings/docs/source/_static/javascripts/version_dropdown.js index 9348d2bf847..aa0ce2bdc67 100644 --- a/cuda_bindings/docs/source/_static/javascripts/version_dropdown.js +++ b/cuda_bindings/docs/source/_static/javascripts/version_dropdown.js @@ -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 function change_current_version(event) { event.preventDefault(); diff --git a/cuda_bindings/docs/source/api.rst b/cuda_bindings/docs/source/api.rst index e6ee4b99ddd..b011d7b5c27 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/conf.py b/cuda_bindings/docs/source/conf.py index c156cb4ccf6..e3703f41cc9 100644 --- a/cuda_bindings/docs/source/conf.py +++ b/cuda_bindings/docs/source/conf.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2012-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2012-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 # Configuration file for the Sphinx documentation builder. # diff --git a/cuda_bindings/docs/source/contribute.md b/cuda_bindings/docs/source/contribute.md index d26f1172345..4620da882c7 100644 --- a/cuda_bindings/docs/source/contribute.md +++ b/cuda_bindings/docs/source/contribute.md @@ -9,4 +9,9 @@ Thank you for your interest in contributing to `cuda-bindings`! Based on the typ them for a release. If you believe the issue needs priority attention comment on the issue to notify the team. 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](https://github.com/NVIDIA/cuda-python/blob/12.9.x/CONTRIBUTING.md), + including signing off each commit under the Developer Certificate of + Origin (DCO) and cryptographically signing commits. diff --git a/cuda_bindings/docs/source/index.rst b/cuda_bindings/docs/source/index.rst index 5fc94185146..74b456359e8 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/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/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 973b90ffbb3..129d4eb7471 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-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 ------ driver @@ -145,8 +145,6 @@ Data types used by CUDA driver Set blocking synchronization as default scheduling - - [Deprecated] @@ -3493,8 +3491,6 @@ Data types used by CUDA driver This indicated that the context being supplied as a parameter to the API call was already the active context. - - [Deprecated] 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/nvrtc.rst b/cuda_bindings/docs/source/module/nvrtc.rst index b19c0c9ef8f..efcb94f389f 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-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 ----- 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 5795c5249fc..968e10d43a7 100644 --- a/cuda_bindings/docs/source/module/runtime.rst +++ b/cuda_bindings/docs/source/module/runtime.rst @@ -1,5697 +1,5755 @@ -.. 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 ------- runtime ------- -Profiler Control ----------------- - -This section describes the profiler control functions of the CUDA runtime application programming interface. - -.. autofunction:: cuda.bindings.runtime.cudaProfilerStart -.. autofunction:: cuda.bindings.runtime.cudaProfilerStop - -Device Management ------------------ - -impl_private - - - - - - - -This section describes the device management functions of the CUDA runtime application programming interface. - -.. autofunction:: cuda.bindings.runtime.cudaDeviceReset -.. autofunction:: cuda.bindings.runtime.cudaDeviceSynchronize -.. autofunction:: cuda.bindings.runtime.cudaDeviceSetLimit -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetLimit -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetTexture1DLinearMaxWidth -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetCacheConfig -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetStreamPriorityRange -.. autofunction:: cuda.bindings.runtime.cudaDeviceSetCacheConfig -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetByPCIBusId -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetPCIBusId -.. autofunction:: cuda.bindings.runtime.cudaIpcGetEventHandle -.. autofunction:: cuda.bindings.runtime.cudaIpcOpenEventHandle -.. autofunction:: cuda.bindings.runtime.cudaIpcGetMemHandle -.. autofunction:: cuda.bindings.runtime.cudaIpcOpenMemHandle -.. autofunction:: cuda.bindings.runtime.cudaIpcCloseMemHandle -.. autofunction:: cuda.bindings.runtime.cudaDeviceFlushGPUDirectRDMAWrites -.. autofunction:: cuda.bindings.runtime.cudaDeviceRegisterAsyncNotification -.. autofunction:: cuda.bindings.runtime.cudaDeviceUnregisterAsyncNotification -.. autofunction:: cuda.bindings.runtime.cudaGetDeviceCount -.. autofunction:: cuda.bindings.runtime.cudaGetDeviceProperties -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetAttribute -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetDefaultMemPool -.. autofunction:: cuda.bindings.runtime.cudaDeviceSetMemPool -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetMemPool -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetNvSciSyncAttributes -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetP2PAttribute -.. autofunction:: cuda.bindings.runtime.cudaChooseDevice -.. autofunction:: cuda.bindings.runtime.cudaInitDevice -.. autofunction:: cuda.bindings.runtime.cudaSetDevice -.. autofunction:: cuda.bindings.runtime.cudaGetDevice -.. autofunction:: cuda.bindings.runtime.cudaSetDeviceFlags -.. autofunction:: cuda.bindings.runtime.cudaGetDeviceFlags - -Error Handling --------------- - -This section describes the error handling functions of the CUDA runtime application programming interface. - -.. autofunction:: cuda.bindings.runtime.cudaGetLastError -.. autofunction:: cuda.bindings.runtime.cudaPeekAtLastError -.. autofunction:: cuda.bindings.runtime.cudaGetErrorName -.. autofunction:: cuda.bindings.runtime.cudaGetErrorString - -Stream Management ------------------ - -This section describes the stream management functions of the CUDA runtime application programming interface. - -.. autoclass:: cuda.bindings.runtime.cudaStreamCallback_t -.. autofunction:: cuda.bindings.runtime.cudaStreamCreate -.. autofunction:: cuda.bindings.runtime.cudaStreamCreateWithFlags -.. autofunction:: cuda.bindings.runtime.cudaStreamCreateWithPriority -.. autofunction:: cuda.bindings.runtime.cudaStreamGetPriority -.. autofunction:: cuda.bindings.runtime.cudaStreamGetFlags -.. autofunction:: cuda.bindings.runtime.cudaStreamGetId -.. autofunction:: cuda.bindings.runtime.cudaStreamGetDevice -.. autofunction:: cuda.bindings.runtime.cudaCtxResetPersistingL2Cache -.. autofunction:: cuda.bindings.runtime.cudaStreamCopyAttributes -.. autofunction:: cuda.bindings.runtime.cudaStreamGetAttribute -.. autofunction:: cuda.bindings.runtime.cudaStreamSetAttribute -.. autofunction:: cuda.bindings.runtime.cudaStreamDestroy -.. autofunction:: cuda.bindings.runtime.cudaStreamWaitEvent -.. autofunction:: cuda.bindings.runtime.cudaStreamAddCallback -.. autofunction:: cuda.bindings.runtime.cudaStreamSynchronize -.. autofunction:: cuda.bindings.runtime.cudaStreamQuery -.. autofunction:: cuda.bindings.runtime.cudaStreamAttachMemAsync -.. autofunction:: cuda.bindings.runtime.cudaStreamBeginCapture -.. autofunction:: cuda.bindings.runtime.cudaStreamBeginCaptureToGraph -.. autofunction:: cuda.bindings.runtime.cudaThreadExchangeStreamCaptureMode -.. autofunction:: cuda.bindings.runtime.cudaStreamEndCapture -.. autofunction:: cuda.bindings.runtime.cudaStreamIsCapturing -.. autofunction:: cuda.bindings.runtime.cudaStreamGetCaptureInfo -.. autofunction:: cuda.bindings.runtime.cudaStreamGetCaptureInfo_v3 -.. autofunction:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependencies -.. autofunction:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependencies_v2 - -Event Management ----------------- - -This section describes the event management functions of the CUDA runtime application programming interface. - -.. autofunction:: cuda.bindings.runtime.cudaEventCreate -.. autofunction:: cuda.bindings.runtime.cudaEventCreateWithFlags -.. autofunction:: cuda.bindings.runtime.cudaEventRecord -.. autofunction:: cuda.bindings.runtime.cudaEventRecordWithFlags -.. autofunction:: cuda.bindings.runtime.cudaEventQuery -.. autofunction:: cuda.bindings.runtime.cudaEventSynchronize -.. autofunction:: cuda.bindings.runtime.cudaEventDestroy -.. autofunction:: cuda.bindings.runtime.cudaEventElapsedTime -.. autofunction:: cuda.bindings.runtime.cudaEventElapsedTime_v2 - -External Resource Interoperability ----------------------------------- - -This section describes the external resource interoperability functions of the CUDA runtime application programming interface. - -.. autofunction:: cuda.bindings.runtime.cudaImportExternalMemory -.. autofunction:: cuda.bindings.runtime.cudaExternalMemoryGetMappedBuffer -.. autofunction:: cuda.bindings.runtime.cudaExternalMemoryGetMappedMipmappedArray -.. autofunction:: cuda.bindings.runtime.cudaDestroyExternalMemory -.. autofunction:: cuda.bindings.runtime.cudaImportExternalSemaphore -.. autofunction:: cuda.bindings.runtime.cudaSignalExternalSemaphoresAsync -.. autofunction:: cuda.bindings.runtime.cudaWaitExternalSemaphoresAsync -.. autofunction:: cuda.bindings.runtime.cudaDestroyExternalSemaphore - -Execution Control ------------------ - -This section describes the execution control functions of the CUDA runtime application programming interface. - - - -Some functions have overloaded C++ API template versions documented separately in the C++ API Routines module. - -.. autofunction:: cuda.bindings.runtime.cudaFuncSetCacheConfig -.. autofunction:: cuda.bindings.runtime.cudaFuncGetAttributes -.. autofunction:: cuda.bindings.runtime.cudaFuncSetAttribute -.. autofunction:: cuda.bindings.runtime.cudaLaunchHostFunc - -Occupancy ---------- - -This section describes the occupancy calculation functions of the CUDA runtime application programming interface. - - - -Besides the occupancy calculator functions (cudaOccupancyMaxActiveBlocksPerMultiprocessor and cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags), there are also C++ only occupancy-based launch configuration functions documented in C++ API Routines module. - - - -See cudaOccupancyMaxPotentialBlockSize (C++ API), cudaOccupancyMaxPotentialBlockSize (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API) cudaOccupancyAvailableDynamicSMemPerBlock (C++ API), - -.. autofunction:: cuda.bindings.runtime.cudaOccupancyMaxActiveBlocksPerMultiprocessor -.. autofunction:: cuda.bindings.runtime.cudaOccupancyAvailableDynamicSMemPerBlock -.. autofunction:: cuda.bindings.runtime.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags - -Memory Management ------------------ - -This section describes the memory management functions of the CUDA runtime application programming interface. - - - -Some functions have overloaded C++ API template versions documented separately in the C++ API Routines module. - -.. autofunction:: cuda.bindings.runtime.cudaMallocManaged -.. autofunction:: cuda.bindings.runtime.cudaMalloc -.. autofunction:: cuda.bindings.runtime.cudaMallocHost -.. autofunction:: cuda.bindings.runtime.cudaMallocPitch -.. autofunction:: cuda.bindings.runtime.cudaMallocArray -.. autofunction:: cuda.bindings.runtime.cudaFree -.. autofunction:: cuda.bindings.runtime.cudaFreeHost -.. autofunction:: cuda.bindings.runtime.cudaFreeArray -.. autofunction:: cuda.bindings.runtime.cudaFreeMipmappedArray -.. autofunction:: cuda.bindings.runtime.cudaHostAlloc -.. autofunction:: cuda.bindings.runtime.cudaHostRegister -.. autofunction:: cuda.bindings.runtime.cudaHostUnregister -.. autofunction:: cuda.bindings.runtime.cudaHostGetDevicePointer -.. autofunction:: cuda.bindings.runtime.cudaHostGetFlags -.. autofunction:: cuda.bindings.runtime.cudaMalloc3D -.. autofunction:: cuda.bindings.runtime.cudaMalloc3DArray -.. autofunction:: cuda.bindings.runtime.cudaMallocMipmappedArray -.. autofunction:: cuda.bindings.runtime.cudaGetMipmappedArrayLevel -.. autofunction:: cuda.bindings.runtime.cudaMemcpy3D -.. autofunction:: cuda.bindings.runtime.cudaMemcpy3DPeer -.. autofunction:: cuda.bindings.runtime.cudaMemcpy3DAsync -.. autofunction:: cuda.bindings.runtime.cudaMemcpy3DPeerAsync -.. autofunction:: cuda.bindings.runtime.cudaMemGetInfo -.. autofunction:: cuda.bindings.runtime.cudaArrayGetInfo -.. autofunction:: cuda.bindings.runtime.cudaArrayGetPlane -.. autofunction:: cuda.bindings.runtime.cudaArrayGetMemoryRequirements -.. autofunction:: cuda.bindings.runtime.cudaMipmappedArrayGetMemoryRequirements -.. autofunction:: cuda.bindings.runtime.cudaArrayGetSparseProperties -.. autofunction:: cuda.bindings.runtime.cudaMipmappedArrayGetSparseProperties -.. autofunction:: cuda.bindings.runtime.cudaMemcpy -.. autofunction:: cuda.bindings.runtime.cudaMemcpyPeer -.. autofunction:: cuda.bindings.runtime.cudaMemcpy2D -.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DToArray -.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DFromArray -.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DArrayToArray -.. autofunction:: cuda.bindings.runtime.cudaMemcpyAsync -.. autofunction:: cuda.bindings.runtime.cudaMemcpyPeerAsync -.. autofunction:: cuda.bindings.runtime.cudaMemcpyBatchAsync -.. autofunction:: cuda.bindings.runtime.cudaMemcpy3DBatchAsync -.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DAsync -.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DToArrayAsync -.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DFromArrayAsync -.. autofunction:: cuda.bindings.runtime.cudaMemset -.. autofunction:: cuda.bindings.runtime.cudaMemset2D -.. autofunction:: cuda.bindings.runtime.cudaMemset3D -.. autofunction:: cuda.bindings.runtime.cudaMemsetAsync -.. autofunction:: cuda.bindings.runtime.cudaMemset2DAsync -.. autofunction:: cuda.bindings.runtime.cudaMemset3DAsync -.. autofunction:: cuda.bindings.runtime.cudaMemPrefetchAsync -.. autofunction:: cuda.bindings.runtime.cudaMemPrefetchAsync_v2 -.. autofunction:: cuda.bindings.runtime.cudaMemAdvise -.. autofunction:: cuda.bindings.runtime.cudaMemAdvise_v2 -.. autofunction:: cuda.bindings.runtime.cudaMemRangeGetAttribute -.. autofunction:: cuda.bindings.runtime.cudaMemRangeGetAttributes -.. autofunction:: cuda.bindings.runtime.make_cudaPitchedPtr -.. autofunction:: cuda.bindings.runtime.make_cudaPos -.. autofunction:: cuda.bindings.runtime.make_cudaExtent - -Stream Ordered Memory Allocator +Data types used by CUDA Runtime ------------------------------- -**overview** +.. autoclass:: cuda.bindings.runtime.cudaChannelFormatDesc +.. autoclass:: cuda.bindings.runtime.cudaArraySparseProperties +.. autoclass:: cuda.bindings.runtime.cudaArrayMemoryRequirements +.. autoclass:: cuda.bindings.runtime.cudaPitchedPtr +.. autoclass:: cuda.bindings.runtime.cudaExtent +.. autoclass:: cuda.bindings.runtime.cudaPos +.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DParms +.. autoclass:: cuda.bindings.runtime.cudaMemcpyNodeParams +.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DPeerParms +.. autoclass:: cuda.bindings.runtime.cudaMemsetParams +.. autoclass:: cuda.bindings.runtime.cudaMemsetParamsV2 +.. autoclass:: cuda.bindings.runtime.cudaAccessPolicyWindow +.. autoclass:: cuda.bindings.runtime.cudaHostNodeParams +.. autoclass:: cuda.bindings.runtime.cudaHostNodeParamsV2 +.. autoclass:: cuda.bindings.runtime.cudaResourceDesc +.. autoclass:: cuda.bindings.runtime.cudaResourceViewDesc +.. autoclass:: cuda.bindings.runtime.cudaPointerAttributes +.. autoclass:: cuda.bindings.runtime.cudaFuncAttributes +.. autoclass:: cuda.bindings.runtime.cudaMemLocation +.. autoclass:: cuda.bindings.runtime.cudaMemAccessDesc +.. autoclass:: cuda.bindings.runtime.cudaMemPoolProps +.. autoclass:: cuda.bindings.runtime.cudaMemPoolPtrExportData +.. autoclass:: cuda.bindings.runtime.cudaMemAllocNodeParams +.. autoclass:: cuda.bindings.runtime.cudaMemAllocNodeParamsV2 +.. autoclass:: cuda.bindings.runtime.cudaMemFreeNodeParams +.. autoclass:: cuda.bindings.runtime.cudaMemcpyAttributes +.. autoclass:: cuda.bindings.runtime.cudaOffset3D +.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DOperand +.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DBatchOp +.. autoclass:: cuda.bindings.runtime.CUuuid_st +.. autoclass:: cuda.bindings.runtime.cudaDeviceProp +.. autoclass:: cuda.bindings.runtime.cudaIpcEventHandle_st +.. autoclass:: cuda.bindings.runtime.cudaIpcMemHandle_st +.. autoclass:: cuda.bindings.runtime.cudaMemFabricHandle_st +.. autoclass:: cuda.bindings.runtime.cudaExternalMemoryHandleDesc +.. autoclass:: cuda.bindings.runtime.cudaExternalMemoryBufferDesc +.. autoclass:: cuda.bindings.runtime.cudaExternalMemoryMipmappedArrayDesc +.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreHandleDesc +.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreSignalParams +.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreWaitParams +.. autoclass:: cuda.bindings.runtime.cudalibraryHostUniversalFunctionAndDataTable +.. autoclass:: cuda.bindings.runtime.cudaKernelNodeParams +.. autoclass:: cuda.bindings.runtime.cudaKernelNodeParamsV2 +.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreSignalNodeParams +.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreSignalNodeParamsV2 +.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreWaitNodeParams +.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreWaitNodeParamsV2 +.. autoclass:: cuda.bindings.runtime.cudaConditionalNodeParams +.. autoclass:: cuda.bindings.runtime.cudaChildGraphNodeParams +.. autoclass:: cuda.bindings.runtime.cudaEventRecordNodeParams +.. autoclass:: cuda.bindings.runtime.cudaEventWaitNodeParams +.. autoclass:: cuda.bindings.runtime.cudaGraphNodeParams +.. autoclass:: cuda.bindings.runtime.cudaGraphEdgeData_st +.. autoclass:: cuda.bindings.runtime.cudaGraphInstantiateParams_st +.. autoclass:: cuda.bindings.runtime.cudaGraphExecUpdateResultInfo_st +.. autoclass:: cuda.bindings.runtime.cudaGraphKernelNodeUpdate +.. autoclass:: cuda.bindings.runtime.cudaLaunchMemSyncDomainMap_st +.. autoclass:: cuda.bindings.runtime.cudaLaunchAttributeValue +.. autoclass:: cuda.bindings.runtime.cudaLaunchAttribute_st +.. autoclass:: cuda.bindings.runtime.cudaAsyncNotificationInfo +.. autoclass:: cuda.bindings.runtime.cudaTextureDesc +.. autoclass:: cuda.bindings.runtime.cudaEglPlaneDesc_st +.. autoclass:: cuda.bindings.runtime.cudaEglFrame_st +.. autoclass:: cuda.bindings.runtime.cudaError_t -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. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaSuccess -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. + The API call returned with no errors. In the case of query calls, this also means that the operation being queried is complete (see :py:obj:`~.cudaEventQuery()` and :py:obj:`~.cudaStreamQuery()`). + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidValue -**Supported Platforms** + This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMemoryAllocation -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 -.. autofunction:: cuda.bindings.runtime.cudaFreeAsync -.. autofunction:: cuda.bindings.runtime.cudaMemPoolTrimTo -.. autofunction:: cuda.bindings.runtime.cudaMemPoolSetAttribute -.. autofunction:: cuda.bindings.runtime.cudaMemPoolGetAttribute -.. autofunction:: cuda.bindings.runtime.cudaMemPoolSetAccess -.. autofunction:: cuda.bindings.runtime.cudaMemPoolGetAccess -.. autofunction:: cuda.bindings.runtime.cudaMemPoolCreate -.. autofunction:: cuda.bindings.runtime.cudaMemPoolDestroy -.. autofunction:: cuda.bindings.runtime.cudaMallocFromPoolAsync -.. autofunction:: cuda.bindings.runtime.cudaMemPoolExportToShareableHandle -.. autofunction:: cuda.bindings.runtime.cudaMemPoolImportFromShareableHandle -.. autofunction:: cuda.bindings.runtime.cudaMemPoolExportPointer -.. autofunction:: cuda.bindings.runtime.cudaMemPoolImportPointer + The API call failed because it was unable to allocate enough memory or other resources to perform the requested operation. -Unified Addressing ------------------- -This section describes the unified addressing functions of the CUDA runtime application programming interface. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInitializationError + The API call failed because the CUDA driver and runtime could not be initialized. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCudartUnloading -**Overview** + This indicates that a CUDA Runtime API call cannot be executed because it is being called during process shut down, at a point in time after CUDA driver has been unloaded. -CUDA devices can share a unified address space with the host. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorProfilerDisabled - 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). + This indicates profiler is not initialized for this run. This can happen when the application is running with external profiling tools like visual profiler. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorProfilerNotInitialized -**Supported Platforms** + [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorProfilerAlreadyStarted -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 . + [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorProfilerAlreadyStopped + [Deprecated] -**Looking Up Information from Pointer Values** + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidConfiguration -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() + This indicates that a kernel launch is requesting resources that can never be satisfied by the current device. Requesting more shared memory per block than the device supports will trigger this error, as will requesting too many threads or blocks. See :py:obj:`~.cudaDeviceProp` for more device limitations. -Since pointers are unique, it is not necessary to specify information about the pointers specified to cudaMemcpy() and other copy functions. - The copy direction cudaMemcpyDefault may be used to specify that the CUDA runtime should infer the location of the pointer from its value. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidPitchValue + This indicates that one or more of the pitch-related parameters passed to the API call is not within the acceptable range for pitch. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidSymbol -**Automatic Mapping of Host Allocated Host Memory** + This indicates that the symbol name/identifier passed to the API call is not a valid name or identifier. -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. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidHostPointer -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. + This indicates that at least one host pointer passed to the API call is not a valid host pointer. + [Deprecated] -Note that this is not the case for memory allocated using the flag cudaHostAllocWriteCombined, as discussed below. + .. 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] -**Direct Access of Peer Memory** + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidTexture -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. + This indicates that the texture passed to the API call is not a valid texture. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidTextureBinding + This indicates that the texture binding is not valid. This occurs if you call :py:obj:`~.cudaGetTextureAlignmentOffset()` with an unbound texture. -**Exceptions, Disjoint Addressing** + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidChannelDescriptor -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. + This indicates that the channel descriptor passed to the API call is not valid. This occurs if the format is not one of the formats specified by :py:obj:`~.cudaChannelFormatKind`, or if one of the dimensions is invalid. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidMemcpyDirection -This device address may be queried using cudaHostGetDevicePointer() when a device using unified addressing is current. Either the host or the unified device pointer value may be used to refer to this memory in cudaMemcpy() and similar functions using the cudaMemcpyDefault memory direction. -.. autofunction:: cuda.bindings.runtime.cudaPointerGetAttributes + This indicates that the direction of the memcpy passed to the API call is not one of the types specified by :py:obj:`~.cudaMemcpyKind`. -Peer Device Memory Access -------------------------- -This section describes the peer device memory access functions of the CUDA runtime application programming interface. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorAddressOfConstant -.. autofunction:: cuda.bindings.runtime.cudaDeviceCanAccessPeer -.. autofunction:: cuda.bindings.runtime.cudaDeviceEnablePeerAccess -.. autofunction:: cuda.bindings.runtime.cudaDeviceDisablePeerAccess -OpenGL Interoperability ------------------------ + This indicated that the user has taken the address of a constant variable, which was forbidden up until the CUDA 3.1 release. -impl_private + [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTextureFetchFailed -This section describes the OpenGL interoperability functions of the CUDA runtime application programming interface. Note that mapping of OpenGL resources is performed with the graphics API agnostic, resource mapping interface described in Graphics Interopability. -.. autoclass:: cuda.bindings.runtime.cudaGLDeviceList + This indicated that a texture fetch was not able to be performed. This was previously used for device emulation of texture operations. - .. autoattribute:: cuda.bindings.runtime.cudaGLDeviceList.cudaGLDeviceListAll + [Deprecated] - The CUDA devices for all GPUs used by the current OpenGL context + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTextureNotBound - .. autoattribute:: cuda.bindings.runtime.cudaGLDeviceList.cudaGLDeviceListCurrentFrame + This indicated that a texture was not bound for access. This was previously used for device emulation of texture operations. + [Deprecated] - The CUDA devices for the GPUs used by the current OpenGL context in its currently rendering frame + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSynchronizationError - .. autoattribute:: cuda.bindings.runtime.cudaGLDeviceList.cudaGLDeviceListNextFrame + This indicated that a synchronization operation had failed. This was previously used for some device emulation functions. - The CUDA devices for the GPUs to be used by the current OpenGL context in the next frame + [Deprecated] -.. autofunction:: cuda.bindings.runtime.cudaGLGetDevices -.. autofunction:: cuda.bindings.runtime.cudaGraphicsGLRegisterImage -.. autofunction:: cuda.bindings.runtime.cudaGraphicsGLRegisterBuffer -Direct3D 9 Interoperability ---------------------------- + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidFilterSetting + This indicates that a non-float texture was being accessed with linear filtering. This is not supported by CUDA. -Direct3D 10 Interoperability ----------------------------- + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidNormSetting + This indicates that an attempt was made to read an unsupported data type as a normalized float. This is not supported by CUDA. -Direct3D 11 Interoperability ----------------------------- + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMixedDeviceExecution + Mixing of device and device emulation code was not allowed. + [Deprecated] -VDPAU Interoperability ----------------------- -This section describes the VDPAU interoperability functions of the CUDA runtime application programming interface. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotYetImplemented -.. autofunction:: cuda.bindings.runtime.cudaVDPAUGetDevice -.. autofunction:: cuda.bindings.runtime.cudaVDPAUSetVDPAUDevice -.. autofunction:: cuda.bindings.runtime.cudaGraphicsVDPAURegisterVideoSurface -.. autofunction:: cuda.bindings.runtime.cudaGraphicsVDPAURegisterOutputSurface -EGL Interoperability --------------------- + This indicates that the API call is not yet implemented. Production releases of CUDA will never return this error. -This section describes the EGL interoperability functions of the CUDA runtime application programming interface. + [Deprecated] -.. autofunction:: cuda.bindings.runtime.cudaGraphicsEGLRegisterImage -.. autofunction:: cuda.bindings.runtime.cudaEGLStreamConsumerConnect -.. autofunction:: cuda.bindings.runtime.cudaEGLStreamConsumerConnectWithFlags -.. autofunction:: cuda.bindings.runtime.cudaEGLStreamConsumerDisconnect -.. autofunction:: cuda.bindings.runtime.cudaEGLStreamConsumerAcquireFrame -.. autofunction:: cuda.bindings.runtime.cudaEGLStreamConsumerReleaseFrame -.. autofunction:: cuda.bindings.runtime.cudaEGLStreamProducerConnect -.. autofunction:: cuda.bindings.runtime.cudaEGLStreamProducerDisconnect -.. autofunction:: cuda.bindings.runtime.cudaEGLStreamProducerPresentFrame -.. autofunction:: cuda.bindings.runtime.cudaEGLStreamProducerReturnFrame -.. autofunction:: cuda.bindings.runtime.cudaGraphicsResourceGetMappedEglFrame -.. autofunction:: cuda.bindings.runtime.cudaEventCreateFromEGLSync -Graphics Interoperability -------------------------- + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMemoryValueTooLarge -This section describes the graphics interoperability functions of the CUDA runtime application programming interface. -.. autofunction:: cuda.bindings.runtime.cudaGraphicsUnregisterResource -.. autofunction:: cuda.bindings.runtime.cudaGraphicsResourceSetMapFlags -.. autofunction:: cuda.bindings.runtime.cudaGraphicsMapResources -.. autofunction:: cuda.bindings.runtime.cudaGraphicsUnmapResources -.. autofunction:: cuda.bindings.runtime.cudaGraphicsResourceGetMappedPointer -.. autofunction:: cuda.bindings.runtime.cudaGraphicsSubResourceGetMappedArray -.. autofunction:: cuda.bindings.runtime.cudaGraphicsResourceGetMappedMipmappedArray + This indicated that an emulated device pointer exceeded the 32-bit address range. -Texture Object Management -------------------------- + [Deprecated] -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 -.. autofunction:: cuda.bindings.runtime.cudaCreateChannelDesc -.. autofunction:: cuda.bindings.runtime.cudaCreateTextureObject -.. autofunction:: cuda.bindings.runtime.cudaDestroyTextureObject -.. autofunction:: cuda.bindings.runtime.cudaGetTextureObjectResourceDesc -.. autofunction:: cuda.bindings.runtime.cudaGetTextureObjectTextureDesc -.. autofunction:: cuda.bindings.runtime.cudaGetTextureObjectResourceViewDesc + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStubLibrary -Surface Object Management -------------------------- -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. + This indicates that the CUDA driver that the application has loaded is a stub library. Applications that run with the stub rather than a real driver loaded will result in CUDA API returning this error. -.. autofunction:: cuda.bindings.runtime.cudaCreateSurfaceObject -.. autofunction:: cuda.bindings.runtime.cudaDestroySurfaceObject -.. autofunction:: cuda.bindings.runtime.cudaGetSurfaceObjectResourceDesc -Version Management ------------------- + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInsufficientDriver + This indicates that the installed NVIDIA CUDA driver is older than the CUDA runtime library. This is not a supported configuration. Users should install an updated NVIDIA display driver to allow the application to run. -.. autofunction:: cuda.bindings.runtime.cudaDriverGetVersion -.. autofunction:: cuda.bindings.runtime.cudaRuntimeGetVersion -.. autofunction:: cuda.bindings.runtime.getLocalRuntimeVersion -Graph Management ----------------- + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCallRequiresNewerDriver -This section describes the graph management functions of CUDA runtime application programming interface. -.. autofunction:: cuda.bindings.runtime.cudaGraphCreate -.. autofunction:: cuda.bindings.runtime.cudaGraphAddKernelNode -.. autofunction:: cuda.bindings.runtime.cudaGraphKernelNodeGetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphKernelNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphKernelNodeCopyAttributes -.. autofunction:: cuda.bindings.runtime.cudaGraphKernelNodeGetAttribute -.. autofunction:: cuda.bindings.runtime.cudaGraphKernelNodeSetAttribute -.. autofunction:: cuda.bindings.runtime.cudaGraphAddMemcpyNode -.. autofunction:: cuda.bindings.runtime.cudaGraphAddMemcpyNode1D -.. autofunction:: cuda.bindings.runtime.cudaGraphMemcpyNodeGetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphMemcpyNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphMemcpyNodeSetParams1D -.. autofunction:: cuda.bindings.runtime.cudaGraphAddMemsetNode -.. autofunction:: cuda.bindings.runtime.cudaGraphMemsetNodeGetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphMemsetNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphAddHostNode -.. autofunction:: cuda.bindings.runtime.cudaGraphHostNodeGetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphHostNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphAddChildGraphNode -.. autofunction:: cuda.bindings.runtime.cudaGraphChildGraphNodeGetGraph -.. autofunction:: cuda.bindings.runtime.cudaGraphAddEmptyNode -.. autofunction:: cuda.bindings.runtime.cudaGraphAddEventRecordNode -.. autofunction:: cuda.bindings.runtime.cudaGraphEventRecordNodeGetEvent -.. autofunction:: cuda.bindings.runtime.cudaGraphEventRecordNodeSetEvent -.. autofunction:: cuda.bindings.runtime.cudaGraphAddEventWaitNode -.. autofunction:: cuda.bindings.runtime.cudaGraphEventWaitNodeGetEvent -.. autofunction:: cuda.bindings.runtime.cudaGraphEventWaitNodeSetEvent -.. autofunction:: cuda.bindings.runtime.cudaGraphAddExternalSemaphoresSignalNode -.. autofunction:: cuda.bindings.runtime.cudaGraphExternalSemaphoresSignalNodeGetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphExternalSemaphoresSignalNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphAddExternalSemaphoresWaitNode -.. autofunction:: cuda.bindings.runtime.cudaGraphExternalSemaphoresWaitNodeGetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphExternalSemaphoresWaitNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphAddMemAllocNode -.. autofunction:: cuda.bindings.runtime.cudaGraphMemAllocNodeGetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphAddMemFreeNode -.. autofunction:: cuda.bindings.runtime.cudaGraphMemFreeNodeGetParams -.. autofunction:: cuda.bindings.runtime.cudaDeviceGraphMemTrim -.. autofunction:: cuda.bindings.runtime.cudaDeviceGetGraphMemAttribute -.. autofunction:: cuda.bindings.runtime.cudaDeviceSetGraphMemAttribute -.. autofunction:: cuda.bindings.runtime.cudaGraphClone -.. autofunction:: cuda.bindings.runtime.cudaGraphNodeFindInClone -.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetType -.. autofunction:: cuda.bindings.runtime.cudaGraphGetNodes -.. autofunction:: cuda.bindings.runtime.cudaGraphGetRootNodes -.. autofunction:: cuda.bindings.runtime.cudaGraphGetEdges -.. autofunction:: cuda.bindings.runtime.cudaGraphGetEdges_v2 -.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetDependencies -.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetDependencies_v2 -.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetDependentNodes -.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetDependentNodes_v2 -.. autofunction:: cuda.bindings.runtime.cudaGraphAddDependencies -.. autofunction:: cuda.bindings.runtime.cudaGraphAddDependencies_v2 -.. autofunction:: cuda.bindings.runtime.cudaGraphRemoveDependencies -.. autofunction:: cuda.bindings.runtime.cudaGraphRemoveDependencies_v2 -.. autofunction:: cuda.bindings.runtime.cudaGraphDestroyNode -.. autofunction:: cuda.bindings.runtime.cudaGraphInstantiate -.. autofunction:: cuda.bindings.runtime.cudaGraphInstantiateWithFlags -.. autofunction:: cuda.bindings.runtime.cudaGraphInstantiateWithParams -.. autofunction:: cuda.bindings.runtime.cudaGraphExecGetFlags -.. autofunction:: cuda.bindings.runtime.cudaGraphExecKernelNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphExecMemcpyNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphExecMemcpyNodeSetParams1D -.. autofunction:: cuda.bindings.runtime.cudaGraphExecMemsetNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphExecHostNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphExecChildGraphNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphExecEventRecordNodeSetEvent -.. autofunction:: cuda.bindings.runtime.cudaGraphExecEventWaitNodeSetEvent -.. autofunction:: cuda.bindings.runtime.cudaGraphExecExternalSemaphoresSignalNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphExecExternalSemaphoresWaitNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphNodeSetEnabled -.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetEnabled -.. autofunction:: cuda.bindings.runtime.cudaGraphExecUpdate -.. autofunction:: cuda.bindings.runtime.cudaGraphUpload -.. autofunction:: cuda.bindings.runtime.cudaGraphLaunch -.. autofunction:: cuda.bindings.runtime.cudaGraphExecDestroy -.. autofunction:: cuda.bindings.runtime.cudaGraphDestroy -.. autofunction:: cuda.bindings.runtime.cudaGraphDebugDotPrint -.. autofunction:: cuda.bindings.runtime.cudaUserObjectCreate -.. autofunction:: cuda.bindings.runtime.cudaUserObjectRetain -.. autofunction:: cuda.bindings.runtime.cudaUserObjectRelease -.. autofunction:: cuda.bindings.runtime.cudaGraphRetainUserObject -.. autofunction:: cuda.bindings.runtime.cudaGraphReleaseUserObject -.. autofunction:: cuda.bindings.runtime.cudaGraphAddNode -.. autofunction:: cuda.bindings.runtime.cudaGraphAddNode_v2 -.. autofunction:: cuda.bindings.runtime.cudaGraphNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphExecNodeSetParams -.. autofunction:: cuda.bindings.runtime.cudaGraphConditionalHandleCreate + This indicates that the API call requires a newer CUDA driver than the one currently installed. Users should install an updated NVIDIA CUDA driver to allow the API call to succeed. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidSurface + + + This indicates that the surface passed to the API call is not a valid surface. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDuplicateVariableName -Driver Entry Point Access -------------------------- -This section describes the driver entry point access functions of CUDA runtime application programming interface. + This indicates that multiple global or constant variables (across separate CUDA source files in the application) share the same string name. -.. autofunction:: cuda.bindings.runtime.cudaGetDriverEntryPoint -.. autofunction:: cuda.bindings.runtime.cudaGetDriverEntryPointByVersion -Library Management ------------------- + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDuplicateTextureName -This section describes the library management functions of the CUDA runtime application programming interface. -.. autofunction:: cuda.bindings.runtime.cudaLibraryLoadData -.. autofunction:: cuda.bindings.runtime.cudaLibraryLoadFromFile -.. autofunction:: cuda.bindings.runtime.cudaLibraryUnload -.. autofunction:: cuda.bindings.runtime.cudaLibraryGetKernel -.. autofunction:: cuda.bindings.runtime.cudaLibraryGetGlobal -.. autofunction:: cuda.bindings.runtime.cudaLibraryGetManaged -.. autofunction:: cuda.bindings.runtime.cudaLibraryGetUnifiedFunction -.. autofunction:: cuda.bindings.runtime.cudaLibraryGetKernelCount -.. autofunction:: cuda.bindings.runtime.cudaLibraryEnumerateKernels -.. autofunction:: cuda.bindings.runtime.cudaKernelSetAttributeForDevice + This indicates that multiple textures (across separate CUDA source files in the application) share the same string name. -C++ API Routines ----------------- -C++-style interface built on top of CUDA runtime API. -impl_private + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDuplicateSurfaceName + This indicates that multiple surfaces (across separate CUDA source files in the application) share the same string name. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDevicesUnavailable -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 indicates that all CUDA devices are busy or unavailable at the current time. Devices are often busy/unavailable due to use of :py:obj:`~.cudaComputeModeProhibited`, :py:obj:`~.cudaComputeModeExclusiveProcess`, or when long running CUDA kernels have filled up the GPU and are blocking new work from starting. They can also be unavailable due to memory constraints on a device that already has active CUDA work being performed. -Interactions with the CUDA Driver API -------------------------------------- + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorIncompatibleDriverContext -This section describes the interactions between the CUDA Driver API and the CUDA Runtime API + 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 -**Primary Contexts** + The device function being invoked (usually via :py:obj:`~.cudaLaunchKernel()`) was not previously configured via the :py:obj:`~.cudaConfigureCall()` function. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorPriorLaunchFailure -There exists a one to one relationship between CUDA devices in the CUDA Runtime API and ::CUcontext s in the CUDA Driver API within a process. The specific context which the CUDA Runtime API uses for a device is called the device's primary context. From the perspective of the CUDA Runtime API, a device and its primary context are synonymous. + 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 -**Initialization and Tear-Down** + This error indicates that a device runtime grid launch did not occur because the depth of the child grid would exceed the maximum supported number of nested grid launches. -CUDA Runtime API calls operate on the CUDA Driver API ::CUcontext which is current to to the calling host thread. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchFileScopedTex -The function cudaInitDevice() ensures that the primary context is initialized for the requested device but does not make it current to the calling thread. -The function cudaSetDevice() initializes the primary context for the specified device and makes it current to the calling thread by calling ::cuCtxSetCurrent(). + This error indicates that a grid launch did not occur because the kernel uses file-scoped textures which are unsupported by the device runtime. Kernels launched via the device runtime only support textures created with the Texture Object API's. -The CUDA Runtime API will automatically initialize the primary context for a device at the first CUDA Runtime API call which requires an active context. 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 for a device will be selected, made current to the calling thread, and initialized. -The context which the CUDA Runtime API initializes 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. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchFileScopedSurf -Primary contexts will remain active until they are explicitly deinitialized using cudaDeviceReset(). The function cudaDeviceReset() will deinitialize the primary context for the calling thread's current device immediately. The context will remain current to all of the threads that it was current to. The next CUDA Runtime API call on any thread which requires an active context will trigger the reinitialization of that device's primary context. -Note that primary contexts are shared resources. It is recommended that the primary context not be reset except just before exit or to recover from an unspecified launch failure. + This error indicates that a grid launch did not occur because the kernel uses file-scoped surfaces which are unsupported by the device runtime. Kernels launched via the device runtime only support surfaces created with the Surface Object API's. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSyncDepthExceeded + This error indicates that a call to :py:obj:`~.cudaDeviceSynchronize` made from the device runtime failed because the call was made at grid depth greater than than either the default (2 levels of grids) or user specified device limit :py:obj:`~.cudaLimitDevRuntimeSyncDepth`. To be able to synchronize on launched grids at a greater depth successfully, the maximum nested depth at which :py:obj:`~.cudaDeviceSynchronize` will be called must be specified with the :py:obj:`~.cudaLimitDevRuntimeSyncDepth` limit to the :py:obj:`~.cudaDeviceSetLimit` api before the host-side launch of a kernel using the device runtime. Keep in mind that additional levels of sync depth require the runtime to reserve large amounts of device memory that cannot be used for user allocations. Note that :py:obj:`~.cudaDeviceSynchronize` made from device runtime is only supported on devices of compute capability < 9.0. -**Context Interoperability** + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchPendingCountExceeded -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 that the implicit one-to-one device-to-context mapping for the process provided by the CUDA Runtime API be used. + This error indicates that a device runtime grid launch failed because the launch would exceed the limit :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount`. For this launch to proceed successfully, :py:obj:`~.cudaDeviceSetLimit` must be called to set the :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount` to be higher than the upper bound of outstanding launches that can be issued to the device runtime. Keep in mind that raising the limit of pending device runtime launches will require the runtime to reserve device memory that cannot be used for user allocations. -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. -The function cudaPointerGetAttributes() will return the error cudaErrorIncompatibleDriverContext if the pointer being queried was allocated by a non-primary context. The function cudaDeviceEnablePeerAccess() and the rest of the peer access API may not be called when a non-primary ::CUcontext is current. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidDeviceFunction - To use the pointer query and peer access APIs with a context created using the CUDA Driver API, it is necessary that the CUDA Driver API be used to access these features. -All CUDA Runtime API state (e.g, global variables' addresses and values) travels with its underlying ::CUcontext. In particular, if a ::CUcontext is moved from one thread to another then all CUDA Runtime API state will move to that thread as well. + The requested device function does not exist or is not compiled for the proper device architecture. -Please note that attaching to legacy contexts (those with a version of 3010 as returned by ::cuCtxGetApiVersion()) is not possible. The CUDA Runtime will return cudaErrorIncompatibleDriverContext in such cases. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNoDevice + This indicates that no CUDA-capable devices were detected by the installed CUDA driver. -**Interactions between CUstream and cudaStream_t** + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidDevice + This indicates that the device ordinal supplied by the user does not correspond to a valid CUDA device or that the action requested is invalid for the specified device. -The types ::CUstream and cudaStream_t are identical and may be used interchangeably. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDeviceNotLicensed + This indicates that the device doesn't have a valid Grid License. -**Interactions between CUevent and cudaEvent_t** + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSoftwareValidityNotEstablished + By default, the CUDA runtime may perform a minimal set of self-tests, as well as CUDA driver tests, to establish the validity of both. Introduced in CUDA 11.2, this error return indicates that at least one of these tests has failed and the validity of either the runtime or the driver could not be established. -The types ::CUevent and cudaEvent_t are identical and may be used interchangeably. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStartupFailure + This indicates an internal startup failure in the CUDA runtime. -**Interactions between CUarray and cudaArray_t** + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidKernelImage + This indicates that the device kernel image is invalid. -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 *. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDeviceUninitialized -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 . + This most frequently indicates that there is no context bound to the current thread. This can also be returned if the context passed to an API call is not a valid handle (such as a context that has had :py:obj:`~.cuCtxDestroy()` invoked on it). This can also be returned if a user mixes different API versions (i.e. 3010 context with 3020 API calls). See :py:obj:`~.cuCtxGetApiVersion()` for more details. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMapBufferObjectFailed -**Interactions between CUgraphicsResource and cudaGraphicsResource_t** + This indicates that the buffer object could not be mapped. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnmapBufferObjectFailed -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. + This indicates that the buffer object could not be unmapped. -In order to use a cudaGraphicsResource_t in a CUDA Driver API function which takes a ::CUgraphicsResource, it is necessary to explicitly cast the cudaGraphicsResource_t to a ::CUgraphicsResource. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorArrayIsMapped + This indicates that the specified array is currently mapped and thus cannot be destroyed. -**Interactions between CUtexObject and cudaTextureObject_t** + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorAlreadyMapped + This indicates that the resource is already mapped. -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. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNoKernelImageForDevice -In order to use a cudaTextureObject_t in a CUDA Driver API function which takes a ::CUtexObject, it is necessary to explicitly cast the cudaTextureObject_t to a ::CUtexObject. + This indicates that there is no kernel image available that is suitable for the device. This can occur when a user specifies code generation options for a particular CUDA source file that do not include the corresponding device configuration. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorAlreadyAcquired -**Interactions between CUsurfObject and cudaSurfaceObject_t** + This indicates that a resource has already been acquired. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotMapped -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. + This indicates that a resource is not mapped. -In order to use a cudaSurfaceObject_t in a CUDA Driver API function which takes a ::CUsurfObject, it is necessary to explicitly cast the cudaSurfaceObject_t to a ::CUsurfObject. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotMappedAsArray + This indicates that a mapped resource is not available for access as an array. -**Interactions between CUfunction and cudaFunction_t** + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotMappedAsPointer + This indicates that a mapped resource is not available for access as a pointer. -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. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorECCUncorrectable + This indicates that an uncorrectable ECC error was detected during execution. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnsupportedLimit -**Interactions between CUkernel and cudaKernel_t** + This indicates that the :py:obj:`~.cudaLimit` passed to the API call is not supported by the active device. -The types ::CUkernel and cudaKernel_t represent the same data type and may be used interchangeably by casting the two types between each other. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDeviceAlreadyInUse -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. -.. autofunction:: cuda.bindings.runtime.cudaGetKernel + This indicates that a call tried to access an exclusive-thread device that is already in use by a different thread. -Data types used by CUDA Runtime -------------------------------- + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorPeerAccessUnsupported -.. autoclass:: cuda.bindings.runtime.cudaEglPlaneDesc_st -.. autoclass:: cuda.bindings.runtime.cudaEglFrame_st -.. autoclass:: cuda.bindings.runtime.cudaChannelFormatDesc -.. autoclass:: cuda.bindings.runtime.cudaArraySparseProperties -.. autoclass:: cuda.bindings.runtime.cudaArrayMemoryRequirements -.. autoclass:: cuda.bindings.runtime.cudaPitchedPtr -.. autoclass:: cuda.bindings.runtime.cudaExtent -.. autoclass:: cuda.bindings.runtime.cudaPos -.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DParms -.. autoclass:: cuda.bindings.runtime.cudaMemcpyNodeParams -.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DPeerParms -.. autoclass:: cuda.bindings.runtime.cudaMemsetParams -.. autoclass:: cuda.bindings.runtime.cudaMemsetParamsV2 -.. autoclass:: cuda.bindings.runtime.cudaAccessPolicyWindow -.. autoclass:: cuda.bindings.runtime.cudaHostNodeParams -.. autoclass:: cuda.bindings.runtime.cudaHostNodeParamsV2 -.. autoclass:: cuda.bindings.runtime.cudaResourceDesc -.. autoclass:: cuda.bindings.runtime.cudaResourceViewDesc -.. autoclass:: cuda.bindings.runtime.cudaPointerAttributes -.. autoclass:: cuda.bindings.runtime.cudaFuncAttributes -.. autoclass:: cuda.bindings.runtime.cudaMemLocation -.. autoclass:: cuda.bindings.runtime.cudaMemAccessDesc -.. autoclass:: cuda.bindings.runtime.cudaMemPoolProps -.. autoclass:: cuda.bindings.runtime.cudaMemPoolPtrExportData -.. autoclass:: cuda.bindings.runtime.cudaMemAllocNodeParams -.. autoclass:: cuda.bindings.runtime.cudaMemAllocNodeParamsV2 -.. autoclass:: cuda.bindings.runtime.cudaMemFreeNodeParams -.. autoclass:: cuda.bindings.runtime.cudaMemcpyAttributes -.. autoclass:: cuda.bindings.runtime.cudaOffset3D -.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DOperand -.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DBatchOp -.. autoclass:: cuda.bindings.runtime.CUuuid_st -.. autoclass:: cuda.bindings.runtime.cudaDeviceProp -.. autoclass:: cuda.bindings.runtime.cudaIpcEventHandle_st -.. autoclass:: cuda.bindings.runtime.cudaIpcMemHandle_st -.. autoclass:: cuda.bindings.runtime.cudaMemFabricHandle_st -.. autoclass:: cuda.bindings.runtime.cudaExternalMemoryHandleDesc -.. autoclass:: cuda.bindings.runtime.cudaExternalMemoryBufferDesc -.. autoclass:: cuda.bindings.runtime.cudaExternalMemoryMipmappedArrayDesc -.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreHandleDesc -.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreSignalParams -.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreWaitParams -.. autoclass:: cuda.bindings.runtime.cudalibraryHostUniversalFunctionAndDataTable -.. autoclass:: cuda.bindings.runtime.cudaKernelNodeParams -.. autoclass:: cuda.bindings.runtime.cudaKernelNodeParamsV2 -.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreSignalNodeParams -.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreSignalNodeParamsV2 -.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreWaitNodeParams -.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreWaitNodeParamsV2 -.. autoclass:: cuda.bindings.runtime.cudaConditionalNodeParams -.. autoclass:: cuda.bindings.runtime.cudaChildGraphNodeParams -.. autoclass:: cuda.bindings.runtime.cudaEventRecordNodeParams -.. autoclass:: cuda.bindings.runtime.cudaEventWaitNodeParams -.. autoclass:: cuda.bindings.runtime.cudaGraphNodeParams -.. autoclass:: cuda.bindings.runtime.cudaGraphEdgeData_st -.. autoclass:: cuda.bindings.runtime.cudaGraphInstantiateParams_st -.. autoclass:: cuda.bindings.runtime.cudaGraphExecUpdateResultInfo_st -.. autoclass:: cuda.bindings.runtime.cudaGraphKernelNodeUpdate -.. autoclass:: cuda.bindings.runtime.cudaLaunchMemSyncDomainMap_st -.. autoclass:: cuda.bindings.runtime.cudaLaunchAttributeValue -.. autoclass:: cuda.bindings.runtime.cudaLaunchAttribute_st -.. autoclass:: cuda.bindings.runtime.cudaAsyncNotificationInfo -.. autoclass:: cuda.bindings.runtime.cudaTextureDesc -.. autoclass:: cuda.bindings.runtime.cudaEglFrameType + This error indicates that P2P access is not supported across the given devices. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidPtx + + + A PTX compilation failed. The runtime may fall back to compiling PTX if an application does not contain a suitable binary for the current device. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidGraphicsContext + + + This indicates an error with the OpenGL or DirectX context. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNvlinkUncorrectable + + + This indicates that an uncorrectable NVLink error was detected during the execution. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorJitCompilerNotFound + + + This indicates that the PTX JIT compiler library was not found. The JIT Compiler library is used for PTX compilation. The runtime may fall back to compiling PTX if an application does not contain a suitable binary for the current device. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnsupportedPtxVersion + + + This indicates that the provided PTX was compiled with an unsupported toolchain. The most common reason for this, is the PTX was generated by a compiler newer than what is supported by the CUDA driver and PTX JIT compiler. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorJitCompilationDisabled + + + This indicates that the JIT compilation was disabled. The JIT compilation compiles PTX. The runtime may fall back to compiling PTX if an application does not contain a suitable binary for the current device. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnsupportedExecAffinity + + + This indicates that the provided execution affinity is not supported by the device. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnsupportedDevSideSync + + + This indicates that the code to be compiled by the PTX JIT contains unsupported call to cudaDeviceSynchronize. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorContained + + + This indicates that an exception occurred on the device that is now contained by the GPU's error containment capability. Common causes are - a. Certain types of invalid accesses of peer GPU memory over nvlink b. Certain classes of hardware errors This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidSource + + + This indicates that the device kernel source is invalid. - .. autoattribute:: cuda.bindings.runtime.cudaEglFrameType.cudaEglFrameTypeArray + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorFileNotFound - Frame type CUDA array + This indicates that the file specified was not found. - .. autoattribute:: cuda.bindings.runtime.cudaEglFrameType.cudaEglFrameTypePitch + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSharedObjectSymbolNotFound - Frame type CUDA pointer -.. autoclass:: cuda.bindings.runtime.cudaEglResourceLocationFlags + This indicates that a link to a shared object failed to resolve. - .. autoattribute:: cuda.bindings.runtime.cudaEglResourceLocationFlags.cudaEglResourceLocationSysmem + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSharedObjectInitFailed - Resource location sysmem + This indicates that initialization of a shared object failed. - .. autoattribute:: cuda.bindings.runtime.cudaEglResourceLocationFlags.cudaEglResourceLocationVidmem + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorOperatingSystem - Resource location vidmem -.. autoclass:: cuda.bindings.runtime.cudaEglColorFormat + This error indicates that an OS call failed. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420Planar + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidResourceHandle - Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + This indicates that a resource handle passed to the API call was not valid. Resource handles are opaque types like :py:obj:`~.cudaStream_t` and :py:obj:`~.cudaEvent_t`. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorIllegalState - Y, UV in two surfaces (UV as one surface) with VU byte ordering, width, height ratio same as YUV420Planar. + This indicates that a resource required by the API call is not in a valid state to perform the requested operation. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV422Planar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLossyQuery - Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height = Y height. + This indicates an attempt was made to introspect an object in a way that would discard semantically important information. This is either due to the object using funtionality newer than the API version used to introspect it or omission of optional return arguments. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV422SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSymbolNotFound - Y, UV in two surfaces with VU byte ordering, width, height ratio same as YUV422Planar. + This indicates that a named symbol was not found. Examples of symbols are global/constant variable names, driver function names, texture names, and surface names. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatARGB + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotReady - R/G/B/A four channels in one surface with BGRA byte ordering. + This indicates that asynchronous operations issued previously have not completed yet. This result is not actually an error, but must be indicated differently than :py:obj:`~.cudaSuccess` (which indicates completion). Calls that may return this value include :py:obj:`~.cudaEventQuery()` and :py:obj:`~.cudaStreamQuery()`. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatRGBA + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorIllegalAddress - R/G/B/A four channels in one surface with ABGR byte ordering. + The device encountered a load or store instruction on an invalid memory address. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatL + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchOutOfResources - single luminance channel in one surface. + This indicates that a launch did not occur because it did not have appropriate resources. Although this error is similar to :py:obj:`~.cudaErrorInvalidConfiguration`, this error usually indicates that the user has attempted to pass too many arguments to the device kernel, or the kernel launch specifies too many threads for the kernel's register count. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatR + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchTimeout - single color channel in one surface. + This indicates that the device kernel took too long to execute. This can only occur if timeouts are enabled - see the device property :py:obj:`~.kernelExecTimeoutEnabled` for more information. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV444Planar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchIncompatibleTexturing - Y, U, V in three surfaces, each in a separate surface, U/V width = Y width, U/V height = Y height. + This error indicates a kernel launch that uses an incompatible texturing mode. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV444SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorPeerAccessAlreadyEnabled - Y, UV in two surfaces (UV as one surface) with VU byte ordering, width, height ratio same as YUV444Planar. + This error indicates that a call to :py:obj:`~.cudaDeviceEnablePeerAccess()` is trying to re-enable peer addressing on from a context which has already had peer addressing enabled. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUYV422 + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorPeerAccessNotEnabled - Y, U, V in one surface, interleaved as UYVY in one channel. + This error indicates that :py:obj:`~.cudaDeviceDisablePeerAccess()` is trying to disable peer addressing which has not been enabled yet via :py:obj:`~.cudaDeviceEnablePeerAccess()`. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY422 + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSetOnActiveProcess - Y, U, V in one surface, interleaved as YUYV in one channel. + This indicates that the user has called :py:obj:`~.cudaSetValidDevices()`, :py:obj:`~.cudaSetDeviceFlags()`, :py:obj:`~.cudaD3D9SetDirect3DDevice()`, :py:obj:`~.cudaD3D10SetDirect3DDevice`, :py:obj:`~.cudaD3D11SetDirect3DDevice()`, or :py:obj:`~.cudaVDPAUSetVDPAUDevice()` after initializing the CUDA runtime by calling non-device management operations (allocating memory and launching kernels are examples of non-device management operations). This error can also be returned if using runtime/driver interoperability and there is an existing :py:obj:`~.CUcontext` active on the host thread. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatABGR + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorContextIsDestroyed - R/G/B/A four channels in one surface with RGBA byte ordering. + This error indicates that the context current to the calling thread has been destroyed using :py:obj:`~.cuCtxDestroy`, or is a primary context which has not yet been initialized. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBGRA + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorAssert - R/G/B/A four channels in one surface with ARGB byte ordering. + An assert triggered in device code during kernel execution. The device cannot be used again. All existing allocations are invalid. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatA + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTooManyPeers - Alpha color format - one channel in one surface. + This error indicates that the hardware resources required to enable peer access have been exhausted for one or more of the devices passed to :py:obj:`~.cudaEnablePeerAccess()`. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatRG + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorHostMemoryAlreadyRegistered - R/G color format - two channels in one surface with GR byte ordering + This error indicates that the memory range passed to :py:obj:`~.cudaHostRegister()` has already been registered. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatAYUV + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorHostMemoryNotRegistered - Y, U, V, A four channels in one surface, interleaved as VUYA. + This error indicates that the pointer passed to :py:obj:`~.cudaHostUnregister()` does not correspond to any currently registered memory region. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU444SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorHardwareStackError - Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. + Device encountered an error in the call stack during kernel execution, possibly due to stack corruption or exceeding the stack size limit. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU422SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorIllegalInstruction - Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = Y height. + The device encountered an illegal instruction during kernel execution This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMisalignedAddress - Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + The device encountered a load or store instruction on a memory address which is not aligned. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_444SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidAddressSpace - Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. + While executing a kernel, the device encountered an instruction which can only operate on memory locations in certain address spaces (global, shared, or local), but was supplied a memory address not belonging to an allowed address space. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_420SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidPc - Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + The device encountered an invalid program counter. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_444SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchFailure - Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. + An exception occurred on the device while executing a kernel. Common causes include dereferencing an invalid device pointer and accessing out of bounds shared memory. Less common cases can be system specific - more information about these cases can be found in the system specific user guide. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_420SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCooperativeLaunchTooLarge - Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + This error indicates that the number of blocks launched per grid for a kernel that was launched via either :py:obj:`~.cudaLaunchCooperativeKernel` or :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` exceeds the maximum number of blocks as allowed by :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessor` or :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` times the number of multiprocessors as specified by the device attribute :py:obj:`~.cudaDevAttrMultiProcessorCount`. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatVYUY_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTensorMemoryLeak - Extended Range Y, U, V in one surface, interleaved as YVYU in one channel. + An exception occurred on the device while exiting a kernel using tensor memory: the tensor memory was not completely deallocated. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotPermitted - Extended Range Y, U, V in one surface, interleaved as YUYV in one channel. + This error indicates the attempted operation is not permitted. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUYV_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotSupported - Extended Range Y, U, V in one surface, interleaved as UYVY in one channel. + This error indicates the attempted operation is not supported on the current system or device. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVYU_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSystemNotReady - Extended Range Y, U, V in one surface, interleaved as VYUY in one channel. + This error indicates that the system is not yet ready to start any CUDA work. To continue using CUDA, verify the system configuration is in a valid state and all required driver daemons are actively running. More information about this error can be found in the system specific user guide. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUVA_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSystemDriverMismatch - Extended Range Y, U, V, A four channels in one surface, interleaved as AVUY. + This error indicates that there is a mismatch between the versions of the display driver and the CUDA driver. Refer to the compatibility documentation for supported versions. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatAYUV_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCompatNotSupportedOnDevice - Extended Range Y, U, V, A four channels in one surface, interleaved as VUYA. + This error indicates that the system was upgraded to run with forward compatibility but the visible hardware detected by CUDA does not support this configuration. Refer to the compatibility documentation for the supported hardware matrix or ensure that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES environment variable. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV444Planar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsConnectionFailed - Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V height = Y height. + This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV422Planar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsRpcFailure - Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V height = Y height. + This error indicates that the remote procedural call between the MPS server and the MPS client failed. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420Planar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsServerNotReady - Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + This error indicates that the MPS server is not ready to accept new MPS client requests. This error can be returned when the MPS server is in the process of recovering from a fatal failure. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV444SemiPlanar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsMaxClientsReached - Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = Y width, U/V height = Y height. + This error indicates that the hardware resources required to create MPS client have been exhausted. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV422SemiPlanar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsMaxConnectionsReached - Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = 1/2 Y width, U/V height = Y height. + This error indicates the the hardware resources required to device connections have been exhausted. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420SemiPlanar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsClientTerminated - Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + This error indicates that the MPS client has been terminated by the server. To continue using CUDA, the process must be terminated and relaunched. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU444Planar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCdpNotSupported - Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V height = Y height. + This error indicates, that the program is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU422Planar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCdpVersionMismatch - Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V height = Y height. + This error indicates, that the program contains an unsupported interaction between different versions of CUDA Dynamic Parallelism. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420Planar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureUnsupported - Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + The operation is not permitted when the stream is capturing. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU444SemiPlanar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureInvalidated - Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. + The current capture sequence on the stream has been invalidated due to a previous error. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU422SemiPlanar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureMerge - Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = Y height. + The operation would have resulted in a merge of two independent capture sequences. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420SemiPlanar_ER + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureUnmatched - Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + The capture was not initiated in this stream. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerRGGB + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureUnjoined - Bayer format - one channel in one surface with interleaved RGGB ordering. + The capture sequence contains a fork that was not joined to the primary stream. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerBGGR + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureIsolation - Bayer format - one channel in one surface with interleaved BGGR ordering. + A dependency would have been created which crosses the capture sequence boundary. Only implicit in-stream ordering dependencies are allowed to cross the boundary. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerGRBG + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureImplicit - Bayer format - one channel in one surface with interleaved GRBG ordering. + The operation would have resulted in a disallowed implicit dependency on a current capture sequence from cudaStreamLegacy. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerGBRG + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCapturedEvent - Bayer format - one channel in one surface with interleaved GBRG ordering. + The operation is not permitted on an event which was last recorded in a capturing stream. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer10RGGB + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureWrongThread - Bayer10 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 10 bits used 6 bits No-op. + A stream capture sequence not initiated with the :py:obj:`~.cudaStreamCaptureModeRelaxed` argument to :py:obj:`~.cudaStreamBeginCapture` was passed to :py:obj:`~.cudaStreamEndCapture` in a different thread. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer10BGGR + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTimeout - Bayer10 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 10 bits used 6 bits No-op. + This indicates that the wait operation has timed out. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer10GRBG + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorGraphExecUpdateFailure - Bayer10 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 10 bits used 6 bits No-op. + This error indicates that the graph update was not performed because it included changes which violated constraints specific to instantiated graph update. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer10GBRG + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorExternalDevice + + + This indicates that an async error has occurred in a device outside of CUDA. If CUDA was waiting for an external device's signal before consuming shared data, the external device signaled an error indicating that the data is not valid for consumption. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidClusterSize + + + This indicates that a kernel launch error has occurred due to cluster misconfiguration. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorFunctionNotLoaded + + + Indiciates a function handle is not loaded when calling an API that requires a loaded function. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidResourceType + + + This error indicates one or more resources passed in are not valid resource types for the operation. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidResourceConfiguration + + + This error indicates one or more resources are insufficient or non-applicable for the operation. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnknown + + + This indicates that an unknown internal error has occurred. + + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorApiFailureBase + +.. autoclass:: cuda.bindings.runtime.cudaChannelFormatKind + + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSigned - Bayer10 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 10 bits used 6 bits No-op. + Signed channel format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12RGGB + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsigned - Bayer12 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 12 bits used 4 bits No-op. + Unsigned channel format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12BGGR + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindFloat - Bayer12 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 12 bits used 4 bits No-op. + Float channel format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12GRBG + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindNone - Bayer12 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 12 bits used 4 bits No-op. + No channel format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12GBRG + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindNV12 - Bayer12 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 12 bits used 4 bits No-op. + Unsigned 8-bit integers, planar 4:2:0 YUV format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer14RGGB + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 - Bayer14 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 14 bits used 2 bits No-op. + 1 channel unsigned 8-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer14BGGR + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 - Bayer14 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 14 bits used 2 bits No-op. + 2 channel unsigned 8-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer14GRBG + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 - Bayer14 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 14 bits used 2 bits No-op. + 4 channel unsigned 8-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer14GBRG + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 - Bayer14 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 14 bits used 2 bits No-op. + 1 channel unsigned 16-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer20RGGB + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 - Bayer20 format - one channel in one surface with interleaved RGGB ordering. Out of 32 bits, 20 bits used 12 bits No-op. + 2 channel unsigned 16-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer20BGGR + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 - Bayer20 format - one channel in one surface with interleaved BGGR ordering. Out of 32 bits, 20 bits used 12 bits No-op. + 4 channel unsigned 16-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer20GRBG + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 - Bayer20 format - one channel in one surface with interleaved GRBG ordering. Out of 32 bits, 20 bits used 12 bits No-op. + 1 channel signed 8-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer20GBRG + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 - Bayer20 format - one channel in one surface with interleaved GBRG ordering. Out of 32 bits, 20 bits used 12 bits No-op. + 2 channel signed 8-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU444Planar + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 - Y, V, U in three surfaces, each in a separate surface, U/V width = Y width, U/V height = Y height. + 4 channel signed 8-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU422Planar + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 - Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = Y height. + 1 channel signed 16-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420Planar + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 - Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + 2 channel signed 16-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerIspRGGB + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 - Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved RGGB ordering and mapped to opaque integer datatype. + 4 channel signed 16-bit normalized integer - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerIspBGGR + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 - Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved BGGR ordering and mapped to opaque integer datatype. + 4 channel unsigned normalized block-compressed (BC1 compression) format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerIspGRBG + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB - Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved GRBG ordering and mapped to opaque integer datatype. + 4 channel unsigned normalized block-compressed (BC1 compression) format with sRGB encoding - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerIspGBRG + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 - Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved GBRG ordering and mapped to opaque integer datatype. + 4 channel unsigned normalized block-compressed (BC2 compression) format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerBCCR + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB - Bayer format - one channel in one surface with interleaved BCCR ordering. + 4 channel unsigned normalized block-compressed (BC2 compression) format with sRGB encoding - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerRCCB + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 - Bayer format - one channel in one surface with interleaved RCCB ordering. + 4 channel unsigned normalized block-compressed (BC3 compression) format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerCRBC + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB - Bayer format - one channel in one surface with interleaved CRBC ordering. + 4 channel unsigned normalized block-compressed (BC3 compression) format with sRGB encoding - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerCBRC + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 - Bayer format - one channel in one surface with interleaved CBRC ordering. + 1 channel unsigned normalized block-compressed (BC4 compression) format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer10CCCC + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 - Bayer10 format - one channel in one surface with interleaved CCCC ordering. Out of 16 bits, 10 bits used 6 bits No-op. + 1 channel signed normalized block-compressed (BC4 compression) format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12BCCR + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 - Bayer12 format - one channel in one surface with interleaved BCCR ordering. Out of 16 bits, 12 bits used 4 bits No-op. + 2 channel unsigned normalized block-compressed (BC5 compression) format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12RCCB + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 - Bayer12 format - one channel in one surface with interleaved RCCB ordering. Out of 16 bits, 12 bits used 4 bits No-op. + 2 channel signed normalized block-compressed (BC5 compression) format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12CRBC + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H - Bayer12 format - one channel in one surface with interleaved CRBC ordering. Out of 16 bits, 12 bits used 4 bits No-op. + 3 channel unsigned half-float block-compressed (BC6H compression) format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12CBRC + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H - Bayer12 format - one channel in one surface with interleaved CBRC ordering. Out of 16 bits, 12 bits used 4 bits No-op. + 3 channel signed half-float block-compressed (BC6H compression) format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12CCCC + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 - Bayer12 format - one channel in one surface with interleaved CCCC ordering. Out of 16 bits, 12 bits used 4 bits No-op. + 4 channel unsigned normalized block-compressed (BC7 compression) format - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB - Color format for single Y plane. + 4 channel unsigned normalized block-compressed (BC7 compression) format with sRGB encoding - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420SemiPlanar_2020 + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 - Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. + 4 channel unsigned normalized (10-bit, 10-bit, 10-bit, 2-bit) format +.. autoclass:: cuda.bindings.runtime.cudaMemoryType - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420SemiPlanar_2020 + .. autoattribute:: cuda.bindings.runtime.cudaMemoryType.cudaMemoryTypeUnregistered - Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. + Unregistered memory - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420Planar_2020 + .. autoattribute:: cuda.bindings.runtime.cudaMemoryType.cudaMemoryTypeHost - Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + Host memory - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420Planar_2020 + .. autoattribute:: cuda.bindings.runtime.cudaMemoryType.cudaMemoryTypeDevice - Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + Device memory - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420SemiPlanar_709 + .. autoattribute:: cuda.bindings.runtime.cudaMemoryType.cudaMemoryTypeManaged - Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. + Managed memory +.. autoclass:: cuda.bindings.runtime.cudaMemcpyKind - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420SemiPlanar_709 + .. autoattribute:: cuda.bindings.runtime.cudaMemcpyKind.cudaMemcpyHostToHost - Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. + Host -> Host - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420Planar_709 + .. autoattribute:: cuda.bindings.runtime.cudaMemcpyKind.cudaMemcpyHostToDevice - Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + Host -> Device - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420Planar_709 + .. autoattribute:: cuda.bindings.runtime.cudaMemcpyKind.cudaMemcpyDeviceToHost - Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + Device -> Host - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_420SemiPlanar_709 + .. autoattribute:: cuda.bindings.runtime.cudaMemcpyKind.cudaMemcpyDeviceToDevice - Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. + Device -> Device - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_420SemiPlanar_2020 + .. autoattribute:: cuda.bindings.runtime.cudaMemcpyKind.cudaMemcpyDefault - Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. + Direction of the transfer is inferred from the pointer values. Requires unified virtual addressing +.. autoclass:: cuda.bindings.runtime.cudaAccessProperty - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_422SemiPlanar_2020 + .. autoattribute:: cuda.bindings.runtime.cudaAccessProperty.cudaAccessPropertyNormal - Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = Y height. + Normal cache persistence. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_422SemiPlanar + .. autoattribute:: cuda.bindings.runtime.cudaAccessProperty.cudaAccessPropertyStreaming - Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = Y height. + Streaming access is less likely to persit from cache. - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_422SemiPlanar_709 + .. autoattribute:: cuda.bindings.runtime.cudaAccessProperty.cudaAccessPropertyPersisting - Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = Y height. + Persisting access is more likely to persist in cache. +.. autoclass:: cuda.bindings.runtime.cudaStreamCaptureStatus - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY_ER + .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureStatus.cudaStreamCaptureStatusNone - Extended Range Color format for single Y plane. + Stream is not capturing - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY_709_ER + .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureStatus.cudaStreamCaptureStatusActive - Extended Range Color format for single Y plane. + Stream is actively capturing - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10_ER + .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureStatus.cudaStreamCaptureStatusInvalidated - Extended Range Color format for single Y10 plane. + Stream is part of a capture sequence that has been invalidated, but not terminated +.. autoclass:: cuda.bindings.runtime.cudaStreamCaptureMode - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10_709_ER + .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureMode.cudaStreamCaptureModeGlobal - Extended Range Color format for single Y10 plane. + .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureMode.cudaStreamCaptureModeThreadLocal - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12_ER + .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureMode.cudaStreamCaptureModeRelaxed +.. autoclass:: cuda.bindings.runtime.cudaSynchronizationPolicy - Extended Range Color format for single Y12 plane. + .. autoattribute:: cuda.bindings.runtime.cudaSynchronizationPolicy.cudaSyncPolicyAuto - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12_709_ER + .. autoattribute:: cuda.bindings.runtime.cudaSynchronizationPolicy.cudaSyncPolicySpin - Extended Range Color format for single Y12 plane. + .. autoattribute:: cuda.bindings.runtime.cudaSynchronizationPolicy.cudaSyncPolicyYield - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUVA + .. autoattribute:: cuda.bindings.runtime.cudaSynchronizationPolicy.cudaSyncPolicyBlockingSync +.. autoclass:: cuda.bindings.runtime.cudaClusterSchedulingPolicy - Y, U, V, A four channels in one surface, interleaved as AVUY. + .. autoattribute:: cuda.bindings.runtime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyDefault - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVYU + the default policy - Y, U, V in one surface, interleaved as YVYU in one channel. + .. autoattribute:: cuda.bindings.runtime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicySpread - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatVYUY + spread the blocks within a cluster to the SMs - Y, U, V in one surface, interleaved as VYUY in one channel. + .. autoattribute:: cuda.bindings.runtime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyLoadBalancing - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_420SemiPlanar_ER + allow the hardware to load-balance the blocks in a cluster to the SMs +.. autoclass:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependenciesFlags - Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. + .. autoattribute:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamAddCaptureDependencies - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER + Add new nodes to the dependency set - Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. + .. autoattribute:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamSetCaptureDependencies - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_444SemiPlanar_ER + Replace the dependency set with the new nodes +.. autoclass:: cuda.bindings.runtime.cudaUserObjectFlags - Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. + .. autoattribute:: cuda.bindings.runtime.cudaUserObjectFlags.cudaUserObjectNoDestructorSync - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER + Indicates the destructor execution is not synchronized by any CUDA handle. +.. autoclass:: cuda.bindings.runtime.cudaUserObjectRetainFlags - Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. + .. autoattribute:: cuda.bindings.runtime.cudaUserObjectRetainFlags.cudaGraphUserObjectMove - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_420SemiPlanar_ER + Transfer references from the caller rather than creating new references. +.. autoclass:: cuda.bindings.runtime.cudaGraphicsRegisterFlags - Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsNone - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER + Default - Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsReadOnly - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_444SemiPlanar_ER + CUDA will not write to this resource - Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsWriteDiscard - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER + CUDA will only write to and will not read from this resource - Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsSurfaceLoadStore - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY709 + CUDA will bind this resource to a surface reference - Y, U, V in one surface, interleaved as UYVY in one channel. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsTextureGather - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY709_ER + CUDA will perform texture gather operations on this resource +.. autoclass:: cuda.bindings.runtime.cudaGraphicsMapFlags - Extended Range Y, U, V in one surface, interleaved as UYVY in one channel. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsNone - .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY2020 + Default; Assume resource can be read/written - Y, U, V in one surface, interleaved as UYVY in one channel. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsReadOnly -.. autoclass:: cuda.bindings.runtime.cudaError_t - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaSuccess + CUDA will not write to this resource - The API call returned with no errors. In the case of query calls, this also means that the operation being queried is complete (see :py:obj:`~.cudaEventQuery()` and :py:obj:`~.cudaStreamQuery()`). + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsWriteDiscard - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidValue + CUDA will only write to and will not read from this resource +.. autoclass:: cuda.bindings.runtime.cudaGraphicsCubeFace - This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveX - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMemoryAllocation + Positive X face of cubemap - The API call failed because it was unable to allocate enough memory or other resources to perform the requested operation. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeX - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInitializationError + Negative X face of cubemap - The API call failed because the CUDA driver and runtime could not be initialized. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveY - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCudartUnloading + Positive Y face of cubemap - This indicates that a CUDA Runtime API call cannot be executed because it is being called during process shut down, at a point in time after CUDA driver has been unloaded. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeY - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorProfilerDisabled + Negative Y face of cubemap - This indicates profiler is not initialized for this run. This can happen when the application is running with external profiling tools like visual profiler. + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveZ - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorProfilerNotInitialized + Positive Z face of cubemap - [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeZ - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorProfilerAlreadyStarted + Negative Z face of cubemap +.. autoclass:: cuda.bindings.runtime.cudaResourceType - [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaResourceType.cudaResourceTypeArray - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorProfilerAlreadyStopped + Array resource - [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaResourceType.cudaResourceTypeMipmappedArray - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidConfiguration + Mipmapped array resource - This indicates that a kernel launch is requesting resources that can never be satisfied by the current device. Requesting more shared memory per block than the device supports will trigger this error, as will requesting too many threads or blocks. See :py:obj:`~.cudaDeviceProp` for more device limitations. + .. autoattribute:: cuda.bindings.runtime.cudaResourceType.cudaResourceTypeLinear - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidPitchValue + Linear resource - This indicates that one or more of the pitch-related parameters passed to the API call is not within the acceptable range for pitch. + .. autoattribute:: cuda.bindings.runtime.cudaResourceType.cudaResourceTypePitch2D - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidSymbol + Pitch 2D resource +.. autoclass:: cuda.bindings.runtime.cudaResourceViewFormat - This indicates that the symbol name/identifier passed to the API call is not a valid name or identifier. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatNone - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidHostPointer + No resource view format (use underlying resource format) - This indicates that at least one host pointer passed to the API call is not a valid host pointer. [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar1 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidDevicePointer + 1 channel unsigned 8-bit integers - This indicates that at least one device pointer passed to the API call is not a valid device pointer. [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar2 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidTexture + 2 channel unsigned 8-bit integers - This indicates that the texture passed to the API call is not a valid texture. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar4 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidTextureBinding + 4 channel unsigned 8-bit integers - This indicates that the texture binding is not valid. This occurs if you call :py:obj:`~.cudaGetTextureAlignmentOffset()` with an unbound texture. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedChar1 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidChannelDescriptor + 1 channel signed 8-bit integers - This indicates that the channel descriptor passed to the API call is not valid. This occurs if the format is not one of the formats specified by :py:obj:`~.cudaChannelFormatKind`, or if one of the dimensions is invalid. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedChar2 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidMemcpyDirection + 2 channel signed 8-bit integers - This indicates that the direction of the memcpy passed to the API call is not one of the types specified by :py:obj:`~.cudaMemcpyKind`. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedChar4 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorAddressOfConstant + 4 channel signed 8-bit integers - 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.cudaResourceViewFormat.cudaResViewFormatUnsignedShort1 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTextureFetchFailed + 1 channel unsigned 16-bit integers - 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.cudaResourceViewFormat.cudaResViewFormatUnsignedShort2 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTextureNotBound + 2 channel unsigned 16-bit integers - 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.cudaResourceViewFormat.cudaResViewFormatUnsignedShort4 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSynchronizationError + 4 channel unsigned 16-bit integers - This indicated that a synchronization operation had failed. This was previously used for some device emulation functions. [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedShort1 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidFilterSetting + 1 channel signed 16-bit integers - This indicates that a non-float texture was being accessed with linear filtering. This is not supported by CUDA. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedShort2 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidNormSetting + 2 channel signed 16-bit integers - This indicates that an attempt was made to read an unsupported data type as a normalized float. This is not supported by CUDA. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedShort4 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMixedDeviceExecution + 4 channel signed 16-bit integers - Mixing of device and device emulation code was not allowed. [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt1 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotYetImplemented + 1 channel unsigned 32-bit integers - This indicates that the API call is not yet implemented. Production releases of CUDA will never return this error. [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt2 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMemoryValueTooLarge + 2 channel unsigned 32-bit integers - This indicated that an emulated device pointer exceeded the 32-bit address range. [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt4 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStubLibrary + 4 channel unsigned 32-bit integers - This indicates that the CUDA driver that the application has loaded is a stub library. Applications that run with the stub rather than a real driver loaded will result in CUDA API returning this error. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedInt1 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInsufficientDriver + 1 channel signed 32-bit integers - This indicates that the installed NVIDIA CUDA driver is older than the CUDA runtime library. This is not a supported configuration. Users should install an updated NVIDIA display driver to allow the application to run. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedInt2 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCallRequiresNewerDriver + 2 channel signed 32-bit integers - This indicates that the API call requires a newer CUDA driver than the one currently installed. Users should install an updated NVIDIA CUDA driver to allow the API call to succeed. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedInt4 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidSurface + 4 channel signed 32-bit integers - This indicates that the surface passed to the API call is not a valid surface. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatHalf1 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDuplicateVariableName + 1 channel 16-bit floating point - This indicates that multiple global or constant variables (across separate CUDA source files in the application) share the same string name. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatHalf2 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDuplicateTextureName + 2 channel 16-bit floating point - This indicates that multiple textures (across separate CUDA source files in the application) share the same string name. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatHalf4 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDuplicateSurfaceName + 4 channel 16-bit floating point - This indicates that multiple surfaces (across separate CUDA source files in the application) share the same string name. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatFloat1 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDevicesUnavailable + 1 channel 32-bit floating point - This indicates that all CUDA devices are busy or unavailable at the current time. Devices are often busy/unavailable due to use of :py:obj:`~.cudaComputeModeProhibited`, :py:obj:`~.cudaComputeModeExclusiveProcess`, or when long running CUDA kernels have filled up the GPU and are blocking new work from starting. They can also be unavailable due to memory constraints on a device that already has active CUDA work being performed. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatFloat2 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorIncompatibleDriverContext + 2 channel 32-bit floating point - 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.cudaResourceViewFormat.cudaResViewFormatFloat4 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMissingConfiguration + 4 channel 32-bit floating point - The device function being invoked (usually via :py:obj:`~.cudaLaunchKernel()`) was not previously configured via the :py:obj:`~.cudaConfigureCall()` function. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed1 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorPriorLaunchFailure + Block compressed 1 - This indicated that a previous kernel launch failed. This was previously used for device emulation of kernel launches. [Deprecated] + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed2 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchMaxDepthExceeded + Block compressed 2 - This error indicates that a device runtime grid launch did not occur because the depth of the child grid would exceed the maximum supported number of nested grid launches. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed3 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchFileScopedTex + Block compressed 3 - This error indicates that a grid launch did not occur because the kernel uses file-scoped textures which are unsupported by the device runtime. Kernels launched via the device runtime only support textures created with the Texture Object API's. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed4 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchFileScopedSurf + Block compressed 4 unsigned - This error indicates that a grid launch did not occur because the kernel uses file-scoped surfaces which are unsupported by the device runtime. Kernels launched via the device runtime only support surfaces created with the Surface Object API's. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed4 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSyncDepthExceeded + Block compressed 4 signed - This error indicates that a call to :py:obj:`~.cudaDeviceSynchronize` made from the device runtime failed because the call was made at grid depth greater than than either the default (2 levels of grids) or user specified device limit :py:obj:`~.cudaLimitDevRuntimeSyncDepth`. To be able to synchronize on launched grids at a greater depth successfully, the maximum nested depth at which :py:obj:`~.cudaDeviceSynchronize` will be called must be specified with the :py:obj:`~.cudaLimitDevRuntimeSyncDepth` limit to the :py:obj:`~.cudaDeviceSetLimit` api before the host-side launch of a kernel using the device runtime. Keep in mind that additional levels of sync depth require the runtime to reserve large amounts of device memory that cannot be used for user allocations. Note that :py:obj:`~.cudaDeviceSynchronize` made from device runtime is only supported on devices of compute capability < 9.0. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed5 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchPendingCountExceeded + Block compressed 5 unsigned - This error indicates that a device runtime grid launch failed because the launch would exceed the limit :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount`. For this launch to proceed successfully, :py:obj:`~.cudaDeviceSetLimit` must be called to set the :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount` to be higher than the upper bound of outstanding launches that can be issued to the device runtime. Keep in mind that raising the limit of pending device runtime launches will require the runtime to reserve device memory that cannot be used for user allocations. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed5 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidDeviceFunction + Block compressed 5 signed - The requested device function does not exist or is not compiled for the proper device architecture. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed6H - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNoDevice + Block compressed 6 unsigned half-float - This indicates that no CUDA-capable devices were detected by the installed CUDA driver. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed6H - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidDevice + Block compressed 6 signed half-float - This indicates that the device ordinal supplied by the user does not correspond to a valid CUDA device or that the action requested is invalid for the specified device. + .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed7 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDeviceNotLicensed + Block compressed 7 +.. autoclass:: cuda.bindings.runtime.cudaFuncAttribute - This indicates that the device doesn't have a valid Grid License. + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeMaxDynamicSharedMemorySize - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSoftwareValidityNotEstablished + Maximum dynamic shared memory size - By default, the CUDA runtime may perform a minimal set of self-tests, as well as CUDA driver tests, to establish the validity of both. Introduced in CUDA 11.2, this error return indicates that at least one of these tests has failed and the validity of either the runtime or the driver could not be established. + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributePreferredSharedMemoryCarveout - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStartupFailure + Preferred shared memory-L1 cache split - This indicates an internal startup failure in the CUDA runtime. + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeClusterDimMustBeSet - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidKernelImage + Indicator to enforce valid cluster dimension specification on kernel launch - This indicates that the device kernel image is invalid. + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterWidth - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDeviceUninitialized + Required cluster width - This most frequently indicates that there is no context bound to the current thread. This can also be returned if the context passed to an API call is not a valid handle (such as a context that has had :py:obj:`~.cuCtxDestroy()` invoked on it). This can also be returned if a user mixes different API versions (i.e. 3010 context with 3020 API calls). See :py:obj:`~.cuCtxGetApiVersion()` for more details. + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterHeight - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMapBufferObjectFailed + Required cluster height - This indicates that the buffer object could not be mapped. + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterDepth - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnmapBufferObjectFailed + Required cluster depth - This indicates that the buffer object could not be unmapped. + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeNonPortableClusterSizeAllowed - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorArrayIsMapped + Whether non-portable cluster scheduling policy is supported - This indicates that the specified array is currently mapped and thus cannot be destroyed. + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeClusterSchedulingPolicyPreference - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorAlreadyMapped + Required cluster scheduling policy preference - This indicates that the resource is already mapped. + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeMax +.. autoclass:: cuda.bindings.runtime.cudaFuncCache - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNoKernelImageForDevice + .. autoattribute:: cuda.bindings.runtime.cudaFuncCache.cudaFuncCachePreferNone - This indicates that there is no kernel image available that is suitable for the device. This can occur when a user specifies code generation options for a particular CUDA source file that do not include the corresponding device configuration. + Default function cache configuration, no preference - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorAlreadyAcquired + .. autoattribute:: cuda.bindings.runtime.cudaFuncCache.cudaFuncCachePreferShared - This indicates that a resource has already been acquired. + Prefer larger shared memory and smaller L1 cache - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotMapped + .. autoattribute:: cuda.bindings.runtime.cudaFuncCache.cudaFuncCachePreferL1 - This indicates that a resource is not mapped. + Prefer larger L1 cache and smaller shared memory - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotMappedAsArray + .. autoattribute:: cuda.bindings.runtime.cudaFuncCache.cudaFuncCachePreferEqual - This indicates that a mapped resource is not available for access as an array. + Prefer equal size L1 cache and shared memory +.. autoclass:: cuda.bindings.runtime.cudaSharedMemConfig - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotMappedAsPointer + .. autoattribute:: cuda.bindings.runtime.cudaSharedMemConfig.cudaSharedMemBankSizeDefault - This indicates that a mapped resource is not available for access as a pointer. + .. autoattribute:: cuda.bindings.runtime.cudaSharedMemConfig.cudaSharedMemBankSizeFourByte - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorECCUncorrectable + .. autoattribute:: cuda.bindings.runtime.cudaSharedMemConfig.cudaSharedMemBankSizeEightByte +.. autoclass:: cuda.bindings.runtime.cudaSharedCarveout - This indicates that an uncorrectable ECC error was detected during execution. + .. autoattribute:: cuda.bindings.runtime.cudaSharedCarveout.cudaSharedmemCarveoutDefault - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnsupportedLimit + No preference for shared memory or L1 (default) - This indicates that the :py:obj:`~.cudaLimit` passed to the API call is not supported by the active device. + .. autoattribute:: cuda.bindings.runtime.cudaSharedCarveout.cudaSharedmemCarveoutMaxShared - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorDeviceAlreadyInUse + Prefer maximum available shared memory, minimum L1 cache - This indicates that a call tried to access an exclusive-thread device that is already in use by a different thread. + .. autoattribute:: cuda.bindings.runtime.cudaSharedCarveout.cudaSharedmemCarveoutMaxL1 - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorPeerAccessUnsupported + Prefer maximum available L1 cache, minimum shared memory +.. autoclass:: cuda.bindings.runtime.cudaComputeMode - This error indicates that P2P access is not supported across the given devices. + .. autoattribute:: cuda.bindings.runtime.cudaComputeMode.cudaComputeModeDefault - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidPtx + Default compute mode (Multiple threads can use :py:obj:`~.cudaSetDevice()` with this device) - A PTX compilation failed. The runtime may fall back to compiling PTX if an application does not contain a suitable binary for the current device. + .. autoattribute:: cuda.bindings.runtime.cudaComputeMode.cudaComputeModeExclusive - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidGraphicsContext + Compute-exclusive-thread mode (Only one thread in one process will be able to use :py:obj:`~.cudaSetDevice()` with this device) - This indicates an error with the OpenGL or DirectX context. + .. autoattribute:: cuda.bindings.runtime.cudaComputeMode.cudaComputeModeProhibited - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNvlinkUncorrectable + Compute-prohibited mode (No threads can use :py:obj:`~.cudaSetDevice()` with this device) - This indicates that an uncorrectable NVLink error was detected during the execution. + .. autoattribute:: cuda.bindings.runtime.cudaComputeMode.cudaComputeModeExclusiveProcess - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorJitCompilerNotFound + Compute-exclusive-process mode (Many threads in one process will be able to use :py:obj:`~.cudaSetDevice()` with this device) +.. autoclass:: cuda.bindings.runtime.cudaLimit - This indicates that the PTX JIT compiler library was not found. The JIT Compiler library is used for PTX compilation. The runtime may fall back to compiling PTX if an application does not contain a suitable binary for the current device. + .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitStackSize - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnsupportedPtxVersion + GPU thread stack size - This indicates that the provided PTX was compiled with an unsupported toolchain. The most common reason for this, is the PTX was generated by a compiler newer than what is supported by the CUDA driver and PTX JIT compiler. + .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitPrintfFifoSize - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorJitCompilationDisabled + GPU printf FIFO size - This indicates that the JIT compilation was disabled. The JIT compilation compiles PTX. The runtime may fall back to compiling PTX if an application does not contain a suitable binary for the current device. + .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitMallocHeapSize - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnsupportedExecAffinity + GPU malloc heap size - This indicates that the provided execution affinity is not supported by the device. + .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitDevRuntimeSyncDepth - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnsupportedDevSideSync + GPU device runtime synchronize depth - This indicates that the code to be compiled by the PTX JIT contains unsupported call to cudaDeviceSynchronize. + .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitDevRuntimePendingLaunchCount - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorContained + GPU device runtime pending launch count - This indicates that an exception occurred on the device that is now contained by the GPU's error containment capability. Common causes are - a. Certain types of invalid accesses of peer GPU memory over nvlink b. Certain classes of hardware errors This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitMaxL2FetchGranularity - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidSource + A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes). This is a hint - This indicates that the device kernel source is invalid. + .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitPersistingL2CacheSize - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorFileNotFound + A size in bytes for L2 persisting lines cache size +.. autoclass:: cuda.bindings.runtime.cudaMemoryAdvise - This indicates that the file specified was not found. + .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseSetReadMostly - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSharedObjectSymbolNotFound + Data will mostly be read and only occassionally be written to - This indicates that a link to a shared object failed to resolve. + .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseUnsetReadMostly - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSharedObjectInitFailed + Undo the effect of :py:obj:`~.cudaMemAdviseSetReadMostly` - This indicates that initialization of a shared object failed. + .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseSetPreferredLocation - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorOperatingSystem + Set the preferred location for the data as the specified device - This error indicates that an OS call failed. + .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseUnsetPreferredLocation - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidResourceHandle + Clear the preferred location for the data - This indicates that a resource handle passed to the API call was not valid. Resource handles are opaque types like :py:obj:`~.cudaStream_t` and :py:obj:`~.cudaEvent_t`. + .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseSetAccessedBy - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorIllegalState + Data will be accessed by the specified device, so prevent page faults as much as possible - This indicates that a resource required by the API call is not in a valid state to perform the requested operation. + .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseUnsetAccessedBy - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLossyQuery + Let the Unified Memory subsystem decide on the page faulting policy for the specified device +.. autoclass:: cuda.bindings.runtime.cudaMemRangeAttribute - This indicates an attempt was made to introspect an object in a way that would discard semantically important information. This is either due to the object using funtionality newer than the API version used to introspect it or omission of optional return arguments. + .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributeReadMostly - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSymbolNotFound + Whether the range will mostly be read and only occassionally be written to - This indicates that a named symbol was not found. Examples of symbols are global/constant variable names, driver function names, texture names, and surface names. + .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocation - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotReady + The preferred location of the range - This indicates that asynchronous operations issued previously have not completed yet. This result is not actually an error, but must be indicated differently than :py:obj:`~.cudaSuccess` (which indicates completion). Calls that may return this value include :py:obj:`~.cudaEventQuery()` and :py:obj:`~.cudaStreamQuery()`. + .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributeAccessedBy - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorIllegalAddress + Memory range has :py:obj:`~.cudaMemAdviseSetAccessedBy` set for specified device - The device encountered a load or store instruction on an invalid memory address. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocation - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchOutOfResources + The last location to which the range was prefetched - This indicates that a launch did not occur because it did not have appropriate resources. Although this error is similar to :py:obj:`~.cudaErrorInvalidConfiguration`, this error usually indicates that the user has attempted to pass too many arguments to the device kernel, or the kernel launch specifies too many threads for the kernel's register count. + .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocationType - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchTimeout + The preferred location type of the range - This indicates that the device kernel took too long to execute. This can only occur if timeouts are enabled - see the device property :py:obj:`~.kernelExecTimeoutEnabled` for more information. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocationId - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchIncompatibleTexturing + The preferred location id of the range - This error indicates a kernel launch that uses an incompatible texturing mode. + .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocationType - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorPeerAccessAlreadyEnabled + The last location type to which the range was prefetched - This error indicates that a call to :py:obj:`~.cudaDeviceEnablePeerAccess()` is trying to re-enable peer addressing on from a context which has already had peer addressing enabled. + .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocationId - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorPeerAccessNotEnabled + The last location id to which the range was prefetched +.. autoclass:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesOptions - This error indicates that :py:obj:`~.cudaDeviceDisablePeerAccess()` is trying to disable peer addressing which has not been enabled yet via :py:obj:`~.cudaDeviceEnablePeerAccess()`. + .. autoattribute:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesOptions.cudaFlushGPUDirectRDMAWritesOptionHost - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSetOnActiveProcess + :py:obj:`~.cudaDeviceFlushGPUDirectRDMAWrites()` and its CUDA Driver API counterpart are supported on the device. - This indicates that the user has called :py:obj:`~.cudaSetValidDevices()`, :py:obj:`~.cudaSetDeviceFlags()`, :py:obj:`~.cudaD3D9SetDirect3DDevice()`, :py:obj:`~.cudaD3D10SetDirect3DDevice`, :py:obj:`~.cudaD3D11SetDirect3DDevice()`, or :py:obj:`~.cudaVDPAUSetVDPAUDevice()` after initializing the CUDA runtime by calling non-device management operations (allocating memory and launching kernels are examples of non-device management operations). This error can also be returned if using runtime/driver interoperability and there is an existing :py:obj:`~.CUcontext` active on the host thread. + .. autoattribute:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesOptions.cudaFlushGPUDirectRDMAWritesOptionMemOps - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorContextIsDestroyed + The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the :py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported on the CUDA device. +.. autoclass:: cuda.bindings.runtime.cudaGPUDirectRDMAWritesOrdering - This error indicates that the context current to the calling thread has been destroyed using :py:obj:`~.cuCtxDestroy`, or is a primary context which has not yet been initialized. + .. autoattribute:: cuda.bindings.runtime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingNone - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorAssert + The device does not natively support ordering of GPUDirect RDMA writes. :py:obj:`~.cudaFlushGPUDirectRDMAWrites()` can be leveraged if supported. - An assert triggered in device code during kernel execution. The device cannot be used again. All existing allocations are invalid. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingOwner - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTooManyPeers + Natively, the device can consistently consume GPUDirect RDMA writes, although other CUDA devices may not. - This error indicates that the hardware resources required to enable peer access have been exhausted for one or more of the devices passed to :py:obj:`~.cudaEnablePeerAccess()`. + .. autoattribute:: cuda.bindings.runtime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingAllDevices - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorHostMemoryAlreadyRegistered + Any CUDA device in the system can consistently consume GPUDirect RDMA writes to this device. +.. autoclass:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesScope - This error indicates that the memory range passed to :py:obj:`~.cudaHostRegister()` has already been registered. + .. autoattribute:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesScope.cudaFlushGPUDirectRDMAWritesToOwner - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorHostMemoryNotRegistered + Blocks until remote writes are visible to the CUDA device context owning the data. - This error indicates that the pointer passed to :py:obj:`~.cudaHostUnregister()` does not correspond to any currently registered memory region. + .. autoattribute:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesScope.cudaFlushGPUDirectRDMAWritesToAllDevices - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorHardwareStackError + Blocks until remote writes are visible to all CUDA device contexts. +.. autoclass:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesTarget - Device encountered an error in the call stack during kernel execution, possibly due to stack corruption or exceeding the stack size limit. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesTarget.cudaFlushGPUDirectRDMAWritesTargetCurrentDevice - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorIllegalInstruction + Sets the target for :py:obj:`~.cudaDeviceFlushGPUDirectRDMAWrites()` to the currently active CUDA device context. +.. autoclass:: cuda.bindings.runtime.cudaDeviceAttr - The device encountered an illegal instruction during kernel execution This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxThreadsPerBlock - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMisalignedAddress + Maximum number of threads per block - The device encountered a load or store instruction on a memory address which is not aligned. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxBlockDimX - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidAddressSpace + Maximum block dimension X - While executing a kernel, the device encountered an instruction which can only operate on memory locations in certain address spaces (global, shared, or local), but was supplied a memory address not belonging to an allowed address space. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxBlockDimY - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidPc + Maximum block dimension Y - The device encountered an invalid program counter. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxBlockDimZ - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorLaunchFailure + Maximum block dimension Z - An exception occurred on the device while executing a kernel. Common causes include dereferencing an invalid device pointer and accessing out of bounds shared memory. Less common cases can be system specific - more information about these cases can be found in the system specific user guide. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxGridDimX - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCooperativeLaunchTooLarge + Maximum grid dimension X - This error indicates that the number of blocks launched per grid for a kernel that was launched via either :py:obj:`~.cudaLaunchCooperativeKernel` or :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` exceeds the maximum number of blocks as allowed by :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessor` or :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` times the number of multiprocessors as specified by the device attribute :py:obj:`~.cudaDevAttrMultiProcessorCount`. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxGridDimY - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTensorMemoryLeak + Maximum grid dimension Y - An exception occurred on the device while exiting a kernel using tensor memory: the tensor memory was not completely deallocated. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxGridDimZ - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotPermitted + Maximum grid dimension Z - This error indicates the attempted operation is not permitted. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerBlock - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotSupported + Maximum shared memory available per block in bytes - This error indicates the attempted operation is not supported on the current system or device. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrTotalConstantMemory - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSystemNotReady + Memory available on device for constant variables in a CUDA C kernel in bytes - This error indicates that the system is not yet ready to start any CUDA work. To continue using CUDA, verify the system configuration is in a valid state and all required driver daemons are actively running. More information about this error can be found in the system specific user guide. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrWarpSize - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorSystemDriverMismatch + Warp size in threads - This error indicates that there is a mismatch between the versions of the display driver and the CUDA driver. Refer to the compatibility documentation for supported versions. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxPitch - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCompatNotSupportedOnDevice + Maximum pitch in bytes allowed by memory copies - This error indicates that the system was upgraded to run with forward compatibility but the visible hardware detected by CUDA does not support this configuration. Refer to the compatibility documentation for the supported hardware matrix or ensure that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES environment variable. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxRegistersPerBlock - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsConnectionFailed + Maximum number of 32-bit registers available per block - This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrClockRate - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsRpcFailure + Peak clock frequency in kilohertz - This error indicates that the remote procedural call between the MPS server and the MPS client failed. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrTextureAlignment - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsServerNotReady + Alignment requirement for textures - This error indicates that the MPS server is not ready to accept new MPS client requests. This error can be returned when the MPS server is in the process of recovering from a fatal failure. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGpuOverlap - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsMaxClientsReached + Device can possibly copy memory and execute a kernel concurrently - This error indicates that the hardware resources required to create MPS client have been exhausted. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMultiProcessorCount - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsMaxConnectionsReached + Number of multiprocessors on device - This error indicates the the hardware resources required to device connections have been exhausted. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrKernelExecTimeout - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMpsClientTerminated + Specifies whether there is a run time limit on kernels - This error indicates that the MPS client has been terminated by the server. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrIntegrated - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCdpNotSupported + Device is integrated with host memory - This error indicates, that the program is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCanMapHostMemory - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCdpVersionMismatch + Device can map host memory into CUDA address space - This error indicates, that the program contains an unsupported interaction between different versions of CUDA Dynamic Parallelism. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrComputeMode - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureUnsupported + Compute mode (See :py:obj:`~.cudaComputeMode` for details) - The operation is not permitted when the stream is capturing. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture1DWidth - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureInvalidated + Maximum 1D texture width - The current capture sequence on the stream has been invalidated due to a previous error. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DWidth - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureMerge + Maximum 2D texture width - The operation would have resulted in a merge of two independent capture sequences. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DHeight - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureUnmatched + Maximum 2D texture height - The capture was not initiated in this stream. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DWidth - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureUnjoined + Maximum 3D texture width - The capture sequence contains a fork that was not joined to the primary stream. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DHeight - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureIsolation + Maximum 3D texture height - A dependency would have been created which crosses the capture sequence boundary. Only implicit in-stream ordering dependencies are allowed to cross the boundary. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DDepth - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureImplicit + Maximum 3D texture depth - The operation would have resulted in a disallowed implicit dependency on a current capture sequence from cudaStreamLegacy. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredWidth - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorCapturedEvent + Maximum 2D layered texture width - The operation is not permitted on an event which was last recorded in a capturing stream. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredHeight - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorStreamCaptureWrongThread + Maximum 2D layered texture height - A stream capture sequence not initiated with the :py:obj:`~.cudaStreamCaptureModeRelaxed` argument to :py:obj:`~.cudaStreamBeginCapture` was passed to :py:obj:`~.cudaStreamEndCapture` in a different thread. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredLayers - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTimeout + Maximum layers in a 2D layered texture - This indicates that the wait operation has timed out. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrSurfaceAlignment - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorGraphExecUpdateFailure + Alignment requirement for surfaces - This error indicates that the graph update was not performed because it included changes which violated constraints specific to instantiated graph update. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrConcurrentKernels - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorExternalDevice + Device can possibly execute multiple kernels concurrently - This indicates that an async error has occurred in a device outside of CUDA. If CUDA was waiting for an external device's signal before consuming shared data, the external device signaled an error indicating that the data is not valid for consumption. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrEccEnabled - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidClusterSize + Device has ECC support enabled - This indicates that a kernel launch error has occurred due to cluster misconfiguration. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrPciBusId - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorFunctionNotLoaded + PCI bus ID of the device - Indiciates a function handle is not loaded when calling an API that requires a loaded function. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrPciDeviceId - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidResourceType + PCI device ID of the device - This error indicates one or more resources passed in are not valid resource types for the operation. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrTccDriver - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidResourceConfiguration + Device is using TCC driver model - This error indicates one or more resources are insufficient or non-applicable for the operation. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMemoryClockRate - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnknown + Peak memory clock frequency in kilohertz - This indicates that an unknown internal error has occurred. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGlobalMemoryBusWidth - .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorApiFailureBase + Global memory bus width in bits -.. autoclass:: cuda.bindings.runtime.cudaChannelFormatKind - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSigned + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrL2CacheSize - Signed channel format + Size of L2 cache in bytes - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsigned + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxThreadsPerMultiProcessor - Unsigned channel format + Maximum resident threads per multiprocessor - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindFloat + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrAsyncEngineCount - Float channel format + Number of asynchronous engines - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindNone + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrUnifiedAddressing - No channel format + Device shares a unified address space with the host - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindNV12 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLayeredWidth - Unsigned 8-bit integers, planar 4:2:0 YUV format + Maximum 1D layered texture width - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLayeredLayers - 1 channel unsigned 8-bit normalized integer + Maximum layers in a 1D layered texture - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DGatherWidth - 2 channel unsigned 8-bit normalized integer + Maximum 2D texture width if cudaArrayTextureGather is set - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DGatherHeight - 4 channel unsigned 8-bit normalized integer + Maximum 2D texture height if cudaArrayTextureGather is set - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DWidthAlt - 1 channel unsigned 16-bit normalized integer + Alternate maximum 3D texture width - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DHeightAlt - 2 channel unsigned 16-bit normalized integer + Alternate maximum 3D texture height - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DDepthAlt - 4 channel unsigned 16-bit normalized integer + Alternate maximum 3D texture depth - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrPciDomainId - 1 channel signed 8-bit normalized integer + PCI domain ID of the device - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrTexturePitchAlignment - 2 channel signed 8-bit normalized integer + Pitch alignment requirement for textures - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapWidth - 4 channel signed 8-bit normalized integer + Maximum cubemap texture width/height - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapLayeredWidth - 1 channel signed 16-bit normalized integer + Maximum cubemap layered texture width/height - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapLayeredLayers - 2 channel signed 16-bit normalized integer + Maximum layers in a cubemap layered texture - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface1DWidth - 4 channel signed 16-bit normalized integer + Maximum 1D surface width - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface2DWidth - 4 channel unsigned normalized block-compressed (BC1 compression) format + Maximum 2D surface width - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface2DHeight - 4 channel unsigned normalized block-compressed (BC1 compression) format with sRGB encoding + Maximum 2D surface height - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface3DWidth - 4 channel unsigned normalized block-compressed (BC2 compression) format + Maximum 3D surface width - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface3DHeight - 4 channel unsigned normalized block-compressed (BC2 compression) format with sRGB encoding + Maximum 3D surface height - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface3DDepth - 4 channel unsigned normalized block-compressed (BC3 compression) format + Maximum 3D surface depth - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface1DLayeredWidth - 4 channel unsigned normalized block-compressed (BC3 compression) format with sRGB encoding + Maximum 1D layered surface width - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface1DLayeredLayers - 1 channel unsigned normalized block-compressed (BC4 compression) format + Maximum layers in a 1D layered surface - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredWidth - 1 channel signed normalized block-compressed (BC4 compression) format + Maximum 2D layered surface width - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredHeight - 2 channel unsigned normalized block-compressed (BC5 compression) format + Maximum 2D layered surface height - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredLayers - 2 channel signed normalized block-compressed (BC5 compression) format + Maximum layers in a 2D layered surface - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapWidth - 3 channel unsigned half-float block-compressed (BC6H compression) format + Maximum cubemap surface width - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapLayeredWidth - 3 channel signed half-float block-compressed (BC6H compression) format + Maximum cubemap layered surface width - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapLayeredLayers - 4 channel unsigned normalized block-compressed (BC7 compression) format + Maximum layers in a cubemap layered surface - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLinearWidth - 4 channel unsigned normalized block-compressed (BC7 compression) format with sRGB encoding + Maximum 1D linear texture width - .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearWidth - 4 channel unsigned normalized (10-bit, 10-bit, 10-bit, 2-bit) format + Maximum 2D linear texture width -.. autoclass:: cuda.bindings.runtime.cudaMemoryType - .. autoattribute:: cuda.bindings.runtime.cudaMemoryType.cudaMemoryTypeUnregistered + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearHeight - Unregistered memory + Maximum 2D linear texture height - .. autoattribute:: cuda.bindings.runtime.cudaMemoryType.cudaMemoryTypeHost + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearPitch - Host memory + Maximum 2D linear texture pitch in bytes - .. autoattribute:: cuda.bindings.runtime.cudaMemoryType.cudaMemoryTypeDevice + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DMipmappedWidth - Device memory + Maximum mipmapped 2D texture width - .. autoattribute:: cuda.bindings.runtime.cudaMemoryType.cudaMemoryTypeManaged + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DMipmappedHeight - Managed memory + Maximum mipmapped 2D texture height -.. autoclass:: cuda.bindings.runtime.cudaMemcpyKind - .. autoattribute:: cuda.bindings.runtime.cudaMemcpyKind.cudaMemcpyHostToHost + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrComputeCapabilityMajor - Host -> Host + Major compute capability version number - .. autoattribute:: cuda.bindings.runtime.cudaMemcpyKind.cudaMemcpyHostToDevice + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrComputeCapabilityMinor - Host -> Device + Minor compute capability version number - .. autoattribute:: cuda.bindings.runtime.cudaMemcpyKind.cudaMemcpyDeviceToHost + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture1DMipmappedWidth - Device -> Host + Maximum mipmapped 1D texture width - .. autoattribute:: cuda.bindings.runtime.cudaMemcpyKind.cudaMemcpyDeviceToDevice + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrStreamPrioritiesSupported - Device -> Device + Device supports stream priorities - .. autoattribute:: cuda.bindings.runtime.cudaMemcpyKind.cudaMemcpyDefault + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGlobalL1CacheSupported - Direction of the transfer is inferred from the pointer values. Requires unified virtual addressing + Device supports caching globals in L1 -.. autoclass:: cuda.bindings.runtime.cudaAccessProperty - .. autoattribute:: cuda.bindings.runtime.cudaAccessProperty.cudaAccessPropertyNormal + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrLocalL1CacheSupported - Normal cache persistence. + Device supports caching locals in L1 - .. autoattribute:: cuda.bindings.runtime.cudaAccessProperty.cudaAccessPropertyStreaming + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerMultiprocessor - Streaming access is less likely to persit from cache. + Maximum shared memory available per multiprocessor in bytes - .. autoattribute:: cuda.bindings.runtime.cudaAccessProperty.cudaAccessPropertyPersisting + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxRegistersPerMultiprocessor - Persisting access is more likely to persist in cache. + Maximum number of 32-bit registers available per multiprocessor -.. autoclass:: cuda.bindings.runtime.cudaStreamCaptureStatus - .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureStatus.cudaStreamCaptureStatusNone + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrManagedMemory - Stream is not capturing + Device can allocate managed memory on this system - .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureStatus.cudaStreamCaptureStatusActive + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrIsMultiGpuBoard - Stream is actively capturing + Device is on a multi-GPU board - .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureStatus.cudaStreamCaptureStatusInvalidated + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMultiGpuBoardGroupID - Stream is part of a capture sequence that has been invalidated, but not terminated + Unique identifier for a group of devices on the same multi-GPU board -.. autoclass:: cuda.bindings.runtime.cudaStreamCaptureMode - .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureMode.cudaStreamCaptureModeGlobal + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostNativeAtomicSupported - .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureMode.cudaStreamCaptureModeThreadLocal + Link between the device and the host supports native atomic operations - .. autoattribute:: cuda.bindings.runtime.cudaStreamCaptureMode.cudaStreamCaptureModeRelaxed + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrSingleToDoublePrecisionPerfRatio -.. autoclass:: cuda.bindings.runtime.cudaSynchronizationPolicy - .. autoattribute:: cuda.bindings.runtime.cudaSynchronizationPolicy.cudaSyncPolicyAuto + Ratio of single precision performance (in floating-point operations per second) to double precision performance - .. autoattribute:: cuda.bindings.runtime.cudaSynchronizationPolicy.cudaSyncPolicySpin + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrPageableMemoryAccess - .. autoattribute:: cuda.bindings.runtime.cudaSynchronizationPolicy.cudaSyncPolicyYield + Device supports coherently accessing pageable memory without calling cudaHostRegister on it - .. autoattribute:: cuda.bindings.runtime.cudaSynchronizationPolicy.cudaSyncPolicyBlockingSync + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrConcurrentManagedAccess -.. autoclass:: cuda.bindings.runtime.cudaClusterSchedulingPolicy - .. autoattribute:: cuda.bindings.runtime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyDefault + Device can coherently access managed memory concurrently with the CPU - the default policy + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrComputePreemptionSupported - .. autoattribute:: cuda.bindings.runtime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicySpread + Device supports Compute Preemption - spread the blocks within a cluster to the SMs + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCanUseHostPointerForRegisteredMem - .. autoattribute:: cuda.bindings.runtime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyLoadBalancing + Device can access host registered memory at the same virtual address as the CPU - allow the hardware to load-balance the blocks in a cluster to the SMs + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved92 -.. autoclass:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependenciesFlags - .. autoattribute:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamAddCaptureDependencies + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved93 - Add new nodes to the dependency set + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved94 - .. autoattribute:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamSetCaptureDependencies + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCooperativeLaunch - Replace the dependency set with the new nodes + Device supports launching cooperative kernels via :py:obj:`~.cudaLaunchCooperativeKernel` -.. autoclass:: cuda.bindings.runtime.cudaUserObjectFlags - .. autoattribute:: cuda.bindings.runtime.cudaUserObjectFlags.cudaUserObjectNoDestructorSync + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCooperativeMultiDeviceLaunch - Indicates the destructor execution is not synchronized by any CUDA handle. + Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated. -.. autoclass:: cuda.bindings.runtime.cudaUserObjectRetainFlags - .. autoattribute:: cuda.bindings.runtime.cudaUserObjectRetainFlags.cudaGraphUserObjectMove + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerBlockOptin - Transfer references from the caller rather than creating new references. + The maximum optin shared memory per block. This value may vary by chip. See :py:obj:`~.cudaFuncSetAttribute` -.. autoclass:: cuda.bindings.runtime.cudaGraphicsRegisterFlags - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsNone + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCanFlushRemoteWrites - Default + Device supports flushing of outstanding remote writes. - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsReadOnly + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostRegisterSupported - CUDA will not write to this resource + Device supports host memory registration via :py:obj:`~.cudaHostRegister`. - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsWriteDiscard + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrPageableMemoryAccessUsesHostPageTables - CUDA will only write to and will not read from this resource + Device accesses pageable memory via the host's page tables. - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsSurfaceLoadStore + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrDirectManagedMemAccessFromHost - CUDA will bind this resource to a surface reference + Host can directly access managed memory on the device without migration. - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsTextureGather + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxBlocksPerMultiprocessor - CUDA will perform texture gather operations on this resource + Maximum number of blocks per multiprocessor -.. autoclass:: cuda.bindings.runtime.cudaGraphicsMapFlags - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsNone + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxPersistingL2CacheSize - Default; Assume resource can be read/written + Maximum L2 persisting lines capacity setting in bytes. - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsReadOnly + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxAccessPolicyWindowSize - CUDA will not write to this resource + Maximum value of :py:obj:`~.cudaAccessPolicyWindow.num_bytes`. - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsWriteDiscard + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReservedSharedMemoryPerBlock - CUDA will only write to and will not read from this resource + Shared memory reserved by CUDA driver per block in bytes -.. autoclass:: cuda.bindings.runtime.cudaGraphicsCubeFace - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveX + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrSparseCudaArraySupported - Positive X face of cubemap + Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeX + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostRegisterReadOnlySupported - Negative X face of cubemap + Device supports using the :py:obj:`~.cudaHostRegister` flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveY + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrTimelineSemaphoreInteropSupported - Positive Y face of cubemap + External timeline semaphore interop is supported on the device - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeY + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTimelineSemaphoreInteropSupported - Negative Y face of cubemap + Deprecated, External timeline semaphore interop is supported on the device - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveZ + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMemoryPoolsSupported - Positive Z face of cubemap + Device supports using the :py:obj:`~.cudaMallocAsync` and :py:obj:`~.cudaMemPool` family of APIs - .. autoattribute:: cuda.bindings.runtime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeZ + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMASupported - Negative Z face of cubemap + Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information) -.. autoclass:: cuda.bindings.runtime.cudaResourceType - .. autoattribute:: cuda.bindings.runtime.cudaResourceType.cudaResourceTypeArray + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMAFlushWritesOptions - Array resource + The returned attribute shall be interpreted as a bitmask, where the individual bits are listed in the :py:obj:`~.cudaFlushGPUDirectRDMAWritesOptions` enum - .. autoattribute:: cuda.bindings.runtime.cudaResourceType.cudaResourceTypeMipmappedArray + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMAWritesOrdering - Mipmapped array resource + GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute. See :py:obj:`~.cudaGPUDirectRDMAWritesOrdering` for the numerical values returned here. - .. autoattribute:: cuda.bindings.runtime.cudaResourceType.cudaResourceTypeLinear + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMemoryPoolSupportedHandleTypes - Linear resource + Handle types supported with mempool based IPC - .. autoattribute:: cuda.bindings.runtime.cudaResourceType.cudaResourceTypePitch2D + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrClusterLaunch - Pitch 2D resource + Indicates device supports cluster launch -.. autoclass:: cuda.bindings.runtime.cudaResourceViewFormat - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatNone + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrDeferredMappingCudaArraySupported - No resource view format (use underlying resource format) + Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar1 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved122 - 1 channel unsigned 8-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved123 - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar2 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved124 - 2 channel unsigned 8-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrIpcEventSupport - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar4 + Device supports IPC Events. - 4 channel unsigned 8-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMemSyncDomainCount - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedChar1 + Number of memory synchronization domains the device supports. - 1 channel signed 8-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved127 - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedChar2 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved128 - 2 channel signed 8-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved129 - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedChar4 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrNumaConfig - 4 channel signed 8-bit integers + NUMA configuration of a device: value is of type :py:obj:`~.cudaDeviceNumaConfig` enum - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort1 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrNumaId - 1 channel unsigned 16-bit integers + NUMA node ID of the GPU memory - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort2 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved132 - 2 channel unsigned 16-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMpsEnabled - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort4 + Contexts created on this device will be shared via MPS - 4 channel unsigned 16-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostNumaId - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedShort1 + NUMA ID of the host node closest to the device or -1 when system does not support NUMA - 1 channel signed 16-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrD3D12CigSupported - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedShort2 + Device supports CIG with D3D12. - 2 channel signed 16-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrVulkanCigSupported - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedShort4 + Device supports CIG with Vulkan. - 4 channel signed 16-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGpuPciDeviceId - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt1 + The combined 16-bit PCI device ID and 16-bit PCI vendor ID. - 1 channel unsigned 32-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGpuPciSubsystemId - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt2 + The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID. - 2 channel unsigned 32-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved141 - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt4 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostNumaMemoryPoolsSupported - 4 channel unsigned 32-bit integers + Device supports HOST_NUMA location with the :py:obj:`~.cudaMallocAsync` and :py:obj:`~.cudaMemPool` family of APIs - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedInt1 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostNumaMultinodeIpcSupported - 1 channel signed 32-bit integers + Device supports HostNuma location IPC between nodes in a multi-node system. - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedInt2 + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMax +.. autoclass:: cuda.bindings.runtime.cudaMemPoolAttr - 2 channel signed 32-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolReuseFollowEventDependencies - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedInt4 + (value type = int) Allow cuMemAllocAsync to use memory asynchronously freed in another streams as long as a stream ordering dependency of the allocating stream on the free action exists. Cuda events and null stream interactions can create the required stream ordered dependencies. (default enabled) - 4 channel signed 32-bit integers + .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolReuseAllowOpportunistic - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatHalf1 + (value type = int) Allow reuse of already completed frees when there is no dependency between the free and allocation. (default enabled) - 1 channel 16-bit floating point + .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolReuseAllowInternalDependencies - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatHalf2 + (value type = int) Allow cuMemAllocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by cuFreeAsync (default enabled). - 2 channel 16-bit floating point + .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrReleaseThreshold - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatHalf4 + (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) - 4 channel 16-bit floating point + .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrReservedMemCurrent - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatFloat1 + (value type = cuuint64_t) Amount of backing memory currently allocated for the mempool. - 1 channel 32-bit floating point + .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrReservedMemHigh - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatFloat2 + (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. - 2 channel 32-bit floating point + .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrUsedMemCurrent - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatFloat4 + (value type = cuuint64_t) Amount of memory from the pool that is currently in use by the application. - 4 channel 32-bit floating point + .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrUsedMemHigh - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed1 + (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. +.. autoclass:: cuda.bindings.runtime.cudaMemLocationType - Block compressed 1 + .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeInvalid - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed2 + .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeDevice - Block compressed 2 + Location is a device location, thus id is a device ordinal - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed3 + .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeHost - Block compressed 3 + Location is host, id is ignored - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed4 + .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeHostNuma - Block compressed 4 unsigned + Location is a host NUMA node, thus id is a host NUMA node id - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed4 + .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeHostNumaCurrent - Block compressed 4 signed + Location is the host NUMA node closest to the current thread's CPU, id is ignored +.. autoclass:: cuda.bindings.runtime.cudaMemAccessFlags - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed5 + .. autoattribute:: cuda.bindings.runtime.cudaMemAccessFlags.cudaMemAccessFlagsProtNone - Block compressed 5 unsigned + Default, make the address range not accessible - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed5 + .. autoattribute:: cuda.bindings.runtime.cudaMemAccessFlags.cudaMemAccessFlagsProtRead - Block compressed 5 signed + Make the address range read accessible - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed6H + .. autoattribute:: cuda.bindings.runtime.cudaMemAccessFlags.cudaMemAccessFlagsProtReadWrite - Block compressed 6 unsigned half-float + Make the address range read-write accessible +.. autoclass:: cuda.bindings.runtime.cudaMemAllocationType - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed6H + .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationType.cudaMemAllocationTypeInvalid - Block compressed 6 signed half-float + .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationType.cudaMemAllocationTypePinned - .. autoattribute:: cuda.bindings.runtime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed7 + This allocation type is 'pinned', i.e. cannot migrate from its current location while the application is actively using it - Block compressed 7 + .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationType.cudaMemAllocationTypeMax -.. autoclass:: cuda.bindings.runtime.cudaFuncAttribute +.. autoclass:: cuda.bindings.runtime.cudaMemAllocationHandleType - .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeMaxDynamicSharedMemorySize + .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypeNone - Maximum dynamic shared memory size + Does not allow any export mechanism. > - .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributePreferredSharedMemoryCarveout + .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypePosixFileDescriptor - Preferred shared memory-L1 cache split + Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int) - .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeClusterDimMustBeSet + .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypeWin32 - Indicator to enforce valid cluster dimension specification on kernel launch + Allows a Win32 NT handle to be used for exporting. (HANDLE) - .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterWidth + .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypeWin32Kmt - Required cluster width + Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE) - .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterHeight + .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypeFabric - Required cluster height + Allows a fabric handle to be used for exporting. (:py:obj:`~.cudaMemFabricHandle_t`) +.. autoclass:: cuda.bindings.runtime.cudaGraphMemAttributeType - .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterDepth + .. autoattribute:: cuda.bindings.runtime.cudaGraphMemAttributeType.cudaGraphMemAttrUsedMemCurrent - Required cluster depth + (value type = cuuint64_t) Amount of memory, in bytes, currently associated with graphs. - .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeNonPortableClusterSizeAllowed + .. autoattribute:: cuda.bindings.runtime.cudaGraphMemAttributeType.cudaGraphMemAttrUsedMemHigh - Whether non-portable cluster scheduling policy is supported + (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. - .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeClusterSchedulingPolicyPreference + .. autoattribute:: cuda.bindings.runtime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemCurrent - Required cluster scheduling policy preference + (value type = cuuint64_t) Amount of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator. - .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeMax + .. autoattribute:: cuda.bindings.runtime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemHigh -.. autoclass:: cuda.bindings.runtime.cudaFuncCache - .. autoattribute:: cuda.bindings.runtime.cudaFuncCache.cudaFuncCachePreferNone + (value type = cuuint64_t) High watermark of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator. +.. autoclass:: cuda.bindings.runtime.cudaMemcpyFlags - Default function cache configuration, no preference + .. autoattribute:: cuda.bindings.runtime.cudaMemcpyFlags.cudaMemcpyFlagDefault - .. autoattribute:: cuda.bindings.runtime.cudaFuncCache.cudaFuncCachePreferShared + .. autoattribute:: cuda.bindings.runtime.cudaMemcpyFlags.cudaMemcpyFlagPreferOverlapWithCompute - Prefer larger shared memory and smaller L1 cache + Hint to the driver to try and overlap the copy with compute work on the SMs. +.. autoclass:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder - .. autoattribute:: cuda.bindings.runtime.cudaFuncCache.cudaFuncCachePreferL1 + .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderInvalid - Prefer larger L1 cache and smaller shared memory + Default invalid. - .. autoattribute:: cuda.bindings.runtime.cudaFuncCache.cudaFuncCachePreferEqual + .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderStream - Prefer equal size L1 cache and shared memory + Indicates that access to the source pointer must be in stream order. -.. autoclass:: cuda.bindings.runtime.cudaSharedMemConfig - .. autoattribute:: cuda.bindings.runtime.cudaSharedMemConfig.cudaSharedMemBankSizeDefault + .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderDuringApiCall - .. autoattribute:: cuda.bindings.runtime.cudaSharedMemConfig.cudaSharedMemBankSizeFourByte + Indicates that access to the source pointer can be out of stream order and all accesses must be complete before the API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it's known that no prior operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the need for the user to synchronize the stream after the API call. - .. autoattribute:: cuda.bindings.runtime.cudaSharedMemConfig.cudaSharedMemBankSizeEightByte + .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderAny -.. autoclass:: cuda.bindings.runtime.cudaSharedCarveout - .. autoattribute:: cuda.bindings.runtime.cudaSharedCarveout.cudaSharedmemCarveoutDefault + Indicates that access to the source pointer can be out of stream order and the accesses can happen even after the API call returns. This flag is suited for host pointers allocated outside CUDA (ex., via malloc) when it's known that no prior operations in the stream can be accessing the memory. Specifying this flag allows the driver to optimize the copy on certain platforms. - No preference for shared memory or L1 (default) + .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderMax +.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DOperandType - .. autoattribute:: cuda.bindings.runtime.cudaSharedCarveout.cudaSharedmemCarveoutMaxShared + .. autoattribute:: cuda.bindings.runtime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypePointer - Prefer maximum available shared memory, minimum L1 cache + Memcpy operand is a valid pointer. - .. autoattribute:: cuda.bindings.runtime.cudaSharedCarveout.cudaSharedmemCarveoutMaxL1 + .. autoattribute:: cuda.bindings.runtime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeArray - Prefer maximum available L1 cache, minimum shared memory + Memcpy operand is a CUarray. -.. autoclass:: cuda.bindings.runtime.cudaComputeMode - .. autoattribute:: cuda.bindings.runtime.cudaComputeMode.cudaComputeModeDefault + .. autoattribute:: cuda.bindings.runtime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeMax +.. autoclass:: cuda.bindings.runtime.cudaDeviceP2PAttr - Default compute mode (Multiple threads can use :py:obj:`~.cudaSetDevice()` with this device) + .. autoattribute:: cuda.bindings.runtime.cudaDeviceP2PAttr.cudaDevP2PAttrPerformanceRank - .. autoattribute:: cuda.bindings.runtime.cudaComputeMode.cudaComputeModeExclusive + A relative value indicating the performance of the link between two devices - Compute-exclusive-thread mode (Only one thread in one process will be able to use :py:obj:`~.cudaSetDevice()` with this device) + .. autoattribute:: cuda.bindings.runtime.cudaDeviceP2PAttr.cudaDevP2PAttrAccessSupported - .. autoattribute:: cuda.bindings.runtime.cudaComputeMode.cudaComputeModeProhibited + Peer access is enabled - Compute-prohibited mode (No threads can use :py:obj:`~.cudaSetDevice()` with this device) + .. autoattribute:: cuda.bindings.runtime.cudaDeviceP2PAttr.cudaDevP2PAttrNativeAtomicSupported - .. autoattribute:: cuda.bindings.runtime.cudaComputeMode.cudaComputeModeExclusiveProcess + Native atomic operation over the link supported - Compute-exclusive-process mode (Many threads in one process will be able to use :py:obj:`~.cudaSetDevice()` with this device) + .. autoattribute:: cuda.bindings.runtime.cudaDeviceP2PAttr.cudaDevP2PAttrCudaArrayAccessSupported -.. autoclass:: cuda.bindings.runtime.cudaLimit - .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitStackSize + Accessing CUDA arrays over the link supported +.. autoclass:: cuda.bindings.runtime.cudaExternalMemoryHandleType - GPU thread stack size + .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueFd - .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitPrintfFifoSize + Handle is an opaque file descriptor - GPU printf FIFO size + .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueWin32 - .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitMallocHeapSize + Handle is an opaque shared NT handle - GPU malloc heap size + .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueWin32Kmt - .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitDevRuntimeSyncDepth + Handle is an opaque, globally shared handle - GPU device runtime synchronize depth + .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D12Heap - .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitDevRuntimePendingLaunchCount + Handle is a D3D12 heap object - GPU device runtime pending launch count + .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D12Resource - .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitMaxL2FetchGranularity + Handle is a D3D12 committed resource - A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes). This is a hint + .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D11Resource - .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitPersistingL2CacheSize + Handle is a shared NT handle to a D3D11 resource - A size in bytes for L2 persisting lines cache size + .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D11ResourceKmt -.. autoclass:: cuda.bindings.runtime.cudaMemoryAdvise - .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseSetReadMostly + Handle is a globally shared handle to a D3D11 resource - Data will mostly be read and only occassionally be written to + .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeNvSciBuf - .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseUnsetReadMostly + Handle is an NvSciBuf object +.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType - Undo the effect of :py:obj:`~.cudaMemAdviseSetReadMostly` + .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueFd - .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseSetPreferredLocation + Handle is an opaque file descriptor - Set the preferred location for the data as the specified device + .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueWin32 - .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseUnsetPreferredLocation + Handle is an opaque shared NT handle - Clear the preferred location for the data + .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt - .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseSetAccessedBy + Handle is an opaque, globally shared handle - Data will be accessed by the specified device, so prevent page faults as much as possible + .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeD3D12Fence - .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseUnsetAccessedBy + Handle is a shared NT handle referencing a D3D12 fence object - Let the Unified Memory subsystem decide on the page faulting policy for the specified device + .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeD3D11Fence -.. autoclass:: cuda.bindings.runtime.cudaMemRangeAttribute - .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributeReadMostly + Handle is a shared NT handle referencing a D3D11 fence object - Whether the range will mostly be read and only occassionally be written to + .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeNvSciSync - .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocation + Opaque handle to NvSciSync Object - The preferred location of the range + .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeKeyedMutex - .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributeAccessedBy + Handle is a shared NT handle referencing a D3D11 keyed mutex object - Memory range has :py:obj:`~.cudaMemAdviseSetAccessedBy` set for specified device + .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeKeyedMutexKmt - .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocation + Handle is a shared KMT handle referencing a D3D11 keyed mutex object - The last location to which the range was prefetched + .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd - .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocationType + Handle is an opaque handle file descriptor referencing a timeline semaphore - The preferred location type of the range + .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 - .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocationId + Handle is an opaque handle file descriptor referencing a timeline semaphore +.. autoclass:: cuda.bindings.runtime.cudaJitOption - The preferred location id of the range + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitMaxRegisters - .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocationType + Max number of registers that a thread may use. + Option type: unsigned int - The last location type to which the range was prefetched + Applies to: compiler only - .. autoattribute:: cuda.bindings.runtime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocationId + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitThreadsPerBlock - The last location id to which the range was prefetched + IN: Specifies minimum number of threads per block to target compilation for -.. autoclass:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesOptions + OUT: Returns the number of threads the compiler actually targeted. This restricts the resource utilization of the compiler (e.g. max registers) such that a block with the given number of threads should be able to launch based on register limitations. Note, this option does not currently take into account any other resource limitations, such as shared memory utilization. - .. autoattribute:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesOptions.cudaFlushGPUDirectRDMAWritesOptionHost + Option type: unsigned int + Applies to: compiler only - :py:obj:`~.cudaDeviceFlushGPUDirectRDMAWrites()` and its CUDA Driver API counterpart are supported on the device. + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitWallTime - .. autoattribute:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesOptions.cudaFlushGPUDirectRDMAWritesOptionMemOps + Overwrites the option value with the total wall clock time, in milliseconds, spent in the compiler and linker - The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the :py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported on the CUDA device. + Option type: float -.. autoclass:: cuda.bindings.runtime.cudaGPUDirectRDMAWritesOrdering + Applies to: compiler and linker - .. autoattribute:: cuda.bindings.runtime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingNone + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitInfoLogBuffer - The device does not natively support ordering of GPUDirect RDMA writes. :py:obj:`~.cudaFlushGPUDirectRDMAWrites()` can be leveraged if supported. + 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`) - .. autoattribute:: cuda.bindings.runtime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingOwner + Option type: char \* + Applies to: compiler and linker - Natively, the device can consistently consume GPUDirect RDMA writes, although other CUDA devices may not. + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitInfoLogBufferSizeBytes - .. autoattribute:: cuda.bindings.runtime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingAllDevices + IN: Log buffer size in bytes. Log messages will be capped at this size (including null terminator) - Any CUDA device in the system can consistently consume GPUDirect RDMA writes to this device. + OUT: Amount of log buffer filled with messages -.. autoclass:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesScope + Option type: unsigned int - .. autoattribute:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesScope.cudaFlushGPUDirectRDMAWritesToOwner + Applies to: compiler and linker - Blocks until remote writes are visible to the CUDA device context owning the data. + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitErrorLogBuffer - .. autoattribute:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesScope.cudaFlushGPUDirectRDMAWritesToAllDevices + 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 \* - Blocks until remote writes are visible to all CUDA device contexts. + Applies to: compiler and linker -.. autoclass:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesTarget - .. autoattribute:: cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesTarget.cudaFlushGPUDirectRDMAWritesTargetCurrentDevice + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitErrorLogBufferSizeBytes - Sets the target for :py:obj:`~.cudaDeviceFlushGPUDirectRDMAWrites()` to the currently active CUDA device context. + IN: Log buffer size in bytes. Log messages will be capped at this size (including null terminator) -.. autoclass:: cuda.bindings.runtime.cudaDeviceAttr + OUT: Amount of log buffer filled with messages - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxThreadsPerBlock + Option type: unsigned int + Applies to: compiler and linker - Maximum number of threads per block + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitOptimizationLevel - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxBlockDimX + Level of optimizations to apply to generated code (0 - 4), with 4 being the default and highest level of optimizations. - Maximum block dimension X + Option type: unsigned int + Applies to: compiler only - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxBlockDimY + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitFallbackStrategy - Maximum block dimension Y + Specifies choice of fallback strategy if matching cubin is not found. Choice is based on supplied :py:obj:`~.cudaJit_Fallback`. Option type: unsigned int for enumerated type :py:obj:`~.cudaJit_Fallback` - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxBlockDimZ + Applies to: compiler only - Maximum block dimension Z + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitGenerateDebugInfo - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxGridDimX + Specifies whether to create debug information in output (-g) (0: false, default) + Option type: int - Maximum grid dimension X + Applies to: compiler and linker - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxGridDimY + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitLogVerbose - Maximum grid dimension Y + Generate verbose log messages (0: false, default) + Option type: int - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxGridDimZ + Applies to: compiler and linker - Maximum grid dimension Z + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitGenerateLineInfo - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerBlock + Generate line number information (-lineinfo) (0: false, default) + Option type: int - Maximum shared memory available per block in bytes + Applies to: compiler only - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrTotalConstantMemory + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitCacheMode - Memory available on device for constant variables in a CUDA C kernel in bytes + Specifies whether to enable caching explicitly (-dlcm) + Choice is based on supplied :py:obj:`~.cudaJit_CacheMode`. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrWarpSize + Option type: unsigned int for enumerated type :py:obj:`~.cudaJit_CacheMode` + Applies to: compiler only - Warp size in threads + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitPositionIndependentCode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxPitch + Generate position independent code (0: false) - Maximum pitch in bytes allowed by memory copies + Option type: int + Applies to: compiler only - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxRegistersPerBlock + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitMinCtaPerSm - Maximum number of 32-bit registers available per block + This option hints to the JIT compiler the minimum number of CTAs from the kernel’s grid to be mapped to a SM. This option is ignored when used together with :py:obj:`~.cudaJitMaxRegisters` or :py:obj:`~.cudaJitThreadsPerBlock`. Optimizations based on this option need :py:obj:`~.cudaJitMaxThreadsPerBlock` to be specified as well. For kernels already using PTX directive .minnctapersm, this option will be ignored by default. Use :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take precedence over the PTX directive. Option type: unsigned int - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrClockRate + Applies to: compiler only - Peak clock frequency in kilohertz + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitMaxThreadsPerBlock - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrTextureAlignment + Maximum number threads in a thread block, computed as the product of the maximum extent specifed for each dimension of the block. This limit is guaranteed not to be exeeded in any invocation of the kernel. Exceeding the the maximum number of threads results in runtime error or kernel launch failure. For kernels already using PTX directive .maxntid, this option will be ignored by default. Use :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take precedence over the PTX directive. Option type: int + Applies to: compiler only - Alignment requirement for textures + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitOverrideDirectiveValues - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGpuOverlap + This option lets the values specified using :py:obj:`~.cudaJitMaxRegisters`, :py:obj:`~.cudaJitThreadsPerBlock`, :py:obj:`~.cudaJitMaxThreadsPerBlock` and :py:obj:`~.cudaJitMinCtaPerSm` take precedence over any PTX directives. (0: Disable, default; 1: Enable) Option type: int - Device can possibly copy memory and execute a kernel concurrently + Applies to: compiler only +.. autoclass:: cuda.bindings.runtime.cudaLibraryOption - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMultiProcessorCount + .. autoattribute:: cuda.bindings.runtime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable - Number of multiprocessors on device + .. autoattribute:: cuda.bindings.runtime.cudaLibraryOption.cudaLibraryBinaryIsPreserved - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrKernelExecTimeout + 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 - Specifies whether there is a run time limit on kernels + .. autoattribute:: cuda.bindings.runtime.cudaJit_CacheMode.cudaJitCacheOptionNone - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrIntegrated + Compile with no -dlcm flag specified - Device is integrated with host memory + .. autoattribute:: cuda.bindings.runtime.cudaJit_CacheMode.cudaJitCacheOptionCG - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCanMapHostMemory + Compile with L1 cache disabled - Device can map host memory into CUDA address space + .. autoattribute:: cuda.bindings.runtime.cudaJit_CacheMode.cudaJitCacheOptionCA - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrComputeMode + Compile with L1 cache enabled +.. autoclass:: cuda.bindings.runtime.cudaJit_Fallback - Compute mode (See :py:obj:`~.cudaComputeMode` for details) + .. autoattribute:: cuda.bindings.runtime.cudaJit_Fallback.cudaPreferPtx - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture1DWidth + Prefer to compile ptx if exact binary match not found - Maximum 1D texture width + .. autoattribute:: cuda.bindings.runtime.cudaJit_Fallback.cudaPreferBinary - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DWidth + Prefer to fall back to compatible binary code if exact match not found +.. autoclass:: cuda.bindings.runtime.cudaCGScope - Maximum 2D texture width + .. autoattribute:: cuda.bindings.runtime.cudaCGScope.cudaCGScopeInvalid - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DHeight + Invalid cooperative group scope - Maximum 2D texture height + .. autoattribute:: cuda.bindings.runtime.cudaCGScope.cudaCGScopeGrid - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DWidth + Scope represented by a grid_group - Maximum 3D texture width + .. autoattribute:: cuda.bindings.runtime.cudaCGScope.cudaCGScopeMultiGrid - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DHeight + Scope represented by a multi_grid_group +.. autoclass:: cuda.bindings.runtime.cudaGraphConditionalHandleFlags - Maximum 3D texture height + .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalHandleFlags.cudaGraphCondAssignDefault - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DDepth + Apply default handle value when graph is launched. +.. autoclass:: cuda.bindings.runtime.cudaGraphConditionalNodeType - Maximum 3D texture depth + .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeIf - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredWidth + 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. - Maximum 2D layered texture width + .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeWhile - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredHeight + Conditional 'while' Node. Body executed repeatedly while condition value is non-zero. - Maximum 2D layered texture height + .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeSwitch - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredLayers + Conditional 'switch' Node. Body[n] is executed once, where 'n' is the value of the condition. If the condition does not match a body index, no body is launched. +.. autoclass:: cuda.bindings.runtime.cudaGraphNodeType - Maximum layers in a 2D layered texture + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeKernel - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrSurfaceAlignment + GPU kernel node - Alignment requirement for surfaces + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeMemcpy - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrConcurrentKernels + Memcpy node - Device can possibly execute multiple kernels concurrently + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeMemset - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrEccEnabled + Memset node - Device has ECC support enabled + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeHost - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrPciBusId + Host (executable) node - PCI bus ID of the device + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeGraph - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrPciDeviceId + Node which executes an embedded graph - PCI device ID of the device + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeEmpty - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrTccDriver + Empty (no-op) node - Device is using TCC driver model + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeWaitEvent - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMemoryClockRate + External event wait node - Peak memory clock frequency in kilohertz + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeEventRecord - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGlobalMemoryBusWidth + External event record node - Global memory bus width in bits + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeExtSemaphoreSignal - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrL2CacheSize + External semaphore signal node - Size of L2 cache in bytes + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeExtSemaphoreWait - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxThreadsPerMultiProcessor + External semaphore wait node - Maximum resident threads per multiprocessor + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeMemAlloc - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrAsyncEngineCount + Memory allocation node - Number of asynchronous engines + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeMemFree - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrUnifiedAddressing + Memory free node - Device shares a unified address space with the host + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeConditional - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLayeredWidth + Conditional node May be used to implement a conditional execution path or loop + inside of a graph. The graph(s) contained within the body of the conditional node - Maximum 1D layered texture width + can be selectively executed or iterated upon based on the value of a conditional + variable. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLayeredLayers - Maximum layers in a 1D layered texture + Handles must be created in advance of creating the node + using :py:obj:`~.cudaGraphConditionalHandleCreate`. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DGatherWidth - Maximum 2D texture width if cudaArrayTextureGather is set + The following restrictions apply to graphs which contain conditional nodes: + The graph cannot be used in a child node. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DGatherHeight + Only one instantiation of the graph may exist at any point in time. + The graph cannot be cloned. - Maximum 2D texture height if cudaArrayTextureGather is set - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DWidthAlt + To set the control value, supply a default value when creating the handle and/or + call :py:obj:`~.cudaGraphSetConditional` from device code. - Alternate maximum 3D texture width + .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeCount - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DHeightAlt +.. autoclass:: cuda.bindings.runtime.cudaGraphChildGraphNodeOwnership + .. autoattribute:: cuda.bindings.runtime.cudaGraphChildGraphNodeOwnership.cudaGraphChildGraphOwnershipClone - Alternate maximum 3D texture height + Default behavior for a child graph node. Child graph is cloned into the parent and memory allocation/free nodes can't be present in the child graph. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture3DDepthAlt + .. autoattribute:: cuda.bindings.runtime.cudaGraphChildGraphNodeOwnership.cudaGraphChildGraphOwnershipMove - Alternate maximum 3D texture depth + The child graph is moved to the parent. The handle to the child graph is owned by the parent and will be destroyed when the parent is destroyed. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrPciDomainId - PCI domain ID of the device + The following restrictions apply to child graphs after they have been moved: Cannot be independently instantiated or destroyed; Cannot be added as a child graph of a separate parent graph; Cannot be used as an argument to cudaGraphExecUpdate; Cannot have additional memory allocation or free nodes added. +.. autoclass:: cuda.bindings.runtime.cudaGraphDependencyType - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrTexturePitchAlignment + .. autoattribute:: cuda.bindings.runtime.cudaGraphDependencyType.cudaGraphDependencyTypeDefault - Pitch alignment requirement for textures + This is an ordinary dependency. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphDependencyType.cudaGraphDependencyTypeProgrammatic - Maximum cubemap texture width/height + 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 - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapLayeredWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateSuccess - Maximum cubemap layered texture width/height + The update succeeded - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapLayeredLayers + .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateError - Maximum layers in a cubemap layered texture + The update failed for an unexpected reason which is described in the return value of the function - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface1DWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorTopologyChanged - Maximum 1D surface width + The update failed because the topology changed - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface2DWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorNodeTypeChanged - Maximum 2D surface width + The update failed because a node type changed - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface2DHeight + .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorFunctionChanged - Maximum 2D surface height + The update failed because the function of a kernel node changed (CUDA driver < 11.2) - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface3DWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorParametersChanged - Maximum 3D surface width + The update failed because the parameters changed in a way that is not supported - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface3DHeight + .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorNotSupported - Maximum 3D surface height + The update failed because something about the node is not supported - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface3DDepth + .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorUnsupportedFunctionChange - Maximum 3D surface depth + The update failed because the function of a kernel node changed in an unsupported way - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface1DLayeredWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorAttributesChanged - Maximum 1D layered surface width + The update failed because the node attributes changed in a way that is not supported +.. autoclass:: cuda.bindings.runtime.cudaGraphInstantiateResult - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface1DLayeredLayers + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateSuccess - Maximum layers in a 1D layered surface + Instantiation succeeded - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateError - Maximum 2D layered surface width + Instantiation failed for an unexpected reason which is described in the return value of the function - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredHeight + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateInvalidStructure - Maximum 2D layered surface height + Instantiation failed due to invalid structure, such as cycles - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredLayers + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateNodeOperationNotSupported - Maximum layers in a 2D layered surface + Instantiation for device launch failed because the graph contained an unsupported operation - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateMultipleDevicesNotSupported - Maximum cubemap surface width + Instantiation for device launch failed due to the nodes belonging to different contexts - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapLayeredWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateConditionalHandleUnused - Maximum cubemap layered surface width + One or more conditional handles are not associated with conditional nodes +.. autoclass:: cuda.bindings.runtime.cudaGraphKernelNodeField - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapLayeredLayers + .. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldInvalid - Maximum layers in a cubemap layered surface + Invalid field - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLinearWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldGridDim - Maximum 1D linear texture width + Grid dimension update - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearWidth + .. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldParam - Maximum 2D linear texture width + Kernel parameter update - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearHeight + .. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldEnabled - Maximum 2D linear texture height + Node enable/disable +.. autoclass:: cuda.bindings.runtime.cudaGetDriverEntryPointFlags - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearPitch + .. autoattribute:: cuda.bindings.runtime.cudaGetDriverEntryPointFlags.cudaEnableDefault - Maximum 2D linear texture pitch in bytes + Default search mode for driver symbols. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DMipmappedWidth + .. autoattribute:: cuda.bindings.runtime.cudaGetDriverEntryPointFlags.cudaEnableLegacyStream - Maximum mipmapped 2D texture width + Search for legacy versions of driver symbols. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture2DMipmappedHeight + .. autoattribute:: cuda.bindings.runtime.cudaGetDriverEntryPointFlags.cudaEnablePerThreadDefaultStream - Maximum mipmapped 2D texture height + Search for per-thread versions of driver symbols. +.. autoclass:: cuda.bindings.runtime.cudaDriverEntryPointQueryResult - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrComputeCapabilityMajor + .. autoattribute:: cuda.bindings.runtime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointSuccess - Major compute capability version number + Search for symbol found a match - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrComputeCapabilityMinor + .. autoattribute:: cuda.bindings.runtime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointSymbolNotFound - Minor compute capability version number + Search for symbol was not found - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTexture1DMipmappedWidth + .. autoattribute:: cuda.bindings.runtime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointVersionNotSufficent - Maximum mipmapped 1D texture width + Search for symbol was found but version wasn't great enough +.. autoclass:: cuda.bindings.runtime.cudaGraphDebugDotFlags - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrStreamPrioritiesSupported + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsVerbose - Device supports stream priorities + Output all debug data as if every debug flag is enabled - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGlobalL1CacheSupported + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsKernelNodeParams - Device supports caching globals in L1 + Adds :py:obj:`~.cudaKernelNodeParams` to output - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrLocalL1CacheSupported + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsMemcpyNodeParams - Device supports caching locals in L1 + Adds :py:obj:`~.cudaMemcpy3DParms` to output - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerMultiprocessor + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsMemsetNodeParams - Maximum shared memory available per multiprocessor in bytes + Adds :py:obj:`~.cudaMemsetParams` to output - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxRegistersPerMultiprocessor + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsHostNodeParams - Maximum number of 32-bit registers available per multiprocessor + Adds :py:obj:`~.cudaHostNodeParams` to output - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrManagedMemory + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsEventNodeParams - Device can allocate managed memory on this system + Adds :py:obj:`~.cudaEvent_t` handle from record and wait nodes to output - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrIsMultiGpuBoard + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasSignalNodeParams - Device is on a multi-GPU board + Adds :py:obj:`~.cudaExternalSemaphoreSignalNodeParams` values to output - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMultiGpuBoardGroupID + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasWaitNodeParams - Unique identifier for a group of devices on the same multi-GPU board + Adds :py:obj:`~.cudaExternalSemaphoreWaitNodeParams` to output - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostNativeAtomicSupported + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsKernelNodeAttributes - Link between the device and the host supports native atomic operations + Adds cudaKernelNodeAttrID values to output - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrSingleToDoublePrecisionPerfRatio + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsHandles - Ratio of single precision performance (in floating-point operations per second) to double precision performance + Adds node handles and every kernel function handle to output - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrPageableMemoryAccess + .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsConditionalNodeParams - Device supports coherently accessing pageable memory without calling cudaHostRegister on it + Adds :py:obj:`~.cudaConditionalNodeParams` to output +.. autoclass:: cuda.bindings.runtime.cudaGraphInstantiateFlags - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrConcurrentManagedAccess + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagAutoFreeOnLaunch - Device can coherently access managed memory concurrently with the CPU + Automatically free memory allocated in a graph before relaunching. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrComputePreemptionSupported + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagUpload - Device supports Compute Preemption + Automatically upload the graph after instantiation. Only supported by + :py:obj:`~.cudaGraphInstantiateWithParams`. The upload will be performed using the - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCanUseHostPointerForRegisteredMem + stream provided in ``instantiateParams``. - Device can access host registered memory at the same virtual address as the CPU + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagDeviceLaunch - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved92 + Instantiate the graph to be launchable from the device. This flag can only + be used on platforms which support unified addressing. This flag cannot be - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved93 + used in conjunction with cudaGraphInstantiateFlagAutoFreeOnLaunch. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved94 + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagUseNodePriority - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCooperativeLaunch + Run the graph using the per-node priority attributes rather than the priority of the stream it is launched into. +.. autoclass:: cuda.bindings.runtime.cudaLaunchMemSyncDomain - Device supports launching cooperative kernels via :py:obj:`~.cudaLaunchCooperativeKernel` + .. autoattribute:: cuda.bindings.runtime.cudaLaunchMemSyncDomain.cudaLaunchMemSyncDomainDefault - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCooperativeMultiDeviceLaunch + Launch kernels in the default domain - Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated. + .. autoattribute:: cuda.bindings.runtime.cudaLaunchMemSyncDomain.cudaLaunchMemSyncDomainRemote - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerBlockOptin + Launch kernels in the remote domain +.. autoclass:: cuda.bindings.runtime.cudaLaunchAttributeID - The maximum optin shared memory per block. This value may vary by chip. See :py:obj:`~.cudaFuncSetAttribute` + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCanFlushRemoteWrites + Ignored entry, for convenient composition - Device supports flushing of outstanding remote writes. + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostRegisterSupported + Valid for streams, graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`. - Device supports host memory registration via :py:obj:`~.cudaHostRegister`. + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrPageableMemoryAccessUsesHostPageTables + Valid for graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.cooperative`. - Device accesses pageable memory via the host's page tables. + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrDirectManagedMemAccessFromHost + Valid for streams. See :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`. - Host can directly access managed memory on the device without migration. + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxBlocksPerMultiprocessor + Valid for graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.clusterDim`. - Maximum number of blocks per multiprocessor + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxPersistingL2CacheSize + Valid for graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`. - Maximum L2 persisting lines capacity setting in bytes. + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxAccessPolicyWindowSize + Valid for launches. Setting :py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed` to non-0 signals that the kernel will use programmatic means to resolve its stream dependency, so that the CUDA runtime should opportunistically allow the grid's execution to overlap with the previous kernel in the stream, if that kernel requests the overlap. The dependent launches can choose to wait on the dependency using the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX instructions). - Maximum value of :py:obj:`~.cudaAccessPolicyWindow.num_bytes`. + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReservedSharedMemoryPerBlock + Valid for launches. Set :py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the event. Event recorded through this launch attribute is guaranteed to only trigger after all block in the associated kernel trigger the event. A block can trigger the event programmatically in a future CUDA release. A trigger can also be inserted at the beginning of each block's execution if triggerAtBlockStart is set to non-0. The dependent launches can choose to wait on the dependency using the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX instructions). Note that dependents (including the CPU thread calling :py:obj:`~.cudaEventSynchronize()`) are not guaranteed to observe the release precisely when it is released. For example, :py:obj:`~.cudaEventSynchronize()` may only observe the event trigger long after the associated kernel has completed. This recording type is primarily meant for establishing programmatic dependency between device tasks. Note also this type of dependency allows, but does not guarantee, concurrent execution of tasks. + 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). - Shared memory reserved by CUDA driver per block in bytes + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributePriority - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrSparseCudaArraySupported + Valid for streams, graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.priority`. - Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostRegisterReadOnlySupported + Valid for streams, graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`. - Device supports using the :py:obj:`~.cudaHostRegister` flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrTimelineSemaphoreInteropSupported + Valid for streams, graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. - External timeline semaphore interop is supported on the device + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMaxTimelineSemaphoreInteropSupported + Valid for graph nodes and launches. Set :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow the kernel launch to specify a preferred substitute cluster dimension. Blocks may be grouped according to either the dimensions specified with this attribute (grouped into a "preferred substitute cluster"), or the one specified with :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped into a "regular cluster"). The cluster dimensions of a "preferred substitute cluster" shall be an integer multiple greater than zero of the regular cluster dimensions. The device will attempt - on a best-effort basis - to group thread blocks into preferred clusters over grouping them into regular clusters. When it deems necessary (primarily when the device temporarily runs out of physical resources to launch the larger preferred clusters), the device may switch to launch the regular clusters instead to attempt to utilize as much of the physical device resources as possible. - Deprecated, External timeline semaphore interop is supported on the device + 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. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMemoryPoolsSupported + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent - Device supports using the :py:obj:`~.cudaMallocAsync` and :py:obj:`~.cudaMemPool` family of APIs + Valid for launches. Set :py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record the event. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMASupported + 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. - Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information) + 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). - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMAFlushWritesOptions + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode - The returned attribute shall be interpreted as a bitmask, where the individual bits are listed in the :py:obj:`~.cudaFlushGPUDirectRDMAWritesOptions` enum + Valid for graph nodes, launches. This attribute is graphs-only, and passing it to a launch in a non-capturing stream will result in an error. + :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can only be set to 0 or 1. Setting the field to 1 indicates that the corresponding kernel node should be device-updatable. On success, a handle will be returned via :py:obj:`~.cudaLaunchAttributeValue.deviceUpdatableKernelNode.devNode` which can be passed to the various device-side update functions to update the node's kernel parameters from within another kernel. For more information on the types of device updates that can be made, as well as the relevant limitations thereof, see :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMAWritesOrdering + Nodes which are device-updatable have additional restrictions compared to regular kernel nodes. Firstly, device-updatable nodes cannot be removed from their graph via :py:obj:`~.cudaGraphDestroyNode`. Additionally, once opted-in to this functionality, a node cannot opt out, and any attempt to set the deviceUpdatable attribute to 0 will result in an error. Device-updatable kernel nodes also cannot have their attributes copied to/from another kernel node via :py:obj:`~.cudaGraphKernelNodeCopyAttributes`. Graphs containing one or more device-updatable nodes also do not allow multiple instantiation, and neither the graph nor its instantiated version can be passed to :py:obj:`~.cudaGraphExecUpdate`. + If a graph contains device-updatable nodes and updates those nodes from the device from within the graph, the graph must be uploaded with :py:obj:`~.cuGraphUpload` before it is launched. For such a graph, if host-side executable graph updates are made to the device-updatable nodes, the graph must be uploaded before it is launched again. - GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute. See :py:obj:`~.cudaGPUDirectRDMAWritesOrdering` for the numerical values returned here. + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMemoryPoolSupportedHandleTypes + Valid for launches. On devices where the L1 cache and shared memory use the same hardware resources, setting :py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a percentage between 0-100 signals sets the shared memory carveout preference in percent of the total shared memory for that kernel launch. This attribute takes precedence over :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`. This is only a hint, and the driver can choose a different configuration if required for the launch. - Handle types supported with mempool based IPC +.. autoclass:: cuda.bindings.runtime.cudaDeviceNumaConfig + .. autoattribute:: cuda.bindings.runtime.cudaDeviceNumaConfig.cudaDeviceNumaConfigNone - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrClusterLaunch + The GPU is not a NUMA node - Indicates device supports cluster launch + .. autoattribute:: cuda.bindings.runtime.cudaDeviceNumaConfig.cudaDeviceNumaConfigNumaNode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrDeferredMappingCudaArraySupported + The GPU is a NUMA node, cudaDevAttrNumaId contains its NUMA ID - Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays +.. autoclass:: cuda.bindings.runtime.cudaAsyncNotificationType + .. autoattribute:: cuda.bindings.runtime.cudaAsyncNotificationType.cudaAsyncNotificationTypeOverBudget - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved122 + Sent when the process has exceeded its device memory budget - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved123 +.. autoclass:: cuda.bindings.runtime.cudaSurfaceBoundaryMode + .. autoattribute:: cuda.bindings.runtime.cudaSurfaceBoundaryMode.cudaBoundaryModeZero - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved124 + Zero boundary mode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrIpcEventSupport + .. autoattribute:: cuda.bindings.runtime.cudaSurfaceBoundaryMode.cudaBoundaryModeClamp - Device supports IPC Events. + Clamp boundary mode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMemSyncDomainCount + .. autoattribute:: cuda.bindings.runtime.cudaSurfaceBoundaryMode.cudaBoundaryModeTrap - Number of memory synchronization domains the device supports. + Trap boundary mode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved127 +.. autoclass:: cuda.bindings.runtime.cudaSurfaceFormatMode + .. autoattribute:: cuda.bindings.runtime.cudaSurfaceFormatMode.cudaFormatModeForced - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved128 + Forced format mode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved129 + .. autoattribute:: cuda.bindings.runtime.cudaSurfaceFormatMode.cudaFormatModeAuto - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrNumaConfig + Auto format mode - NUMA configuration of a device: value is of type :py:obj:`~.cudaDeviceNumaConfig` enum +.. autoclass:: cuda.bindings.runtime.cudaTextureAddressMode + .. autoattribute:: cuda.bindings.runtime.cudaTextureAddressMode.cudaAddressModeWrap - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrNumaId + Wrapping address mode - NUMA node ID of the GPU memory + .. autoattribute:: cuda.bindings.runtime.cudaTextureAddressMode.cudaAddressModeClamp - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved132 + Clamp to edge address mode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMpsEnabled + .. autoattribute:: cuda.bindings.runtime.cudaTextureAddressMode.cudaAddressModeMirror - Contexts created on this device will be shared via MPS + Mirror address mode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostNumaId + .. autoattribute:: cuda.bindings.runtime.cudaTextureAddressMode.cudaAddressModeBorder - NUMA ID of the host node closest to the device or -1 when system does not support NUMA + Border address mode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrD3D12CigSupported +.. autoclass:: cuda.bindings.runtime.cudaTextureFilterMode + .. autoattribute:: cuda.bindings.runtime.cudaTextureFilterMode.cudaFilterModePoint - Device supports CIG with D3D12. + Point filter mode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrVulkanCigSupported + .. autoattribute:: cuda.bindings.runtime.cudaTextureFilterMode.cudaFilterModeLinear - Device supports CIG with Vulkan. + Linear filter mode - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGpuPciDeviceId +.. autoclass:: cuda.bindings.runtime.cudaTextureReadMode + .. autoattribute:: cuda.bindings.runtime.cudaTextureReadMode.cudaReadModeElementType - The combined 16-bit PCI device ID and 16-bit PCI vendor ID. + Read texture as specified element type - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGpuPciSubsystemId + .. autoattribute:: cuda.bindings.runtime.cudaTextureReadMode.cudaReadModeNormalizedFloat - The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID. + Read texture as normalized float - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrReserved141 +.. autoclass:: cuda.bindings.runtime.cudaEglFrameType + .. autoattribute:: cuda.bindings.runtime.cudaEglFrameType.cudaEglFrameTypeArray - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostNumaMemoryPoolsSupported + Frame type CUDA array - Device supports HOST_NUMA location with the :py:obj:`~.cudaMallocAsync` and :py:obj:`~.cudaMemPool` family of APIs + .. autoattribute:: cuda.bindings.runtime.cudaEglFrameType.cudaEglFrameTypePitch - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostNumaMultinodeIpcSupported + Frame type CUDA pointer - Device supports HostNuma location IPC between nodes in a multi-node system. +.. autoclass:: cuda.bindings.runtime.cudaEglResourceLocationFlags + .. autoattribute:: cuda.bindings.runtime.cudaEglResourceLocationFlags.cudaEglResourceLocationSysmem - .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMax -.. autoclass:: cuda.bindings.runtime.cudaMemPoolAttr + Resource location sysmem - .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolReuseFollowEventDependencies + .. autoattribute:: cuda.bindings.runtime.cudaEglResourceLocationFlags.cudaEglResourceLocationVidmem - (value type = int) Allow cuMemAllocAsync to use memory asynchronously freed in another streams as long as a stream ordering dependency of the allocating stream on the free action exists. Cuda events and null stream interactions can create the required stream ordered dependencies. (default enabled) + Resource location vidmem - .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolReuseAllowOpportunistic +.. autoclass:: cuda.bindings.runtime.cudaEglColorFormat + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420Planar - (value type = int) Allow reuse of already completed frees when there is no dependency between the free and allocation. (default enabled) + Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolReuseAllowInternalDependencies + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420SemiPlanar - (value type = int) Allow cuMemAllocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by cuFreeAsync (default enabled). + Y, UV in two surfaces (UV as one surface) with VU byte ordering, width, height ratio same as YUV420Planar. - .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrReleaseThreshold + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV422Planar - (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) + Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrReservedMemCurrent + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV422SemiPlanar - (value type = cuuint64_t) Amount of backing memory currently allocated for the mempool. + Y, UV in two surfaces with VU byte ordering, width, height ratio same as YUV422Planar. - .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrReservedMemHigh + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatARGB - (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. + R/G/B/A four channels in one surface with BGRA byte ordering. - .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrUsedMemCurrent + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatRGBA - (value type = cuuint64_t) Amount of memory from the pool that is currently in use by the application. + R/G/B/A four channels in one surface with ABGR byte ordering. - .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrUsedMemHigh + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatL - (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. -.. autoclass:: cuda.bindings.runtime.cudaMemLocationType + single luminance channel in one surface. - .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeInvalid + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatR - .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeDevice + single color channel in one surface. - Location is a device location, thus id is a device ordinal + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV444Planar - .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeHost + Y, U, V in three surfaces, each in a separate surface, U/V width = Y width, U/V height = Y height. - Location is host, id is ignored + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV444SemiPlanar - .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeHostNuma + Y, UV in two surfaces (UV as one surface) with VU byte ordering, width, height ratio same as YUV444Planar. - Location is a host NUMA node, thus id is a host NUMA node id + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUYV422 - .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeHostNumaCurrent + Y, U, V in one surface, interleaved as UYVY in one channel. - Location is the host NUMA node closest to the current thread's CPU, id is ignored -.. autoclass:: cuda.bindings.runtime.cudaMemAccessFlags + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY422 - .. autoattribute:: cuda.bindings.runtime.cudaMemAccessFlags.cudaMemAccessFlagsProtNone + Y, U, V in one surface, interleaved as YUYV in one channel. - Default, make the address range not accessible + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatABGR - .. autoattribute:: cuda.bindings.runtime.cudaMemAccessFlags.cudaMemAccessFlagsProtRead + R/G/B/A four channels in one surface with RGBA byte ordering. - Make the address range read accessible + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBGRA - .. autoattribute:: cuda.bindings.runtime.cudaMemAccessFlags.cudaMemAccessFlagsProtReadWrite + R/G/B/A four channels in one surface with ARGB byte ordering. - Make the address range read-write accessible -.. autoclass:: cuda.bindings.runtime.cudaMemAllocationType + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatA - .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationType.cudaMemAllocationTypeInvalid + Alpha color format - one channel in one surface. - .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationType.cudaMemAllocationTypePinned + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatRG - This allocation type is 'pinned', i.e. cannot migrate from its current location while the application is actively using it + R/G color format - two channels in one surface with GR byte ordering - .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationType.cudaMemAllocationTypeMax -.. autoclass:: cuda.bindings.runtime.cudaMemAllocationHandleType + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatAYUV - .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypeNone + Y, U, V, A four channels in one surface, interleaved as VUYA. - Does not allow any export mechanism. > + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU444SemiPlanar - .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypePosixFileDescriptor + Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. - Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int) + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU422SemiPlanar - .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypeWin32 + Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = Y height. - Allows a Win32 NT handle to be used for exporting. (HANDLE) + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420SemiPlanar - .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypeWin32Kmt + Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE) + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_444SemiPlanar - .. autoattribute:: cuda.bindings.runtime.cudaMemAllocationHandleType.cudaMemHandleTypeFabric + Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. - Allows a fabric handle to be used for exporting. (cudaMemFabricHandle_t) -.. autoclass:: cuda.bindings.runtime.cudaGraphMemAttributeType + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_420SemiPlanar - .. autoattribute:: cuda.bindings.runtime.cudaGraphMemAttributeType.cudaGraphMemAttrUsedMemCurrent + Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - (value type = cuuint64_t) Amount of memory, in bytes, currently associated with graphs. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_444SemiPlanar - .. autoattribute:: cuda.bindings.runtime.cudaGraphMemAttributeType.cudaGraphMemAttrUsedMemHigh + Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. - (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. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_420SemiPlanar - .. autoattribute:: cuda.bindings.runtime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemCurrent + Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - (value type = cuuint64_t) Amount of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatVYUY_ER - .. autoattribute:: cuda.bindings.runtime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemHigh + Extended Range Y, U, V in one surface, interleaved as YVYU in one channel. - (value type = cuuint64_t) High watermark of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator. -.. autoclass:: cuda.bindings.runtime.cudaMemcpyFlags + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY_ER - .. autoattribute:: cuda.bindings.runtime.cudaMemcpyFlags.cudaMemcpyFlagDefault + Extended Range Y, U, V in one surface, interleaved as YUYV in one channel. - .. autoattribute:: cuda.bindings.runtime.cudaMemcpyFlags.cudaMemcpyFlagPreferOverlapWithCompute + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUYV_ER - Hint to the driver to try and overlap the copy with compute work on the SMs. -.. autoclass:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder + Extended Range Y, U, V in one surface, interleaved as UYVY in one channel. - .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderInvalid + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVYU_ER - Default invalid. + Extended Range Y, U, V in one surface, interleaved as VYUY in one channel. - .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderStream + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUVA_ER - Indicates that access to the source pointer must be in stream order. + Extended Range Y, U, V, A four channels in one surface, interleaved as AVUY. - .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderDuringApiCall + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatAYUV_ER - Indicates that access to the source pointer can be out of stream order and all accesses must be complete before the API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it's known that no prior operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the need for the user to synchronize the stream after the API call. + Extended Range Y, U, V, A four channels in one surface, interleaved as VUYA. - .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderAny + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV444Planar_ER - Indicates that access to the source pointer can be out of stream order and the accesses can happen even after the API call returns. This flag is suited for host pointers allocated outside CUDA (ex., via malloc) when it's known that no prior operations in the stream can be accessing the memory. Specifying this flag allows the driver to optimize the copy on certain platforms. + Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderMax -.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DOperandType + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV422Planar_ER - .. autoattribute:: cuda.bindings.runtime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypePointer + Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V height = Y height. - Memcpy operand is a valid pointer. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420Planar_ER - .. autoattribute:: cuda.bindings.runtime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeArray + Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - Memcpy operand is a CUarray. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV444SemiPlanar_ER - .. autoattribute:: cuda.bindings.runtime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeMax -.. autoclass:: cuda.bindings.runtime.cudaDeviceP2PAttr + Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceP2PAttr.cudaDevP2PAttrPerformanceRank + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV422SemiPlanar_ER - A relative value indicating the performance of the link between two devices + Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = 1/2 Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceP2PAttr.cudaDevP2PAttrAccessSupported + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420SemiPlanar_ER - Peer access is enabled + Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceP2PAttr.cudaDevP2PAttrNativeAtomicSupported + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU444Planar_ER - Native atomic operation over the link supported + Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaDeviceP2PAttr.cudaDevP2PAttrCudaArrayAccessSupported + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU422Planar_ER - Accessing CUDA arrays over the link supported -.. autoclass:: cuda.bindings.runtime.cudaExternalMemoryHandleType + Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueFd + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420Planar_ER - Handle is an opaque file descriptor + Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueWin32 + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU444SemiPlanar_ER - Handle is an opaque shared NT handle + Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueWin32Kmt + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU422SemiPlanar_ER - Handle is an opaque, globally shared handle + Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D12Heap + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420SemiPlanar_ER - Handle is a D3D12 heap object + Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D12Resource + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerRGGB - Handle is a D3D12 committed resource + Bayer format - one channel in one surface with interleaved RGGB ordering. - .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D11Resource + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerBGGR - Handle is a shared NT handle to a D3D11 resource + Bayer format - one channel in one surface with interleaved BGGR ordering. - .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D11ResourceKmt + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerGRBG - Handle is a globally shared handle to a D3D11 resource + Bayer format - one channel in one surface with interleaved GRBG ordering. - .. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeNvSciBuf + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerGBRG - Handle is an NvSciBuf object -.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType + Bayer format - one channel in one surface with interleaved GBRG ordering. - .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueFd + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer10RGGB - Handle is an opaque file descriptor + Bayer10 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 10 bits used 6 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueWin32 + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer10BGGR - Handle is an opaque shared NT handle + Bayer10 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 10 bits used 6 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer10GRBG - Handle is an opaque, globally shared handle + Bayer10 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 10 bits used 6 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeD3D12Fence + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer10GBRG - Handle is a shared NT handle referencing a D3D12 fence object + Bayer10 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 10 bits used 6 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeD3D11Fence + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12RGGB - Handle is a shared NT handle referencing a D3D11 fence object + Bayer12 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 12 bits used 4 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeNvSciSync + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12BGGR - Opaque handle to NvSciSync Object + Bayer12 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 12 bits used 4 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeKeyedMutex + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12GRBG - Handle is a shared NT handle referencing a D3D11 keyed mutex object + Bayer12 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 12 bits used 4 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeKeyedMutexKmt + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12GBRG - Handle is a shared KMT handle referencing a D3D11 keyed mutex object + Bayer12 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 12 bits used 4 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer14RGGB - Handle is an opaque handle file descriptor referencing a timeline semaphore + Bayer14 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 14 bits used 2 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer14BGGR - Handle is an opaque handle file descriptor referencing a timeline semaphore -.. autoclass:: cuda.bindings.runtime.cudaJitOption + Bayer14 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 14 bits used 2 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitMaxRegisters + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer14GRBG - Max number of registers that a thread may use. - Option type: unsigned int + Bayer14 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 14 bits used 2 bits No-op. - Applies to: compiler only + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer14GBRG - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitThreadsPerBlock + Bayer14 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 14 bits used 2 bits No-op. - IN: Specifies minimum number of threads per block to target compilation for - OUT: Returns the number of threads the compiler actually targeted. This restricts the resource utilization of the compiler (e.g. max registers) such that a block with the given number of threads should be able to launch based on register limitations. Note, this option does not currently take into account any other resource limitations, such as shared memory utilization. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer20RGGB - Option type: unsigned int - Applies to: compiler only + Bayer20 format - one channel in one surface with interleaved RGGB ordering. Out of 32 bits, 20 bits used 12 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitWallTime + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer20BGGR - Overwrites the option value with the total wall clock time, in milliseconds, spent in the compiler and linker + Bayer20 format - one channel in one surface with interleaved BGGR ordering. Out of 32 bits, 20 bits used 12 bits No-op. - Option type: float - Applies to: compiler and linker + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer20GRBG - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitInfoLogBuffer + Bayer20 format - one channel in one surface with interleaved GRBG ordering. Out of 32 bits, 20 bits used 12 bits No-op. - 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`) + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer20GBRG - Option type: char * - Applies to: compiler and linker + Bayer20 format - one channel in one surface with interleaved GBRG ordering. Out of 32 bits, 20 bits used 12 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitInfoLogBufferSizeBytes + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU444Planar - IN: Log buffer size in bytes. Log messages will be capped at this size (including null terminator) + Y, V, U in three surfaces, each in a separate surface, U/V width = Y width, U/V height = Y height. - OUT: Amount of log buffer filled with messages - Option type: unsigned int + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU422Planar - Applies to: compiler and linker + Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitErrorLogBuffer + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420Planar - 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 * + Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - Applies to: compiler and linker + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerIspRGGB - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitErrorLogBufferSizeBytes + Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved RGGB ordering and mapped to opaque integer datatype. - IN: Log buffer size in bytes. Log messages will be capped at this size (including null terminator) - OUT: Amount of log buffer filled with messages + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerIspBGGR - Option type: unsigned int - Applies to: compiler and linker + Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved BGGR ordering and mapped to opaque integer datatype. - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitOptimizationLevel + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerIspGRBG - Level of optimizations to apply to generated code (0 - 4), with 4 being the default and highest level of optimizations. + Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved GRBG ordering and mapped to opaque integer datatype. - Option type: unsigned int - Applies to: compiler only + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerIspGBRG - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitFallbackStrategy + Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved GBRG ordering and mapped to opaque integer datatype. - Specifies choice of fallback strategy if matching cubin is not found. Choice is based on supplied :py:obj:`~.cudaJit_Fallback`. Option type: unsigned int for enumerated type :py:obj:`~.cudaJit_Fallback` + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerBCCR - Applies to: compiler only + Bayer format - one channel in one surface with interleaved BCCR ordering. - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitGenerateDebugInfo + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerRCCB - Specifies whether to create debug information in output (-g) (0: false, default) - Option type: int + Bayer format - one channel in one surface with interleaved RCCB ordering. - Applies to: compiler and linker + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerCRBC - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitLogVerbose + Bayer format - one channel in one surface with interleaved CRBC ordering. - Generate verbose log messages (0: false, default) - Option type: int + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayerCBRC - Applies to: compiler and linker + Bayer format - one channel in one surface with interleaved CBRC ordering. - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitGenerateLineInfo + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer10CCCC - Generate line number information (-lineinfo) (0: false, default) - Option type: int + Bayer10 format - one channel in one surface with interleaved CCCC ordering. Out of 16 bits, 10 bits used 6 bits No-op. - Applies to: compiler only + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12BCCR - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitCacheMode + Bayer12 format - one channel in one surface with interleaved BCCR ordering. Out of 16 bits, 12 bits used 4 bits No-op. - Specifies whether to enable caching explicitly (-dlcm) - Choice is based on supplied :py:obj:`~.cudaJit_CacheMode`. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12RCCB - Option type: unsigned int for enumerated type :py:obj:`~.cudaJit_CacheMode` - Applies to: compiler only + Bayer12 format - one channel in one surface with interleaved RCCB ordering. Out of 16 bits, 12 bits used 4 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitPositionIndependentCode + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12CRBC - Generate position independent code (0: false) + Bayer12 format - one channel in one surface with interleaved CRBC ordering. Out of 16 bits, 12 bits used 4 bits No-op. - Option type: int - Applies to: compiler only + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12CBRC - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitMinCtaPerSm + Bayer12 format - one channel in one surface with interleaved CBRC ordering. Out of 16 bits, 12 bits used 4 bits No-op. - This option hints to the JIT compiler the minimum number of CTAs from the kernel’s grid to be mapped to a SM. This option is ignored when used together with :py:obj:`~.cudaJitMaxRegisters` or :py:obj:`~.cudaJitThreadsPerBlock`. Optimizations based on this option need :py:obj:`~.cudaJitMaxThreadsPerBlock` to be specified as well. For kernels already using PTX directive .minnctapersm, this option will be ignored by default. Use :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take precedence over the PTX directive. Option type: unsigned int + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatBayer12CCCC - Applies to: compiler only + Bayer12 format - one channel in one surface with interleaved CCCC ordering. Out of 16 bits, 12 bits used 4 bits No-op. - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitMaxThreadsPerBlock + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY - Maximum number threads in a thread block, computed as the product of the maximum extent specifed for each dimension of the block. This limit is guaranteed not to be exeeded in any invocation of the kernel. Exceeding the the maximum number of threads results in runtime error or kernel launch failure. For kernels already using PTX directive .maxntid, this option will be ignored by default. Use :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take precedence over the PTX directive. Option type: int - Applies to: compiler only + Color format for single Y plane. - .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitOverrideDirectiveValues + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420SemiPlanar_2020 - This option lets the values specified using :py:obj:`~.cudaJitMaxRegisters`, :py:obj:`~.cudaJitThreadsPerBlock`, :py:obj:`~.cudaJitMaxThreadsPerBlock` and :py:obj:`~.cudaJitMinCtaPerSm` take precedence over any PTX directives. (0: Disable, default; 1: Enable) Option type: int + Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. - Applies to: compiler only -.. autoclass:: cuda.bindings.runtime.cudaLibraryOption + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420SemiPlanar_2020 - .. autoattribute:: cuda.bindings.runtime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable + Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaLibraryOption.cudaLibraryBinaryIsPreserved + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420Planar_2020 - 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 + Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaJit_CacheMode.cudaJitCacheOptionNone + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420Planar_2020 - Compile with no -dlcm flag specified + Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaJit_CacheMode.cudaJitCacheOptionCG + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420SemiPlanar_709 - Compile with L1 cache disabled + Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaJit_CacheMode.cudaJitCacheOptionCA + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420SemiPlanar_709 - Compile with L1 cache enabled -.. autoclass:: cuda.bindings.runtime.cudaJit_Fallback + Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaJit_Fallback.cudaPreferPtx + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUV420Planar_709 - Prefer to compile ptx if exact binary match not found + Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaJit_Fallback.cudaPreferBinary + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVU420Planar_709 - Prefer to fall back to compatible binary code if exact match not found -.. autoclass:: cuda.bindings.runtime.cudaCGScope + Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaCGScope.cudaCGScopeInvalid + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_420SemiPlanar_709 - Invalid cooperative group scope + Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaCGScope.cudaCGScopeGrid + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_420SemiPlanar_2020 - Scope represented by a grid_group + Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaCGScope.cudaCGScopeMultiGrid + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_422SemiPlanar_2020 - Scope represented by a multi_grid_group -.. autoclass:: cuda.bindings.runtime.cudaGraphConditionalHandleFlags + Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalHandleFlags.cudaGraphCondAssignDefault + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_422SemiPlanar - Apply default handle value when graph is launched. -.. autoclass:: cuda.bindings.runtime.cudaGraphConditionalNodeType + Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeIf + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_422SemiPlanar_709 - 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. + Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeWhile + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY_ER - Conditional 'while' Node. Body executed repeatedly while condition value is non-zero. + Extended Range Color format for single Y plane. - .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeSwitch + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY_709_ER - Conditional 'switch' Node. Body[n] is executed once, where 'n' is the value of the condition. If the condition does not match a body index, no body is launched. -.. autoclass:: cuda.bindings.runtime.cudaGraphNodeType + Extended Range Color format for single Y plane. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeKernel + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10_ER - GPU kernel node + Extended Range Color format for single Y10 plane. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeMemcpy + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10_709_ER - Memcpy node + Extended Range Color format for single Y10 plane. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeMemset + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12_ER - Memset node + Extended Range Color format for single Y12 plane. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeHost + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12_709_ER - Host (executable) node + Extended Range Color format for single Y12 plane. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeGraph + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYUVA - Node which executes an embedded graph + Y, U, V, A four channels in one surface, interleaved as AVUY. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeEmpty + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatYVYU - Empty (no-op) node + Y, U, V in one surface, interleaved as YVYU in one channel. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeWaitEvent + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatVYUY - External event wait node + Y, U, V in one surface, interleaved as VYUY in one channel. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeEventRecord + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_420SemiPlanar_ER - External event record node + Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeExtSemaphoreSignal + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER - External semaphore signal node + Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeExtSemaphoreWait + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_444SemiPlanar_ER - External semaphore wait node + Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeMemAlloc + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER - Memory allocation node + Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeMemFree + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_420SemiPlanar_ER - Memory free node + Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeConditional + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER - Conditional node May be used to implement a conditional execution path or loop - inside of a graph. The graph(s) contained within the body of the conditional node + Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height. - can be selectively executed or iterated upon based on the value of a conditional - variable. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_444SemiPlanar_ER + Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. - Handles must be created in advance of creating the node - using :py:obj:`~.cudaGraphConditionalHandleCreate`. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER + Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. - The following restrictions apply to graphs which contain conditional nodes: - The graph cannot be used in a child node. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY709 - Only one instantiation of the graph may exist at any point in time. - The graph cannot be cloned. + Y, U, V in one surface, interleaved as UYVY in one channel. + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY709_ER - To set the control value, supply a default value when creating the handle and/or - call :py:obj:`~.cudaGraphSetConditional` from device code. + Extended Range Y, U, V in one surface, interleaved as UYVY in one channel. - .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeCount + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY2020 -.. autoclass:: cuda.bindings.runtime.cudaGraphChildGraphNodeOwnership - .. autoattribute:: cuda.bindings.runtime.cudaGraphChildGraphNodeOwnership.cudaGraphChildGraphOwnershipClone + Y, U, V in one surface, interleaved as UYVY in one channel. +.. autoclass:: cuda.bindings.runtime.cudaArray_t +.. autoclass:: cuda.bindings.runtime.cudaArray_const_t +.. autoclass:: cuda.bindings.runtime.cudaMipmappedArray_t +.. autoclass:: cuda.bindings.runtime.cudaMipmappedArray_const_t +.. autoclass:: cuda.bindings.runtime.cudaHostFn_t +.. autoclass:: cuda.bindings.runtime.CUuuid +.. autoclass:: cuda.bindings.runtime.cudaUUID_t +.. autoclass:: cuda.bindings.runtime.cudaIpcEventHandle_t +.. autoclass:: cuda.bindings.runtime.cudaIpcMemHandle_t +.. autoclass:: cuda.bindings.runtime.cudaMemFabricHandle_t +.. autoclass:: cuda.bindings.runtime.cudaStream_t +.. autoclass:: cuda.bindings.runtime.cudaEvent_t +.. autoclass:: cuda.bindings.runtime.cudaGraphicsResource_t +.. autoclass:: cuda.bindings.runtime.cudaExternalMemory_t +.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphore_t +.. autoclass:: cuda.bindings.runtime.cudaGraph_t +.. autoclass:: cuda.bindings.runtime.cudaGraphNode_t +.. autoclass:: cuda.bindings.runtime.cudaUserObject_t +.. autoclass:: cuda.bindings.runtime.cudaGraphConditionalHandle +.. autoclass:: cuda.bindings.runtime.cudaFunction_t +.. autoclass:: cuda.bindings.runtime.cudaKernel_t +.. autoclass:: cuda.bindings.runtime.cudaLibrary_t +.. autoclass:: cuda.bindings.runtime.cudaMemPool_t +.. autoclass:: cuda.bindings.runtime.cudaGraphEdgeData +.. autoclass:: cuda.bindings.runtime.cudaGraphExec_t +.. autoclass:: cuda.bindings.runtime.cudaGraphInstantiateParams +.. autoclass:: cuda.bindings.runtime.cudaGraphExecUpdateResultInfo +.. autoclass:: cuda.bindings.runtime.cudaGraphDeviceNode_t +.. autoclass:: cuda.bindings.runtime.cudaLaunchMemSyncDomainMap +.. autoclass:: cuda.bindings.runtime.cudaLaunchAttributeValue +.. autoclass:: cuda.bindings.runtime.cudaLaunchAttribute +.. autoclass:: cuda.bindings.runtime.cudaAsyncCallbackHandle_t +.. autoclass:: cuda.bindings.runtime.cudaAsyncNotificationInfo_t +.. autoclass:: cuda.bindings.runtime.cudaAsyncCallback +.. autoclass:: cuda.bindings.runtime.cudaSurfaceObject_t +.. autoclass:: cuda.bindings.runtime.cudaTextureObject_t +.. autoclass:: cuda.bindings.runtime.cudaEglPlaneDesc +.. autoclass:: cuda.bindings.runtime.cudaEglFrame +.. autoclass:: cuda.bindings.runtime.cudaEglStreamConnection +.. autoattribute:: cuda.bindings.runtime.cudaHostAllocDefault - Default behavior for a child graph node. Child graph is cloned into the parent and memory allocation/free nodes can't be present in the child graph. + Default page-locked allocation flag +.. autoattribute:: cuda.bindings.runtime.cudaHostAllocPortable - .. autoattribute:: cuda.bindings.runtime.cudaGraphChildGraphNodeOwnership.cudaGraphChildGraphOwnershipMove + Pinned memory accessible by all CUDA contexts +.. autoattribute:: cuda.bindings.runtime.cudaHostAllocMapped - The child graph is moved to the parent. The handle to the child graph is owned by the parent and will be destroyed when the parent is destroyed. + Map allocation into device space +.. autoattribute:: cuda.bindings.runtime.cudaHostAllocWriteCombined + Write-combined memory - The following restrictions apply to child graphs after they have been moved: Cannot be independently instantiated or destroyed; Cannot be added as a child graph of a separate parent graph; Cannot be used as an argument to cudaGraphExecUpdate; Cannot have additional memory allocation or free nodes added. +.. autoattribute:: cuda.bindings.runtime.cudaHostRegisterDefault -.. autoclass:: cuda.bindings.runtime.cudaGraphDependencyType + Default host memory registration flag - .. autoattribute:: cuda.bindings.runtime.cudaGraphDependencyType.cudaGraphDependencyTypeDefault +.. autoattribute:: cuda.bindings.runtime.cudaHostRegisterPortable + Pinned memory accessible by all CUDA contexts - This is an ordinary dependency. +.. autoattribute:: cuda.bindings.runtime.cudaHostRegisterMapped + Map registered memory into device space - .. autoattribute:: cuda.bindings.runtime.cudaGraphDependencyType.cudaGraphDependencyTypeProgrammatic +.. autoattribute:: cuda.bindings.runtime.cudaHostRegisterIoMemory + Memory-mapped I/O space - 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. +.. autoattribute:: cuda.bindings.runtime.cudaHostRegisterReadOnly -.. autoclass:: cuda.bindings.runtime.cudaGraphExecUpdateResult + Memory-mapped read-only - .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateSuccess +.. autoattribute:: cuda.bindings.runtime.cudaPeerAccessDefault + Default peer addressing enable flag - The update succeeded +.. autoattribute:: cuda.bindings.runtime.cudaStreamDefault + Default stream flag - .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateError +.. autoattribute:: cuda.bindings.runtime.cudaStreamNonBlocking + Stream does not synchronize with stream 0 (the NULL stream) - The update failed for an unexpected reason which is described in the return value of the function +.. autoattribute:: cuda.bindings.runtime.cudaStreamLegacy + Legacy stream handle - .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorTopologyChanged - The update failed because the topology changed + Stream handle that can be passed as a :py:obj:`~.cudaStream_t` to use an implicit stream with legacy synchronization behavior. - .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorNodeTypeChanged + See details of the \link_sync_behavior - The update failed because a node type changed +.. autoattribute:: cuda.bindings.runtime.cudaStreamPerThread + Per-thread stream handle - .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorFunctionChanged - The update failed because the function of a kernel node changed (CUDA driver < 11.2) + Stream handle that can be passed as a :py:obj:`~.cudaStream_t` to use an implicit stream with per-thread synchronization behavior. - .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorParametersChanged + See details of the \link_sync_behavior - The update failed because the parameters changed in a way that is not supported +.. autoattribute:: cuda.bindings.runtime.cudaEventDefault + Default event flag - .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorNotSupported +.. autoattribute:: cuda.bindings.runtime.cudaEventBlockingSync + Event uses blocking synchronization - The update failed because something about the node is not supported +.. autoattribute:: cuda.bindings.runtime.cudaEventDisableTiming + Event will not record timing data - .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorUnsupportedFunctionChange +.. autoattribute:: cuda.bindings.runtime.cudaEventInterprocess + Event is suitable for interprocess use. cudaEventDisableTiming must be set - The update failed because the function of a kernel node changed in an unsupported way +.. autoattribute:: cuda.bindings.runtime.cudaEventRecordDefault + Default event record flag - .. autoattribute:: cuda.bindings.runtime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorAttributesChanged +.. autoattribute:: cuda.bindings.runtime.cudaEventRecordExternal + Event is captured in the graph as an external event node when performing stream capture - The update failed because the node attributes changed in a way that is not supported +.. autoattribute:: cuda.bindings.runtime.cudaEventWaitDefault -.. autoclass:: cuda.bindings.runtime.cudaGraphInstantiateResult + Default event wait flag - .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateSuccess +.. autoattribute:: cuda.bindings.runtime.cudaEventWaitExternal + Event is captured in the graph as an external event node when performing stream capture - Instantiation succeeded +.. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleAuto + Device flag - Automatic scheduling - .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateError +.. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleSpin + Device flag - Spin default scheduling - Instantiation failed for an unexpected reason which is described in the return value of the function +.. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleYield + Device flag - Yield default scheduling - .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateInvalidStructure +.. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleBlockingSync + Device flag - Use blocking synchronization - Instantiation failed due to invalid structure, such as cycles +.. autoattribute:: cuda.bindings.runtime.cudaDeviceBlockingSync + Device flag - Use blocking synchronization - .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateNodeOperationNotSupported + [Deprecated] +.. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleMask - Instantiation for device launch failed because the graph contained an unsupported operation + Device schedule flags mask +.. autoattribute:: cuda.bindings.runtime.cudaDeviceMapHost - .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateMultipleDevicesNotSupported + Device flag - Support mapped pinned allocations +.. autoattribute:: cuda.bindings.runtime.cudaDeviceLmemResizeToMax - Instantiation for device launch failed due to the nodes belonging to different contexts + Device flag - Keep local memory allocation after launch +.. autoattribute:: cuda.bindings.runtime.cudaDeviceSyncMemops - .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateConditionalHandleUnused + Device flag - Ensure synchronous memory operations on this context will synchronize +.. autoattribute:: cuda.bindings.runtime.cudaDeviceMask - One or more conditional handles are not associated with conditional nodes + Device flags mask -.. autoclass:: cuda.bindings.runtime.cudaGraphKernelNodeField +.. autoattribute:: cuda.bindings.runtime.cudaArrayDefault - .. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldInvalid + Default CUDA array allocation flag +.. autoattribute:: cuda.bindings.runtime.cudaArrayLayered - Invalid field + Must be set in cudaMalloc3DArray to create a layered CUDA array +.. autoattribute:: cuda.bindings.runtime.cudaArraySurfaceLoadStore - .. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldGridDim + Must be set in cudaMallocArray or cudaMalloc3DArray in order to bind surfaces to the CUDA array +.. autoattribute:: cuda.bindings.runtime.cudaArrayCubemap - Grid dimension update + Must be set in cudaMalloc3DArray to create a cubemap CUDA array +.. autoattribute:: cuda.bindings.runtime.cudaArrayTextureGather - .. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldParam + Must be set in cudaMallocArray or cudaMalloc3DArray in order to perform texture gather operations on the CUDA array +.. autoattribute:: cuda.bindings.runtime.cudaArrayColorAttachment - Kernel parameter update + Must be set in cudaExternalMemoryGetMappedMipmappedArray if the mipmapped array is used as a color target in a graphics API +.. autoattribute:: cuda.bindings.runtime.cudaArraySparse - .. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldEnabled + Must be set in cudaMallocArray, cudaMalloc3DArray or cudaMallocMipmappedArray in order to create a sparse CUDA array or CUDA mipmapped array +.. autoattribute:: cuda.bindings.runtime.cudaArrayDeferredMapping - Node enable/disable + Must be set in cudaMallocArray, cudaMalloc3DArray or cudaMallocMipmappedArray in order to create a deferred mapping CUDA array or CUDA mipmapped array -.. autoclass:: cuda.bindings.runtime.cudaGetDriverEntryPointFlags +.. autoattribute:: cuda.bindings.runtime.cudaIpcMemLazyEnablePeerAccess - .. autoattribute:: cuda.bindings.runtime.cudaGetDriverEntryPointFlags.cudaEnableDefault + Automatically enable peer access between remote devices as needed +.. autoattribute:: cuda.bindings.runtime.cudaMemAttachGlobal - Default search mode for driver symbols. + Memory can be accessed by any stream on any device +.. autoattribute:: cuda.bindings.runtime.cudaMemAttachHost - .. autoattribute:: cuda.bindings.runtime.cudaGetDriverEntryPointFlags.cudaEnableLegacyStream + Memory cannot be accessed by any stream on any device +.. autoattribute:: cuda.bindings.runtime.cudaMemAttachSingle - Search for legacy versions of driver symbols. + Memory can only be accessed by a single stream on the associated device +.. autoattribute:: cuda.bindings.runtime.cudaOccupancyDefault - .. autoattribute:: cuda.bindings.runtime.cudaGetDriverEntryPointFlags.cudaEnablePerThreadDefaultStream + Default behavior +.. autoattribute:: cuda.bindings.runtime.cudaOccupancyDisableCachingOverride - Search for per-thread versions of driver symbols. + Assume global caching is enabled and cannot be automatically turned off -.. autoclass:: cuda.bindings.runtime.cudaDriverEntryPointQueryResult +.. autoattribute:: cuda.bindings.runtime.cudaCpuDeviceId - .. autoattribute:: cuda.bindings.runtime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointSuccess + Device id that represents the CPU +.. autoattribute:: cuda.bindings.runtime.cudaInvalidDeviceId - Search for symbol found a match + Device id that represents an invalid device +.. autoattribute:: cuda.bindings.runtime.cudaInitDeviceFlagsAreValid - .. autoattribute:: cuda.bindings.runtime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointSymbolNotFound + Tell the CUDA runtime that DeviceFlags is being set in cudaInitDevice call +.. autoattribute:: cuda.bindings.runtime.cudaCooperativeLaunchMultiDeviceNoPreSync - Search for symbol was not found + If set, each kernel launched as part of :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` only waits for prior work in the stream corresponding to that GPU to complete before the kernel begins execution. +.. autoattribute:: cuda.bindings.runtime.cudaCooperativeLaunchMultiDeviceNoPostSync - .. autoattribute:: cuda.bindings.runtime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointVersionNotSufficent + If set, any subsequent work pushed in a stream that participated in a call to :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` will only wait for the kernel launched on the GPU corresponding to that stream to complete before it begins execution. +.. autoattribute:: cuda.bindings.runtime.cudaArraySparsePropertiesSingleMipTail - Search for symbol was found but version wasn't great enough + Indicates that the layered sparse CUDA array or CUDA mipmapped array has a single mip tail region for all layers -.. autoclass:: cuda.bindings.runtime.cudaGraphDebugDotFlags +.. autoattribute:: cuda.bindings.runtime.CUDART_CB +.. autoattribute:: cuda.bindings.runtime.cudaMemPoolCreateUsageHwDecompress - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsVerbose + This flag, if set, indicates that the memory will be used as a buffer for hardware accelerated decompression. +.. autoattribute:: cuda.bindings.runtime.CU_UUID_HAS_BEEN_DEFINED - Output all debug data as if every debug flag is enabled + CUDA UUID types +.. autoattribute:: cuda.bindings.runtime.CUDA_IPC_HANDLE_SIZE - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsKernelNodeParams + CUDA IPC Handle Size +.. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryDedicated - Adds :py:obj:`~.cudaKernelNodeParams` to output + Indicates that the external memory object is a dedicated resource +.. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreSignalSkipNvSciBufMemSync - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsMemcpyNodeParams + When the /p flags parameter of :py:obj:`~.cudaExternalSemaphoreSignalParams` 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:`~.cudaExternalMemoryHandleTypeNvSciBuf`, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects. +.. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreWaitSkipNvSciBufMemSync - Adds :py:obj:`~.cudaMemcpy3DParms` to output + When the /p flags parameter of :py:obj:`~.cudaExternalSemaphoreWaitParams` contains this flag, it indicates that waiting an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as :py:obj:`~.cudaExternalMemoryHandleTypeNvSciBuf`, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects. +.. autoattribute:: cuda.bindings.runtime.cudaNvSciSyncAttrSignal - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsMemsetNodeParams + When /p flags of :py:obj:`~.cudaDeviceGetNvSciSyncAttributes` is set to this, it indicates that application need signaler specific NvSciSyncAttr to be filled by :py:obj:`~.cudaDeviceGetNvSciSyncAttributes`. +.. autoattribute:: cuda.bindings.runtime.cudaNvSciSyncAttrWait - Adds :py:obj:`~.cudaMemsetParams` to output + When /p flags of :py:obj:`~.cudaDeviceGetNvSciSyncAttributes` is set to this, it indicates that application need waiter specific NvSciSyncAttr to be filled by :py:obj:`~.cudaDeviceGetNvSciSyncAttributes`. +.. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodePortDefault - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsHostNodeParams + This port activates when the kernel has finished executing. +.. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodePortProgrammatic - Adds :py:obj:`~.cudaHostNodeParams` to output + This port activates when all blocks of the kernel have performed cudaTriggerProgrammaticLaunchCompletion() or have terminated. It must be used with edge type :py:obj:`~.cudaGraphDependencyTypeProgrammatic`. See also :py:obj:`~.cudaLaunchAttributeProgrammaticEvent`. +.. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodePortLaunchCompletion - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsEventNodeParams + This port activates when all blocks of the kernel have begun execution. See also :py:obj:`~.cudaLaunchAttributeLaunchCompletionEvent`. +.. autoattribute:: cuda.bindings.runtime.cudaStreamAttrID +.. autoattribute:: cuda.bindings.runtime.cudaStreamAttributeAccessPolicyWindow +.. autoattribute:: cuda.bindings.runtime.cudaStreamAttributeSynchronizationPolicy +.. autoattribute:: cuda.bindings.runtime.cudaStreamAttributeMemSyncDomainMap +.. autoattribute:: cuda.bindings.runtime.cudaStreamAttributeMemSyncDomain +.. autoattribute:: cuda.bindings.runtime.cudaStreamAttributePriority +.. autoattribute:: cuda.bindings.runtime.cudaStreamAttrValue +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttrID +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeAccessPolicyWindow +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeCooperative +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributePriority +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeClusterDimension +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeClusterSchedulingPolicyPreference +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeMemSyncDomainMap +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeMemSyncDomain +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributePreferredSharedMemoryCarveout +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeDeviceUpdatableKernelNode +.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttrValue +.. autoattribute:: cuda.bindings.runtime.cudaSurfaceType1D +.. autoattribute:: cuda.bindings.runtime.cudaSurfaceType2D +.. autoattribute:: cuda.bindings.runtime.cudaSurfaceType3D +.. autoattribute:: cuda.bindings.runtime.cudaSurfaceTypeCubemap +.. autoattribute:: cuda.bindings.runtime.cudaSurfaceType1DLayered +.. autoattribute:: cuda.bindings.runtime.cudaSurfaceType2DLayered +.. autoattribute:: cuda.bindings.runtime.cudaSurfaceTypeCubemapLayered +.. autoattribute:: cuda.bindings.runtime.cudaTextureType1D +.. autoattribute:: cuda.bindings.runtime.cudaTextureType2D +.. autoattribute:: cuda.bindings.runtime.cudaTextureType3D +.. autoattribute:: cuda.bindings.runtime.cudaTextureTypeCubemap +.. autoattribute:: cuda.bindings.runtime.cudaTextureType1DLayered +.. autoattribute:: cuda.bindings.runtime.cudaTextureType2DLayered +.. autoattribute:: cuda.bindings.runtime.cudaTextureTypeCubemapLayered +.. autoattribute:: cuda.bindings.runtime.CUDA_EGL_MAX_PLANES - Adds cudaEvent_t handle from record and wait nodes to output + Maximum number of planes per frame - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasSignalNodeParams +Device Management +----------------- +impl_private - Adds :py:obj:`~.cudaExternalSemaphoreSignalNodeParams` values to output - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasWaitNodeParams +MANBRIEF device management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - Adds :py:obj:`~.cudaExternalSemaphoreWaitNodeParams` to output +This section describes the device management functions of the CUDA runtime application programming interface. - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsKernelNodeAttributes +.. autofunction:: cuda.bindings.runtime.cudaDeviceReset +.. autofunction:: cuda.bindings.runtime.cudaDeviceSynchronize +.. autofunction:: cuda.bindings.runtime.cudaDeviceSetLimit +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetLimit +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetTexture1DLinearMaxWidth +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetCacheConfig +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetStreamPriorityRange +.. autofunction:: cuda.bindings.runtime.cudaDeviceSetCacheConfig +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetByPCIBusId +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetPCIBusId +.. autofunction:: cuda.bindings.runtime.cudaIpcGetEventHandle +.. autofunction:: cuda.bindings.runtime.cudaIpcOpenEventHandle +.. autofunction:: cuda.bindings.runtime.cudaIpcGetMemHandle +.. autofunction:: cuda.bindings.runtime.cudaIpcOpenMemHandle +.. autofunction:: cuda.bindings.runtime.cudaIpcCloseMemHandle +.. autofunction:: cuda.bindings.runtime.cudaDeviceFlushGPUDirectRDMAWrites +.. autofunction:: cuda.bindings.runtime.cudaDeviceRegisterAsyncNotification +.. autofunction:: cuda.bindings.runtime.cudaDeviceUnregisterAsyncNotification +.. autofunction:: cuda.bindings.runtime.cudaGetDeviceCount +.. autofunction:: cuda.bindings.runtime.cudaGetDeviceProperties +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetAttribute +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetDefaultMemPool +.. autofunction:: cuda.bindings.runtime.cudaDeviceSetMemPool +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetMemPool +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetNvSciSyncAttributes +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetP2PAttribute +.. autofunction:: cuda.bindings.runtime.cudaChooseDevice +.. autofunction:: cuda.bindings.runtime.cudaInitDevice +.. autofunction:: cuda.bindings.runtime.cudaSetDevice +.. autofunction:: cuda.bindings.runtime.cudaGetDevice +.. autofunction:: cuda.bindings.runtime.cudaSetDeviceFlags +.. autofunction:: cuda.bindings.runtime.cudaGetDeviceFlags +Error Handling +-------------- - Adds cudaKernelNodeAttrID values to output +MANBRIEF error handling functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsHandles +This section describes the error handling functions of the CUDA runtime application programming interface. - Adds node handles and every kernel function handle to output +.. autofunction:: cuda.bindings.runtime.cudaGetLastError +.. autofunction:: cuda.bindings.runtime.cudaPeekAtLastError +.. autofunction:: cuda.bindings.runtime.cudaGetErrorName +.. autofunction:: cuda.bindings.runtime.cudaGetErrorString +Stream Management +----------------- - .. autoattribute:: cuda.bindings.runtime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsConditionalNodeParams +MANBRIEF stream management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - Adds :py:obj:`~.cudaConditionalNodeParams` to output -.. autoclass:: cuda.bindings.runtime.cudaGraphInstantiateFlags +This section describes the stream management functions of the CUDA runtime application programming interface. - .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagAutoFreeOnLaunch +.. autoclass:: cuda.bindings.runtime.cudaStreamCallback_t +.. autofunction:: cuda.bindings.runtime.cudaStreamCreate +.. autofunction:: cuda.bindings.runtime.cudaStreamCreateWithFlags +.. autofunction:: cuda.bindings.runtime.cudaStreamCreateWithPriority +.. autofunction:: cuda.bindings.runtime.cudaStreamGetPriority +.. autofunction:: cuda.bindings.runtime.cudaStreamGetFlags +.. autofunction:: cuda.bindings.runtime.cudaStreamGetId +.. autofunction:: cuda.bindings.runtime.cudaStreamGetDevice +.. autofunction:: cuda.bindings.runtime.cudaCtxResetPersistingL2Cache +.. autofunction:: cuda.bindings.runtime.cudaStreamCopyAttributes +.. autofunction:: cuda.bindings.runtime.cudaStreamGetAttribute +.. autofunction:: cuda.bindings.runtime.cudaStreamSetAttribute +.. autofunction:: cuda.bindings.runtime.cudaStreamDestroy +.. autofunction:: cuda.bindings.runtime.cudaStreamWaitEvent +.. autofunction:: cuda.bindings.runtime.cudaStreamAddCallback +.. autofunction:: cuda.bindings.runtime.cudaStreamSynchronize +.. autofunction:: cuda.bindings.runtime.cudaStreamQuery +.. autofunction:: cuda.bindings.runtime.cudaStreamAttachMemAsync +.. autofunction:: cuda.bindings.runtime.cudaStreamBeginCapture +.. autofunction:: cuda.bindings.runtime.cudaStreamBeginCaptureToGraph +.. autofunction:: cuda.bindings.runtime.cudaThreadExchangeStreamCaptureMode +.. autofunction:: cuda.bindings.runtime.cudaStreamEndCapture +.. autofunction:: cuda.bindings.runtime.cudaStreamIsCapturing +.. autofunction:: cuda.bindings.runtime.cudaStreamGetCaptureInfo +.. autofunction:: cuda.bindings.runtime.cudaStreamGetCaptureInfo_v3 +.. autofunction:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependencies +.. autofunction:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependencies_v2 +Event Management +---------------- - Automatically free memory allocated in a graph before relaunching. +MANBRIEF event management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagUpload +This section describes the event management functions of the CUDA runtime application programming interface. - Automatically upload the graph after instantiation. Only supported by +.. autofunction:: cuda.bindings.runtime.cudaEventCreate +.. autofunction:: cuda.bindings.runtime.cudaEventCreateWithFlags +.. autofunction:: cuda.bindings.runtime.cudaEventRecord +.. autofunction:: cuda.bindings.runtime.cudaEventRecordWithFlags +.. autofunction:: cuda.bindings.runtime.cudaEventQuery +.. autofunction:: cuda.bindings.runtime.cudaEventSynchronize +.. autofunction:: cuda.bindings.runtime.cudaEventDestroy +.. autofunction:: cuda.bindings.runtime.cudaEventElapsedTime +.. autofunction:: cuda.bindings.runtime.cudaEventElapsedTime_v2 - :py:obj:`~.cudaGraphInstantiateWithParams`. The upload will be performed using the +External Resource Interoperability +---------------------------------- - stream provided in `instantiateParams`. +MANBRIEF External resource interoperability functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagDeviceLaunch +This section describes the external resource interoperability functions of the CUDA runtime application programming interface. - Instantiate the graph to be launchable from the device. This flag can only +.. autofunction:: cuda.bindings.runtime.cudaImportExternalMemory +.. autofunction:: cuda.bindings.runtime.cudaExternalMemoryGetMappedBuffer +.. autofunction:: cuda.bindings.runtime.cudaExternalMemoryGetMappedMipmappedArray +.. autofunction:: cuda.bindings.runtime.cudaDestroyExternalMemory +.. autofunction:: cuda.bindings.runtime.cudaImportExternalSemaphore +.. autofunction:: cuda.bindings.runtime.cudaSignalExternalSemaphoresAsync +.. autofunction:: cuda.bindings.runtime.cudaWaitExternalSemaphoresAsync +.. autofunction:: cuda.bindings.runtime.cudaDestroyExternalSemaphore - be used on platforms which support unified addressing. This flag cannot be +Execution Control +----------------- - used in conjunction with cudaGraphInstantiateFlagAutoFreeOnLaunch. +MANBRIEF execution control functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagUseNodePriority +This section describes the execution control functions of the CUDA runtime application programming interface. - Run the graph using the per-node priority attributes rather than the priority of the stream it is launched into. -.. autoclass:: cuda.bindings.runtime.cudaLaunchMemSyncDomain - .. autoattribute:: cuda.bindings.runtime.cudaLaunchMemSyncDomain.cudaLaunchMemSyncDomainDefault +Some functions have overloaded C++ API template versions documented separately in the C++ API Routines module. +.. autofunction:: cuda.bindings.runtime.cudaFuncSetCacheConfig +.. autofunction:: cuda.bindings.runtime.cudaFuncGetAttributes +.. autofunction:: cuda.bindings.runtime.cudaFuncSetAttribute +.. autofunction:: cuda.bindings.runtime.cudaLaunchHostFunc - Launch kernels in the default domain +Occupancy +--------- +MANBRIEF occupancy calculation functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - .. autoattribute:: cuda.bindings.runtime.cudaLaunchMemSyncDomain.cudaLaunchMemSyncDomainRemote - Launch kernels in the remote domain +This section describes the occupancy calculation functions of the CUDA runtime application programming interface. -.. autoclass:: cuda.bindings.runtime.cudaLaunchAttributeID - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore +Besides the occupancy calculator functions (cudaOccupancyMaxActiveBlocksPerMultiprocessor and cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags), there are also C++ only occupancy-based launch configuration functions documented in C++ API Routines module. - Ignored entry, for convenient composition - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow +See cudaOccupancyMaxPotentialBlockSize (C++ API), cudaOccupancyMaxPotentialBlockSize (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API) cudaOccupancyAvailableDynamicSMemPerBlock (C++ API), +.. autofunction:: cuda.bindings.runtime.cudaOccupancyMaxActiveBlocksPerMultiprocessor +.. autofunction:: cuda.bindings.runtime.cudaOccupancyAvailableDynamicSMemPerBlock +.. autofunction:: cuda.bindings.runtime.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags - Valid for streams, graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`. +Memory Management +----------------- +MANBRIEF memory management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative - Valid for graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.cooperative`. +This section describes the memory management functions of the CUDA runtime application programming interface. - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy +Some functions have overloaded C++ API template versions documented separately in the C++ API Routines module. - Valid for streams. See :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`. +.. autofunction:: cuda.bindings.runtime.cudaMallocManaged +.. autofunction:: cuda.bindings.runtime.cudaMalloc +.. autofunction:: cuda.bindings.runtime.cudaMallocHost +.. autofunction:: cuda.bindings.runtime.cudaMallocPitch +.. autofunction:: cuda.bindings.runtime.cudaMallocArray +.. autofunction:: cuda.bindings.runtime.cudaFree +.. autofunction:: cuda.bindings.runtime.cudaFreeHost +.. autofunction:: cuda.bindings.runtime.cudaFreeArray +.. autofunction:: cuda.bindings.runtime.cudaFreeMipmappedArray +.. autofunction:: cuda.bindings.runtime.cudaHostAlloc +.. autofunction:: cuda.bindings.runtime.cudaHostRegister +.. autofunction:: cuda.bindings.runtime.cudaHostUnregister +.. autofunction:: cuda.bindings.runtime.cudaHostGetDevicePointer +.. autofunction:: cuda.bindings.runtime.cudaHostGetFlags +.. autofunction:: cuda.bindings.runtime.cudaMalloc3D +.. autofunction:: cuda.bindings.runtime.cudaMalloc3DArray +.. autofunction:: cuda.bindings.runtime.cudaMallocMipmappedArray +.. autofunction:: cuda.bindings.runtime.cudaGetMipmappedArrayLevel +.. autofunction:: cuda.bindings.runtime.cudaMemcpy3D +.. autofunction:: cuda.bindings.runtime.cudaMemcpy3DPeer +.. autofunction:: cuda.bindings.runtime.cudaMemcpy3DAsync +.. autofunction:: cuda.bindings.runtime.cudaMemcpy3DPeerAsync +.. autofunction:: cuda.bindings.runtime.cudaMemGetInfo +.. autofunction:: cuda.bindings.runtime.cudaArrayGetInfo +.. autofunction:: cuda.bindings.runtime.cudaArrayGetPlane +.. autofunction:: cuda.bindings.runtime.cudaArrayGetMemoryRequirements +.. autofunction:: cuda.bindings.runtime.cudaMipmappedArrayGetMemoryRequirements +.. autofunction:: cuda.bindings.runtime.cudaArrayGetSparseProperties +.. autofunction:: cuda.bindings.runtime.cudaMipmappedArrayGetSparseProperties +.. autofunction:: cuda.bindings.runtime.cudaMemcpy +.. autofunction:: cuda.bindings.runtime.cudaMemcpyPeer +.. autofunction:: cuda.bindings.runtime.cudaMemcpy2D +.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DToArray +.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DFromArray +.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DArrayToArray +.. autofunction:: cuda.bindings.runtime.cudaMemcpyAsync +.. autofunction:: cuda.bindings.runtime.cudaMemcpyPeerAsync +.. autofunction:: cuda.bindings.runtime.cudaMemcpyBatchAsync +.. autofunction:: cuda.bindings.runtime.cudaMemcpy3DBatchAsync +.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DAsync +.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DToArrayAsync +.. autofunction:: cuda.bindings.runtime.cudaMemcpy2DFromArrayAsync +.. autofunction:: cuda.bindings.runtime.cudaMemset +.. autofunction:: cuda.bindings.runtime.cudaMemset2D +.. autofunction:: cuda.bindings.runtime.cudaMemset3D +.. autofunction:: cuda.bindings.runtime.cudaMemsetAsync +.. autofunction:: cuda.bindings.runtime.cudaMemset2DAsync +.. autofunction:: cuda.bindings.runtime.cudaMemset3DAsync +.. autofunction:: cuda.bindings.runtime.cudaMemPrefetchAsync +.. autofunction:: cuda.bindings.runtime.cudaMemPrefetchAsync_v2 +.. autofunction:: cuda.bindings.runtime.cudaMemAdvise +.. autofunction:: cuda.bindings.runtime.cudaMemAdvise_v2 +.. autofunction:: cuda.bindings.runtime.cudaMemRangeGetAttribute +.. autofunction:: cuda.bindings.runtime.cudaMemRangeGetAttributes +.. autofunction:: cuda.bindings.runtime.make_cudaPitchedPtr +.. autofunction:: cuda.bindings.runtime.make_cudaPos +.. autofunction:: cuda.bindings.runtime.make_cudaExtent +Stream Ordered Memory Allocator +------------------------------- - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension +MANBRIEF Functions for performing allocation and free operations in stream order. Functions for controlling the behavior of the underlying allocator. (CURRENT_FILE) ENDMANBRIEF - Valid for graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.clusterDim`. - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference +**overview** - Valid for graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`. +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. - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization - Valid for launches. Setting :py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed` to non-0 signals that the kernel will use programmatic means to resolve its stream dependency, so that the CUDA runtime should opportunistically allow the grid's execution to overlap with the previous kernel in the stream, if that kernel requests the overlap. The dependent launches can choose to wait on the dependency using the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX instructions). - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent +**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. - Valid for launches. Set :py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the event. Event recorded through this launch attribute is guaranteed to only trigger after all block in the associated kernel trigger the event. A block can trigger the event programmatically in a future CUDA release. A trigger can also be inserted at the beginning of each block's execution if triggerAtBlockStart is set to non-0. The dependent launches can choose to wait on the dependency using the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX instructions). Note that dependents (including the CPU thread calling :py:obj:`~.cudaEventSynchronize()`) are not guaranteed to observe the release precisely when it is released. For example, :py:obj:`~.cudaEventSynchronize()` may only observe the event trigger long after the associated kernel has completed. This recording type is primarily meant for establishing programmatic dependency between device tasks. Note also this type of dependency allows, but does not guarantee, concurrent execution of tasks. +.. autofunction:: cuda.bindings.runtime.cudaMallocAsync +.. autofunction:: cuda.bindings.runtime.cudaFreeAsync +.. autofunction:: cuda.bindings.runtime.cudaMemPoolTrimTo +.. autofunction:: cuda.bindings.runtime.cudaMemPoolSetAttribute +.. autofunction:: cuda.bindings.runtime.cudaMemPoolGetAttribute +.. autofunction:: cuda.bindings.runtime.cudaMemPoolSetAccess +.. autofunction:: cuda.bindings.runtime.cudaMemPoolGetAccess +.. autofunction:: cuda.bindings.runtime.cudaMemPoolCreate +.. autofunction:: cuda.bindings.runtime.cudaMemPoolDestroy +.. autofunction:: cuda.bindings.runtime.cudaMallocFromPoolAsync +.. autofunction:: cuda.bindings.runtime.cudaMemPoolExportToShareableHandle +.. autofunction:: cuda.bindings.runtime.cudaMemPoolImportFromShareableHandle +.. autofunction:: cuda.bindings.runtime.cudaMemPoolExportPointer +.. autofunction:: cuda.bindings.runtime.cudaMemPoolImportPointer - 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). +Unified Addressing +------------------ +MANBRIEF unified addressing functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributePriority - Valid for streams, graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.priority`. +This section describes the unified addressing functions of the CUDA runtime application programming interface. - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap - Valid for streams, graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`. +**Overview** - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain +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). - Valid for streams, graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension - Valid for graph nodes and launches. Set :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow the kernel launch to specify a preferred substitute cluster dimension. Blocks may be grouped according to either the dimensions specified with this attribute (grouped into a "preferred substitute cluster"), or the one specified with :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped into a "regular cluster"). The cluster dimensions of a "preferred substitute cluster" shall be an integer multiple greater than zero of the regular cluster dimensions. The device will attempt - on a best-effort basis - to group thread blocks into preferred clusters over grouping them into regular clusters. When it deems necessary (primarily when the device temporarily runs out of physical resources to launch the larger preferred clusters), the device may switch to launch the regular clusters instead to attempt to utilize as much of the physical device resources as possible. +**Supported Platforms** - 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. +Whether or not a device supports unified addressing may be queried by calling cudaGetDeviceProperties() with the device property cudaDeviceProp::unifiedAddressing. - 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. +Unified addressing is automatically enabled in 64-bit processes . - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent - Valid for launches. Set :py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record the event. - 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. +**Looking Up Information from Pointer Values** - 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. +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() - 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). +Since pointers are unique, it is not necessary to specify information about the pointers specified to cudaMemcpy() and other copy functions. + The copy direction cudaMemcpyDefault may be used to specify that the CUDA runtime should infer the location of the pointer from its value. - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode - Valid for graph nodes, launches. This attribute is graphs-only, and passing it to a launch in a non-capturing stream will result in an error. - :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can only be set to 0 or 1. Setting the field to 1 indicates that the corresponding kernel node should be device-updatable. On success, a handle will be returned via :py:obj:`~.cudaLaunchAttributeValue`::deviceUpdatableKernelNode::devNode which can be passed to the various device-side update functions to update the node's kernel parameters from within another kernel. For more information on the types of device updates that can be made, as well as the relevant limitations thereof, see :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. - Nodes which are device-updatable have additional restrictions compared to regular kernel nodes. Firstly, device-updatable nodes cannot be removed from their graph via :py:obj:`~.cudaGraphDestroyNode`. Additionally, once opted-in to this functionality, a node cannot opt out, and any attempt to set the deviceUpdatable attribute to 0 will result in an error. Device-updatable kernel nodes also cannot have their attributes copied to/from another kernel node via :py:obj:`~.cudaGraphKernelNodeCopyAttributes`. Graphs containing one or more device-updatable nodes also do not allow multiple instantiation, and neither the graph nor its instantiated version can be passed to :py:obj:`~.cudaGraphExecUpdate`. +**Automatic Mapping of Host Allocated Host Memory** - If a graph contains device-updatable nodes and updates those nodes from the device from within the graph, the graph must be uploaded with :py:obj:`~.cuGraphUpload` before it is launched. For such a graph, if host-side executable graph updates are made to the device-updatable nodes, the graph must be uploaded before it is launched again. +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. - .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout - Valid for launches. On devices where the L1 cache and shared memory use the same hardware resources, setting :py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a percentage between 0-100 signals sets the shared memory carveout preference in percent of the total shared memory for that kernel launch. This attribute takes precedence over :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`. This is only a hint, and the driver can choose a different configuration if required for the launch. +Note that this is not the case for memory allocated using the flag cudaHostAllocWriteCombined, as discussed below. -.. autoclass:: cuda.bindings.runtime.cudaDeviceNumaConfig - .. autoattribute:: cuda.bindings.runtime.cudaDeviceNumaConfig.cudaDeviceNumaConfigNone - The GPU is not a NUMA node +**Direct Access of Peer Memory** - .. autoattribute:: cuda.bindings.runtime.cudaDeviceNumaConfig.cudaDeviceNumaConfigNumaNode +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. - The GPU is a NUMA node, cudaDevAttrNumaId contains its NUMA ID -.. autoclass:: cuda.bindings.runtime.cudaAsyncNotificationType - .. autoattribute:: cuda.bindings.runtime.cudaAsyncNotificationType.cudaAsyncNotificationTypeOverBudget +**Exceptions, Disjoint Addressing** - Sent when the process has exceeded its device memory budget +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. -.. autoclass:: cuda.bindings.runtime.cudaSurfaceBoundaryMode - .. autoattribute:: cuda.bindings.runtime.cudaSurfaceBoundaryMode.cudaBoundaryModeZero +This device address may be queried using cudaHostGetDevicePointer() when a device using unified addressing is current. Either the host or the unified device pointer value may be used to refer to this memory in cudaMemcpy() and similar functions using the cudaMemcpyDefault memory direction. - Zero boundary mode +.. autofunction:: cuda.bindings.runtime.cudaPointerGetAttributes +Peer Device Memory Access +------------------------- - .. autoattribute:: cuda.bindings.runtime.cudaSurfaceBoundaryMode.cudaBoundaryModeClamp +MANBRIEF peer device memory access functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - Clamp boundary mode +This section describes the peer device memory access functions of the CUDA runtime application programming interface. - .. autoattribute:: cuda.bindings.runtime.cudaSurfaceBoundaryMode.cudaBoundaryModeTrap +.. autofunction:: cuda.bindings.runtime.cudaDeviceCanAccessPeer +.. autofunction:: cuda.bindings.runtime.cudaDeviceEnablePeerAccess +.. autofunction:: cuda.bindings.runtime.cudaDeviceDisablePeerAccess +OpenGL Interoperability +----------------------- - Trap boundary mode +impl_private -.. autoclass:: cuda.bindings.runtime.cudaSurfaceFormatMode - .. autoattribute:: cuda.bindings.runtime.cudaSurfaceFormatMode.cudaFormatModeForced +This section describes the OpenGL interoperability functions of the CUDA runtime application programming interface. Note that mapping of OpenGL resources is performed with the graphics API agnostic, resource mapping interface described in Graphics Interopability. - Forced format mode +.. autoclass:: cuda.bindings.runtime.cudaGLDeviceList + .. autoattribute:: cuda.bindings.runtime.cudaGLDeviceList.cudaGLDeviceListAll - .. autoattribute:: cuda.bindings.runtime.cudaSurfaceFormatMode.cudaFormatModeAuto + The CUDA devices for all GPUs used by the current OpenGL context - Auto format mode -.. autoclass:: cuda.bindings.runtime.cudaTextureAddressMode + .. autoattribute:: cuda.bindings.runtime.cudaGLDeviceList.cudaGLDeviceListCurrentFrame - .. autoattribute:: cuda.bindings.runtime.cudaTextureAddressMode.cudaAddressModeWrap + The CUDA devices for the GPUs used by the current OpenGL context in its currently rendering frame - Wrapping address mode + .. autoattribute:: cuda.bindings.runtime.cudaGLDeviceList.cudaGLDeviceListNextFrame - .. autoattribute:: cuda.bindings.runtime.cudaTextureAddressMode.cudaAddressModeClamp + The CUDA devices for the GPUs to be used by the current OpenGL context in the next frame - Clamp to edge address mode +.. autofunction:: cuda.bindings.runtime.cudaGLGetDevices +.. autofunction:: cuda.bindings.runtime.cudaGraphicsGLRegisterImage +.. autofunction:: cuda.bindings.runtime.cudaGraphicsGLRegisterBuffer +Direct3D 9 Interoperability +--------------------------- - .. autoattribute:: cuda.bindings.runtime.cudaTextureAddressMode.cudaAddressModeMirror - Mirror address mode +Direct3D 10 Interoperability +---------------------------- - .. autoattribute:: cuda.bindings.runtime.cudaTextureAddressMode.cudaAddressModeBorder - Border address mode -.. autoclass:: cuda.bindings.runtime.cudaTextureFilterMode +Direct3D 11 Interoperability +---------------------------- - .. autoattribute:: cuda.bindings.runtime.cudaTextureFilterMode.cudaFilterModePoint - Point filter mode +VDPAU Interoperability +---------------------- - .. autoattribute:: cuda.bindings.runtime.cudaTextureFilterMode.cudaFilterModeLinear +This section describes the VDPAU interoperability functions of the CUDA runtime application programming interface. +.. autofunction:: cuda.bindings.runtime.cudaVDPAUGetDevice +.. autofunction:: cuda.bindings.runtime.cudaVDPAUSetVDPAUDevice +.. autofunction:: cuda.bindings.runtime.cudaGraphicsVDPAURegisterVideoSurface +.. autofunction:: cuda.bindings.runtime.cudaGraphicsVDPAURegisterOutputSurface - Linear filter mode +EGL Interoperability +-------------------- -.. autoclass:: cuda.bindings.runtime.cudaTextureReadMode +This section describes the EGL interoperability functions of the CUDA runtime application programming interface. - .. autoattribute:: cuda.bindings.runtime.cudaTextureReadMode.cudaReadModeElementType +.. autofunction:: cuda.bindings.runtime.cudaGraphicsEGLRegisterImage +.. autofunction:: cuda.bindings.runtime.cudaEGLStreamConsumerConnect +.. autofunction:: cuda.bindings.runtime.cudaEGLStreamConsumerConnectWithFlags +.. autofunction:: cuda.bindings.runtime.cudaEGLStreamConsumerDisconnect +.. autofunction:: cuda.bindings.runtime.cudaEGLStreamConsumerAcquireFrame +.. autofunction:: cuda.bindings.runtime.cudaEGLStreamConsumerReleaseFrame +.. autofunction:: cuda.bindings.runtime.cudaEGLStreamProducerConnect +.. autofunction:: cuda.bindings.runtime.cudaEGLStreamProducerDisconnect +.. autofunction:: cuda.bindings.runtime.cudaEGLStreamProducerPresentFrame +.. autofunction:: cuda.bindings.runtime.cudaEGLStreamProducerReturnFrame +.. autofunction:: cuda.bindings.runtime.cudaGraphicsResourceGetMappedEglFrame +.. autofunction:: cuda.bindings.runtime.cudaEventCreateFromEGLSync +Graphics Interoperability +------------------------- - Read texture as specified element type +MANBRIEF graphics interoperability functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - .. autoattribute:: cuda.bindings.runtime.cudaTextureReadMode.cudaReadModeNormalizedFloat +This section describes the graphics interoperability functions of the CUDA runtime application programming interface. - Read texture as normalized float +.. autofunction:: cuda.bindings.runtime.cudaGraphicsUnregisterResource +.. autofunction:: cuda.bindings.runtime.cudaGraphicsResourceSetMapFlags +.. autofunction:: cuda.bindings.runtime.cudaGraphicsMapResources +.. autofunction:: cuda.bindings.runtime.cudaGraphicsUnmapResources +.. autofunction:: cuda.bindings.runtime.cudaGraphicsResourceGetMappedPointer +.. autofunction:: cuda.bindings.runtime.cudaGraphicsSubResourceGetMappedArray +.. autofunction:: cuda.bindings.runtime.cudaGraphicsResourceGetMappedMipmappedArray -.. autoclass:: cuda.bindings.runtime.cudaEglPlaneDesc -.. autoclass:: cuda.bindings.runtime.cudaEglFrame -.. autoclass:: cuda.bindings.runtime.cudaEglStreamConnection -.. autoclass:: cuda.bindings.runtime.cudaArray_t -.. autoclass:: cuda.bindings.runtime.cudaArray_const_t -.. autoclass:: cuda.bindings.runtime.cudaMipmappedArray_t -.. autoclass:: cuda.bindings.runtime.cudaMipmappedArray_const_t -.. autoclass:: cuda.bindings.runtime.cudaHostFn_t -.. autoclass:: cuda.bindings.runtime.CUuuid -.. autoclass:: cuda.bindings.runtime.cudaUUID_t -.. autoclass:: cuda.bindings.runtime.cudaIpcEventHandle_t -.. autoclass:: cuda.bindings.runtime.cudaIpcMemHandle_t -.. autoclass:: cuda.bindings.runtime.cudaMemFabricHandle_t -.. autoclass:: cuda.bindings.runtime.cudaStream_t -.. autoclass:: cuda.bindings.runtime.cudaEvent_t -.. autoclass:: cuda.bindings.runtime.cudaGraphicsResource_t -.. autoclass:: cuda.bindings.runtime.cudaExternalMemory_t -.. autoclass:: cuda.bindings.runtime.cudaExternalSemaphore_t -.. autoclass:: cuda.bindings.runtime.cudaGraph_t -.. autoclass:: cuda.bindings.runtime.cudaGraphNode_t -.. autoclass:: cuda.bindings.runtime.cudaUserObject_t -.. autoclass:: cuda.bindings.runtime.cudaGraphConditionalHandle -.. autoclass:: cuda.bindings.runtime.cudaFunction_t -.. autoclass:: cuda.bindings.runtime.cudaKernel_t -.. autoclass:: cuda.bindings.runtime.cudaLibrary_t -.. autoclass:: cuda.bindings.runtime.cudaMemPool_t -.. autoclass:: cuda.bindings.runtime.cudaGraphEdgeData -.. autoclass:: cuda.bindings.runtime.cudaGraphExec_t -.. autoclass:: cuda.bindings.runtime.cudaGraphInstantiateParams -.. autoclass:: cuda.bindings.runtime.cudaGraphExecUpdateResultInfo -.. autoclass:: cuda.bindings.runtime.cudaGraphDeviceNode_t -.. autoclass:: cuda.bindings.runtime.cudaLaunchMemSyncDomainMap -.. autoclass:: cuda.bindings.runtime.cudaLaunchAttributeValue -.. autoclass:: cuda.bindings.runtime.cudaLaunchAttribute -.. autoclass:: cuda.bindings.runtime.cudaAsyncCallbackHandle_t -.. autoclass:: cuda.bindings.runtime.cudaAsyncNotificationInfo_t -.. autoclass:: cuda.bindings.runtime.cudaAsyncCallback -.. autoclass:: cuda.bindings.runtime.cudaSurfaceObject_t -.. autoclass:: cuda.bindings.runtime.cudaTextureObject_t -.. autoattribute:: cuda.bindings.runtime.CUDA_EGL_MAX_PLANES +Texture Object Management +------------------------- - Maximum number of planes per frame +MANBRIEF texture object management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF -.. autoattribute:: cuda.bindings.runtime.cudaHostAllocDefault - Default page-locked allocation flag -.. autoattribute:: cuda.bindings.runtime.cudaHostAllocPortable +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. - Pinned memory accessible by all CUDA contexts +.. autofunction:: cuda.bindings.runtime.cudaGetChannelDesc +.. autofunction:: cuda.bindings.runtime.cudaCreateChannelDesc +.. autofunction:: cuda.bindings.runtime.cudaCreateTextureObject +.. autofunction:: cuda.bindings.runtime.cudaDestroyTextureObject +.. autofunction:: cuda.bindings.runtime.cudaGetTextureObjectResourceDesc +.. autofunction:: cuda.bindings.runtime.cudaGetTextureObjectTextureDesc +.. autofunction:: cuda.bindings.runtime.cudaGetTextureObjectResourceViewDesc -.. autoattribute:: cuda.bindings.runtime.cudaHostAllocMapped +Surface Object Management +------------------------- - Map allocation into device space +MANBRIEF surface object management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF -.. autoattribute:: cuda.bindings.runtime.cudaHostAllocWriteCombined - Write-combined memory -.. autoattribute:: cuda.bindings.runtime.cudaHostRegisterDefault +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. - Default host memory registration flag +.. autofunction:: cuda.bindings.runtime.cudaCreateSurfaceObject +.. autofunction:: cuda.bindings.runtime.cudaDestroySurfaceObject +.. autofunction:: cuda.bindings.runtime.cudaGetSurfaceObjectResourceDesc -.. autoattribute:: cuda.bindings.runtime.cudaHostRegisterPortable +Version Management +------------------ - Pinned memory accessible by all CUDA contexts -.. autoattribute:: cuda.bindings.runtime.cudaHostRegisterMapped - Map registered memory into device space +.. autofunction:: cuda.bindings.runtime.cudaDriverGetVersion +.. autofunction:: cuda.bindings.runtime.cudaRuntimeGetVersion +.. autofunction:: cuda.bindings.runtime.getLocalRuntimeVersion -.. autoattribute:: cuda.bindings.runtime.cudaHostRegisterIoMemory +Graph Management +---------------- - Memory-mapped I/O space +MANBRIEF graph management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF -.. autoattribute:: cuda.bindings.runtime.cudaHostRegisterReadOnly - Memory-mapped read-only -.. autoattribute:: cuda.bindings.runtime.cudaPeerAccessDefault +This section describes the graph management functions of CUDA runtime application programming interface. - Default peer addressing enable flag +.. autofunction:: cuda.bindings.runtime.cudaGraphCreate +.. autofunction:: cuda.bindings.runtime.cudaGraphAddKernelNode +.. autofunction:: cuda.bindings.runtime.cudaGraphKernelNodeGetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphKernelNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphKernelNodeCopyAttributes +.. autofunction:: cuda.bindings.runtime.cudaGraphKernelNodeGetAttribute +.. autofunction:: cuda.bindings.runtime.cudaGraphKernelNodeSetAttribute +.. autofunction:: cuda.bindings.runtime.cudaGraphAddMemcpyNode +.. autofunction:: cuda.bindings.runtime.cudaGraphAddMemcpyNode1D +.. autofunction:: cuda.bindings.runtime.cudaGraphMemcpyNodeGetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphMemcpyNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphMemcpyNodeSetParams1D +.. autofunction:: cuda.bindings.runtime.cudaGraphAddMemsetNode +.. autofunction:: cuda.bindings.runtime.cudaGraphMemsetNodeGetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphMemsetNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphAddHostNode +.. autofunction:: cuda.bindings.runtime.cudaGraphHostNodeGetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphHostNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphAddChildGraphNode +.. autofunction:: cuda.bindings.runtime.cudaGraphChildGraphNodeGetGraph +.. autofunction:: cuda.bindings.runtime.cudaGraphAddEmptyNode +.. autofunction:: cuda.bindings.runtime.cudaGraphAddEventRecordNode +.. autofunction:: cuda.bindings.runtime.cudaGraphEventRecordNodeGetEvent +.. autofunction:: cuda.bindings.runtime.cudaGraphEventRecordNodeSetEvent +.. autofunction:: cuda.bindings.runtime.cudaGraphAddEventWaitNode +.. autofunction:: cuda.bindings.runtime.cudaGraphEventWaitNodeGetEvent +.. autofunction:: cuda.bindings.runtime.cudaGraphEventWaitNodeSetEvent +.. autofunction:: cuda.bindings.runtime.cudaGraphAddExternalSemaphoresSignalNode +.. autofunction:: cuda.bindings.runtime.cudaGraphExternalSemaphoresSignalNodeGetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphExternalSemaphoresSignalNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphAddExternalSemaphoresWaitNode +.. autofunction:: cuda.bindings.runtime.cudaGraphExternalSemaphoresWaitNodeGetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphExternalSemaphoresWaitNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphAddMemAllocNode +.. autofunction:: cuda.bindings.runtime.cudaGraphMemAllocNodeGetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphAddMemFreeNode +.. autofunction:: cuda.bindings.runtime.cudaGraphMemFreeNodeGetParams +.. autofunction:: cuda.bindings.runtime.cudaDeviceGraphMemTrim +.. autofunction:: cuda.bindings.runtime.cudaDeviceGetGraphMemAttribute +.. autofunction:: cuda.bindings.runtime.cudaDeviceSetGraphMemAttribute +.. autofunction:: cuda.bindings.runtime.cudaGraphClone +.. autofunction:: cuda.bindings.runtime.cudaGraphNodeFindInClone +.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetType +.. autofunction:: cuda.bindings.runtime.cudaGraphGetNodes +.. autofunction:: cuda.bindings.runtime.cudaGraphGetRootNodes +.. autofunction:: cuda.bindings.runtime.cudaGraphGetEdges +.. autofunction:: cuda.bindings.runtime.cudaGraphGetEdges_v2 +.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetDependencies +.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetDependencies_v2 +.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetDependentNodes +.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetDependentNodes_v2 +.. autofunction:: cuda.bindings.runtime.cudaGraphAddDependencies +.. autofunction:: cuda.bindings.runtime.cudaGraphAddDependencies_v2 +.. autofunction:: cuda.bindings.runtime.cudaGraphRemoveDependencies +.. autofunction:: cuda.bindings.runtime.cudaGraphRemoveDependencies_v2 +.. autofunction:: cuda.bindings.runtime.cudaGraphDestroyNode +.. autofunction:: cuda.bindings.runtime.cudaGraphInstantiate +.. autofunction:: cuda.bindings.runtime.cudaGraphInstantiateWithFlags +.. autofunction:: cuda.bindings.runtime.cudaGraphInstantiateWithParams +.. autofunction:: cuda.bindings.runtime.cudaGraphExecGetFlags +.. autofunction:: cuda.bindings.runtime.cudaGraphExecKernelNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphExecMemcpyNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphExecMemcpyNodeSetParams1D +.. autofunction:: cuda.bindings.runtime.cudaGraphExecMemsetNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphExecHostNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphExecChildGraphNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphExecEventRecordNodeSetEvent +.. autofunction:: cuda.bindings.runtime.cudaGraphExecEventWaitNodeSetEvent +.. autofunction:: cuda.bindings.runtime.cudaGraphExecExternalSemaphoresSignalNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphExecExternalSemaphoresWaitNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphNodeSetEnabled +.. autofunction:: cuda.bindings.runtime.cudaGraphNodeGetEnabled +.. autofunction:: cuda.bindings.runtime.cudaGraphExecUpdate +.. autofunction:: cuda.bindings.runtime.cudaGraphUpload +.. autofunction:: cuda.bindings.runtime.cudaGraphLaunch +.. autofunction:: cuda.bindings.runtime.cudaGraphExecDestroy +.. autofunction:: cuda.bindings.runtime.cudaGraphDestroy +.. autofunction:: cuda.bindings.runtime.cudaGraphDebugDotPrint +.. autofunction:: cuda.bindings.runtime.cudaUserObjectCreate +.. autofunction:: cuda.bindings.runtime.cudaUserObjectRetain +.. autofunction:: cuda.bindings.runtime.cudaUserObjectRelease +.. autofunction:: cuda.bindings.runtime.cudaGraphRetainUserObject +.. autofunction:: cuda.bindings.runtime.cudaGraphReleaseUserObject +.. autofunction:: cuda.bindings.runtime.cudaGraphAddNode +.. autofunction:: cuda.bindings.runtime.cudaGraphAddNode_v2 +.. autofunction:: cuda.bindings.runtime.cudaGraphNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphExecNodeSetParams +.. autofunction:: cuda.bindings.runtime.cudaGraphConditionalHandleCreate -.. autoattribute:: cuda.bindings.runtime.cudaStreamDefault +Driver Entry Point Access +------------------------- - Default stream flag +MANBRIEF driver entry point access functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF -.. autoattribute:: cuda.bindings.runtime.cudaStreamNonBlocking - Stream does not synchronize with stream 0 (the NULL stream) -.. autoattribute:: cuda.bindings.runtime.cudaStreamLegacy +This section describes the driver entry point access functions of CUDA runtime application programming interface. - Legacy stream handle +.. autofunction:: cuda.bindings.runtime.cudaGetDriverEntryPoint +.. autofunction:: cuda.bindings.runtime.cudaGetDriverEntryPointByVersion +Library Management +------------------ +MANBRIEF library management functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - Stream handle that can be passed as a cudaStream_t to use an implicit stream with legacy synchronization behavior. +This section describes the library management functions of the CUDA runtime application programming interface. - See details of the \link_sync_behavior +.. autofunction:: cuda.bindings.runtime.cudaLibraryLoadData +.. autofunction:: cuda.bindings.runtime.cudaLibraryLoadFromFile +.. autofunction:: cuda.bindings.runtime.cudaLibraryUnload +.. autofunction:: cuda.bindings.runtime.cudaLibraryGetKernel +.. autofunction:: cuda.bindings.runtime.cudaLibraryGetGlobal +.. autofunction:: cuda.bindings.runtime.cudaLibraryGetManaged +.. autofunction:: cuda.bindings.runtime.cudaLibraryGetUnifiedFunction +.. autofunction:: cuda.bindings.runtime.cudaLibraryGetKernelCount +.. autofunction:: cuda.bindings.runtime.cudaLibraryEnumerateKernels +.. autofunction:: cuda.bindings.runtime.cudaKernelSetAttributeForDevice -.. autoattribute:: cuda.bindings.runtime.cudaStreamPerThread +C++ API Routines +---------------- +C++-style interface built on top of CUDA runtime API. +impl_private - Per-thread stream handle +MANBRIEF C++ high level API functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - Stream handle that can be passed as a cudaStream_t to use an implicit stream with per-thread synchronization behavior. +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. - See details of the \link_sync_behavior -.. autoattribute:: cuda.bindings.runtime.cudaEventDefault +Interactions with the CUDA Driver API +------------------------------------- - Default event flag +MANBRIEF interactions between CUDA Driver API and CUDA Runtime API (CURRENT_FILE) ENDMANBRIEF -.. autoattribute:: cuda.bindings.runtime.cudaEventBlockingSync - Event uses blocking synchronization -.. autoattribute:: cuda.bindings.runtime.cudaEventDisableTiming +This section describes the interactions between the CUDA Driver API and the CUDA Runtime API - Event will not record timing data -.. autoattribute:: cuda.bindings.runtime.cudaEventInterprocess - Event is suitable for interprocess use. cudaEventDisableTiming must be set -.. autoattribute:: cuda.bindings.runtime.cudaEventRecordDefault - Default event record flag +**Primary Contexts** -.. autoattribute:: cuda.bindings.runtime.cudaEventRecordExternal +There exists a one to one relationship between CUDA devices in the CUDA Runtime API and ::CUcontext s in the CUDA Driver API within a process. The specific context which the CUDA Runtime API uses for a device is called the device's primary context. From the perspective of the CUDA Runtime API, a device and its primary context are synonymous. - Event is captured in the graph as an external event node when performing stream capture -.. autoattribute:: cuda.bindings.runtime.cudaEventWaitDefault - Default event wait flag -.. autoattribute:: cuda.bindings.runtime.cudaEventWaitExternal - Event is captured in the graph as an external event node when performing stream capture +**Initialization and Tear-Down** -.. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleAuto +CUDA Runtime API calls operate on the CUDA Driver API ::CUcontext which is current to to the calling host thread. - Device flag - Automatic scheduling +The function cudaInitDevice() ensures that the primary context is initialized for the requested device but does not make it current to the calling thread. -.. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleSpin +The function cudaSetDevice() initializes the primary context for the specified device and makes it current to the calling thread by calling ::cuCtxSetCurrent(). - Device flag - Spin default scheduling +The CUDA Runtime API will automatically initialize the primary context for a device at the first CUDA Runtime API call which requires an active context. 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 for a device will be selected, made current to the calling thread, and initialized. -.. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleYield +The context which the CUDA Runtime API initializes 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. - Device flag - Yield default scheduling +Primary contexts will remain active until they are explicitly deinitialized using cudaDeviceReset(). The function cudaDeviceReset() will deinitialize the primary context for the calling thread's current device immediately. The context will remain current to all of the threads that it was current to. The next CUDA Runtime API call on any thread which requires an active context will trigger the reinitialization of that device's primary context. -.. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleBlockingSync +Note that primary contexts are shared resources. It is recommended that the primary context not be reset except just before exit or to recover from an unspecified launch failure. - Device flag - Use blocking synchronization -.. autoattribute:: cuda.bindings.runtime.cudaDeviceBlockingSync - Device flag - Use blocking synchronization [Deprecated] -.. autoattribute:: cuda.bindings.runtime.cudaDeviceScheduleMask - Device schedule flags mask +**Context Interoperability** -.. autoattribute:: cuda.bindings.runtime.cudaDeviceMapHost +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 that the implicit one-to-one device-to-context mapping for the process provided by the CUDA Runtime API be used. - Device flag - Support mapped pinned allocations +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. -.. autoattribute:: cuda.bindings.runtime.cudaDeviceLmemResizeToMax +The function cudaPointerGetAttributes() will return the error cudaErrorIncompatibleDriverContext if the pointer being queried was allocated by a non-primary context. The function cudaDeviceEnablePeerAccess() and the rest of the peer access API may not be called when a non-primary ::CUcontext is current. - Device flag - Keep local memory allocation after launch + To use the pointer query and peer access APIs with a context created using the CUDA Driver API, it is necessary that the CUDA Driver API be used to access these features. -.. autoattribute:: cuda.bindings.runtime.cudaDeviceSyncMemops +All CUDA Runtime API state (e.g, global variables' addresses and values) travels with its underlying ::CUcontext. In particular, if a ::CUcontext is moved from one thread to another then all CUDA Runtime API state will move to that thread as well. - Device flag - Ensure synchronous memory operations on this context will synchronize +Please note that attaching to legacy contexts (those with a version of 3010 as returned by ::cuCtxGetApiVersion()) is not possible. The CUDA Runtime will return cudaErrorIncompatibleDriverContext in such cases. -.. autoattribute:: cuda.bindings.runtime.cudaDeviceMask - Device flags mask -.. autoattribute:: cuda.bindings.runtime.cudaArrayDefault - Default CUDA array allocation flag -.. autoattribute:: cuda.bindings.runtime.cudaArrayLayered +**Interactions between CUstream and cudaStream_t** - Must be set in cudaMalloc3DArray to create a layered CUDA array +The types ::CUstream and cudaStream_t are identical and may be used interchangeably. -.. autoattribute:: cuda.bindings.runtime.cudaArraySurfaceLoadStore - Must be set in cudaMallocArray or cudaMalloc3DArray in order to bind surfaces to the CUDA array -.. autoattribute:: cuda.bindings.runtime.cudaArrayCubemap - Must be set in cudaMalloc3DArray to create a cubemap CUDA array -.. autoattribute:: cuda.bindings.runtime.cudaArrayTextureGather +**Interactions between CUevent and cudaEvent_t** - Must be set in cudaMallocArray or cudaMalloc3DArray in order to perform texture gather operations on the CUDA array +The types ::CUevent and cudaEvent_t are identical and may be used interchangeably. -.. autoattribute:: cuda.bindings.runtime.cudaArrayColorAttachment - Must be set in cudaExternalMemoryGetMappedMipmappedArray if the mipmapped array is used as a color target in a graphics API -.. autoattribute:: cuda.bindings.runtime.cudaArraySparse - Must be set in cudaMallocArray, cudaMalloc3DArray or cudaMallocMipmappedArray in order to create a sparse CUDA array or CUDA mipmapped array -.. autoattribute:: cuda.bindings.runtime.cudaArrayDeferredMapping +**Interactions between CUarray and cudaArray_t** - Must be set in cudaMallocArray, cudaMalloc3DArray or cudaMallocMipmappedArray in order to create a deferred mapping CUDA array or CUDA mipmapped array +The types ::CUarray and struct ::cudaArray \* represent the same data type and may be used interchangeably by casting the two types between each other. -.. autoattribute:: cuda.bindings.runtime.cudaIpcMemLazyEnablePeerAccess +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 \*. - Automatically enable peer access between remote devices as needed +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 . -.. autoattribute:: cuda.bindings.runtime.cudaMemAttachGlobal - Memory can be accessed by any stream on any device -.. autoattribute:: cuda.bindings.runtime.cudaMemAttachHost - Memory cannot be accessed by any stream on any device -.. autoattribute:: cuda.bindings.runtime.cudaMemAttachSingle +**Interactions between CUgraphicsResource and cudaGraphicsResource_t** - Memory can only be accessed by a single stream on the associated device +The types ::CUgraphicsResource and cudaGraphicsResource_t represent the same data type and may be used interchangeably by casting the two types between each other. -.. autoattribute:: cuda.bindings.runtime.cudaOccupancyDefault +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. - Default behavior +In order to use a cudaGraphicsResource_t in a CUDA Driver API function which takes a ::CUgraphicsResource, it is necessary to explicitly cast the cudaGraphicsResource_t to a ::CUgraphicsResource. -.. autoattribute:: cuda.bindings.runtime.cudaOccupancyDisableCachingOverride - Assume global caching is enabled and cannot be automatically turned off -.. autoattribute:: cuda.bindings.runtime.cudaCpuDeviceId - Device id that represents the CPU -.. autoattribute:: cuda.bindings.runtime.cudaInvalidDeviceId +**Interactions between CUtexObject and cudaTextureObject_t** - Device id that represents an invalid device +The types ::CUtexObject and cudaTextureObject_t represent the same data type and may be used interchangeably by casting the two types between each other. -.. autoattribute:: cuda.bindings.runtime.cudaInitDeviceFlagsAreValid +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. - Tell the CUDA runtime that DeviceFlags is being set in cudaInitDevice call +In order to use a cudaTextureObject_t in a CUDA Driver API function which takes a ::CUtexObject, it is necessary to explicitly cast the cudaTextureObject_t to a ::CUtexObject. -.. autoattribute:: cuda.bindings.runtime.cudaCooperativeLaunchMultiDeviceNoPreSync - If set, each kernel launched as part of :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` only waits for prior work in the stream corresponding to that GPU to complete before the kernel begins execution. -.. autoattribute:: cuda.bindings.runtime.cudaCooperativeLaunchMultiDeviceNoPostSync - If set, any subsequent work pushed in a stream that participated in a call to :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` will only wait for the kernel launched on the GPU corresponding to that stream to complete before it begins execution. -.. autoattribute:: cuda.bindings.runtime.cudaArraySparsePropertiesSingleMipTail +**Interactions between CUsurfObject and cudaSurfaceObject_t** - Indicates that the layered sparse CUDA array or CUDA mipmapped array has a single mip tail region for all layers +The types ::CUsurfObject and cudaSurfaceObject_t represent the same data type and may be used interchangeably by casting the two types between each other. -.. autoattribute:: cuda.bindings.runtime.CUDART_CB -.. autoattribute:: cuda.bindings.runtime.cudaMemPoolCreateUsageHwDecompress +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. - This flag, if set, indicates that the memory will be used as a buffer for hardware accelerated decompression. +In order to use a cudaSurfaceObject_t in a CUDA Driver API function which takes a ::CUsurfObject, it is necessary to explicitly cast the cudaSurfaceObject_t to a ::CUsurfObject. -.. autoattribute:: cuda.bindings.runtime.CU_UUID_HAS_BEEN_DEFINED - CUDA UUID types -.. autoattribute:: cuda.bindings.runtime.CUDA_IPC_HANDLE_SIZE - CUDA IPC Handle Size -.. autoattribute:: cuda.bindings.runtime.cudaExternalMemoryDedicated +**Interactions between CUfunction and cudaFunction_t** - Indicates that the external memory object is a dedicated resource +The types ::CUfunction and cudaFunction_t represent the same data type and may be used interchangeably by casting the two types between each other. -.. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreSignalSkipNvSciBufMemSync +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. - When the /p flags parameter of :py:obj:`~.cudaExternalSemaphoreSignalParams` 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:`~.cudaExternalMemoryHandleTypeNvSciBuf`, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects. -.. autoattribute:: cuda.bindings.runtime.cudaExternalSemaphoreWaitSkipNvSciBufMemSync - When the /p flags parameter of :py:obj:`~.cudaExternalSemaphoreWaitParams` contains this flag, it indicates that waiting an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as :py:obj:`~.cudaExternalMemoryHandleTypeNvSciBuf`, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects. -.. autoattribute:: cuda.bindings.runtime.cudaNvSciSyncAttrSignal - When /p flags of :py:obj:`~.cudaDeviceGetNvSciSyncAttributes` is set to this, it indicates that application need signaler specific NvSciSyncAttr to be filled by :py:obj:`~.cudaDeviceGetNvSciSyncAttributes`. +**Interactions between CUkernel and cudaKernel_t** -.. autoattribute:: cuda.bindings.runtime.cudaNvSciSyncAttrWait +The types ::CUkernel and cudaKernel_t represent the same data type and may be used interchangeably by casting the two types between each other. - When /p flags of :py:obj:`~.cudaDeviceGetNvSciSyncAttributes` is set to this, it indicates that application need waiter specific NvSciSyncAttr to be filled by :py:obj:`~.cudaDeviceGetNvSciSyncAttributes`. +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. -.. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodePortDefault +.. autofunction:: cuda.bindings.runtime.cudaGetKernel - This port activates when the kernel has finished executing. +Profiler Control +---------------- -.. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodePortProgrammatic +MANBRIEF profiler control functions of the CUDA runtime API (CURRENT_FILE) ENDMANBRIEF - This port activates when all blocks of the kernel have performed cudaTriggerProgrammaticLaunchCompletion() or have terminated. It must be used with edge type :py:obj:`~.cudaGraphDependencyTypeProgrammatic`. See also :py:obj:`~.cudaLaunchAttributeProgrammaticEvent`. -.. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodePortLaunchCompletion - This port activates when all blocks of the kernel have begun execution. See also :py:obj:`~.cudaLaunchAttributeLaunchCompletionEvent`. +This section describes the profiler control functions of the CUDA runtime application programming interface. -.. autoattribute:: cuda.bindings.runtime.cudaStreamAttrID -.. autoattribute:: cuda.bindings.runtime.cudaStreamAttributeAccessPolicyWindow -.. autoattribute:: cuda.bindings.runtime.cudaStreamAttributeSynchronizationPolicy -.. autoattribute:: cuda.bindings.runtime.cudaStreamAttributeMemSyncDomainMap -.. autoattribute:: cuda.bindings.runtime.cudaStreamAttributeMemSyncDomain -.. autoattribute:: cuda.bindings.runtime.cudaStreamAttributePriority -.. autoattribute:: cuda.bindings.runtime.cudaStreamAttrValue -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttrID -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeAccessPolicyWindow -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeCooperative -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributePriority -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeClusterDimension -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeClusterSchedulingPolicyPreference -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeMemSyncDomainMap -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeMemSyncDomain -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributePreferredSharedMemoryCarveout -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttributeDeviceUpdatableKernelNode -.. autoattribute:: cuda.bindings.runtime.cudaKernelNodeAttrValue -.. autoattribute:: cuda.bindings.runtime.cudaSurfaceType1D -.. autoattribute:: cuda.bindings.runtime.cudaSurfaceType2D -.. autoattribute:: cuda.bindings.runtime.cudaSurfaceType3D -.. autoattribute:: cuda.bindings.runtime.cudaSurfaceTypeCubemap -.. autoattribute:: cuda.bindings.runtime.cudaSurfaceType1DLayered -.. autoattribute:: cuda.bindings.runtime.cudaSurfaceType2DLayered -.. autoattribute:: cuda.bindings.runtime.cudaSurfaceTypeCubemapLayered -.. autoattribute:: cuda.bindings.runtime.cudaTextureType1D -.. autoattribute:: cuda.bindings.runtime.cudaTextureType2D -.. autoattribute:: cuda.bindings.runtime.cudaTextureType3D -.. autoattribute:: cuda.bindings.runtime.cudaTextureTypeCubemap -.. autoattribute:: cuda.bindings.runtime.cudaTextureType1DLayered -.. autoattribute:: cuda.bindings.runtime.cudaTextureType2DLayered -.. autoattribute:: cuda.bindings.runtime.cudaTextureTypeCubemapLayered +.. autofunction:: cuda.bindings.runtime.cudaProfilerStart +.. autofunction:: cuda.bindings.runtime.cudaProfilerStop 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/release.rst b/cuda_bindings/docs/source/release.rst index 23e1eca8080..8a19737abef 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.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.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.X.Y-notes.rst b/cuda_bindings/docs/source/release/12.X.Y-notes.rst index 411d07b5440..f5e5d00a172 100644 --- a/cuda_bindings/docs/source/release/12.X.Y-notes.rst +++ b/cuda_bindings/docs/source/release/12.X.Y-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/support.rst b/cuda_bindings/docs/source/support.rst index 2aa5896985e..05a60221a05 100644 --- a/cuda_bindings/docs/source/support.rst +++ b/cuda_bindings/docs/source/support.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`` Support Policy ================================ diff --git a/cuda_bindings/docs/source/tips_and_tricks.rst b/cuda_bindings/docs/source/tips_and_tricks.rst index 97f585f9b47..5de1be1bb64 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_test.py b/cuda_bindings/examples/0_Introduction/clock_nvrtc_test.py index 2fa3ff0f664..dcf94438fdd 100644 --- a/cuda_bindings/examples/0_Introduction/clock_nvrtc_test.py +++ b/cuda_bindings/examples/0_Introduction/clock_nvrtc_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import platform import numpy as np diff --git a/cuda_bindings/examples/0_Introduction/simpleCubemapTexture_test.py b/cuda_bindings/examples/0_Introduction/simpleCubemapTexture_test.py index c3cf369a143..8cc409a4000 100644 --- a/cuda_bindings/examples/0_Introduction/simpleCubemapTexture_test.py +++ b/cuda_bindings/examples/0_Introduction/simpleCubemapTexture_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import sys import time diff --git a/cuda_bindings/examples/0_Introduction/simpleP2P_test.py b/cuda_bindings/examples/0_Introduction/simpleP2P_test.py index 5689db61079..3d5dc871481 100644 --- a/cuda_bindings/examples/0_Introduction/simpleP2P_test.py +++ b/cuda_bindings/examples/0_Introduction/simpleP2P_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import platform import sys diff --git a/cuda_bindings/examples/0_Introduction/simpleZeroCopy_test.py b/cuda_bindings/examples/0_Introduction/simpleZeroCopy_test.py index 4db00202927..49a0edf4558 100644 --- a/cuda_bindings/examples/0_Introduction/simpleZeroCopy_test.py +++ b/cuda_bindings/examples/0_Introduction/simpleZeroCopy_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import math import platform diff --git a/cuda_bindings/examples/0_Introduction/systemWideAtomics_test.py b/cuda_bindings/examples/0_Introduction/systemWideAtomics_test.py index 64ae4d390f6..bc51dcdcc96 100644 --- a/cuda_bindings/examples/0_Introduction/systemWideAtomics_test.py +++ b/cuda_bindings/examples/0_Introduction/systemWideAtomics_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import os import sys diff --git a/cuda_bindings/examples/0_Introduction/vectorAddDrv_test.py b/cuda_bindings/examples/0_Introduction/vectorAddDrv_test.py index 81f589f0e56..dcb6cf014c9 100644 --- a/cuda_bindings/examples/0_Introduction/vectorAddDrv_test.py +++ b/cuda_bindings/examples/0_Introduction/vectorAddDrv_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import math import sys diff --git a/cuda_bindings/examples/0_Introduction/vectorAddMMAP_test.py b/cuda_bindings/examples/0_Introduction/vectorAddMMAP_test.py index 3230b507142..16eafbe3e74 100644 --- a/cuda_bindings/examples/0_Introduction/vectorAddMMAP_test.py +++ b/cuda_bindings/examples/0_Introduction/vectorAddMMAP_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import math import platform diff --git a/cuda_bindings/examples/2_Concepts_and_Techniques/streamOrderedAllocation_test.py b/cuda_bindings/examples/2_Concepts_and_Techniques/streamOrderedAllocation_test.py index 4cba3ab078c..56c7578db13 100644 --- a/cuda_bindings/examples/2_Concepts_and_Techniques/streamOrderedAllocation_test.py +++ b/cuda_bindings/examples/2_Concepts_and_Techniques/streamOrderedAllocation_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import math import platform diff --git a/cuda_bindings/examples/3_CUDA_Features/globalToShmemAsyncCopy_test.py b/cuda_bindings/examples/3_CUDA_Features/globalToShmemAsyncCopy_test.py index b973d018146..c9772ce9ea6 100644 --- a/cuda_bindings/examples/3_CUDA_Features/globalToShmemAsyncCopy_test.py +++ b/cuda_bindings/examples/3_CUDA_Features/globalToShmemAsyncCopy_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import math import platform diff --git a/cuda_bindings/examples/3_CUDA_Features/simpleCudaGraphs_test.py b/cuda_bindings/examples/3_CUDA_Features/simpleCudaGraphs_test.py index ee834363210..2aa6a604310 100644 --- a/cuda_bindings/examples/3_CUDA_Features/simpleCudaGraphs_test.py +++ b/cuda_bindings/examples/3_CUDA_Features/simpleCudaGraphs_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import random as rnd diff --git a/cuda_bindings/examples/4_CUDA_Libraries/conjugateGradientMultiBlockCG_test.py b/cuda_bindings/examples/4_CUDA_Libraries/conjugateGradientMultiBlockCG_test.py index 4a6fafb7682..13ea157bcc6 100644 --- a/cuda_bindings/examples/4_CUDA_Libraries/conjugateGradientMultiBlockCG_test.py +++ b/cuda_bindings/examples/4_CUDA_Libraries/conjugateGradientMultiBlockCG_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import math import platform diff --git a/cuda_bindings/examples/common/common.py b/cuda_bindings/examples/common/common.py index ec55c1ac582..0b0239329e8 100644 --- a/cuda_bindings/examples/common/common.py +++ b/cuda_bindings/examples/common/common.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import os import numpy as np diff --git a/cuda_bindings/examples/common/helper_cuda.py b/cuda_bindings/examples/common/helper_cuda.py index 6cc4026dd03..9ea5e038119 100644 --- a/cuda_bindings/examples/common/helper_cuda.py +++ b/cuda_bindings/examples/common/helper_cuda.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + from common.helper_string import checkCmdLineFlag, getCmdLineArgumentInt from cuda import cuda, cudart, nvrtc diff --git a/cuda_bindings/examples/common/helper_string.py b/cuda_bindings/examples/common/helper_string.py index 7677047a32b..b6cdd8b2a34 100644 --- a/cuda_bindings/examples/common/helper_string.py +++ b/cuda_bindings/examples/common/helper_string.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import sys diff --git a/cuda_bindings/examples/extra/isoFDModelling_test.py b/cuda_bindings/examples/extra/isoFDModelling_test.py index 01e5f57144c..5438ba48972 100644 --- a/cuda_bindings/examples/extra/isoFDModelling_test.py +++ b/cuda_bindings/examples/extra/isoFDModelling_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import time import numpy as np diff --git a/cuda_bindings/examples/extra/jit_program_test.py b/cuda_bindings/examples/extra/jit_program_test.py index 18835ec9d2e..55602c92593 100644 --- a/cuda_bindings/examples/extra/jit_program_test.py +++ b/cuda_bindings/examples/extra/jit_program_test.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + import ctypes import numpy as np diff --git a/cuda_bindings/examples/extra/numba_emm_plugin.py b/cuda_bindings/examples/extra/numba_emm_plugin.py index 45015ada429..4cdb65e31cf 100644 --- a/cuda_bindings/examples/extra/numba_emm_plugin.py +++ b/cuda_bindings/examples/extra/numba_emm_plugin.py @@ -1,10 +1,6 @@ -# Copyright 2021-2024 NVIDIA Corporation. All rights reserved. -# -# 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-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + """Numba EMM Plugin using the CUDA Python Driver API. diff --git a/cuda_bindings/pyproject.toml b/cuda_bindings/pyproject.toml index 68a846456af..29762752495 100644 --- a/cuda_bindings/pyproject.toml +++ b/cuda_bindings/pyproject.toml @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 [build-system] requires = [ @@ -15,7 +15,8 @@ backend-path = ["."] name = "cuda-bindings" 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"] classifiers = [ "Intended Audience :: Developers", "Topic :: Database", @@ -125,4 +126,4 @@ root = ".." version_file = "cuda/bindings/_version.py" # We deliberately do not want to include the version suffixes (a/b/rc) in cuda-bindings versioning tag_regex = "^(?Pv\\d+\\.\\d+\\.\\d+)" -git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v*[0-9]*"] \ No newline at end of file +git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v*[0-9]*"] diff --git a/cuda_bindings/setup.py b/cuda_bindings/setup.py index 3aea9d7aba0..25c38941b17 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/site-packages/_cuda_bindings_redirector.pth b/cuda_bindings/site-packages/_cuda_bindings_redirector.pth index 9371fb3645c..82a091bd35a 100644 --- a/cuda_bindings/site-packages/_cuda_bindings_redirector.pth +++ b/cuda_bindings/site-packages/_cuda_bindings_redirector.pth @@ -1,4 +1,4 @@ -# 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 _cuda_bindings_redirector diff --git a/cuda_bindings/site-packages/_cuda_bindings_redirector.py b/cuda_bindings/site-packages/_cuda_bindings_redirector.py index 13b3c04cf13..0feae7a1374 100644 --- a/cuda_bindings/site-packages/_cuda_bindings_redirector.py +++ b/cuda_bindings/site-packages/_cuda_bindings_redirector.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 sys from types import ModuleType diff --git a/cuda_bindings/tests/cython/build_tests.bat b/cuda_bindings/tests/cython/build_tests.bat index fda860506ed..9edf9653b76 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.sh b/cuda_bindings/tests/cython/build_tests.sh index 1e08f359554..db8b97fbe7c 100755 --- a/cuda_bindings/tests/cython/build_tests.sh +++ b/cuda_bindings/tests/cython/build_tests.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 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 edeb5e12af7..8b3947258c4 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-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 # 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 76d8578fa54..f42ce5d9456 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-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 # 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 289f9c3c4e3..f98660725f2 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-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 # 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 06c651900c7..7d44bb7152c 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 20ef7ed24ea..d05e2634a12 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 cuda.bindings.driver as cuda from cuda.bindings import nvml diff --git a/cuda_bindings/tests/nvml/test_gpu.py b/cuda_bindings/tests/nvml/test_gpu.py index 231a599dbba..55ea1bad9e2 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 4721352c190..94b489ab45f 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 d8e782831ef..2280d1fb7ad 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_pynvml.py b/cuda_bindings/tests/nvml/test_pynvml.py index a0086bcde06..a96b2c87575 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/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/pytest.ini b/cuda_bindings/tests/pytest.ini index 4205c121c21..2881d93e98f 100644 --- a/cuda_bindings/tests/pytest.ini +++ b/cuda_bindings/tests/pytest.ini @@ -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 [pytest] norecursedirs = cython diff --git a/cuda_bindings/tests/test_cuda.py b/cuda_bindings/tests/test_cuda.py index 3ad7bb8fab3..52957574a6a 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 platform diff --git a/cuda_bindings/tests/test_cudart.py b/cuda_bindings/tests/test_cudart.py index 990bc9412df..0ef975a9ee7 100644 --- a/cuda_bindings/tests/test_cudart.py +++ b/cuda_bindings/tests/test_cudart.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 import math diff --git a/cuda_bindings/tests/test_cufile.py b/cuda_bindings/tests/test_cufile.py index d2ec94af786..abd7c7d5f12 100644 --- a/cuda_bindings/tests/test_cufile.py +++ b/cuda_bindings/tests/test_cufile.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 ctypes import errno diff --git a/cuda_bindings/tests/test_graphics_apis.py b/cuda_bindings/tests/test_graphics_apis.py index e45c210685b..0cfbac4e870 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 pytest diff --git a/cuda_bindings/tests/test_interoperability.py b/cuda_bindings/tests/test_interoperability.py index cbebe7b56f1..5262524d9a2 100644 --- a/cuda_bindings/tests/test_interoperability.py +++ b/cuda_bindings/tests/test_interoperability.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 numpy as np import pytest diff --git a/cuda_bindings/tests/test_kernelParams.py b/cuda_bindings/tests/test_kernelParams.py index 94edc71ac24..040ba839418 100644 --- a/cuda_bindings/tests/test_kernelParams.py +++ b/cuda_bindings/tests/test_kernelParams.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 ctypes diff --git a/cuda_bindings/tests/test_nvfatbin.py b/cuda_bindings/tests/test_nvfatbin.py index 400de0c4b79..383e5bc4078 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 e2ff43e5b4a..19dc040e47d 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 import pytest diff --git a/cuda_bindings/tests/test_nvrtc.py b/cuda_bindings/tests/test_nvrtc.py index e24655f33bc..e887260e990 100644 --- a/cuda_bindings/tests/test_nvrtc.py +++ b/cuda_bindings/tests/test_nvrtc.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 pytest diff --git a/cuda_bindings/tests/test_nvvm.py b/cuda_bindings/tests/test_nvvm.py index e96120ec9ef..d154097d99a 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 binascii import re diff --git a/cuda_bindings/tests/test_utils.py b/cuda_bindings/tests/test_utils.py index 7ed4fd75318..c9afe1f415b 100644 --- a/cuda_bindings/tests/test_utils.py +++ b/cuda_bindings/tests/test_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 random import subprocess # nosec B404 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_core/LICENSE b/cuda_core/LICENSE index f433b1a53f5..d6f74778be8 100644 --- a/cuda_core/LICENSE +++ b/cuda_core/LICENSE @@ -1,3 +1,4 @@ +Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. Apache License Version 2.0, January 2004 diff --git a/cuda_core/MANIFEST.in b/cuda_core/MANIFEST.in index 43d38159014..7b85ae37892 100644 --- a/cuda_core/MANIFEST.in +++ b/cuda_core/MANIFEST.in @@ -1,5 +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: Apache-2.0 recursive-include cuda/core *.pyx *.pxd +include NOTICE diff --git a/cuda_core/NOTICE b/cuda_core/NOTICE new file mode 100644 index 00000000000..bb82083df9e --- /dev/null +++ b/cuda_core/NOTICE @@ -0,0 +1,42 @@ +SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +SPDX-License-Identifier: Apache-2.0 + +CUDA Python - cuda.core +Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + +Third-party software notices +---------------------------- + +DLPack +Copyright (c) 2017 by Contributors +Licensed under the Apache License, Version 2.0. +Source: https://github.com/dmlc/dlpack + +Deprecated +Copyright (c) 2017 Laurent LAPORTE +Licensed under the MIT License. +Source: https://github.com/tantale/deprecated + +The following license applies to the vendored Deprecated source: + +The MIT License (MIT) + +Copyright (c) 2017 Laurent LAPORTE + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/cuda_core/cuda/core/experimental/_utils/__init__.py b/cuda_core/cuda/core/experimental/_utils/__init__.py index bd8faf14fa9..644dbb92e75 100644 --- a/cuda_core/cuda/core/experimental/_utils/__init__.py +++ b/cuda_core/cuda/core/experimental/_utils/__init__.py @@ -1,3 +1,3 @@ -# 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 diff --git a/cuda_core/cuda/core/experimental/_utils/clear_error_support.py b/cuda_core/cuda/core/experimental/_utils/clear_error_support.py index b13a3d6b026..2912afeba93 100644 --- a/cuda_core/cuda/core/experimental/_utils/clear_error_support.py +++ b/cuda_core/cuda/core/experimental/_utils/clear_error_support.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 def assert_type(obj, expected_type): diff --git a/cuda_core/cuda/core/experimental/_utils/driver_cu_result_explanations.py b/cuda_core/cuda/core/experimental/_utils/driver_cu_result_explanations.py index 3f6d67a3690..7a9b0ff4bf7 100644 --- a/cuda_core/cuda/core/experimental/_utils/driver_cu_result_explanations.py +++ b/cuda_core/cuda/core/experimental/_utils/driver_cu_result_explanations.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 # To regenerate the dictionary below, navigate to: # https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__TYPES.html#group__CUDA__TYPES diff --git a/cuda_core/cuda/core/experimental/_utils/runtime_cuda_error_explanations.py b/cuda_core/cuda/core/experimental/_utils/runtime_cuda_error_explanations.py index a6d2e7a7859..e6ba89ed280 100644 --- a/cuda_core/cuda/core/experimental/_utils/runtime_cuda_error_explanations.py +++ b/cuda_core/cuda/core/experimental/_utils/runtime_cuda_error_explanations.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 # To regenerate the dictionary below, navigate to: # https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES diff --git a/cuda_core/cuda/core/experimental/include/utility.hpp b/cuda_core/cuda/core/experimental/include/utility.hpp index aa83a465e32..0507274a9aa 100644 --- a/cuda_core/cuda/core/experimental/include/utility.hpp +++ b/cuda_core/cuda/core/experimental/include/utility.hpp @@ -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 #pragma once diff --git a/cuda_core/tests/cython/test_cython.py b/cuda_core/tests/cython/test_cython.py index a118249043c..afdb1dd316d 100644 --- a/cuda_core/tests/cython/test_cython.py +++ b/cuda_core/tests/cython/test_cython.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# 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 importlib diff --git a/cuda_core/tests/cython/test_get_cuda_native_handle.pyx b/cuda_core/tests/cython/test_get_cuda_native_handle.pyx index d1764d3bbaf..c5fc9c1e11c 100644 --- a/cuda_core/tests/cython/test_get_cuda_native_handle.pyx +++ b/cuda_core/tests/cython/test_get_cuda_native_handle.pyx @@ -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 # distutils: language = c++ # distutils: extra_compile_args = -std=c++17 diff --git a/cuda_core/tests/pytest.ini b/cuda_core/tests/pytest.ini index 2842d8a6323..8e82c4042a4 100644 --- a/cuda_core/tests/pytest.ini +++ b/cuda_core/tests/pytest.ini @@ -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 [pytest] norecursedirs = cython diff --git a/cuda_core/tests/test_cuda_utils.py b/cuda_core/tests/test_cuda_utils.py index 866582438aa..d7ccf1ad64c 100644 --- a/cuda_core/tests/test_cuda_utils.py +++ b/cuda_core/tests/test_cuda_utils.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 pytest diff --git a/cuda_core/tests/test_graph.py b/cuda_core/tests/test_graph.py index cc558b6d220..3a141d7dd0a 100644 --- a/cuda_core/tests/test_graph.py +++ b/cuda_core/tests/test_graph.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 numpy as np import pytest diff --git a/cuda_core/tests/test_linker.py b/cuda_core/tests/test_linker.py index 64aca98107a..e3a200e1a48 100644 --- a/cuda_core/tests/test_linker.py +++ b/cuda_core/tests/test_linker.py @@ -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 import pytest diff --git a/cuda_core/tests/test_program.py b/cuda_core/tests/test_program.py index e5c873f1fbe..0d6f0c2ebe3 100644 --- a/cuda_core/tests/test_program.py +++ b/cuda_core/tests/test_program.py @@ -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 import warnings diff --git a/cuda_core/tests/test_utils.py b/cuda_core/tests/test_utils.py index af34145a300..10851205485 100644 --- a/cuda_core/tests/test_utils.py +++ b/cuda_core/tests/test_utils.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024 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 import platform import subprocess # nosec B404 diff --git a/cuda_pathfinder/LICENSE b/cuda_pathfinder/LICENSE index f433b1a53f5..a4baaa2d3fa 100644 --- a/cuda_pathfinder/LICENSE +++ b/cuda_pathfinder/LICENSE @@ -1,3 +1,4 @@ +Copyright (c) 2025-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 01da48eac1d..c69544d6444 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 b7d042fcee3..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 700f19d5ec3..ef0d2b436c5 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 8b306143bf4..b844753e9dc 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-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/environment-docs.yml b/cuda_python/docs/environment-docs.yml index a3e10599e04..95b86ad725d 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/source/_static/javascripts/version_dropdown.js b/cuda_python/docs/source/_static/javascripts/version_dropdown.js index 9348d2bf847..aa0ce2bdc67 100644 --- a/cuda_python/docs/source/_static/javascripts/version_dropdown.js +++ b/cuda_python/docs/source/_static/javascripts/version_dropdown.js @@ -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 function change_current_version(event) { event.preventDefault(); diff --git a/cuda_python/docs/source/conf.py b/cuda_python/docs/source/conf.py index ef7f7eab0b4..81ae296eb98 100644 --- a/cuda_python/docs/source/conf.py +++ b/cuda_python/docs/source/conf.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 # Configuration file for the Sphinx documentation builder. # diff --git a/cuda_python/docs/source/index.rst b/cuda_python/docs/source/index.rst index 5b16ac20a55..9b5ab9ff3fa 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/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.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.X.Y-notes.rst b/cuda_python/docs/source/release/12.X.Y-notes.rst index d75a5aadcd7..4c4aae5d2a2 100644 --- a/cuda_python/docs/source/release/12.X.Y-notes.rst +++ b/cuda_python/docs/source/release/12.X.Y-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.X.Y Release notes ================================ diff --git a/cuda_python/pyproject.toml b/cuda_python/pyproject.toml index e0a3542df3a..ea9f345e436 100644 --- a/cuda_python/pyproject.toml +++ b/cuda_python/pyproject.toml @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# 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"] @@ -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", @@ -44,4 +45,4 @@ line-length = 120 # The [tool.setuptools_scm] section is handled in setup.py since we need to # dynamically set the dependency to cuda_bindings based on the dynamically -# determinded version \ No newline at end of file +# determinded version diff --git a/cuda_python/setup.py b/cuda_python/setup.py index 19fead35a67..20c8a100504 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 from packaging.version import Version from setuptools import setup diff --git a/toolshed/build_static_bitcode_input.py b/toolshed/build_static_bitcode_input.py index 95c3a610f6c..d111738d494 100755 --- a/toolshed/build_static_bitcode_input.py +++ b/toolshed/build_static_bitcode_input.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. +# SPDX-License-Identifier: Apache-2.0 """ Helper to produce static bitcode input for test_nvvm.py. diff --git a/toolshed/check_spdx.py b/toolshed/check_spdx.py index c5c63ab4c84..689ef4bbf55 100644 --- a/toolshed/check_spdx.py +++ b/toolshed/check_spdx.py @@ -1,24 +1,48 @@ -# 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: Apache-2.0 +import datetime import os +import re +import subprocess import sys +from pathlib import PureWindowsPath import pathspec -# Intentionally puzzling together EXPECTED_SPDX_BYTES so that we don't overlook -# if the identifiers are missing in this file. -EXPECTED_SPDX_BYTES = ( - b"-".join((b"SPDX", b"License", b"Identifier: ")), - b"-".join((b"SPDX", b"FileCopyrightText: ")), +# Intentionally puzzling together SPDX prefixes so that we don't overlook if the +# identifiers are missing in this file. +SPDX_LICENSE_IDENTIFIER_PREFIX = b"-".join((b"SPDX", b"License", b"Identifier: ")) +SPDX_FILE_COPYRIGHT_TEXT_PREFIX = b"-".join((b"SPDX", b"FileCopyrightText: ")) + +LICENSE_IDENTIFIER_REGEX = re.compile( + re.escape(SPDX_LICENSE_IDENTIFIER_PREFIX) + rb"(?P[^\r\n]+)" ) +TOP_LEVEL_FILE_LICENSE_IDENTIFIER = "Apache-2.0" + +# Every top-level directory needs to have an entry here, so new paths +# can't slip in without a reviewed license decision. +TOP_LEVEL_DIRS_LICENSE_IDENTIFIERS = { + ".github": "Apache-2.0", + "benchmarks": "Apache-2.0", + "ci": "Apache-2.0", + "cuda_bindings": "Apache-2.0", + "cuda_core": "Apache-2.0", + "cuda_pathfinder": "Apache-2.0", + "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", +} + SPDX_IGNORE_FILENAME = ".spdx-ignore" def load_spdx_ignore(): if os.path.exists(SPDX_IGNORE_FILENAME): - with open(SPDX_IGNORE_FILENAME, "r", encoding="utf-8") as f: + with open(SPDX_IGNORE_FILENAME, encoding="utf-8") as f: lines = f.readlines() else: lines = [] @@ -26,29 +50,178 @@ def load_spdx_ignore(): return pathspec.PathSpec.from_lines("gitwildmatch", lines) -def has_spdx_or_is_empty(filepath): +COPYRIGHT_REGEX = ( + rb"Copyright \(c\) (?P[0-9]{4}(-[0-9]{4})?) " + rb"(?PNVIDIA CORPORATION( & AFFILIATES\. All rights reserved\.)?)" +) +COPYRIGHT_SUB = r"Copyright (c) {} \g" +CURRENT_YEAR = str(datetime.datetime.now(tz=datetime.timezone.utc).year) + + +def is_staged(filepath): + # If the file is staged, we need to update it to the current year + process = subprocess.run( # noqa: S603 + ["git", "diff", "--staged", "--", filepath], # noqa: S607 + capture_output=True, + text=True, + ) + return process.stdout.strip() != "" + + +def normalize_repo_path(filepath): + # We compare against repo prefixes like "cuda_core/" regardless of host OS. + # os.path.normpath is host-dependent: on POSIX it leaves "\" untouched, and + # on Windows it normalizes to "\" separators, so neither gives a stable + # forward-slash form for this prefix check. + return PureWindowsPath(filepath).as_posix() + + +def get_top_level_directory(normalized_path): + if "/" not in normalized_path: + return None + return normalized_path.split("/", 1)[0] + + +def get_expected_license_identifier(filepath): + normalized_path = normalize_repo_path(filepath) + top_level_directory = get_top_level_directory(normalized_path) + if top_level_directory is None: + return TOP_LEVEL_FILE_LICENSE_IDENTIFIER, None + + if top_level_directory not in TOP_LEVEL_DIRS_LICENSE_IDENTIFIERS: + return ( + None, + f"MISSING TOP_LEVEL_DIRS_LICENSE_IDENTIFIERS entry for top-level directory " + f"{top_level_directory!r} required by {filepath!r}", + ) + + return TOP_LEVEL_DIRS_LICENSE_IDENTIFIERS[top_level_directory], None + + +def validate_required_spdx_field(filepath, blob, expected_bytes): + if expected_bytes in blob: + return True + print(f"MISSING {expected_bytes.decode()}{filepath!r}") + return False + + +def extract_license_identifier(blob): + match = LICENSE_IDENTIFIER_REGEX.search(blob) + if match is None: + return None + license_identifier = ( + match.group("license_identifier").decode("ascii", errors="replace").strip() + ) + for comment_suffix in ("-->", "*/"): + if license_identifier.endswith(comment_suffix): + license_identifier = license_identifier.removesuffix( + comment_suffix + ).rstrip() + return license_identifier or None + + +def validate_license_identifier(filepath, blob): + license_identifier = extract_license_identifier(blob) + if license_identifier is None: + print(f"MISSING valid SPDX license identifier in {filepath!r}") + return False + + expected_license_identifier, configuration_error = get_expected_license_identifier( + filepath + ) + if configuration_error is not None: + print(configuration_error) + return False + + if license_identifier != expected_license_identifier: + print( + f"INVALID SPDX license identifier {license_identifier!r} " + f"(expected {expected_license_identifier!r}) in {filepath!r}" + ) + return False + + return True + + +def validate_or_fix_copyright(filepath, blob, fix): + match = re.search(COPYRIGHT_REGEX, blob) + if match is None: + print(f"MISSING valid copyright line in {filepath!r}") + return False, blob + + years = match.group("years").decode() + if "-" in years: + start_year, end_year = years.split("-", 1) + if int(start_year) > int(end_year): + print(f"INVALID copyright years {years!r} in {filepath!r}") + return False, blob + else: + start_year = end_year = years + + if not is_staged(filepath) or int(end_year) >= int(CURRENT_YEAR): + return True, blob + + print(f"OUTDATED copyright {years!r} (expected {CURRENT_YEAR!r}) in {filepath!r}") + if not fix: + return False, blob + + new_years = f"{start_year}-{CURRENT_YEAR}" + return ( + False, + re.sub( + COPYRIGHT_REGEX, + COPYRIGHT_SUB.format(new_years).encode("ascii"), + blob, + ), + ) + + +def find_or_fix_spdx(filepath, fix): with open(filepath, "rb") as f: blob = f.read() if len(blob.strip()) == 0: return True + good = True - for expected_bytes in EXPECTED_SPDX_BYTES: - if expected_bytes not in blob: - print(f"MISSING {expected_bytes.decode()}{filepath!r}") + has_license_identifier = validate_required_spdx_field( + filepath, blob, SPDX_LICENSE_IDENTIFIER_PREFIX + ) + has_copyright = validate_required_spdx_field( + filepath, blob, SPDX_FILE_COPYRIGHT_TEXT_PREFIX + ) + + if not has_license_identifier or not validate_license_identifier(filepath, blob): + good = False + + if not has_copyright: + good = False + else: + copyright_ok, updated_blob = validate_or_fix_copyright(filepath, blob, fix) + if updated_blob != blob: + with open(filepath, "wb") as f: + f.write(updated_blob) + if not copyright_ok: good = False + return good def main(args): assert args, "filepaths expected to be passed from pre-commit" + if "--fix" in args: + fix = True + del args[args.index("--fix")] + else: + fix = False + ignore_spec = load_spdx_ignore() returncode = 0 for filepath in args: if ignore_spec.match_file(filepath): continue - if not has_spdx_or_is_empty(filepath): + if not find_or_fix_spdx(filepath, fix): returncode = 1 return returncode diff --git a/toolshed/dump_cutile_b64.py b/toolshed/dump_cutile_b64.py index 4ce5a82a9fb..e4392e69638 100644 --- a/toolshed/dump_cutile_b64.py +++ b/toolshed/dump_cutile_b64.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# SPDX-License-Identifier: Apache-2.0 """ Embeds a sample cuTile kernel, executes it with CUDA_TILE_DUMP_BYTECODE=.,