From 5ab636a20bc6357f12974ef99657a7aecf3796ff Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Thu, 2 Jul 2026 12:12:09 -0700 Subject: [PATCH] add new CDI hook to set CUDA memory limits Signed-off-by: Tariq Ibrahim --- THIRD_PARTY_NOTICES.md | 472 ++++- .../apply-cuda-memory-limits.go | 185 ++ cmd/nvidia-cdi-hook/commands/commands.go | 2 + cmd/nvidia-ctk/cdi/generate/generate_test.go | 40 +- go.mod | 5 +- go.sum | 10 +- internal/discover/hooks.go | 11 +- internal/info/cgroup/cgroup_path.go | 137 ++ pkg/nvcdi/cuda-memory-limits.go | 54 + pkg/nvcdi/full-gpu-nvml.go | 6 + pkg/nvcdi/lib-csv_test.go | 8 + .../go-nvml/pkg/nvml/cgo_helpers_static.go | 14 + .../NVIDIA/go-nvml/pkg/nvml/const.go | 392 +++- .../NVIDIA/go-nvml/pkg/nvml/device.go | 95 + .../NVIDIA/go-nvml/pkg/nvml/event_set.go | 70 + .../github.com/NVIDIA/go-nvml/pkg/nvml/gpm.go | 2 +- .../NVIDIA/go-nvml/pkg/nvml/mock/device.go | 387 ++++ .../NVIDIA/go-nvml/pkg/nvml/mock/eventset.go | 267 ++- .../NVIDIA/go-nvml/pkg/nvml/mock/interface.go | 1570 +++++++++++---- .../go-nvml/pkg/nvml/mock/vgputypeid.go | 37 + .../NVIDIA/go-nvml/pkg/nvml/nvml.go | 140 ++ .../github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h | 1693 ++++++++++++++--- .../NVIDIA/go-nvml/pkg/nvml/types_gen.go | 202 +- .../NVIDIA/go-nvml/pkg/nvml/vgpu.go | 13 + .../go-nvml/pkg/nvml/zz_generated.api.go | 830 ++++---- .../github.com/coreos/go-systemd/v22/LICENSE | 191 ++ .../github.com/coreos/go-systemd/v22/NOTICE | 5 + .../coreos/go-systemd/v22/dbus/dbus.go | 267 +++ .../coreos/go-systemd/v22/dbus/methods.go | 735 +++++++ .../coreos/go-systemd/v22/dbus/properties.go | 237 +++ .../coreos/go-systemd/v22/dbus/set.go | 62 + .../go-systemd/v22/dbus/subscription.go | 351 ++++ .../go-systemd/v22/dbus/subscription_set.go | 63 + .../github.com/godbus/dbus/v5/CONTRIBUTING.md | 50 + vendor/github.com/godbus/dbus/v5/LICENSE | 25 + vendor/github.com/godbus/dbus/v5/MAINTAINERS | 3 + vendor/github.com/godbus/dbus/v5/README.md | 46 + vendor/github.com/godbus/dbus/v5/auth.go | 257 +++ .../godbus/dbus/v5/auth_anonymous.go | 16 + .../godbus/dbus/v5/auth_external.go | 26 + vendor/github.com/godbus/dbus/v5/auth_sha1.go | 102 + vendor/github.com/godbus/dbus/v5/call.go | 69 + vendor/github.com/godbus/dbus/v5/conn.go | 996 ++++++++++ .../github.com/godbus/dbus/v5/conn_darwin.go | 37 + .../github.com/godbus/dbus/v5/conn_other.go | 90 + vendor/github.com/godbus/dbus/v5/conn_unix.go | 17 + .../github.com/godbus/dbus/v5/conn_windows.go | 15 + vendor/github.com/godbus/dbus/v5/dbus.go | 430 +++++ vendor/github.com/godbus/dbus/v5/decoder.go | 292 +++ .../godbus/dbus/v5/default_handler.go | 342 ++++ vendor/github.com/godbus/dbus/v5/doc.go | 71 + vendor/github.com/godbus/dbus/v5/encoder.go | 235 +++ vendor/github.com/godbus/dbus/v5/escape.go | 84 + vendor/github.com/godbus/dbus/v5/export.go | 463 +++++ vendor/github.com/godbus/dbus/v5/homedir.go | 25 + vendor/github.com/godbus/dbus/v5/match.go | 89 + vendor/github.com/godbus/dbus/v5/message.go | 390 ++++ vendor/github.com/godbus/dbus/v5/object.go | 174 ++ vendor/github.com/godbus/dbus/v5/sequence.go | 24 + .../godbus/dbus/v5/sequential_handler.go | 125 ++ .../godbus/dbus/v5/server_interfaces.go | 107 ++ vendor/github.com/godbus/dbus/v5/sig.go | 293 +++ .../godbus/dbus/v5/transport_darwin.go | 6 + .../godbus/dbus/v5/transport_generic.go | 52 + .../godbus/dbus/v5/transport_nonce_tcp.go | 39 + .../godbus/dbus/v5/transport_tcp.go | 41 + .../godbus/dbus/v5/transport_unix.go | 212 +++ .../dbus/v5/transport_unixcred_dragonfly.go | 95 + .../dbus/v5/transport_unixcred_freebsd.go | 92 + .../dbus/v5/transport_unixcred_linux.go | 25 + .../dbus/v5/transport_unixcred_netbsd.go | 14 + .../dbus/v5/transport_unixcred_openbsd.go | 14 + .../godbus/dbus/v5/transport_zos.go | 6 + vendor/github.com/godbus/dbus/v5/variant.go | 150 ++ .../godbus/dbus/v5/variant_lexer.go | 284 +++ .../godbus/dbus/v5/variant_parser.go | 817 ++++++++ vendor/github.com/moby/sys/userns/LICENSE | 202 ++ vendor/github.com/moby/sys/userns/userns.go | 16 + .../moby/sys/userns/userns_linux.go | 53 + .../moby/sys/userns/userns_linux_fuzzer.go | 8 + .../moby/sys/userns/userns_unsupported.go | 6 + .../cgroups/.golangci-extra.yml | 29 + .../opencontainers/cgroups/.golangci.yml | 31 + .../opencontainers/cgroups/CODEOWNERS | 1 + .../opencontainers/cgroups/CONTRIBUTING.md | 150 ++ .../opencontainers/cgroups/GOVERNANCE.md | 63 + .../opencontainers/cgroups/MAINTAINERS | 8 + .../cgroups/MAINTAINERS_GUIDE.md | 92 + .../opencontainers/cgroups/README.md | 11 + .../opencontainers/cgroups/RELEASES.md | 51 + .../opencontainers/cgroups/cgroups.go | 86 + .../cgroups/config_blkio_device.go | 66 + .../cgroups/config_hugepages.go | 9 + .../cgroups/config_ifprio_map.go | 14 + .../opencontainers/cgroups/config_linux.go | 169 ++ .../opencontainers/cgroups/config_rdma.go | 9 + .../cgroups/config_unsupported.go | 8 + .../github.com/opencontainers/cgroups/file.go | 216 +++ .../opencontainers/cgroups/fs2/cpu.go | 123 ++ .../opencontainers/cgroups/fs2/cpuset.go | 27 + .../opencontainers/cgroups/fs2/create.go | 150 ++ .../opencontainers/cgroups/fs2/defaultpath.go | 80 + .../opencontainers/cgroups/fs2/freezer.go | 140 ++ .../opencontainers/cgroups/fs2/fs2.go | 364 ++++ .../opencontainers/cgroups/fs2/hugetlb.go | 70 + .../opencontainers/cgroups/fs2/io.go | 203 ++ .../opencontainers/cgroups/fs2/memory.go | 238 +++ .../opencontainers/cgroups/fs2/misc.go | 52 + .../opencontainers/cgroups/fs2/pids.go | 79 + .../opencontainers/cgroups/fs2/psi.go | 89 + .../opencontainers/cgroups/fscommon/rdma.go | 120 ++ .../opencontainers/cgroups/fscommon/utils.go | 143 ++ .../opencontainers/cgroups/getallpids.go | 27 + .../cgroups/internal/path/path.go | 52 + .../opencontainers/cgroups/stats.go | 239 +++ .../opencontainers/cgroups/utils.go | 483 +++++ .../opencontainers/cgroups/v1_utils.go | 276 +++ vendor/modules.txt | 15 +- 118 files changed, 18460 insertions(+), 1101 deletions(-) create mode 100644 cmd/nvidia-cdi-hook/apply-cuda-memory-limits/apply-cuda-memory-limits.go create mode 100644 internal/info/cgroup/cgroup_path.go create mode 100644 pkg/nvcdi/cuda-memory-limits.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/LICENSE create mode 100644 vendor/github.com/coreos/go-systemd/v22/NOTICE create mode 100644 vendor/github.com/coreos/go-systemd/v22/dbus/dbus.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/dbus/methods.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/dbus/properties.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/dbus/set.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/dbus/subscription.go create mode 100644 vendor/github.com/coreos/go-systemd/v22/dbus/subscription_set.go create mode 100644 vendor/github.com/godbus/dbus/v5/CONTRIBUTING.md create mode 100644 vendor/github.com/godbus/dbus/v5/LICENSE create mode 100644 vendor/github.com/godbus/dbus/v5/MAINTAINERS create mode 100644 vendor/github.com/godbus/dbus/v5/README.md create mode 100644 vendor/github.com/godbus/dbus/v5/auth.go create mode 100644 vendor/github.com/godbus/dbus/v5/auth_anonymous.go create mode 100644 vendor/github.com/godbus/dbus/v5/auth_external.go create mode 100644 vendor/github.com/godbus/dbus/v5/auth_sha1.go create mode 100644 vendor/github.com/godbus/dbus/v5/call.go create mode 100644 vendor/github.com/godbus/dbus/v5/conn.go create mode 100644 vendor/github.com/godbus/dbus/v5/conn_darwin.go create mode 100644 vendor/github.com/godbus/dbus/v5/conn_other.go create mode 100644 vendor/github.com/godbus/dbus/v5/conn_unix.go create mode 100644 vendor/github.com/godbus/dbus/v5/conn_windows.go create mode 100644 vendor/github.com/godbus/dbus/v5/dbus.go create mode 100644 vendor/github.com/godbus/dbus/v5/decoder.go create mode 100644 vendor/github.com/godbus/dbus/v5/default_handler.go create mode 100644 vendor/github.com/godbus/dbus/v5/doc.go create mode 100644 vendor/github.com/godbus/dbus/v5/encoder.go create mode 100644 vendor/github.com/godbus/dbus/v5/escape.go create mode 100644 vendor/github.com/godbus/dbus/v5/export.go create mode 100644 vendor/github.com/godbus/dbus/v5/homedir.go create mode 100644 vendor/github.com/godbus/dbus/v5/match.go create mode 100644 vendor/github.com/godbus/dbus/v5/message.go create mode 100644 vendor/github.com/godbus/dbus/v5/object.go create mode 100644 vendor/github.com/godbus/dbus/v5/sequence.go create mode 100644 vendor/github.com/godbus/dbus/v5/sequential_handler.go create mode 100644 vendor/github.com/godbus/dbus/v5/server_interfaces.go create mode 100644 vendor/github.com/godbus/dbus/v5/sig.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_darwin.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_generic.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_nonce_tcp.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_tcp.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_unix.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_unixcred_dragonfly.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_unixcred_freebsd.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_unixcred_linux.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_unixcred_netbsd.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_unixcred_openbsd.go create mode 100644 vendor/github.com/godbus/dbus/v5/transport_zos.go create mode 100644 vendor/github.com/godbus/dbus/v5/variant.go create mode 100644 vendor/github.com/godbus/dbus/v5/variant_lexer.go create mode 100644 vendor/github.com/godbus/dbus/v5/variant_parser.go create mode 100644 vendor/github.com/moby/sys/userns/LICENSE create mode 100644 vendor/github.com/moby/sys/userns/userns.go create mode 100644 vendor/github.com/moby/sys/userns/userns_linux.go create mode 100644 vendor/github.com/moby/sys/userns/userns_linux_fuzzer.go create mode 100644 vendor/github.com/moby/sys/userns/userns_unsupported.go create mode 100644 vendor/github.com/opencontainers/cgroups/.golangci-extra.yml create mode 100644 vendor/github.com/opencontainers/cgroups/.golangci.yml create mode 100644 vendor/github.com/opencontainers/cgroups/CODEOWNERS create mode 100644 vendor/github.com/opencontainers/cgroups/CONTRIBUTING.md create mode 100644 vendor/github.com/opencontainers/cgroups/GOVERNANCE.md create mode 100644 vendor/github.com/opencontainers/cgroups/MAINTAINERS create mode 100644 vendor/github.com/opencontainers/cgroups/MAINTAINERS_GUIDE.md create mode 100644 vendor/github.com/opencontainers/cgroups/README.md create mode 100644 vendor/github.com/opencontainers/cgroups/RELEASES.md create mode 100644 vendor/github.com/opencontainers/cgroups/cgroups.go create mode 100644 vendor/github.com/opencontainers/cgroups/config_blkio_device.go create mode 100644 vendor/github.com/opencontainers/cgroups/config_hugepages.go create mode 100644 vendor/github.com/opencontainers/cgroups/config_ifprio_map.go create mode 100644 vendor/github.com/opencontainers/cgroups/config_linux.go create mode 100644 vendor/github.com/opencontainers/cgroups/config_rdma.go create mode 100644 vendor/github.com/opencontainers/cgroups/config_unsupported.go create mode 100644 vendor/github.com/opencontainers/cgroups/file.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/cpu.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/cpuset.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/create.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/defaultpath.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/freezer.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/fs2.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/hugetlb.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/io.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/memory.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/misc.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/pids.go create mode 100644 vendor/github.com/opencontainers/cgroups/fs2/psi.go create mode 100644 vendor/github.com/opencontainers/cgroups/fscommon/rdma.go create mode 100644 vendor/github.com/opencontainers/cgroups/fscommon/utils.go create mode 100644 vendor/github.com/opencontainers/cgroups/getallpids.go create mode 100644 vendor/github.com/opencontainers/cgroups/internal/path/path.go create mode 100644 vendor/github.com/opencontainers/cgroups/stats.go create mode 100644 vendor/github.com/opencontainers/cgroups/utils.go create mode 100644 vendor/github.com/opencontainers/cgroups/v1_utils.go diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 5cdb06420..ccf815bb4 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -27,14 +27,17 @@ busybox binary is added to the image, which is licensed under GPLv2. | `github.com/containerd/log` | Apache-2.0 | `github.com/containerd/log` | | `github.com/containerd/nri/pkg` | Apache-2.0 | `github.com/containerd/nri` | | `github.com/containerd/ttrpc` | Apache-2.0 | `github.com/containerd/ttrpc` | +| `github.com/coreos/go-systemd/v22/dbus` | Apache-2.0 | `github.com/coreos/go-systemd/v22` | | `github.com/cyphar/filepath-securejoin` | BSD-3-Clause / MPL-2.0 | `github.com/cyphar/filepath-securejoin` | | `github.com/fsnotify/fsnotify` | BSD-3-Clause | `github.com/fsnotify/fsnotify` | +| `github.com/godbus/dbus/v5` | BSD-2-Clause | `github.com/godbus/dbus/v5` | | `github.com/google/uuid` | BSD-3-Clause | `github.com/google/uuid` | | `github.com/knqyf263/go-plugin/wasm` | MIT | `github.com/knqyf263/go-plugin` | | `github.com/moby/sys/capability` | BSD-2-Clause | `github.com/moby/sys/capability` | | `github.com/moby/sys/mountinfo` | Apache-2.0 | `github.com/moby/sys/mountinfo` | | `github.com/moby/sys/reexec` | Apache-2.0 | `github.com/moby/sys/reexec` | -| `github.com/opencontainers/cgroups/devices/config` | Apache-2.0 | `github.com/opencontainers/cgroups` | +| `github.com/moby/sys/userns` | Apache-2.0 | `github.com/moby/sys/userns` | +| `github.com/opencontainers/cgroups` | Apache-2.0 | `github.com/opencontainers/cgroups` | | `github.com/opencontainers/runc` | Apache-2.0 | `github.com/opencontainers/runc` | | `github.com/opencontainers/runtime-spec/specs-go` | Apache-2.0 | `github.com/opencontainers/runtime-spec` | | `github.com/opencontainers/runtime-tools` | Apache-2.0 | `github.com/opencontainers/runtime-tools` | @@ -1155,6 +1158,220 @@ the PCI ID Project at https://pci-ids.ucw.cz/. ``` +### github.com/coreos/go-systemd/v22/dbus + +* License: Apache-2.0 +* Module: github.com/coreos/go-systemd/v22 + +#### LICENSE + +```text +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: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +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 +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 + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +``` + +#### NOTICE + +```text +CoreOS Project +Copyright 2018 CoreOS, Inc + +This product includes software developed at CoreOS, Inc. +(http://www.coreos.com/). + +``` + + ### github.com/cyphar/filepath-securejoin * License: BSD-3-Clause / MPL-2.0 @@ -2064,6 +2281,43 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ``` +### github.com/godbus/dbus/v5 + +* License: BSD-2-Clause +* Module: github.com/godbus/dbus/v5 + +#### LICENSE + +```text +Copyright (c) 2013, Georg Reinke (), Google +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +``` + + ### github.com/google/uuid * License: BSD-3-Clause @@ -2601,7 +2855,221 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ``` -### github.com/opencontainers/cgroups/devices/config +### github.com/moby/sys/userns + +* License: Apache-2.0 +* Module: github.com/moby/sys/userns + +#### LICENSE + +```text + + 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 + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +``` + + +### github.com/opencontainers/cgroups * License: Apache-2.0 * Module: github.com/opencontainers/cgroups diff --git a/cmd/nvidia-cdi-hook/apply-cuda-memory-limits/apply-cuda-memory-limits.go b/cmd/nvidia-cdi-hook/apply-cuda-memory-limits/apply-cuda-memory-limits.go new file mode 100644 index 000000000..54ecb44e9 --- /dev/null +++ b/cmd/nvidia-cdi-hook/apply-cuda-memory-limits/apply-cuda-memory-limits.go @@ -0,0 +1,185 @@ +/** +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +**/ + +package cudamemorylimits + +import ( + "context" + "fmt" + "strconv" + "strings" + + "github.com/NVIDIA/go-nvml/pkg/nvml" + "github.com/urfave/cli/v3" + + cgroupinfo "github.com/NVIDIA/nvidia-container-toolkit/internal/info/cgroup" + "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" + "github.com/NVIDIA/nvidia-container-toolkit/internal/oci" + "github.com/NVIDIA/nvidia-container-toolkit/pkg/lookup" +) + +type command struct { + logger logger.Interface +} + +type config struct { + driverRoot string + gpuIds []string + containerSpec string +} + +func NewCommand(logger logger.Interface) *cli.Command { + c := command{ + logger: logger, + } + return c.build() +} + +func (m command) build() *cli.Command { + cfg := config{} + + c := cli.Command{ + Name: "apply-cuda-memory-limits", + Usage: "Set the soft and hard limits of CUDA memory usage on a GPU device in the container.", + Before: func(ctx context.Context, cmd *cli.Command) (context.Context, error) { + return ctx, m.validateFlags(cmd, &cfg) + }, + Action: func(ctx context.Context, cmd *cli.Command) error { + return m.run(cmd, &cfg) + }, + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "driver-root", + Usage: "Specify the driver root", + Destination: &cfg.driverRoot, + }, + &cli.StringSliceFlag{ + Name: "gpu-id", + Usage: "Specify the UUID of the GPU", + Destination: &cfg.gpuIds, + }, + &cli.StringFlag{ + Name: "container-spec", + Usage: "Specify the path to the OCI container spec. If empty or '-' the spec will be read from STDIN", + Destination: &cfg.containerSpec, + }, + }, + } + + return &c +} + +func (m command) validateFlags(_ *cli.Command, cfg *config) error { + for _, id := range cfg.gpuIds { + if strings.TrimSpace(id) == "" { + return fmt.Errorf("gpu-id must not be empty") + } + } + + return nil +} + +func (m command) run(_ *cli.Command, cfg *config) error { + s, err := oci.LoadContainerState(cfg.containerSpec) + if err != nil { + return fmt.Errorf("failed to load container state: %w", err) + } + specFilePath := oci.GetSpecFilePath(s.Bundle) + fs := oci.NewFileSpec(specFilePath, false) + ctrSpec, err := fs.Load() + if err != nil { + return fmt.Errorf("failed to load OCI container spec: %w", err) + } + + memReqStr, ok1 := fs.LookupEnv("NVIDIA_GPU_MEMORY_REQUESTS") + if !ok1 { + memReqStr, ok1 = fs.LookupEnv("NVIDIA_GPU_MEMORY_REQUEST") + } + memLimitStr, ok2 := fs.LookupEnv("NVIDIA_GPU_MEMORY_LIMITS") + if !ok2 { + memLimitStr, ok2 = fs.LookupEnv("NVIDIA_GPU_MEMORY_LIMIT") + } + if !ok1 || !ok2 { + return nil + } + + if !cgroupinfo.IsCgroupV2() { + return fmt.Errorf("setting GPU memory limits is only supported in cgroup v2") + } + + cgroupPath, err := cgroupinfo.GetAbsolutePath(*ctrSpec) + if err != nil { + return fmt.Errorf("failed to resolve cgroup path: %w", err) + } + + memoryRequests, err := strconv.ParseUint(memReqStr, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse NVIDIA_GPU_MEMORY_REQUESTS: %w", err) + } + + memoryLimits, err := strconv.ParseUint(memLimitStr, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse NVIDIA_GPU_MEMORY_LIMITS: %w", err) + } + if memoryRequests > memoryLimits { + return fmt.Errorf("memory request (%d MiB) exceeds memory limit (%d MiB)", memoryRequests, memoryLimits) + } + + return m.runApplyCudaMemoryLimits(cgroupPath, memoryRequests, memoryLimits, cfg.driverRoot, cfg.gpuIds) +} + +func (m command) runApplyCudaMemoryLimits(cgroupPath string, requests uint64, limits uint64, driverRoot string, gpuIDs []string) error { + + driverLibLocator := lookup.NewLibraryLocator( + lookup.WithLogger(m.logger), + lookup.WithRoot(driverRoot), + ) + + candidates, err := driverLibLocator.Locate("libnvidia-ml.so.1") + if err != nil { + return fmt.Errorf("failed to locate libnvidia-ml.so.1: %w", err) + } + if len(candidates) == 0 { + return fmt.Errorf("no libnvidia-ml.so.1 found") + } + + m.logger.Infof("driver library found: %s", candidates[0]) + + nvmllib := nvml.New(nvml.WithLibraryPath(candidates[0])) + ret := nvmllib.Init() + if ret != nvml.SUCCESS { + return fmt.Errorf("failed to initialize nvml: %v", ret) + } + defer func() { + _ = nvmllib.Shutdown() + }() + + for _, gpuID := range gpuIDs { + device, ret := nvmllib.DeviceGetHandleByUUID(gpuID) + if ret != nvml.SUCCESS { + return fmt.Errorf("failed to get GPU device handle with uuid %s: %v", gpuID, ret) + } + if device == nil { + return fmt.Errorf("empty GPU device handle: %s", gpuID) + } + ret = device.SetMemoryLimits_v1(cgroupPath, int(requests*1024*1024), int(limits*1024*1024)) + if ret != nvml.SUCCESS { + return fmt.Errorf("failed to set memory limits for gpu %q: %v", gpuID, ret) + } + } + return nil +} diff --git a/cmd/nvidia-cdi-hook/commands/commands.go b/cmd/nvidia-cdi-hook/commands/commands.go index a15b36cc2..85f734204 100644 --- a/cmd/nvidia-cdi-hook/commands/commands.go +++ b/cmd/nvidia-cdi-hook/commands/commands.go @@ -22,6 +22,7 @@ import ( "github.com/urfave/cli/v3" + cudamemorylimits "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/apply-cuda-memory-limits" "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/chmod" symlinks "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/create-symlinks" "github.com/NVIDIA/nvidia-container-toolkit/cmd/nvidia-cdi-hook/cudacompat" @@ -91,6 +92,7 @@ func ConfigureCDIHookCommand(logger logger.Interface, base *cli.Command) *cli.Co chmod.NewCommand(logger), cudacompat.NewCommand(logger), disabledevicenodemodification.NewCommand(logger), + cudamemorylimits.NewCommand(logger), updateapplicationprofile.NewCommand(logger), { Name: "noop", diff --git a/cmd/nvidia-ctk/cdi/generate/generate_test.go b/cmd/nvidia-ctk/cdi/generate/generate_test.go index a954d2ba7..7d106e1a8 100644 --- a/cmd/nvidia-ctk/cdi/generate/generate_test.go +++ b/cmd/nvidia-ctk/cdi/generate/generate_test.go @@ -98,11 +98,35 @@ devices: deviceNodes: - path: /dev/nvidia0 hostPath: {{ .driverRoot }}/dev/nvidia0 + hooks: + - hookName: createRuntime + path: /usr/bin/nvidia-cdi-hook + args: + - nvidia-cdi-hook + - apply-cuda-memory-limits + - --driver-root + - {{ .driverRoot }} + - --gpu-id + - {{ .gpuID }} + env: + - NVIDIA_CTK_DEBUG=false - name: all containerEdits: deviceNodes: - path: /dev/nvidia0 hostPath: {{ .driverRoot }}/dev/nvidia0 + hooks: + - hookName: createRuntime + path: /usr/bin/nvidia-cdi-hook + args: + - nvidia-cdi-hook + - apply-cuda-memory-limits + - --driver-root + - {{ .driverRoot }} + - --gpu-id + - {{ .gpuID }} + env: + - NVIDIA_CTK_DEBUG=false containerEdits: env: - NVIDIA_CTK_LIBCUDA_DIR=/lib/x86_64-linux-gnu @@ -180,7 +204,7 @@ containerEdits: vendor: "example.com", class: "device", driverRoot: driverRoot, - disabledHooks: []string{"enable-cuda-compat"}, + disabledHooks: []string{"enable-cuda-compat", "apply-cuda-memory-limits"}, }, expectedOptions: options{ format: "yaml", @@ -189,7 +213,7 @@ containerEdits: class: "device", nvidiaCDIHookPath: "/usr/bin/nvidia-cdi-hook", driverRoot: driverRoot, - disabledHooks: []string{"enable-cuda-compat"}, + disabledHooks: []string{"enable-cuda-compat", "apply-cuda-memory-limits"}, }, expectedSpec: `--- cdiVersion: 0.5.0 @@ -274,7 +298,7 @@ containerEdits: vendor: "example.com", class: "device", driverRoot: driverRoot, - disabledHooks: []string{"enable-cuda-compat", "update-ldcache"}, + disabledHooks: []string{"enable-cuda-compat", "apply-cuda-memory-limits", "update-ldcache"}, }, expectedOptions: options{ format: "yaml", @@ -283,7 +307,7 @@ containerEdits: class: "device", nvidiaCDIHookPath: "/usr/bin/nvidia-cdi-hook", driverRoot: driverRoot, - disabledHooks: []string{"enable-cuda-compat", "update-ldcache"}, + disabledHooks: []string{"enable-cuda-compat", "apply-cuda-memory-limits", "update-ldcache"}, }, expectedSpec: `--- cdiVersion: 0.5.0 @@ -539,7 +563,13 @@ containerEdits: require.NoError(t, err) } - require.Equal(t, strings.ReplaceAll(tc.expectedSpec, "{{ .driverRoot }}", driverRoot), buf.String()) + gpuID, ret := server.Devices[0].GetUUID() + require.True(t, ret == nvml.SUCCESS, gpuID) + + expected := strings.ReplaceAll(tc.expectedSpec, "{{ .driverRoot }}", driverRoot) + expected = strings.ReplaceAll(expected, "{{ .gpuID }}", gpuID) + + require.Equal(t, expected, buf.String()) }) } } diff --git a/go.mod b/go.mod index 11dbed2f6..44afc7827 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.25.0 require ( github.com/Masterminds/semver/v3 v3.5.0 github.com/NVIDIA/go-nvlib v0.12.0 - github.com/NVIDIA/go-nvml v0.13.3-1 + github.com/NVIDIA/go-nvml v0.13.3-1.0.20260814002628-7f946c0908a3 github.com/containerd/nri v0.12.1 github.com/cyphar/filepath-securejoin v0.7.0 github.com/google/uuid v1.6.0 @@ -31,12 +31,15 @@ require ( cyphar.com/go-pathrs v0.2.5 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/ttrpc v1.2.7 // indirect + github.com/coreos/go-systemd/v22 v22.7.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/knqyf263/go-plugin v0.9.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/moby/sys/capability v0.4.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect github.com/opencontainers/runtime-tools v0.9.1-0.20251114084447-edf4cb3d2116 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect diff --git a/go.sum b/go.sum index c875a3300..2aa0a71db 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAw github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/NVIDIA/go-nvlib v0.12.0 h1:LICVlUGlDnpbwQv64rOZQn11xQae1J+c+dvH9CCi7jc= github.com/NVIDIA/go-nvlib v0.12.0/go.mod h1:J5M/QPIJJtaipjdONqevSnfgBlkW49uVWX5cFOoQpoA= -github.com/NVIDIA/go-nvml v0.13.3-1 h1:P76U2h88OZSiMtdhRsJjSF5DXyXUqHIXKeDicVAaae0= -github.com/NVIDIA/go-nvml v0.13.3-1/go.mod h1:ahi2psRYoa+wYUBIrZPRO+wJs9lcvMhxSSkjjvsJJNQ= +github.com/NVIDIA/go-nvml v0.13.3-1.0.20260814002628-7f946c0908a3 h1:r6oO3PV4w/DCEqY7EXbZsQCu5TGs2oM0owr1vWvQxHg= +github.com/NVIDIA/go-nvml v0.13.3-1.0.20260814002628-7f946c0908a3/go.mod h1:ahi2psRYoa+wYUBIrZPRO+wJs9lcvMhxSSkjjvsJJNQ= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/brianvoe/gofakeit/v7 v7.12.1 h1:df1tiI4SL1dR5Ix4D/r6a3a+nXBJ/OBGU5jEKRBmmqg= @@ -16,6 +16,8 @@ github.com/containerd/nri v0.12.1 h1:Nkp14W/mdhP0ze83ja/O437du6NQA33W5Y0O+ar3aKM github.com/containerd/nri v0.12.1/go.mod h1:TGAfPLH4a+qwbv0PxsefPiR+PobYecDj2aXMtz7GQcg= github.com/containerd/ttrpc v1.2.7 h1:qIrroQvuOL9HQ1X6KHe2ohc7p+HP/0VE6XPU7elJRqQ= github.com/containerd/ttrpc v1.2.7/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= +github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA= +github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.7.0 h1:s0Y3ITPy6sQn5xt54DuYvTF8hu134ooYLUb58DX/HjE= github.com/cyphar/filepath-securejoin v0.7.0/go.mod h1:ymLGms/u3BYaviIiuKFnUx8EkQEZeK6cInNoAPJA3o4= @@ -27,6 +29,8 @@ github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -54,6 +58,8 @@ github.com/moby/sys/reexec v0.1.0 h1:RrBi8e0EBTLEgfruBOFcxtElzRGTEUkeIFaVXgU7wok github.com/moby/sys/reexec v0.1.0/go.mod h1:EqjBg8F3X7iZe5pU6nRZnYCMUTXoxsjiIfHup5wYIN8= github.com/moby/sys/symlink v0.3.0 h1:GZX89mEZ9u53f97npBy4Rc3vJKj7JBDj/PN2I22GrNU= github.com/moby/sys/symlink v0.3.0/go.mod h1:3eNdhduHmYPcgsJtZXW1W4XUJdZGBIkttZ8xKqPUJq0= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/onsi/ginkgo/v2 v2.19.1 h1:QXgq3Z8Crl5EL1WBAC98A5sEBHARrAJNzAmMxzLcRF0= github.com/onsi/ginkgo/v2 v2.19.1/go.mod h1:O3DtEWQkPa/F7fBMgmZQKKsluAy8pd3rEQdrjkPb9zA= github.com/onsi/gomega v1.34.0 h1:eSSPsPNp6ZpsG8X1OVmOTxig+CblTc4AxpPBykhe2Os= diff --git a/internal/discover/hooks.go b/internal/discover/hooks.go index 95cc35e61..173291f7f 100644 --- a/internal/discover/hooks.go +++ b/internal/discover/hooks.go @@ -63,6 +63,8 @@ const ( // An UpdateLDCacheHook is the hook used to update the ldcache in the // container. This allows injected libraries to be discoverable. UpdateLDCacheHook = HookName("update-ldcache") + // ApplyCudaMemoryLimitsHook is used to assign soft and hard limits of CUDA memory usage to a container + ApplyCudaMemoryLimitsHook = HookName("apply-cuda-memory-limits") defaultNvidiaCDIHookPath = "/usr/bin/nvidia-cdi-hook" ) @@ -222,6 +224,8 @@ func (c cdiHookCreator) getOCIHookType(name HookName) OCIHookType { switch name { case CreateSymlinksHook, ChmodHook, DisableDeviceNodeModificationHook, EnableCudaCompatHook, UpdateLDCacheHook, ApplicationProfileHook: return OCIHookTypeCreateContainer + case ApplyCudaMemoryLimitsHook: + return OCIHookTypeCreateRuntime default: return OCIHookTypeCreateContainer } @@ -238,7 +242,7 @@ func (c cdiHookCreator) isDisabled(name HookName, args ...string) bool { // still reject hooks that require args if none were provided switch name { - case CreateSymlinksHook, ChmodHook: + case CreateSymlinksHook, ChmodHook, ApplyCudaMemoryLimitsHook: return len(args) == 0 } return false @@ -267,6 +271,11 @@ func (c cdiHookCreator) transformArgs(name HookName, args ...string) []string { for _, arg := range args { transformedArgs = append(transformedArgs, "--folder", arg) } + case ApplyCudaMemoryLimitsHook: + transformedArgs = append(transformedArgs, "--driver-root", args[0]) + for _, arg := range args[1:] { + transformedArgs = append(transformedArgs, "--gpu-id", arg) + } default: return args } diff --git a/internal/info/cgroup/cgroup_path.go b/internal/info/cgroup/cgroup_path.go new file mode 100644 index 000000000..1674df874 --- /dev/null +++ b/internal/info/cgroup/cgroup_path.go @@ -0,0 +1,137 @@ +/** +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Portions of this file are derived from github.com/opencontainers/cgroups, +# licensed under the Apache License, Version 2.0. + +**/ + +package cgroup + +import ( + "fmt" + "path/filepath" + "strings" + + securejoin "github.com/cyphar/filepath-securejoin" + "github.com/opencontainers/cgroups" + "github.com/opencontainers/cgroups/fs2" + "github.com/opencontainers/runtime-spec/specs-go" + "golang.org/x/sys/unix" +) + +func IsCgroupV2() bool { + const v2FsMagicNumber = 0x63677270 + var s unix.Statfs_t + err := unix.Statfs("/sys/fs/cgroup", &s) + if err != nil { + panic(err) + } + return s.Type == v2FsMagicNumber +} + +func GetAbsolutePath(spec specs.Spec) (string, error) { + c := &cgroups.Cgroup{} + myCgroupPath := spec.Linux.CgroupsPath + parts := strings.Split(myCgroupPath, ":") + if len(parts) != 3 { + return "", fmt.Errorf("expected cgroupsPath to be of format \"slice:prefix:name\" for systemd cgroups, got %q instead", myCgroupPath) + } + c.Parent = parts[0] + c.ScopePrefix = parts[1] + c.Name = parts[2] + + return getPath(c) +} + +func getUnitName(c *cgroups.Cgroup) string { + // by default, we create a scope unless the user explicitly asks for a slice. + if !strings.HasSuffix(c.Name, ".slice") { + return c.ScopePrefix + "-" + c.Name + ".scope" + } + return c.Name +} + +func getPath(c *cgroups.Cgroup) (string, error) { + + sliceFull, err := getSliceFull(c) + if err != nil { + return "", err + } + + path := filepath.Join(sliceFull, getUnitName(c)) + path, err = securejoin.SecureJoin(fs2.UnifiedMountpoint, path) + if err != nil { + return "", err + } + + // an example of the final path in rootless: + // "/sys/fs/cgroup/user.slice/user-1001.slice/user@1001.service/user.slice/libpod-132ff0d72245e6f13a3bbc6cdc5376886897b60ac59eaa8dea1df7ab959cbf1c.scope" + + return path, nil +} + +func getSliceFull(c *cgroups.Cgroup) (string, error) { + slice := "system.slice" + if c.Rootless { + slice = "user.slice" + } + if c.Parent != "" { + var err error + slice, err = expandSlice(c.Parent) + if err != nil { + return "", err + } + } + + // an example of the final slice in rootless: "/user.slice/user-1001.slice/user@1001.service/user.slice" + // NOTE: systemdDbus.PropSlice requires the "/user.slice/user-1001.slice/user@1001.service/" prefix NOT to be specified. + return slice, nil +} + +// systemd represents slice hierarchy using `-`, so we need to follow suit when +// generating the path of slice. Essentially, test-a-b.slice becomes +// /test.slice/test-a.slice/test-a-b.slice. +func expandSlice(slice string) (string, error) { + suffix := ".slice" + // Name has to end with ".slice", but can't be just ".slice". + if len(slice) < len(suffix) || !strings.HasSuffix(slice, suffix) { + return "", fmt.Errorf("invalid slice name: %s", slice) + } + + // Path-separators are not allowed. + if strings.Contains(slice, "/") { + return "", fmt.Errorf("invalid slice name: %s", slice) + } + + var path, prefix string + sliceName := strings.TrimSuffix(slice, suffix) + // if input was -.slice, we should just return root now + if sliceName == "-" { + return "/", nil + } + for component := range strings.SplitSeq(sliceName, "-") { + // test--a.slice isn't permitted, nor is -test.slice. + if component == "" { + return "", fmt.Errorf("invalid slice name: %s", slice) + } + + // Append the component to the path and to the prefix. + path += "/" + prefix + component + suffix + prefix += component + "-" + } + return path, nil +} diff --git a/pkg/nvcdi/cuda-memory-limits.go b/pkg/nvcdi/cuda-memory-limits.go new file mode 100644 index 000000000..b48a23ce2 --- /dev/null +++ b/pkg/nvcdi/cuda-memory-limits.go @@ -0,0 +1,54 @@ +package nvcdi + +import ( + "fmt" + + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" + "github.com/NVIDIA/go-nvml/pkg/nvml" + + "github.com/NVIDIA/nvidia-container-toolkit/internal/discover" + "github.com/NVIDIA/nvidia-container-toolkit/internal/logger" +) + +type cudaMemoryLimits struct { + logger logger.Interface + driverRoot string + uuid string + hookCreator discover.HookCreator +} + +func (l *nvcdilib) newCudaMemoryLimits(d device.Device) (discover.Discover, error) { + uuid, nvmlRet := d.GetUUID() + if nvmlRet != nvml.SUCCESS { + return nil, fmt.Errorf("failed to get device UUID: %w", nvmlRet) + } + + cMemLimits := &cudaMemoryLimits{ + logger: l.logger, + driverRoot: l.driver.Root, + uuid: uuid, + hookCreator: l.hookCreator, + } + + return cMemLimits, nil +} + +// Devices are empty for this discoverer +func (c *cudaMemoryLimits) Devices() ([]discover.Device, error) { + return nil, nil +} + +// EnvVars are empty for this discoverer +func (c *cudaMemoryLimits) EnvVars() ([]discover.EnvVar, error) { + return nil, nil +} + +// Hooks returns a set of hooks that assigns a CUDA memory limit to the cgroup of the GPU workload container +func (c *cudaMemoryLimits) Hooks() ([]discover.Hook, error) { + return c.hookCreator.Create("apply-cuda-memory-limits", c.driverRoot, c.uuid).Hooks() +} + +// Mounts are empty for this discoverer +func (c *cudaMemoryLimits) Mounts() ([]discover.Mount, error) { + return nil, nil +} diff --git a/pkg/nvcdi/full-gpu-nvml.go b/pkg/nvcdi/full-gpu-nvml.go index 49bf0bdd1..554d8cbdb 100644 --- a/pkg/nvcdi/full-gpu-nvml.go +++ b/pkg/nvcdi/full-gpu-nvml.go @@ -173,11 +173,17 @@ func (l *fullGPUDeviceSpecGenerator) newFullGPUDiscoverer(d device.Device) (disc deviceNodes, ) + cudaMemoryLimitsHook, err := (*nvcdilib)(l.nvmllib).newCudaMemoryLimits(d) + if err != nil { + return nil, fmt.Errorf("failed to create cuda memory limits discoverer: %w", err) + } + var discoverers []discover.Discover discoverers = append(discoverers, deviceNodes, deviceFolderPermissionHooks, + cudaMemoryLimitsHook, ) discoverers = append(discoverers, l.additionalDiscoverers...) diff --git a/pkg/nvcdi/lib-csv_test.go b/pkg/nvcdi/lib-csv_test.go index c5ed3d8df..37ff0991e 100644 --- a/pkg/nvcdi/lib-csv_test.go +++ b/pkg/nvcdi/lib-csv_test.go @@ -200,6 +200,14 @@ func TestDeviceSpecGenerators(t *testing.T) { {Path: "/dev/nvidiactl", HostPath: "/dev/nvidiactl"}, {Path: "/dev/nvmap", HostPath: "/dev/nvmap", FileMode: to.Ptr(os.FileMode(0400)), Permissions: "rwm", GID: to.Ptr[uint32](44)}, }, + Hooks: []*specs.Hook{ + { + HookName: "createRuntime", + Path: "/usr/bin/nvidia-cdi-hook", + Args: []string{"nvidia-cdi-hook", "apply-cuda-memory-limits", "--driver-root", "", "--gpu-id", "GPU-1"}, + Env: []string{"NVIDIA_CTK_DEBUG=false"}, + }, + }, }, }, }, diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/cgo_helpers_static.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/cgo_helpers_static.go index fc675546c..51a4825f1 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/cgo_helpers_static.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/cgo_helpers_static.go @@ -121,3 +121,17 @@ func stringToInt8Slice(s string, out []int8) { out[i] = 0 } } + +func int8PtrToString(p *int8) string { + goString := C.GoString((*C.char)(unsafe.Pointer(p))) + return goString +} + +func stringToCPtr(s string) unsafe.Pointer { + // s is a Go string + cstr := C.CString(s) + + // Cast *C.char to *int8 if your struct requires it + p := unsafe.Pointer(cstr) + return p +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/const.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/const.go index 9987eb2e0..c77aa7a32 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/const.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/const.go @@ -44,6 +44,8 @@ const ( DEVICE_PCI_BUS_ID_LEGACY_FMT = "%04X:%02X:%02X.0" // DEVICE_PCI_BUS_ID_FMT as defined in nvml/nvml.h DEVICE_PCI_BUS_ID_FMT = "%08X:%02X:%02X.0" + // DEVICE_MEMORY_LIMIT_MAX as defined in nvml/nvml.h + DEVICE_MEMORY_LIMIT_MAX = 18446744073709551615 // NVLINK_MAX_LINKS as defined in nvml/nvml.h NVLINK_MAX_LINKS = 36 // TOPOLOGY_CPU as defined in nvml/nvml.h @@ -56,6 +58,32 @@ const ( DEVICE_UUID_ASCII_LEN = 41 // DEVICE_UUID_BINARY_LEN as defined in nvml/nvml.h DEVICE_UUID_BINARY_LEN = 16 + // PERF_METRICS_PWR_MODEL_DLPPM_1X_MAX_CORE_RAILS as defined in nvml/nvml.h + PERF_METRICS_PWR_MODEL_DLPPM_1X_MAX_CORE_RAILS = 2 + // PERF_METRICS_NNE_DESC_INFERENCE_LOOPS_MAX as defined in nvml/nvml.h + PERF_METRICS_NNE_DESC_INFERENCE_LOOPS_MAX = 8 + // PERF_METRICS_PWR_MODEL_METRICS_DLPPM_1X_OBESRVED_INTIAL_DRAMCLK_ESTIMATES_MAX as defined in nvml/nvml.h + PERF_METRICS_PWR_MODEL_METRICS_DLPPM_1X_OBESRVED_INTIAL_DRAMCLK_ESTIMATES_MAX = 3 + // PERF_METRICS_CONTROLLER_DLPPC_2X_PWR_POLICY_RELATIONSHIP_SET_LIMITS_MAX as defined in nvml/nvml.h + PERF_METRICS_CONTROLLER_DLPPC_2X_PWR_POLICY_RELATIONSHIP_SET_LIMITS_MAX = 4 + // PERF_METRICS_CONTROLLER_STATUS_DLPPC_2X_DRAMCLK_NUM as defined in nvml/nvml.h + PERF_METRICS_CONTROLLER_STATUS_DLPPC_2X_DRAMCLK_NUM = 3 + // PERF_METRICS_CONTROLLER_SAMPLE_CONTROLLER_MAX_NUM as defined in nvml/nvml.h + PERF_METRICS_CONTROLLER_SAMPLE_CONTROLLER_MAX_NUM = 4 + // PERF_METRICS_SAMPLE_COUNT as defined in nvml/nvml.h + PERF_METRICS_SAMPLE_COUNT = 13 + // PERF_METRICS_PWR_MODEL_SCALE_LOOPS_MAX_PFPP_1X as defined in nvml/nvml.h + PERF_METRICS_PWR_MODEL_SCALE_LOOPS_MAX_PFPP_1X = 32 + // PERF_METRICS_PWR_MODEL_SCALE_METRICS_INPUT_MAX as defined in nvml/nvml.h + PERF_METRICS_PWR_MODEL_SCALE_METRICS_INPUT_MAX = 16 + // PERF_METRICS_CONTROLLER_TYPE_DLPPC_2X as defined in nvml/nvml.h + PERF_METRICS_CONTROLLER_TYPE_DLPPC_2X = 0 + // PERF_METRICS_CONTROLLER_TYPE_PFPP_1X as defined in nvml/nvml.h + PERF_METRICS_CONTROLLER_TYPE_PFPP_1X = 1 + // PERF_METRICS_PWR_MODEL_SCALE_METRICS_PFPP_1X_GPCCLK_IDX as defined in nvml/nvml.h + PERF_METRICS_PWR_MODEL_SCALE_METRICS_PFPP_1X_GPCCLK_IDX = 0 + // PERF_CF_PM_SENSOR_MAX_SIGNALS as defined in nvml/nvml.h + PERF_CF_PM_SENSOR_MAX_SIGNALS = 1024 // FlagDefault as defined in nvml/nvml.h FlagDefault = 0 // FlagForce as defined in nvml/nvml.h @@ -118,8 +146,14 @@ const ( DEVICE_ARCH_HOPPER = 9 // DEVICE_ARCH_BLACKWELL as defined in nvml/nvml.h DEVICE_ARCH_BLACKWELL = 10 + // DEVICE_ARCH_DLA as defined in nvml/nvml.h + DEVICE_ARCH_DLA = 11 + // DEVICE_ARCH_DLA2 as defined in nvml/nvml.h + DEVICE_ARCH_DLA2 = 12 // DEVICE_ARCH_RUBIN as defined in nvml/nvml.h DEVICE_ARCH_RUBIN = 13 + // DEVICE_ARCH_NPU3 as defined in nvml/nvml.h + DEVICE_ARCH_NPU3 = 15 // DEVICE_ARCH_UNKNOWN as defined in nvml/nvml.h DEVICE_ARCH_UNKNOWN = 4294967295 // BUS_TYPE_UNKNOWN as defined in nvml/nvml.h @@ -854,8 +888,18 @@ const ( FI_DEV_REMAPPED_ROWS_COR_INACTIVE = 301 // FI_DEV_REMAPPED_ROWS_UNC_INACTIVE as defined in nvml/nvml.h FI_DEV_REMAPPED_ROWS_UNC_INACTIVE = 302 + // FI_DEV_ACTIVE_BANK_REMAPPINGS as defined in nvml/nvml.h + FI_DEV_ACTIVE_BANK_REMAPPINGS = 303 + // FI_DEV_INACTIVE_BANK_REMAPPINGS as defined in nvml/nvml.h + FI_DEV_INACTIVE_BANK_REMAPPINGS = 304 + // FI_DEV_BANK_REMAPPER_HISTOGRAM_MAX as defined in nvml/nvml.h + FI_DEV_BANK_REMAPPER_HISTOGRAM_MAX = 305 + // FI_DEV_BANK_REMAPPER_HISTOGRAM_NONE as defined in nvml/nvml.h + FI_DEV_BANK_REMAPPER_HISTOGRAM_NONE = 306 + // FI_DEV_PENDING_BANK_REMAPPING as defined in nvml/nvml.h + FI_DEV_PENDING_BANK_REMAPPING = 307 // FI_MAX as defined in nvml/nvml.h - FI_MAX = 303 + FI_MAX = 308 // MCLK_SWITCH_TYPE_NOT_SUPPORTED as defined in nvml/nvml.h MCLK_SWITCH_TYPE_NOT_SUPPORTED = 0 // MCLK_SWITCH_TYPE_DEFERRED as defined in nvml/nvml.h @@ -914,6 +958,30 @@ const ( EventTypeGpuRecoveryAction = 32768 // EventTypeAll as defined in nvml/nvml.h EventTypeAll = 65439 + // GPU_INSTANCE_ID_ANY as defined in nvml/nvml.h + GPU_INSTANCE_ID_ANY = 4294967295 + // COMPUTE_INSTANCE_ID_ANY as defined in nvml/nvml.h + COMPUTE_INSTANCE_ID_ANY = 4294967295 + // OPERATIONAL_EVENT_ATTR_UNCONTAINED as defined in nvml/nvml.h + OPERATIONAL_EVENT_ATTR_UNCONTAINED = 1 + // OPERATIONAL_EVENT_ATTR_LATENT as defined in nvml/nvml.h + OPERATIONAL_EVENT_ATTR_LATENT = 2 + // OPERATIONAL_EVENT_ATTR_PROPAGATED as defined in nvml/nvml.h + OPERATIONAL_EVENT_ATTR_PROPAGATED = 4 + // OPERATIONAL_EVENT_ATTR_COMPONENT_RESET as defined in nvml/nvml.h + OPERATIONAL_EVENT_ATTR_COMPONENT_RESET = 8 + // OPERATIONAL_EVENT_ATTR_THRESHOLD_EXCEEDED as defined in nvml/nvml.h + OPERATIONAL_EVENT_ATTR_THRESHOLD_EXCEEDED = 16 + // OPERATIONAL_EVENT_ATTR_PRIMARY as defined in nvml/nvml.h + OPERATIONAL_EVENT_ATTR_PRIMARY = 32 + // OPERATIONAL_EVENT_ATTR_OVERFLOW as defined in nvml/nvml.h + OPERATIONAL_EVENT_ATTR_OVERFLOW = 64 + // OPERATIONAL_EVENT_GROUP_ATTR_RECOVERED as defined in nvml/nvml.h + OPERATIONAL_EVENT_GROUP_ATTR_RECOVERED = 1 + // OPERATIONAL_EVENT_GROUP_ATTR_PREVERR as defined in nvml/nvml.h + OPERATIONAL_EVENT_GROUP_ATTR_PREVERR = 2 + // OPERATIONAL_EVENT_GROUP_ATTR_SIMULATED as defined in nvml/nvml.h + OPERATIONAL_EVENT_GROUP_ATTR_SIMULATED = 4 // SystemEventTypeGpuDriverUnbind as defined in nvml/nvml.h SystemEventTypeGpuDriverUnbind = 1 // SystemEventTypeGpuDriverBind as defined in nvml/nvml.h @@ -940,10 +1008,14 @@ const ( ClocksThrottleReasonHwPowerBrakeSlowdown = 128 // ClocksEventReasonDisplayClockSetting as defined in nvml/nvml.h ClocksEventReasonDisplayClockSetting = 256 + // ClocksEventReasonBoardLimit as defined in nvml/nvml.h + ClocksEventReasonBoardLimit = 512 + // ClocksEventReasonReliability as defined in nvml/nvml.h + ClocksEventReasonReliability = 1024 // ClocksEventReasonNone as defined in nvml/nvml.h ClocksEventReasonNone = 0 // ClocksEventReasonAll as defined in nvml/nvml.h - ClocksEventReasonAll = 511 + ClocksEventReasonAll = 2047 // ClocksThrottleReasonGpuIdle as defined in nvml/nvml.h ClocksThrottleReasonGpuIdle = 1 // ClocksThrottleReasonApplicationsClocksSetting as defined in nvml/nvml.h @@ -959,7 +1031,7 @@ const ( // ClocksThrottleReasonNone as defined in nvml/nvml.h ClocksThrottleReasonNone = 0 // ClocksThrottleReasonAll as defined in nvml/nvml.h - ClocksThrottleReasonAll = 511 + ClocksThrottleReasonAll = 2047 // NVFBC_SESSION_FLAG_DIFFMAP_ENABLED as defined in nvml/nvml.h NVFBC_SESSION_FLAG_DIFFMAP_ENABLED = 1 // NVFBC_SESSION_FLAG_CLASSIFICATIONMAP_ENABLED as defined in nvml/nvml.h @@ -1108,6 +1180,16 @@ const ( GPU_FABRIC_HEALTH_MASK_SHIFT_PARTITION_ASSIGNED = 12 // GPU_FABRIC_HEALTH_MASK_WIDTH_PARTITION_ASSIGNED as defined in nvml/nvml.h GPU_FABRIC_HEALTH_MASK_WIDTH_PARTITION_ASSIGNED = 3 + // GPU_FABRIC_HEALTH_MASK_GFM_STATE_NOT_SUPPORTED as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_GFM_STATE_NOT_SUPPORTED = 0 + // GPU_FABRIC_HEALTH_MASK_GFM_STATE_CONNECTED as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_GFM_STATE_CONNECTED = 1 + // GPU_FABRIC_HEALTH_MASK_GFM_STATE_DISCONNECTED as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_GFM_STATE_DISCONNECTED = 2 + // GPU_FABRIC_HEALTH_MASK_SHIFT_GFM_STATE as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_SHIFT_GFM_STATE = 14 + // GPU_FABRIC_HEALTH_MASK_WIDTH_GFM_STATE as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_WIDTH_GFM_STATE = 3 // GPU_FABRIC_HEALTH_SUMMARY_NOT_SUPPORTED as defined in nvml/nvml.h GPU_FABRIC_HEALTH_SUMMARY_NOT_SUPPORTED = 0 // GPU_FABRIC_HEALTH_SUMMARY_HEALTHY as defined in nvml/nvml.h @@ -1116,6 +1198,16 @@ const ( GPU_FABRIC_HEALTH_SUMMARY_UNHEALTHY = 2 // GPU_FABRIC_HEALTH_SUMMARY_LIMITED_CAPACITY as defined in nvml/nvml.h GPU_FABRIC_HEALTH_SUMMARY_LIMITED_CAPACITY = 3 + // GPU_FABRIC_CLIQUE_MAX as defined in nvml/nvml.h + GPU_FABRIC_CLIQUE_MAX = 64 + // GPU_FABRIC_CLIQUE_TYPE_UNICAST_POINTER as defined in nvml/nvml.h + GPU_FABRIC_CLIQUE_TYPE_UNICAST_POINTER = 0 + // GPU_FABRIC_CLIQUE_TYPE_MULTICAST_POINTER as defined in nvml/nvml.h + GPU_FABRIC_CLIQUE_TYPE_MULTICAST_POINTER = 1 + // GPU_FABRIC_CLIQUE_TYPE_UNICAST_LOGICAL_ENDPOINT as defined in nvml/nvml.h + GPU_FABRIC_CLIQUE_TYPE_UNICAST_LOGICAL_ENDPOINT = 2 + // GPU_FABRIC_CLIQUE_TYPE_MULTICAST_LOGICAL_ENDPOINT as defined in nvml/nvml.h + GPU_FABRIC_CLIQUE_TYPE_MULTICAST_LOGICAL_ENDPOINT = 3 // INIT_FLAG_NO_GPUS as defined in nvml/nvml.h INIT_FLAG_NO_GPUS = 1 // INIT_FLAG_NO_ATTACH as defined in nvml/nvml.h @@ -1162,6 +1254,8 @@ const ( NVLINK_STATE_ACTIVE = 1 // NVLINK_STATE_SLEEP as defined in nvml/nvml.h NVLINK_STATE_SLEEP = 2 + // NVLINK_STATE_ACTIVE_TRAFFIC_DISABLED as defined in nvml/nvml.h + NVLINK_STATE_ACTIVE_TRAFFIC_DISABLED = 3 // NVLINK_TOTAL_SUPPORTED_BW_MODES as defined in nvml/nvml.h NVLINK_TOTAL_SUPPORTED_BW_MODES = 23 // NVLINK_FIRMWARE_UCODE_TYPE_MSE as defined in nvml/nvml.h @@ -1527,7 +1621,10 @@ const ( BRAND_NVIDIA BrandType = 14 BRAND_GEFORCE_RTX BrandType = 15 BRAND_TITAN_RTX BrandType = 16 - BRAND_COUNT BrandType = 18 + BRAND_NVIDIA_DLA BrandType = 17 + BRAND_NVIDIA_VGAMEDEV BrandType = 18 + BRAND_NVIDIA_NPU BrandType = 19 + BRAND_COUNT BrandType = 20 ) // TemperatureThresholds as declared in nvml/nvml.h @@ -1551,8 +1648,9 @@ type TemperatureSensors int32 // TemperatureSensors enumeration from nvml/nvml.h const ( - TEMPERATURE_GPU TemperatureSensors = iota - TEMPERATURE_COUNT TemperatureSensors = 1 + TEMPERATURE_GPU TemperatureSensors = iota + TEMPERATURE_GPU_MAX TemperatureSensors = 1 + TEMPERATURE_COUNT TemperatureSensors = 2 ) // ComputeMode as declared in nvml/nvml.h @@ -1847,6 +1945,8 @@ const ( GPU_RECOVERY_ACTION_DRAIN_P2P DeviceGpuRecoveryAction = 3 GPU_RECOVERY_ACTION_DRAIN_AND_RESET DeviceGpuRecoveryAction = 4 GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN DeviceGpuRecoveryAction = 5 + GPU_RECOVERY_ACTION_BUS_RESET DeviceGpuRecoveryAction = 6 + GPU_RECOVERY_ACTION_SYSTEM_REBOOT DeviceGpuRecoveryAction = 7 ) // FanState as declared in nvml/nvml.h @@ -2032,6 +2132,50 @@ const ( GRID_LICENSE_FEATURE_CODE_VWORKSTATION GridLicenseFeatureCode = 2 GRID_LICENSE_FEATURE_CODE_GAMING GridLicenseFeatureCode = 3 GRID_LICENSE_FEATURE_CODE_COMPUTE GridLicenseFeatureCode = 4 + GRID_LICENSE_FEATURE_CODE_VGAMEDEV GridLicenseFeatureCode = 5 +) + +// GpuOperationalEventLogLevel as declared in nvml/nvml.h +type GpuOperationalEventLogLevel int32 + +// GpuOperationalEventLogLevel enumeration from nvml/nvml.h +const ( + GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL GpuOperationalEventLogLevel = iota + GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY GpuOperationalEventLogLevel = 10 + GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG GpuOperationalEventLogLevel = 20 + GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE GpuOperationalEventLogLevel = 30 + GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING GpuOperationalEventLogLevel = 40 + GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR GpuOperationalEventLogLevel = 50 +) + +// OperationalEventSeverity as declared in nvml/nvml.h +type OperationalEventSeverity int32 + +// OperationalEventSeverity enumeration from nvml/nvml.h +const ( + OPERATIONAL_EVENT_SEVERITY_ALL OperationalEventSeverity = iota + OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL OperationalEventSeverity = 10 + OPERATIONAL_EVENT_SEVERITY_CORRECTED OperationalEventSeverity = 20 + OPERATIONAL_EVENT_SEVERITY_RECOVERABLE OperationalEventSeverity = 30 + OPERATIONAL_EVENT_SEVERITY_FATAL OperationalEventSeverity = 40 +) + +// EventDataType as declared in nvml/nvml.h +type EventDataType int32 + +// EventDataType enumeration from nvml/nvml.h +const ( + EVENT_DATA_TYPE_NVML_EVENT EventDataType = iota + EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT EventDataType = 1 +) + +// GpuOperationalEventContextType as declared in nvml/nvml.h +type GpuOperationalEventContextType int32 + +// GpuOperationalEventContextType enumeration from nvml/nvml.h +const ( + GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_UNKNOWN GpuOperationalEventContextType = iota + GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_LEGACY_XID GpuOperationalEventContextType = 1 ) // CPERType as declared in nvml/nvml.h @@ -2042,26 +2186,44 @@ const ( CPER_ACCESS_TYPE_GPU CPERType = 1 ) +// NvlinkTelemetrySampleType as declared in nvml/nvml.h +type NvlinkTelemetrySampleType int32 + +// NvlinkTelemetrySampleType enumeration from nvml/nvml.h +const ( + NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX NvlinkTelemetrySampleType = iota + NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX NvlinkTelemetrySampleType = 1 + NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT NvlinkTelemetrySampleType = 2 +) + // PRMCounterId as declared in nvml/nvml.h type PRMCounterId int32 // PRMCounterId enumeration from nvml/nvml.h const ( - PRM_COUNTER_ID_NONE PRMCounterId = iota - PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS PRMCounterId = 1 - PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS PRMCounterId = 2 - PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS PRMCounterId = 101 - PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY PRMCounterId = 102 - PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES PRMCounterId = 103 - PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT PRMCounterId = 201 - PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES PRMCounterId = 301 - PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR PRMCounterId = 302 - PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE PRMCounterId = 303 - PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES PRMCounterId = 304 - PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES PRMCounterId = 305 - PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS PRMCounterId = 306 - PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS PRMCounterId = 307 - PRM_COUNTER_ID_PPRM_OPER_RECOVERY PRMCounterId = 1001 + PRM_COUNTER_ID_NONE PRMCounterId = iota + PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS PRMCounterId = 1 + PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS PRMCounterId = 2 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS PRMCounterId = 101 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY PRMCounterId = 102 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES PRMCounterId = 103 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY PRMCounterId = 104 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY PRMCounterId = 105 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT PRMCounterId = 106 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT PRMCounterId = 107 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT PRMCounterId = 108 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS PRMCounterId = 109 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME PRMCounterId = 110 + PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME PRMCounterId = 111 + PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT PRMCounterId = 201 + PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES PRMCounterId = 301 + PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR PRMCounterId = 302 + PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE PRMCounterId = 303 + PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES PRMCounterId = 304 + PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES PRMCounterId = 305 + PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS PRMCounterId = 306 + PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS PRMCounterId = 307 + PRM_COUNTER_ID_PPRM_OPER_RECOVERY PRMCounterId = 1001 ) // GpmMetricId as declared in nvml/nvml.h @@ -2371,7 +2533,151 @@ const ( GPM_METRIC_NVLINK_L34_TX GpmMetricId = 330 GPM_METRIC_NVLINK_L35_RX GpmMetricId = 331 GPM_METRIC_NVLINK_L35_TX GpmMetricId = 332 - GPM_METRIC_MAX GpmMetricId = 333 + GPM_METRIC_NVLINK_L36_RX GpmMetricId = 333 + GPM_METRIC_NVLINK_L36_TX GpmMetricId = 334 + GPM_METRIC_NVLINK_L37_RX GpmMetricId = 335 + GPM_METRIC_NVLINK_L37_TX GpmMetricId = 336 + GPM_METRIC_NVLINK_L38_RX GpmMetricId = 337 + GPM_METRIC_NVLINK_L38_TX GpmMetricId = 338 + GPM_METRIC_NVLINK_L39_RX GpmMetricId = 339 + GPM_METRIC_NVLINK_L39_TX GpmMetricId = 340 + GPM_METRIC_NVLINK_L40_RX GpmMetricId = 341 + GPM_METRIC_NVLINK_L40_TX GpmMetricId = 342 + GPM_METRIC_NVLINK_L41_RX GpmMetricId = 343 + GPM_METRIC_NVLINK_L41_TX GpmMetricId = 344 + GPM_METRIC_NVLINK_L42_RX GpmMetricId = 345 + GPM_METRIC_NVLINK_L42_TX GpmMetricId = 346 + GPM_METRIC_NVLINK_L43_RX GpmMetricId = 347 + GPM_METRIC_NVLINK_L43_TX GpmMetricId = 348 + GPM_METRIC_NVLINK_L44_RX GpmMetricId = 349 + GPM_METRIC_NVLINK_L44_TX GpmMetricId = 350 + GPM_METRIC_NVLINK_L45_RX GpmMetricId = 351 + GPM_METRIC_NVLINK_L45_TX GpmMetricId = 352 + GPM_METRIC_NVLINK_L46_RX GpmMetricId = 353 + GPM_METRIC_NVLINK_L46_TX GpmMetricId = 354 + GPM_METRIC_NVLINK_L47_RX GpmMetricId = 355 + GPM_METRIC_NVLINK_L47_TX GpmMetricId = 356 + GPM_METRIC_NVLINK_L48_RX GpmMetricId = 357 + GPM_METRIC_NVLINK_L48_TX GpmMetricId = 358 + GPM_METRIC_NVLINK_L49_RX GpmMetricId = 359 + GPM_METRIC_NVLINK_L49_TX GpmMetricId = 360 + GPM_METRIC_NVLINK_L50_RX GpmMetricId = 361 + GPM_METRIC_NVLINK_L50_TX GpmMetricId = 362 + GPM_METRIC_NVLINK_L51_RX GpmMetricId = 363 + GPM_METRIC_NVLINK_L51_TX GpmMetricId = 364 + GPM_METRIC_NVLINK_L52_RX GpmMetricId = 365 + GPM_METRIC_NVLINK_L52_TX GpmMetricId = 366 + GPM_METRIC_NVLINK_L53_RX GpmMetricId = 367 + GPM_METRIC_NVLINK_L53_TX GpmMetricId = 368 + GPM_METRIC_NVLINK_L54_RX GpmMetricId = 369 + GPM_METRIC_NVLINK_L54_TX GpmMetricId = 370 + GPM_METRIC_NVLINK_L55_RX GpmMetricId = 371 + GPM_METRIC_NVLINK_L55_TX GpmMetricId = 372 + GPM_METRIC_NVLINK_L56_RX GpmMetricId = 373 + GPM_METRIC_NVLINK_L56_TX GpmMetricId = 374 + GPM_METRIC_NVLINK_L57_RX GpmMetricId = 375 + GPM_METRIC_NVLINK_L57_TX GpmMetricId = 376 + GPM_METRIC_NVLINK_L58_RX GpmMetricId = 377 + GPM_METRIC_NVLINK_L58_TX GpmMetricId = 378 + GPM_METRIC_NVLINK_L59_RX GpmMetricId = 379 + GPM_METRIC_NVLINK_L59_TX GpmMetricId = 380 + GPM_METRIC_NVLINK_L60_RX GpmMetricId = 381 + GPM_METRIC_NVLINK_L60_TX GpmMetricId = 382 + GPM_METRIC_NVLINK_L61_RX GpmMetricId = 383 + GPM_METRIC_NVLINK_L61_TX GpmMetricId = 384 + GPM_METRIC_NVLINK_L62_RX GpmMetricId = 385 + GPM_METRIC_NVLINK_L62_TX GpmMetricId = 386 + GPM_METRIC_NVLINK_L63_RX GpmMetricId = 387 + GPM_METRIC_NVLINK_L63_TX GpmMetricId = 388 + GPM_METRIC_NVLINK_L64_RX GpmMetricId = 389 + GPM_METRIC_NVLINK_L64_TX GpmMetricId = 390 + GPM_METRIC_NVLINK_L65_RX GpmMetricId = 391 + GPM_METRIC_NVLINK_L65_TX GpmMetricId = 392 + GPM_METRIC_NVLINK_L66_RX GpmMetricId = 393 + GPM_METRIC_NVLINK_L66_TX GpmMetricId = 394 + GPM_METRIC_NVLINK_L67_RX GpmMetricId = 395 + GPM_METRIC_NVLINK_L67_TX GpmMetricId = 396 + GPM_METRIC_NVLINK_L68_RX GpmMetricId = 397 + GPM_METRIC_NVLINK_L68_TX GpmMetricId = 398 + GPM_METRIC_NVLINK_L69_RX GpmMetricId = 399 + GPM_METRIC_NVLINK_L69_TX GpmMetricId = 400 + GPM_METRIC_NVLINK_L70_RX GpmMetricId = 401 + GPM_METRIC_NVLINK_L70_TX GpmMetricId = 402 + GPM_METRIC_NVLINK_L71_RX GpmMetricId = 403 + GPM_METRIC_NVLINK_L71_TX GpmMetricId = 404 + GPM_METRIC_NVLINK_L36_RX_PER_SEC GpmMetricId = 405 + GPM_METRIC_NVLINK_L36_TX_PER_SEC GpmMetricId = 406 + GPM_METRIC_NVLINK_L37_RX_PER_SEC GpmMetricId = 407 + GPM_METRIC_NVLINK_L37_TX_PER_SEC GpmMetricId = 408 + GPM_METRIC_NVLINK_L38_RX_PER_SEC GpmMetricId = 409 + GPM_METRIC_NVLINK_L38_TX_PER_SEC GpmMetricId = 410 + GPM_METRIC_NVLINK_L39_RX_PER_SEC GpmMetricId = 411 + GPM_METRIC_NVLINK_L39_TX_PER_SEC GpmMetricId = 412 + GPM_METRIC_NVLINK_L40_RX_PER_SEC GpmMetricId = 413 + GPM_METRIC_NVLINK_L40_TX_PER_SEC GpmMetricId = 414 + GPM_METRIC_NVLINK_L41_RX_PER_SEC GpmMetricId = 415 + GPM_METRIC_NVLINK_L41_TX_PER_SEC GpmMetricId = 416 + GPM_METRIC_NVLINK_L42_RX_PER_SEC GpmMetricId = 417 + GPM_METRIC_NVLINK_L42_TX_PER_SEC GpmMetricId = 418 + GPM_METRIC_NVLINK_L43_RX_PER_SEC GpmMetricId = 419 + GPM_METRIC_NVLINK_L43_TX_PER_SEC GpmMetricId = 420 + GPM_METRIC_NVLINK_L44_RX_PER_SEC GpmMetricId = 421 + GPM_METRIC_NVLINK_L44_TX_PER_SEC GpmMetricId = 422 + GPM_METRIC_NVLINK_L45_RX_PER_SEC GpmMetricId = 423 + GPM_METRIC_NVLINK_L45_TX_PER_SEC GpmMetricId = 424 + GPM_METRIC_NVLINK_L46_RX_PER_SEC GpmMetricId = 425 + GPM_METRIC_NVLINK_L46_TX_PER_SEC GpmMetricId = 426 + GPM_METRIC_NVLINK_L47_RX_PER_SEC GpmMetricId = 427 + GPM_METRIC_NVLINK_L47_TX_PER_SEC GpmMetricId = 428 + GPM_METRIC_NVLINK_L48_RX_PER_SEC GpmMetricId = 429 + GPM_METRIC_NVLINK_L48_TX_PER_SEC GpmMetricId = 430 + GPM_METRIC_NVLINK_L49_RX_PER_SEC GpmMetricId = 431 + GPM_METRIC_NVLINK_L49_TX_PER_SEC GpmMetricId = 432 + GPM_METRIC_NVLINK_L50_RX_PER_SEC GpmMetricId = 433 + GPM_METRIC_NVLINK_L50_TX_PER_SEC GpmMetricId = 434 + GPM_METRIC_NVLINK_L51_RX_PER_SEC GpmMetricId = 435 + GPM_METRIC_NVLINK_L51_TX_PER_SEC GpmMetricId = 436 + GPM_METRIC_NVLINK_L52_RX_PER_SEC GpmMetricId = 437 + GPM_METRIC_NVLINK_L52_TX_PER_SEC GpmMetricId = 438 + GPM_METRIC_NVLINK_L53_RX_PER_SEC GpmMetricId = 439 + GPM_METRIC_NVLINK_L53_TX_PER_SEC GpmMetricId = 440 + GPM_METRIC_NVLINK_L54_RX_PER_SEC GpmMetricId = 441 + GPM_METRIC_NVLINK_L54_TX_PER_SEC GpmMetricId = 442 + GPM_METRIC_NVLINK_L55_RX_PER_SEC GpmMetricId = 443 + GPM_METRIC_NVLINK_L55_TX_PER_SEC GpmMetricId = 444 + GPM_METRIC_NVLINK_L56_RX_PER_SEC GpmMetricId = 445 + GPM_METRIC_NVLINK_L56_TX_PER_SEC GpmMetricId = 446 + GPM_METRIC_NVLINK_L57_RX_PER_SEC GpmMetricId = 447 + GPM_METRIC_NVLINK_L57_TX_PER_SEC GpmMetricId = 448 + GPM_METRIC_NVLINK_L58_RX_PER_SEC GpmMetricId = 449 + GPM_METRIC_NVLINK_L58_TX_PER_SEC GpmMetricId = 450 + GPM_METRIC_NVLINK_L59_RX_PER_SEC GpmMetricId = 451 + GPM_METRIC_NVLINK_L59_TX_PER_SEC GpmMetricId = 452 + GPM_METRIC_NVLINK_L60_RX_PER_SEC GpmMetricId = 453 + GPM_METRIC_NVLINK_L60_TX_PER_SEC GpmMetricId = 454 + GPM_METRIC_NVLINK_L61_RX_PER_SEC GpmMetricId = 455 + GPM_METRIC_NVLINK_L61_TX_PER_SEC GpmMetricId = 456 + GPM_METRIC_NVLINK_L62_RX_PER_SEC GpmMetricId = 457 + GPM_METRIC_NVLINK_L62_TX_PER_SEC GpmMetricId = 458 + GPM_METRIC_NVLINK_L63_RX_PER_SEC GpmMetricId = 459 + GPM_METRIC_NVLINK_L63_TX_PER_SEC GpmMetricId = 460 + GPM_METRIC_NVLINK_L64_RX_PER_SEC GpmMetricId = 461 + GPM_METRIC_NVLINK_L64_TX_PER_SEC GpmMetricId = 462 + GPM_METRIC_NVLINK_L65_RX_PER_SEC GpmMetricId = 463 + GPM_METRIC_NVLINK_L65_TX_PER_SEC GpmMetricId = 464 + GPM_METRIC_NVLINK_L66_RX_PER_SEC GpmMetricId = 465 + GPM_METRIC_NVLINK_L66_TX_PER_SEC GpmMetricId = 466 + GPM_METRIC_NVLINK_L67_RX_PER_SEC GpmMetricId = 467 + GPM_METRIC_NVLINK_L67_TX_PER_SEC GpmMetricId = 468 + GPM_METRIC_NVLINK_L68_RX_PER_SEC GpmMetricId = 469 + GPM_METRIC_NVLINK_L68_TX_PER_SEC GpmMetricId = 470 + GPM_METRIC_NVLINK_L69_RX_PER_SEC GpmMetricId = 471 + GPM_METRIC_NVLINK_L69_TX_PER_SEC GpmMetricId = 472 + GPM_METRIC_NVLINK_L70_RX_PER_SEC GpmMetricId = 473 + GPM_METRIC_NVLINK_L70_TX_PER_SEC GpmMetricId = 474 + GPM_METRIC_NVLINK_L71_RX_PER_SEC GpmMetricId = 475 + GPM_METRIC_NVLINK_L71_TX_PER_SEC GpmMetricId = 476 + GPM_METRIC_MAX GpmMetricId = 477 ) // PowerProfileType as declared in nvml/nvml.h @@ -2379,22 +2685,32 @@ type PowerProfileType int32 // PowerProfileType enumeration from nvml/nvml.h const ( - POWER_PROFILE_MAX_P PowerProfileType = iota - POWER_PROFILE_MAX_Q PowerProfileType = 1 - POWER_PROFILE_COMPUTE PowerProfileType = 2 - POWER_PROFILE_MEMORY_BOUND PowerProfileType = 3 - POWER_PROFILE_NETWORK PowerProfileType = 4 - POWER_PROFILE_BALANCED PowerProfileType = 5 - POWER_PROFILE_LLM_INFERENCE PowerProfileType = 6 - POWER_PROFILE_LLM_TRAINING PowerProfileType = 7 - POWER_PROFILE_RBM PowerProfileType = 8 - POWER_PROFILE_DCPCIE PowerProfileType = 9 - POWER_PROFILE_HMMA_SPARSE PowerProfileType = 10 - POWER_PROFILE_HMMA_DENSE PowerProfileType = 11 - POWER_PROFILE_SYNC_BALANCED PowerProfileType = 12 - POWER_PROFILE_HPC PowerProfileType = 13 - POWER_PROFILE_MIG PowerProfileType = 14 - POWER_PROFILE_MAX PowerProfileType = 15 + POWER_PROFILE_MAX_P PowerProfileType = iota + POWER_PROFILE_MAX_Q PowerProfileType = 1 + POWER_PROFILE_COMPUTE PowerProfileType = 2 + POWER_PROFILE_MEMORY_BOUND PowerProfileType = 3 + POWER_PROFILE_NETWORK PowerProfileType = 4 + POWER_PROFILE_BALANCED PowerProfileType = 5 + POWER_PROFILE_LLM_INFERENCE PowerProfileType = 6 + POWER_PROFILE_LLM_TRAINING PowerProfileType = 7 + POWER_PROFILE_RBM PowerProfileType = 8 + POWER_PROFILE_DCPCIE PowerProfileType = 9 + POWER_PROFILE_HMMA_SPARSE PowerProfileType = 10 + POWER_PROFILE_HMMA_DENSE PowerProfileType = 11 + POWER_PROFILE_SYNC_BALANCED PowerProfileType = 12 + POWER_PROFILE_HPC PowerProfileType = 13 + POWER_PROFILE_MIG PowerProfileType = 14 + POWER_PROFILE_MAX_Q_1 PowerProfileType = 15 + POWER_PROFILE_NETWORK_BOUND PowerProfileType = 16 + POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE PowerProfileType = 17 + POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE PowerProfileType = 18 + POWER_PROFILE_LOW_LATENCY_INFERENCE PowerProfileType = 19 + POWER_PROFILE_TRAINING PowerProfileType = 20 + POWER_PROFILE_INFERENCE PowerProfileType = 21 + POWER_PROFILE_MAX_Q_2 PowerProfileType = 22 + POWER_PROFILE_MAX_Q_3 PowerProfileType = 23 + POWER_PROFILE_LOW_PRIORITY_BACKGROUND PowerProfileType = 24 + POWER_PROFILE_MAX PowerProfileType = 25 ) // PowerProfileOperation as declared in nvml/nvml.h diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/device.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/device.go index afe1f8353..2a859e215 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/device.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/device.go @@ -3261,6 +3261,16 @@ func (device nvmlDevice) GetGpuFabricInfoV() GpuFabricInfoHandler { return GpuFabricInfoHandler{device} } +func (l *library) DeviceGetGpuFabricInfo_v4(device Device) (GpuFabricInfo_v4, Return) { + return device.GetGpuFabricInfo_v4() +} + +func (device nvmlDevice) GetGpuFabricInfo_v4() (GpuFabricInfo_v4, Return) { + var info GpuFabricInfo_v4 + ret := nvmlDeviceGetGpuFabricInfo_v4(device, &info) + return info, ret +} + // nvml.DeviceGetProcessesUtilizationInfo() func (l *library) DeviceGetProcessesUtilizationInfo(device Device) (ProcessesUtilizationInfo, Return) { return device.GetProcessesUtilizationInfo() @@ -3831,3 +3841,88 @@ func (l *library) GpuInstanceSetVgpuSchedulerState_v2(gpuInstance GpuInstance, s func (gpuInstance nvmlGpuInstance) SetVgpuSchedulerState_v2(schedulerState *VgpuSchedulerState_v2) Return { return nvmlGpuInstanceSetVgpuSchedulerState_v2(gpuInstance, schedulerState) } + +func (l *library) DeviceSetMemoryLimits_v1(device Device, namespace string, requests int, limits int) Return { + return device.SetMemoryLimits_v1(namespace, requests, limits) +} + +func (device nvmlDevice) SetMemoryLimits_v1(namespace string, requests int, limits int) Return { + d := &SetMemoryLimits_v1{} + cptr := stringToCPtr(namespace) + defer free(cptr) + d.NameSpace = (*int8)(cptr) + d.SoftLimit = uint64(requests) + d.HardLimit = uint64(limits) + return nvmlDeviceSetMemoryLimits_v1(device, d) +} + +func (l *library) DeviceGetMemoryLimits_v1(device Device, namespace string) (GetMemoryLimits_v1, Return) { + return device.GetMemoryLimits_v1(namespace) +} + +func (device nvmlDevice) GetMemoryLimits_v1(namespace string) (GetMemoryLimits_v1, Return) { + d := &GetMemoryLimits_v1{} + cptr := stringToCPtr(namespace) + defer free(cptr) + d.NameSpace = (*int8)(cptr) + ret := nvmlDeviceGetMemoryLimits_v1(device, d) + return *d, ret +} + +// nvml.DeviceSetAdaptiveTgpMode_v1() +func (l *library) DeviceSetAdaptiveTgpMode_v1(device Device, mode EnableState) Return { + return device.SetAdaptiveTgpMode_v1(mode) +} + +func (device nvmlDevice) SetAdaptiveTgpMode_v1(mode EnableState) Return { + return nvmlDeviceSetAdaptiveTgpMode_v1(device, mode) +} + +// nvml.DeviceGetAdaptiveTgpModeInfo_v1() +func (l *library) DeviceGetAdaptiveTgpModeInfo_v1(device Device) (AdaptiveTgpModeInfo_v1, Return) { + return device.GetAdaptiveTgpModeInfo_v1() +} + +func (device nvmlDevice) GetAdaptiveTgpModeInfo_v1() (AdaptiveTgpModeInfo_v1, Return) { + var info AdaptiveTgpModeInfo_v1 + ret := nvmlDeviceGetAdaptiveTgpModeInfo_v1(device, &info) + return info, ret +} + +// nvml.DevicePerfMetricsGetSamples_v1() +func (l *library) DevicePerfMetricsGetSamples_v1(device Device, samples *PerfMetricsSamples_v1) Return { + return device.PerfMetricsGetSamples_v1(samples) +} + +func (device nvmlDevice) PerfMetricsGetSamples_v1(samples *PerfMetricsSamples_v1) Return { + return nvmlDevicePerfMetricsGetSamples_v1(device, samples) +} + +// nvml.DeviceSetNvlinkBwModeAsync_v1() +func (l *library) DeviceSetNvlinkBwModeAsync_v1(device Device, setBwModeAsync *NvlinkSetBwModeAsync_v1) Return { + return device.SetNvlinkBwModeAsync_v1(setBwModeAsync) +} + +func (device nvmlDevice) SetNvlinkBwModeAsync_v1(setBwModeAsync *NvlinkSetBwModeAsync_v1) Return { + return nvmlDeviceSetNvlinkBwModeAsync_v1(device, setBwModeAsync) +} + +// nvml.DeviceGetNvLinkTelemetrySamples_v1() +func (l *library) DeviceGetNvLinkTelemetrySamples_v1(device Device, samples *NvlinkTelemetrySamples_v1) Return { + return device.GetNvLinkTelemetrySamples_v1(samples) +} + +func (device nvmlDevice) GetNvLinkTelemetrySamples_v1(samples *NvlinkTelemetrySamples_v1) Return { + return nvmlDeviceGetNvLinkTelemetrySamples_v1(device, samples) +} + +// nvml.DeviceGetBankRemapperStatus_v1() +func (l *library) DeviceGetBankRemapperStatus_v1(device Device) (EccBankRemapperStatus_v1, Return) { + return device.GetBankRemapperStatus_v1() +} + +func (device nvmlDevice) GetBankRemapperStatus_v1() (EccBankRemapperStatus_v1, Return) { + var status EccBankRemapperStatus_v1 + ret := nvmlDeviceGetBankRemapperStatus_v1(device, &status) + return status, ret +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/event_set.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/event_set.go index b772d57fc..0c47dd5dc 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/event_set.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/event_set.go @@ -14,6 +14,8 @@ package nvml +import "unsafe" + // EventData includes an interface type for Device instead of nvmlDevice type EventData struct { Device Device @@ -80,3 +82,71 @@ func (l *library) SystemRegisterEvents(request *SystemRegisterEventRequest) Retu func (l *library) SystemEventSetWait(request *SystemEventSetWaitRequest) Return { return nvmlSystemEventSetWait(request) } + +// nvml.EventSetRegisterGpuOperationalEvents_v1() +func (l *library) EventSetRegisterGpuOperationalEvents_v1(set EventSet, config *GpuOperationalEventConfig_v1) Return { + return set.RegisterGpuOperationalEvents_v1(config) +} + +func (set nvmlEventSet) RegisterGpuOperationalEvents_v1(config *GpuOperationalEventConfig_v1) Return { + return nvmlEventSetRegisterGpuOperationalEvents_v1(set, config) +} + +// nvml.EventSetWait_v3() +func (l *library) EventSetWait_v3(set EventSet, timeoutms uint32) (EventData_v2, Return) { + return set.Wait_v3(timeoutms) +} + +func (set nvmlEventSet) Wait_v3(timeoutms uint32) (EventData_v2, Return) { + var data EventData_v2 + ret := nvmlEventSetWait_v3(set, &data, timeoutms) + return data, ret +} + +// nvml.EventSetGetContextCount_v1() +func (l *library) EventSetGetContextCount_v1(set EventSet) (uint32, Return) { + return set.GetContextCount_v1() +} + +func (set nvmlEventSet) GetContextCount_v1() (uint32, Return) { + var count uint32 + ret := nvmlEventSetGetContextCount_v1(set, &count) + return count, ret +} + +// nvml.EventSetGetContextInfo_v1() +func (l *library) EventSetGetContextInfo_v1(set EventSet, index uint32) (OperationalEventContextInfo_v1, Return) { + return set.GetContextInfo_v1(index) +} + +func (set nvmlEventSet) GetContextInfo_v1(index uint32) (OperationalEventContextInfo_v1, Return) { + var info OperationalEventContextInfo_v1 + ret := nvmlEventSetGetContextInfo_v1(set, index, &info) + return info, ret +} + +// nvml.EventSetGetContextData_v1() +func (l *library) EventSetGetContextData_v1(set EventSet, index uint32, data []byte) (uint32, Return) { + return set.GetContextData_v1(index, data) +} + +func (set nvmlEventSet) GetContextData_v1(index uint32, data []byte) (uint32, Return) { + dataSize := uint32(len(data)) + var ptr unsafe.Pointer + if len(data) > 0 { + ptr = unsafe.Pointer(&data[0]) + } + ret := nvmlEventSetGetContextData_v1(set, index, ptr, &dataSize) + return dataSize, ret +} + +// nvml.EventSetGetGpuOperationalEventContextLegacyXid_v1() +func (l *library) EventSetGetGpuOperationalEventContextLegacyXid_v1(set EventSet, index uint32) (GpuOperationalEventContextLegacyXid_v1, Return) { + return set.GetGpuOperationalEventContextLegacyXid_v1(index) +} + +func (set nvmlEventSet) GetGpuOperationalEventContextLegacyXid_v1(index uint32) (GpuOperationalEventContextLegacyXid_v1, Return) { + var xid GpuOperationalEventContextLegacyXid_v1 + ret := nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(set, index, &xid) + return xid, ret +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/gpm.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/gpm.go index 0ecb22d28..9405f0f95 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/gpm.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/gpm.go @@ -20,7 +20,7 @@ type GpmMetricsGetType struct { NumMetrics uint32 Sample1 GpmSample Sample2 GpmSample - Metrics [333]GpmMetric + Metrics [477]GpmMetric } func (g *GpmMetricsGetType) convert() *nvmlGpmMetricsGetType { diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go index 5b8014fe3..e330b9fe9 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go @@ -63,6 +63,9 @@ var _ nvml.Device = &Device{} // GetAdaptiveClockInfoStatusFunc: func() (uint32, nvml.Return) { // panic("mock out the GetAdaptiveClockInfoStatus method") // }, +// GetAdaptiveTgpModeInfo_v1Func: func() (nvml.AdaptiveTgpModeInfo_v1, nvml.Return) { +// panic("mock out the GetAdaptiveTgpModeInfo_v1 method") +// }, // GetAddressingModeFunc: func() (nvml.DeviceAddressingMode, nvml.Return) { // panic("mock out the GetAddressingMode method") // }, @@ -84,6 +87,9 @@ var _ nvml.Device = &Device{} // GetBBXTimeData_v1Func: func() (nvml.BBXTimeData_v1, nvml.Return) { // panic("mock out the GetBBXTimeData_v1 method") // }, +// GetBankRemapperStatus_v1Func: func() (nvml.EccBankRemapperStatus_v1, nvml.Return) { +// panic("mock out the GetBankRemapperStatus_v1 method") +// }, // GetBoardIdFunc: func() (uint32, nvml.Return) { // panic("mock out the GetBoardId method") // }, @@ -252,6 +258,9 @@ var _ nvml.Device = &Device{} // GetGpuFabricInfoVFunc: func() nvml.GpuFabricInfoHandler { // panic("mock out the GetGpuFabricInfoV method") // }, +// GetGpuFabricInfo_v4Func: func() (nvml.GpuFabricInfo_v4, nvml.Return) { +// panic("mock out the GetGpuFabricInfo_v4 method") +// }, // GetGpuInstanceByIdFunc: func(n int) (nvml.GpuInstance, nvml.Return) { // panic("mock out the GetGpuInstanceById method") // }, @@ -363,6 +372,9 @@ var _ nvml.Device = &Device{} // GetMemoryInfo_v2Func: func() (nvml.Memory_v2, nvml.Return) { // panic("mock out the GetMemoryInfo_v2 method") // }, +// GetMemoryLimits_v1Func: func(s string) (nvml.GetMemoryLimits_v1, nvml.Return) { +// panic("mock out the GetMemoryLimits_v1 method") +// }, // GetMigDeviceHandleByIndexFunc: func(n int) (nvml.Device, nvml.Return) { // panic("mock out the GetMigDeviceHandleByIndex method") // }, @@ -414,6 +426,9 @@ var _ nvml.Device = &Device{} // GetNvLinkStateFunc: func(n int) (nvml.EnableState, nvml.Return) { // panic("mock out the GetNvLinkState method") // }, +// GetNvLinkTelemetrySamples_v1Func: func(nvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1) nvml.Return { +// panic("mock out the GetNvLinkTelemetrySamples_v1 method") +// }, // GetNvLinkUtilizationControlFunc: func(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { // panic("mock out the GetNvLinkUtilizationControl method") // }, @@ -669,6 +684,9 @@ var _ nvml.Device = &Device{} // OnSameBoardFunc: func(device nvml.Device) (int, nvml.Return) { // panic("mock out the OnSameBoard method") // }, +// PerfMetricsGetSamples_v1Func: func(perfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1) nvml.Return { +// panic("mock out the PerfMetricsGetSamples_v1 method") +// }, // PowerSmoothingActivatePresetProfileFunc: func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { // panic("mock out the PowerSmoothingActivatePresetProfile method") // }, @@ -708,6 +726,9 @@ var _ nvml.Device = &Device{} // SetAccountingModeFunc: func(enableState nvml.EnableState) nvml.Return { // panic("mock out the SetAccountingMode method") // }, +// SetAdaptiveTgpMode_v1Func: func(enableState nvml.EnableState) nvml.Return { +// panic("mock out the SetAdaptiveTgpMode_v1 method") +// }, // SetApplicationsClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { // panic("mock out the SetApplicationsClocks method") // }, @@ -762,6 +783,9 @@ var _ nvml.Device = &Device{} // SetMemClkVfOffsetFunc: func(n int) nvml.Return { // panic("mock out the SetMemClkVfOffset method") // }, +// SetMemoryLimits_v1Func: func(s string, n1 int, n2 int) nvml.Return { +// panic("mock out the SetMemoryLimits_v1 method") +// }, // SetMemoryLockedClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { // panic("mock out the SetMemoryLockedClocks method") // }, @@ -777,6 +801,9 @@ var _ nvml.Device = &Device{} // SetNvlinkBwModeFunc: func(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { // panic("mock out the SetNvlinkBwMode method") // }, +// SetNvlinkBwModeAsync_v1Func: func(nvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1) nvml.Return { +// panic("mock out the SetNvlinkBwModeAsync_v1 method") +// }, // SetPersistenceModeFunc: func(enableState nvml.EnableState) nvml.Return { // panic("mock out the SetPersistenceMode method") // }, @@ -883,6 +910,9 @@ type Device struct { // GetAdaptiveClockInfoStatusFunc mocks the GetAdaptiveClockInfoStatus method. GetAdaptiveClockInfoStatusFunc func() (uint32, nvml.Return) + // GetAdaptiveTgpModeInfo_v1Func mocks the GetAdaptiveTgpModeInfo_v1 method. + GetAdaptiveTgpModeInfo_v1Func func() (nvml.AdaptiveTgpModeInfo_v1, nvml.Return) + // GetAddressingModeFunc mocks the GetAddressingMode method. GetAddressingModeFunc func() (nvml.DeviceAddressingMode, nvml.Return) @@ -904,6 +934,9 @@ type Device struct { // GetBBXTimeData_v1Func mocks the GetBBXTimeData_v1 method. GetBBXTimeData_v1Func func() (nvml.BBXTimeData_v1, nvml.Return) + // GetBankRemapperStatus_v1Func mocks the GetBankRemapperStatus_v1 method. + GetBankRemapperStatus_v1Func func() (nvml.EccBankRemapperStatus_v1, nvml.Return) + // GetBoardIdFunc mocks the GetBoardId method. GetBoardIdFunc func() (uint32, nvml.Return) @@ -1072,6 +1105,9 @@ type Device struct { // GetGpuFabricInfoVFunc mocks the GetGpuFabricInfoV method. GetGpuFabricInfoVFunc func() nvml.GpuFabricInfoHandler + // GetGpuFabricInfo_v4Func mocks the GetGpuFabricInfo_v4 method. + GetGpuFabricInfo_v4Func func() (nvml.GpuFabricInfo_v4, nvml.Return) + // GetGpuInstanceByIdFunc mocks the GetGpuInstanceById method. GetGpuInstanceByIdFunc func(n int) (nvml.GpuInstance, nvml.Return) @@ -1183,6 +1219,9 @@ type Device struct { // GetMemoryInfo_v2Func mocks the GetMemoryInfo_v2 method. GetMemoryInfo_v2Func func() (nvml.Memory_v2, nvml.Return) + // GetMemoryLimits_v1Func mocks the GetMemoryLimits_v1 method. + GetMemoryLimits_v1Func func(s string) (nvml.GetMemoryLimits_v1, nvml.Return) + // GetMigDeviceHandleByIndexFunc mocks the GetMigDeviceHandleByIndex method. GetMigDeviceHandleByIndexFunc func(n int) (nvml.Device, nvml.Return) @@ -1234,6 +1273,9 @@ type Device struct { // GetNvLinkStateFunc mocks the GetNvLinkState method. GetNvLinkStateFunc func(n int) (nvml.EnableState, nvml.Return) + // GetNvLinkTelemetrySamples_v1Func mocks the GetNvLinkTelemetrySamples_v1 method. + GetNvLinkTelemetrySamples_v1Func func(nvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1) nvml.Return + // GetNvLinkUtilizationControlFunc mocks the GetNvLinkUtilizationControl method. GetNvLinkUtilizationControlFunc func(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) @@ -1489,6 +1531,9 @@ type Device struct { // OnSameBoardFunc mocks the OnSameBoard method. OnSameBoardFunc func(device nvml.Device) (int, nvml.Return) + // PerfMetricsGetSamples_v1Func mocks the PerfMetricsGetSamples_v1 method. + PerfMetricsGetSamples_v1Func func(perfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1) nvml.Return + // PowerSmoothingActivatePresetProfileFunc mocks the PowerSmoothingActivatePresetProfile method. PowerSmoothingActivatePresetProfileFunc func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return @@ -1528,6 +1573,9 @@ type Device struct { // SetAccountingModeFunc mocks the SetAccountingMode method. SetAccountingModeFunc func(enableState nvml.EnableState) nvml.Return + // SetAdaptiveTgpMode_v1Func mocks the SetAdaptiveTgpMode_v1 method. + SetAdaptiveTgpMode_v1Func func(enableState nvml.EnableState) nvml.Return + // SetApplicationsClocksFunc mocks the SetApplicationsClocks method. SetApplicationsClocksFunc func(v1 uint32, v2 uint32) nvml.Return @@ -1582,6 +1630,9 @@ type Device struct { // SetMemClkVfOffsetFunc mocks the SetMemClkVfOffset method. SetMemClkVfOffsetFunc func(n int) nvml.Return + // SetMemoryLimits_v1Func mocks the SetMemoryLimits_v1 method. + SetMemoryLimits_v1Func func(s string, n1 int, n2 int) nvml.Return + // SetMemoryLockedClocksFunc mocks the SetMemoryLockedClocks method. SetMemoryLockedClocksFunc func(v1 uint32, v2 uint32) nvml.Return @@ -1597,6 +1648,9 @@ type Device struct { // SetNvlinkBwModeFunc mocks the SetNvlinkBwMode method. SetNvlinkBwModeFunc func(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return + // SetNvlinkBwModeAsync_v1Func mocks the SetNvlinkBwModeAsync_v1 method. + SetNvlinkBwModeAsync_v1Func func(nvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1) nvml.Return + // SetPersistenceModeFunc mocks the SetPersistenceMode method. SetPersistenceModeFunc func(enableState nvml.EnableState) nvml.Return @@ -1720,6 +1774,9 @@ type Device struct { // GetAdaptiveClockInfoStatus holds details about calls to the GetAdaptiveClockInfoStatus method. GetAdaptiveClockInfoStatus []struct { } + // GetAdaptiveTgpModeInfo_v1 holds details about calls to the GetAdaptiveTgpModeInfo_v1 method. + GetAdaptiveTgpModeInfo_v1 []struct { + } // GetAddressingMode holds details about calls to the GetAddressingMode method. GetAddressingMode []struct { } @@ -1743,6 +1800,9 @@ type Device struct { // GetBBXTimeData_v1 holds details about calls to the GetBBXTimeData_v1 method. GetBBXTimeData_v1 []struct { } + // GetBankRemapperStatus_v1 holds details about calls to the GetBankRemapperStatus_v1 method. + GetBankRemapperStatus_v1 []struct { + } // GetBoardId holds details about calls to the GetBoardId method. GetBoardId []struct { } @@ -1939,6 +1999,9 @@ type Device struct { // GetGpuFabricInfoV holds details about calls to the GetGpuFabricInfoV method. GetGpuFabricInfoV []struct { } + // GetGpuFabricInfo_v4 holds details about calls to the GetGpuFabricInfo_v4 method. + GetGpuFabricInfo_v4 []struct { + } // GetGpuInstanceById holds details about calls to the GetGpuInstanceById method. GetGpuInstanceById []struct { // N is the n argument value. @@ -2080,6 +2143,11 @@ type Device struct { // GetMemoryInfo_v2 holds details about calls to the GetMemoryInfo_v2 method. GetMemoryInfo_v2 []struct { } + // GetMemoryLimits_v1 holds details about calls to the GetMemoryLimits_v1 method. + GetMemoryLimits_v1 []struct { + // S is the s argument value. + S string + } // GetMigDeviceHandleByIndex holds details about calls to the GetMigDeviceHandleByIndex method. GetMigDeviceHandleByIndex []struct { // N is the n argument value. @@ -2151,6 +2219,11 @@ type Device struct { // N is the n argument value. N int } + // GetNvLinkTelemetrySamples_v1 holds details about calls to the GetNvLinkTelemetrySamples_v1 method. + GetNvLinkTelemetrySamples_v1 []struct { + // NvlinkTelemetrySamples_v1 is the nvlinkTelemetrySamples_v1 argument value. + NvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1 + } // GetNvLinkUtilizationControl holds details about calls to the GetNvLinkUtilizationControl method. GetNvLinkUtilizationControl []struct { // N1 is the n1 argument value. @@ -2478,6 +2551,11 @@ type Device struct { // Device is the device argument value. Device nvml.Device } + // PerfMetricsGetSamples_v1 holds details about calls to the PerfMetricsGetSamples_v1 method. + PerfMetricsGetSamples_v1 []struct { + // PerfMetricsSamples_v1 is the perfMetricsSamples_v1 argument value. + PerfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1 + } // PowerSmoothingActivatePresetProfile holds details about calls to the PowerSmoothingActivatePresetProfile method. PowerSmoothingActivatePresetProfile []struct { // PowerSmoothingProfile is the powerSmoothingProfile argument value. @@ -2545,6 +2623,11 @@ type Device struct { // EnableState is the enableState argument value. EnableState nvml.EnableState } + // SetAdaptiveTgpMode_v1 holds details about calls to the SetAdaptiveTgpMode_v1 method. + SetAdaptiveTgpMode_v1 []struct { + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } // SetApplicationsClocks holds details about calls to the SetApplicationsClocks method. SetApplicationsClocks []struct { // V1 is the v1 argument value. @@ -2645,6 +2728,15 @@ type Device struct { // N is the n argument value. N int } + // SetMemoryLimits_v1 holds details about calls to the SetMemoryLimits_v1 method. + SetMemoryLimits_v1 []struct { + // S is the s argument value. + S string + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } // SetMemoryLockedClocks holds details about calls to the SetMemoryLockedClocks method. SetMemoryLockedClocks []struct { // V1 is the v1 argument value. @@ -2678,6 +2770,11 @@ type Device struct { // NvlinkSetBwMode is the nvlinkSetBwMode argument value. NvlinkSetBwMode *nvml.NvlinkSetBwMode } + // SetNvlinkBwModeAsync_v1 holds details about calls to the SetNvlinkBwModeAsync_v1 method. + SetNvlinkBwModeAsync_v1 []struct { + // NvlinkSetBwModeAsync_v1 is the nvlinkSetBwModeAsync_v1 argument value. + NvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1 + } // SetPersistenceMode holds details about calls to the SetPersistenceMode method. SetPersistenceMode []struct { // EnableState is the enableState argument value. @@ -2782,6 +2879,7 @@ type Device struct { lockGetAccountingStats_v2 sync.RWMutex lockGetActiveVgpus sync.RWMutex lockGetAdaptiveClockInfoStatus sync.RWMutex + lockGetAdaptiveTgpModeInfo_v1 sync.RWMutex lockGetAddressingMode sync.RWMutex lockGetApplicationsClock sync.RWMutex lockGetArchitecture sync.RWMutex @@ -2789,6 +2887,7 @@ type Device struct { lockGetAutoBoostedClocksEnabled sync.RWMutex lockGetBAR1MemoryInfo sync.RWMutex lockGetBBXTimeData_v1 sync.RWMutex + lockGetBankRemapperStatus_v1 sync.RWMutex lockGetBoardId sync.RWMutex lockGetBoardPartNumber sync.RWMutex lockGetBrand sync.RWMutex @@ -2845,6 +2944,7 @@ type Device struct { lockGetGpcClkVfOffset sync.RWMutex lockGetGpuFabricInfo sync.RWMutex lockGetGpuFabricInfoV sync.RWMutex + lockGetGpuFabricInfo_v4 sync.RWMutex lockGetGpuInstanceById sync.RWMutex lockGetGpuInstanceId sync.RWMutex lockGetGpuInstancePossiblePlacements sync.RWMutex @@ -2882,6 +2982,7 @@ type Device struct { lockGetMemoryErrorCounter sync.RWMutex lockGetMemoryInfo sync.RWMutex lockGetMemoryInfo_v2 sync.RWMutex + lockGetMemoryLimits_v1 sync.RWMutex lockGetMigDeviceHandleByIndex sync.RWMutex lockGetMigMode sync.RWMutex lockGetMinMaxClockOfPState sync.RWMutex @@ -2899,6 +3000,7 @@ type Device struct { lockGetNvLinkRemoteDeviceType sync.RWMutex lockGetNvLinkRemotePciInfo sync.RWMutex lockGetNvLinkState sync.RWMutex + lockGetNvLinkTelemetrySamples_v1 sync.RWMutex lockGetNvLinkUtilizationControl sync.RWMutex lockGetNvLinkUtilizationCounter sync.RWMutex lockGetNvLinkVersion sync.RWMutex @@ -2984,6 +3086,7 @@ type Device struct { lockGpmSetStreamingEnabled sync.RWMutex lockIsMigDeviceHandle sync.RWMutex lockOnSameBoard sync.RWMutex + lockPerfMetricsGetSamples_v1 sync.RWMutex lockPowerSmoothingActivatePresetProfile sync.RWMutex lockPowerSmoothingSetState sync.RWMutex lockPowerSmoothingUpdatePresetProfileParam sync.RWMutex @@ -2997,6 +3100,7 @@ type Device struct { lockResetNvLinkUtilizationCounter sync.RWMutex lockSetAPIRestriction sync.RWMutex lockSetAccountingMode sync.RWMutex + lockSetAdaptiveTgpMode_v1 sync.RWMutex lockSetApplicationsClocks sync.RWMutex lockSetAutoBoostedClocksEnabled sync.RWMutex lockSetClockOffsets sync.RWMutex @@ -3015,11 +3119,13 @@ type Device struct { lockSetGpuOperationMode sync.RWMutex lockSetHostname_v1 sync.RWMutex lockSetMemClkVfOffset sync.RWMutex + lockSetMemoryLimits_v1 sync.RWMutex lockSetMemoryLockedClocks sync.RWMutex lockSetMigMode sync.RWMutex lockSetNvLinkDeviceLowPowerThreshold sync.RWMutex lockSetNvLinkUtilizationControl sync.RWMutex lockSetNvlinkBwMode sync.RWMutex + lockSetNvlinkBwModeAsync_v1 sync.RWMutex lockSetPersistenceMode sync.RWMutex lockSetPowerManagementLimit sync.RWMutex lockSetPowerManagementLimit_v2 sync.RWMutex @@ -3497,6 +3603,33 @@ func (mock *Device) GetAdaptiveClockInfoStatusCalls() []struct { return calls } +// GetAdaptiveTgpModeInfo_v1 calls GetAdaptiveTgpModeInfo_v1Func. +func (mock *Device) GetAdaptiveTgpModeInfo_v1() (nvml.AdaptiveTgpModeInfo_v1, nvml.Return) { + if mock.GetAdaptiveTgpModeInfo_v1Func == nil { + panic("Device.GetAdaptiveTgpModeInfo_v1Func: method is nil but Device.GetAdaptiveTgpModeInfo_v1 was just called") + } + callInfo := struct { + }{} + mock.lockGetAdaptiveTgpModeInfo_v1.Lock() + mock.calls.GetAdaptiveTgpModeInfo_v1 = append(mock.calls.GetAdaptiveTgpModeInfo_v1, callInfo) + mock.lockGetAdaptiveTgpModeInfo_v1.Unlock() + return mock.GetAdaptiveTgpModeInfo_v1Func() +} + +// GetAdaptiveTgpModeInfo_v1Calls gets all the calls that were made to GetAdaptiveTgpModeInfo_v1. +// Check the length with: +// +// len(mockedDevice.GetAdaptiveTgpModeInfo_v1Calls()) +func (mock *Device) GetAdaptiveTgpModeInfo_v1Calls() []struct { +} { + var calls []struct { + } + mock.lockGetAdaptiveTgpModeInfo_v1.RLock() + calls = mock.calls.GetAdaptiveTgpModeInfo_v1 + mock.lockGetAdaptiveTgpModeInfo_v1.RUnlock() + return calls +} + // GetAddressingMode calls GetAddressingModeFunc. func (mock *Device) GetAddressingMode() (nvml.DeviceAddressingMode, nvml.Return) { if mock.GetAddressingModeFunc == nil { @@ -3691,6 +3824,33 @@ func (mock *Device) GetBBXTimeData_v1Calls() []struct { return calls } +// GetBankRemapperStatus_v1 calls GetBankRemapperStatus_v1Func. +func (mock *Device) GetBankRemapperStatus_v1() (nvml.EccBankRemapperStatus_v1, nvml.Return) { + if mock.GetBankRemapperStatus_v1Func == nil { + panic("Device.GetBankRemapperStatus_v1Func: method is nil but Device.GetBankRemapperStatus_v1 was just called") + } + callInfo := struct { + }{} + mock.lockGetBankRemapperStatus_v1.Lock() + mock.calls.GetBankRemapperStatus_v1 = append(mock.calls.GetBankRemapperStatus_v1, callInfo) + mock.lockGetBankRemapperStatus_v1.Unlock() + return mock.GetBankRemapperStatus_v1Func() +} + +// GetBankRemapperStatus_v1Calls gets all the calls that were made to GetBankRemapperStatus_v1. +// Check the length with: +// +// len(mockedDevice.GetBankRemapperStatus_v1Calls()) +func (mock *Device) GetBankRemapperStatus_v1Calls() []struct { +} { + var calls []struct { + } + mock.lockGetBankRemapperStatus_v1.RLock() + calls = mock.calls.GetBankRemapperStatus_v1 + mock.lockGetBankRemapperStatus_v1.RUnlock() + return calls +} + // GetBoardId calls GetBoardIdFunc. func (mock *Device) GetBoardId() (uint32, nvml.Return) { if mock.GetBoardIdFunc == nil { @@ -5270,6 +5430,33 @@ func (mock *Device) GetGpuFabricInfoVCalls() []struct { return calls } +// GetGpuFabricInfo_v4 calls GetGpuFabricInfo_v4Func. +func (mock *Device) GetGpuFabricInfo_v4() (nvml.GpuFabricInfo_v4, nvml.Return) { + if mock.GetGpuFabricInfo_v4Func == nil { + panic("Device.GetGpuFabricInfo_v4Func: method is nil but Device.GetGpuFabricInfo_v4 was just called") + } + callInfo := struct { + }{} + mock.lockGetGpuFabricInfo_v4.Lock() + mock.calls.GetGpuFabricInfo_v4 = append(mock.calls.GetGpuFabricInfo_v4, callInfo) + mock.lockGetGpuFabricInfo_v4.Unlock() + return mock.GetGpuFabricInfo_v4Func() +} + +// GetGpuFabricInfo_v4Calls gets all the calls that were made to GetGpuFabricInfo_v4. +// Check the length with: +// +// len(mockedDevice.GetGpuFabricInfo_v4Calls()) +func (mock *Device) GetGpuFabricInfo_v4Calls() []struct { +} { + var calls []struct { + } + mock.lockGetGpuFabricInfo_v4.RLock() + calls = mock.calls.GetGpuFabricInfo_v4 + mock.lockGetGpuFabricInfo_v4.RUnlock() + return calls +} + // GetGpuInstanceById calls GetGpuInstanceByIdFunc. func (mock *Device) GetGpuInstanceById(n int) (nvml.GpuInstance, nvml.Return) { if mock.GetGpuInstanceByIdFunc == nil { @@ -6341,6 +6528,38 @@ func (mock *Device) GetMemoryInfo_v2Calls() []struct { return calls } +// GetMemoryLimits_v1 calls GetMemoryLimits_v1Func. +func (mock *Device) GetMemoryLimits_v1(s string) (nvml.GetMemoryLimits_v1, nvml.Return) { + if mock.GetMemoryLimits_v1Func == nil { + panic("Device.GetMemoryLimits_v1Func: method is nil but Device.GetMemoryLimits_v1 was just called") + } + callInfo := struct { + S string + }{ + S: s, + } + mock.lockGetMemoryLimits_v1.Lock() + mock.calls.GetMemoryLimits_v1 = append(mock.calls.GetMemoryLimits_v1, callInfo) + mock.lockGetMemoryLimits_v1.Unlock() + return mock.GetMemoryLimits_v1Func(s) +} + +// GetMemoryLimits_v1Calls gets all the calls that were made to GetMemoryLimits_v1. +// Check the length with: +// +// len(mockedDevice.GetMemoryLimits_v1Calls()) +func (mock *Device) GetMemoryLimits_v1Calls() []struct { + S string +} { + var calls []struct { + S string + } + mock.lockGetMemoryLimits_v1.RLock() + calls = mock.calls.GetMemoryLimits_v1 + mock.lockGetMemoryLimits_v1.RUnlock() + return calls +} + // GetMigDeviceHandleByIndex calls GetMigDeviceHandleByIndexFunc. func (mock *Device) GetMigDeviceHandleByIndex(n int) (nvml.Device, nvml.Return) { if mock.GetMigDeviceHandleByIndexFunc == nil { @@ -6847,6 +7066,38 @@ func (mock *Device) GetNvLinkStateCalls() []struct { return calls } +// GetNvLinkTelemetrySamples_v1 calls GetNvLinkTelemetrySamples_v1Func. +func (mock *Device) GetNvLinkTelemetrySamples_v1(nvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1) nvml.Return { + if mock.GetNvLinkTelemetrySamples_v1Func == nil { + panic("Device.GetNvLinkTelemetrySamples_v1Func: method is nil but Device.GetNvLinkTelemetrySamples_v1 was just called") + } + callInfo := struct { + NvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1 + }{ + NvlinkTelemetrySamples_v1: nvlinkTelemetrySamples_v1, + } + mock.lockGetNvLinkTelemetrySamples_v1.Lock() + mock.calls.GetNvLinkTelemetrySamples_v1 = append(mock.calls.GetNvLinkTelemetrySamples_v1, callInfo) + mock.lockGetNvLinkTelemetrySamples_v1.Unlock() + return mock.GetNvLinkTelemetrySamples_v1Func(nvlinkTelemetrySamples_v1) +} + +// GetNvLinkTelemetrySamples_v1Calls gets all the calls that were made to GetNvLinkTelemetrySamples_v1. +// Check the length with: +// +// len(mockedDevice.GetNvLinkTelemetrySamples_v1Calls()) +func (mock *Device) GetNvLinkTelemetrySamples_v1Calls() []struct { + NvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1 +} { + var calls []struct { + NvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1 + } + mock.lockGetNvLinkTelemetrySamples_v1.RLock() + calls = mock.calls.GetNvLinkTelemetrySamples_v1 + mock.lockGetNvLinkTelemetrySamples_v1.RUnlock() + return calls +} + // GetNvLinkUtilizationControl calls GetNvLinkUtilizationControlFunc. func (mock *Device) GetNvLinkUtilizationControl(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { if mock.GetNvLinkUtilizationControlFunc == nil { @@ -9316,6 +9567,38 @@ func (mock *Device) OnSameBoardCalls() []struct { return calls } +// PerfMetricsGetSamples_v1 calls PerfMetricsGetSamples_v1Func. +func (mock *Device) PerfMetricsGetSamples_v1(perfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1) nvml.Return { + if mock.PerfMetricsGetSamples_v1Func == nil { + panic("Device.PerfMetricsGetSamples_v1Func: method is nil but Device.PerfMetricsGetSamples_v1 was just called") + } + callInfo := struct { + PerfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1 + }{ + PerfMetricsSamples_v1: perfMetricsSamples_v1, + } + mock.lockPerfMetricsGetSamples_v1.Lock() + mock.calls.PerfMetricsGetSamples_v1 = append(mock.calls.PerfMetricsGetSamples_v1, callInfo) + mock.lockPerfMetricsGetSamples_v1.Unlock() + return mock.PerfMetricsGetSamples_v1Func(perfMetricsSamples_v1) +} + +// PerfMetricsGetSamples_v1Calls gets all the calls that were made to PerfMetricsGetSamples_v1. +// Check the length with: +// +// len(mockedDevice.PerfMetricsGetSamples_v1Calls()) +func (mock *Device) PerfMetricsGetSamples_v1Calls() []struct { + PerfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1 +} { + var calls []struct { + PerfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1 + } + mock.lockPerfMetricsGetSamples_v1.RLock() + calls = mock.calls.PerfMetricsGetSamples_v1 + mock.lockPerfMetricsGetSamples_v1.RUnlock() + return calls +} + // PowerSmoothingActivatePresetProfile calls PowerSmoothingActivatePresetProfileFunc. func (mock *Device) PowerSmoothingActivatePresetProfile(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { if mock.PowerSmoothingActivatePresetProfileFunc == nil { @@ -9733,6 +10016,38 @@ func (mock *Device) SetAccountingModeCalls() []struct { return calls } +// SetAdaptiveTgpMode_v1 calls SetAdaptiveTgpMode_v1Func. +func (mock *Device) SetAdaptiveTgpMode_v1(enableState nvml.EnableState) nvml.Return { + if mock.SetAdaptiveTgpMode_v1Func == nil { + panic("Device.SetAdaptiveTgpMode_v1Func: method is nil but Device.SetAdaptiveTgpMode_v1 was just called") + } + callInfo := struct { + EnableState nvml.EnableState + }{ + EnableState: enableState, + } + mock.lockSetAdaptiveTgpMode_v1.Lock() + mock.calls.SetAdaptiveTgpMode_v1 = append(mock.calls.SetAdaptiveTgpMode_v1, callInfo) + mock.lockSetAdaptiveTgpMode_v1.Unlock() + return mock.SetAdaptiveTgpMode_v1Func(enableState) +} + +// SetAdaptiveTgpMode_v1Calls gets all the calls that were made to SetAdaptiveTgpMode_v1. +// Check the length with: +// +// len(mockedDevice.SetAdaptiveTgpMode_v1Calls()) +func (mock *Device) SetAdaptiveTgpMode_v1Calls() []struct { + EnableState nvml.EnableState +} { + var calls []struct { + EnableState nvml.EnableState + } + mock.lockSetAdaptiveTgpMode_v1.RLock() + calls = mock.calls.SetAdaptiveTgpMode_v1 + mock.lockSetAdaptiveTgpMode_v1.RUnlock() + return calls +} + // SetApplicationsClocks calls SetApplicationsClocksFunc. func (mock *Device) SetApplicationsClocks(v1 uint32, v2 uint32) nvml.Return { if mock.SetApplicationsClocksFunc == nil { @@ -10328,6 +10643,46 @@ func (mock *Device) SetMemClkVfOffsetCalls() []struct { return calls } +// SetMemoryLimits_v1 calls SetMemoryLimits_v1Func. +func (mock *Device) SetMemoryLimits_v1(s string, n1 int, n2 int) nvml.Return { + if mock.SetMemoryLimits_v1Func == nil { + panic("Device.SetMemoryLimits_v1Func: method is nil but Device.SetMemoryLimits_v1 was just called") + } + callInfo := struct { + S string + N1 int + N2 int + }{ + S: s, + N1: n1, + N2: n2, + } + mock.lockSetMemoryLimits_v1.Lock() + mock.calls.SetMemoryLimits_v1 = append(mock.calls.SetMemoryLimits_v1, callInfo) + mock.lockSetMemoryLimits_v1.Unlock() + return mock.SetMemoryLimits_v1Func(s, n1, n2) +} + +// SetMemoryLimits_v1Calls gets all the calls that were made to SetMemoryLimits_v1. +// Check the length with: +// +// len(mockedDevice.SetMemoryLimits_v1Calls()) +func (mock *Device) SetMemoryLimits_v1Calls() []struct { + S string + N1 int + N2 int +} { + var calls []struct { + S string + N1 int + N2 int + } + mock.lockSetMemoryLimits_v1.RLock() + calls = mock.calls.SetMemoryLimits_v1 + mock.lockSetMemoryLimits_v1.RUnlock() + return calls +} + // SetMemoryLockedClocks calls SetMemoryLockedClocksFunc. func (mock *Device) SetMemoryLockedClocks(v1 uint32, v2 uint32) nvml.Return { if mock.SetMemoryLockedClocksFunc == nil { @@ -10504,6 +10859,38 @@ func (mock *Device) SetNvlinkBwModeCalls() []struct { return calls } +// SetNvlinkBwModeAsync_v1 calls SetNvlinkBwModeAsync_v1Func. +func (mock *Device) SetNvlinkBwModeAsync_v1(nvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1) nvml.Return { + if mock.SetNvlinkBwModeAsync_v1Func == nil { + panic("Device.SetNvlinkBwModeAsync_v1Func: method is nil but Device.SetNvlinkBwModeAsync_v1 was just called") + } + callInfo := struct { + NvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1 + }{ + NvlinkSetBwModeAsync_v1: nvlinkSetBwModeAsync_v1, + } + mock.lockSetNvlinkBwModeAsync_v1.Lock() + mock.calls.SetNvlinkBwModeAsync_v1 = append(mock.calls.SetNvlinkBwModeAsync_v1, callInfo) + mock.lockSetNvlinkBwModeAsync_v1.Unlock() + return mock.SetNvlinkBwModeAsync_v1Func(nvlinkSetBwModeAsync_v1) +} + +// SetNvlinkBwModeAsync_v1Calls gets all the calls that were made to SetNvlinkBwModeAsync_v1. +// Check the length with: +// +// len(mockedDevice.SetNvlinkBwModeAsync_v1Calls()) +func (mock *Device) SetNvlinkBwModeAsync_v1Calls() []struct { + NvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1 +} { + var calls []struct { + NvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1 + } + mock.lockSetNvlinkBwModeAsync_v1.RLock() + calls = mock.calls.SetNvlinkBwModeAsync_v1 + mock.lockSetNvlinkBwModeAsync_v1.RUnlock() + return calls +} + // SetPersistenceMode calls SetPersistenceModeFunc. func (mock *Device) SetPersistenceMode(enableState nvml.EnableState) nvml.Return { if mock.SetPersistenceModeFunc == nil { diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go index d452c4d42..9ab6930a7 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go @@ -21,9 +21,27 @@ var _ nvml.EventSet = &EventSet{} // FreeFunc: func() nvml.Return { // panic("mock out the Free method") // }, +// GetContextCount_v1Func: func() (uint32, nvml.Return) { +// panic("mock out the GetContextCount_v1 method") +// }, +// GetContextData_v1Func: func(v uint32, bytes []byte) (uint32, nvml.Return) { +// panic("mock out the GetContextData_v1 method") +// }, +// GetContextInfo_v1Func: func(v uint32) (nvml.OperationalEventContextInfo_v1, nvml.Return) { +// panic("mock out the GetContextInfo_v1 method") +// }, +// GetGpuOperationalEventContextLegacyXid_v1Func: func(v uint32) (nvml.GpuOperationalEventContextLegacyXid_v1, nvml.Return) { +// panic("mock out the GetGpuOperationalEventContextLegacyXid_v1 method") +// }, +// RegisterGpuOperationalEvents_v1Func: func(gpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1) nvml.Return { +// panic("mock out the RegisterGpuOperationalEvents_v1 method") +// }, // WaitFunc: func(v uint32) (nvml.EventData, nvml.Return) { // panic("mock out the Wait method") // }, +// Wait_v3Func: func(v uint32) (nvml.EventData_v2, nvml.Return) { +// panic("mock out the Wait_v3 method") +// }, // } // // // use mockedEventSet in code that requires nvml.EventSet @@ -34,22 +52,76 @@ type EventSet struct { // FreeFunc mocks the Free method. FreeFunc func() nvml.Return + // GetContextCount_v1Func mocks the GetContextCount_v1 method. + GetContextCount_v1Func func() (uint32, nvml.Return) + + // GetContextData_v1Func mocks the GetContextData_v1 method. + GetContextData_v1Func func(v uint32, bytes []byte) (uint32, nvml.Return) + + // GetContextInfo_v1Func mocks the GetContextInfo_v1 method. + GetContextInfo_v1Func func(v uint32) (nvml.OperationalEventContextInfo_v1, nvml.Return) + + // GetGpuOperationalEventContextLegacyXid_v1Func mocks the GetGpuOperationalEventContextLegacyXid_v1 method. + GetGpuOperationalEventContextLegacyXid_v1Func func(v uint32) (nvml.GpuOperationalEventContextLegacyXid_v1, nvml.Return) + + // RegisterGpuOperationalEvents_v1Func mocks the RegisterGpuOperationalEvents_v1 method. + RegisterGpuOperationalEvents_v1Func func(gpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1) nvml.Return + // WaitFunc mocks the Wait method. WaitFunc func(v uint32) (nvml.EventData, nvml.Return) + // Wait_v3Func mocks the Wait_v3 method. + Wait_v3Func func(v uint32) (nvml.EventData_v2, nvml.Return) + // calls tracks calls to the methods. calls struct { // Free holds details about calls to the Free method. Free []struct { } + // GetContextCount_v1 holds details about calls to the GetContextCount_v1 method. + GetContextCount_v1 []struct { + } + // GetContextData_v1 holds details about calls to the GetContextData_v1 method. + GetContextData_v1 []struct { + // V is the v argument value. + V uint32 + // Bytes is the bytes argument value. + Bytes []byte + } + // GetContextInfo_v1 holds details about calls to the GetContextInfo_v1 method. + GetContextInfo_v1 []struct { + // V is the v argument value. + V uint32 + } + // GetGpuOperationalEventContextLegacyXid_v1 holds details about calls to the GetGpuOperationalEventContextLegacyXid_v1 method. + GetGpuOperationalEventContextLegacyXid_v1 []struct { + // V is the v argument value. + V uint32 + } + // RegisterGpuOperationalEvents_v1 holds details about calls to the RegisterGpuOperationalEvents_v1 method. + RegisterGpuOperationalEvents_v1 []struct { + // GpuOperationalEventConfig_v1 is the gpuOperationalEventConfig_v1 argument value. + GpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1 + } // Wait holds details about calls to the Wait method. Wait []struct { // V is the v argument value. V uint32 } + // Wait_v3 holds details about calls to the Wait_v3 method. + Wait_v3 []struct { + // V is the v argument value. + V uint32 + } } - lockFree sync.RWMutex - lockWait sync.RWMutex + lockFree sync.RWMutex + lockGetContextCount_v1 sync.RWMutex + lockGetContextData_v1 sync.RWMutex + lockGetContextInfo_v1 sync.RWMutex + lockGetGpuOperationalEventContextLegacyXid_v1 sync.RWMutex + lockRegisterGpuOperationalEvents_v1 sync.RWMutex + lockWait sync.RWMutex + lockWait_v3 sync.RWMutex } // Free calls FreeFunc. @@ -79,6 +151,165 @@ func (mock *EventSet) FreeCalls() []struct { return calls } +// GetContextCount_v1 calls GetContextCount_v1Func. +func (mock *EventSet) GetContextCount_v1() (uint32, nvml.Return) { + if mock.GetContextCount_v1Func == nil { + panic("EventSet.GetContextCount_v1Func: method is nil but EventSet.GetContextCount_v1 was just called") + } + callInfo := struct { + }{} + mock.lockGetContextCount_v1.Lock() + mock.calls.GetContextCount_v1 = append(mock.calls.GetContextCount_v1, callInfo) + mock.lockGetContextCount_v1.Unlock() + return mock.GetContextCount_v1Func() +} + +// GetContextCount_v1Calls gets all the calls that were made to GetContextCount_v1. +// Check the length with: +// +// len(mockedEventSet.GetContextCount_v1Calls()) +func (mock *EventSet) GetContextCount_v1Calls() []struct { +} { + var calls []struct { + } + mock.lockGetContextCount_v1.RLock() + calls = mock.calls.GetContextCount_v1 + mock.lockGetContextCount_v1.RUnlock() + return calls +} + +// GetContextData_v1 calls GetContextData_v1Func. +func (mock *EventSet) GetContextData_v1(v uint32, bytes []byte) (uint32, nvml.Return) { + if mock.GetContextData_v1Func == nil { + panic("EventSet.GetContextData_v1Func: method is nil but EventSet.GetContextData_v1 was just called") + } + callInfo := struct { + V uint32 + Bytes []byte + }{ + V: v, + Bytes: bytes, + } + mock.lockGetContextData_v1.Lock() + mock.calls.GetContextData_v1 = append(mock.calls.GetContextData_v1, callInfo) + mock.lockGetContextData_v1.Unlock() + return mock.GetContextData_v1Func(v, bytes) +} + +// GetContextData_v1Calls gets all the calls that were made to GetContextData_v1. +// Check the length with: +// +// len(mockedEventSet.GetContextData_v1Calls()) +func (mock *EventSet) GetContextData_v1Calls() []struct { + V uint32 + Bytes []byte +} { + var calls []struct { + V uint32 + Bytes []byte + } + mock.lockGetContextData_v1.RLock() + calls = mock.calls.GetContextData_v1 + mock.lockGetContextData_v1.RUnlock() + return calls +} + +// GetContextInfo_v1 calls GetContextInfo_v1Func. +func (mock *EventSet) GetContextInfo_v1(v uint32) (nvml.OperationalEventContextInfo_v1, nvml.Return) { + if mock.GetContextInfo_v1Func == nil { + panic("EventSet.GetContextInfo_v1Func: method is nil but EventSet.GetContextInfo_v1 was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockGetContextInfo_v1.Lock() + mock.calls.GetContextInfo_v1 = append(mock.calls.GetContextInfo_v1, callInfo) + mock.lockGetContextInfo_v1.Unlock() + return mock.GetContextInfo_v1Func(v) +} + +// GetContextInfo_v1Calls gets all the calls that were made to GetContextInfo_v1. +// Check the length with: +// +// len(mockedEventSet.GetContextInfo_v1Calls()) +func (mock *EventSet) GetContextInfo_v1Calls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockGetContextInfo_v1.RLock() + calls = mock.calls.GetContextInfo_v1 + mock.lockGetContextInfo_v1.RUnlock() + return calls +} + +// GetGpuOperationalEventContextLegacyXid_v1 calls GetGpuOperationalEventContextLegacyXid_v1Func. +func (mock *EventSet) GetGpuOperationalEventContextLegacyXid_v1(v uint32) (nvml.GpuOperationalEventContextLegacyXid_v1, nvml.Return) { + if mock.GetGpuOperationalEventContextLegacyXid_v1Func == nil { + panic("EventSet.GetGpuOperationalEventContextLegacyXid_v1Func: method is nil but EventSet.GetGpuOperationalEventContextLegacyXid_v1 was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockGetGpuOperationalEventContextLegacyXid_v1.Lock() + mock.calls.GetGpuOperationalEventContextLegacyXid_v1 = append(mock.calls.GetGpuOperationalEventContextLegacyXid_v1, callInfo) + mock.lockGetGpuOperationalEventContextLegacyXid_v1.Unlock() + return mock.GetGpuOperationalEventContextLegacyXid_v1Func(v) +} + +// GetGpuOperationalEventContextLegacyXid_v1Calls gets all the calls that were made to GetGpuOperationalEventContextLegacyXid_v1. +// Check the length with: +// +// len(mockedEventSet.GetGpuOperationalEventContextLegacyXid_v1Calls()) +func (mock *EventSet) GetGpuOperationalEventContextLegacyXid_v1Calls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockGetGpuOperationalEventContextLegacyXid_v1.RLock() + calls = mock.calls.GetGpuOperationalEventContextLegacyXid_v1 + mock.lockGetGpuOperationalEventContextLegacyXid_v1.RUnlock() + return calls +} + +// RegisterGpuOperationalEvents_v1 calls RegisterGpuOperationalEvents_v1Func. +func (mock *EventSet) RegisterGpuOperationalEvents_v1(gpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1) nvml.Return { + if mock.RegisterGpuOperationalEvents_v1Func == nil { + panic("EventSet.RegisterGpuOperationalEvents_v1Func: method is nil but EventSet.RegisterGpuOperationalEvents_v1 was just called") + } + callInfo := struct { + GpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1 + }{ + GpuOperationalEventConfig_v1: gpuOperationalEventConfig_v1, + } + mock.lockRegisterGpuOperationalEvents_v1.Lock() + mock.calls.RegisterGpuOperationalEvents_v1 = append(mock.calls.RegisterGpuOperationalEvents_v1, callInfo) + mock.lockRegisterGpuOperationalEvents_v1.Unlock() + return mock.RegisterGpuOperationalEvents_v1Func(gpuOperationalEventConfig_v1) +} + +// RegisterGpuOperationalEvents_v1Calls gets all the calls that were made to RegisterGpuOperationalEvents_v1. +// Check the length with: +// +// len(mockedEventSet.RegisterGpuOperationalEvents_v1Calls()) +func (mock *EventSet) RegisterGpuOperationalEvents_v1Calls() []struct { + GpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1 +} { + var calls []struct { + GpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1 + } + mock.lockRegisterGpuOperationalEvents_v1.RLock() + calls = mock.calls.RegisterGpuOperationalEvents_v1 + mock.lockRegisterGpuOperationalEvents_v1.RUnlock() + return calls +} + // Wait calls WaitFunc. func (mock *EventSet) Wait(v uint32) (nvml.EventData, nvml.Return) { if mock.WaitFunc == nil { @@ -110,3 +341,35 @@ func (mock *EventSet) WaitCalls() []struct { mock.lockWait.RUnlock() return calls } + +// Wait_v3 calls Wait_v3Func. +func (mock *EventSet) Wait_v3(v uint32) (nvml.EventData_v2, nvml.Return) { + if mock.Wait_v3Func == nil { + panic("EventSet.Wait_v3Func: method is nil but EventSet.Wait_v3 was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockWait_v3.Lock() + mock.calls.Wait_v3 = append(mock.calls.Wait_v3, callInfo) + mock.lockWait_v3.Unlock() + return mock.Wait_v3Func(v) +} + +// Wait_v3Calls gets all the calls that were made to Wait_v3. +// Check the length with: +// +// len(mockedEventSet.Wait_v3Calls()) +func (mock *EventSet) Wait_v3Calls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockWait_v3.RLock() + calls = mock.calls.Wait_v3 + mock.lockWait_v3.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go index f727fdce1..7c4e925fd 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go @@ -72,6 +72,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetAdaptiveClockInfoStatusFunc: func(device nvml.Device) (uint32, nvml.Return) { // panic("mock out the DeviceGetAdaptiveClockInfoStatus method") // }, +// DeviceGetAdaptiveTgpModeInfo_v1Func: func(device nvml.Device) (nvml.AdaptiveTgpModeInfo_v1, nvml.Return) { +// panic("mock out the DeviceGetAdaptiveTgpModeInfo_v1 method") +// }, // DeviceGetAddressingModeFunc: func(device nvml.Device) (nvml.DeviceAddressingMode, nvml.Return) { // panic("mock out the DeviceGetAddressingMode method") // }, @@ -93,6 +96,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetBBXTimeData_v1Func: func(device nvml.Device) (nvml.BBXTimeData_v1, nvml.Return) { // panic("mock out the DeviceGetBBXTimeData_v1 method") // }, +// DeviceGetBankRemapperStatus_v1Func: func(device nvml.Device) (nvml.EccBankRemapperStatus_v1, nvml.Return) { +// panic("mock out the DeviceGetBankRemapperStatus_v1 method") +// }, // DeviceGetBoardIdFunc: func(device nvml.Device) (uint32, nvml.Return) { // panic("mock out the DeviceGetBoardId method") // }, @@ -264,6 +270,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetGpuFabricInfoVFunc: func(device nvml.Device) nvml.GpuFabricInfoHandler { // panic("mock out the DeviceGetGpuFabricInfoV method") // }, +// DeviceGetGpuFabricInfo_v4Func: func(device nvml.Device) (nvml.GpuFabricInfo_v4, nvml.Return) { +// panic("mock out the DeviceGetGpuFabricInfo_v4 method") +// }, // DeviceGetGpuInstanceByIdFunc: func(device nvml.Device, n int) (nvml.GpuInstance, nvml.Return) { // panic("mock out the DeviceGetGpuInstanceById method") // }, @@ -390,6 +399,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetMemoryInfo_v2Func: func(device nvml.Device) (nvml.Memory_v2, nvml.Return) { // panic("mock out the DeviceGetMemoryInfo_v2 method") // }, +// DeviceGetMemoryLimits_v1Func: func(device nvml.Device, s string) (nvml.GetMemoryLimits_v1, nvml.Return) { +// panic("mock out the DeviceGetMemoryLimits_v1 method") +// }, // DeviceGetMigDeviceHandleByIndexFunc: func(device nvml.Device, n int) (nvml.Device, nvml.Return) { // panic("mock out the DeviceGetMigDeviceHandleByIndex method") // }, @@ -441,6 +453,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetNvLinkStateFunc: func(device nvml.Device, n int) (nvml.EnableState, nvml.Return) { // panic("mock out the DeviceGetNvLinkState method") // }, +// DeviceGetNvLinkTelemetrySamples_v1Func: func(device nvml.Device, nvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1) nvml.Return { +// panic("mock out the DeviceGetNvLinkTelemetrySamples_v1 method") +// }, // DeviceGetNvLinkUtilizationControlFunc: func(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { // panic("mock out the DeviceGetNvLinkUtilizationControl method") // }, @@ -681,6 +696,9 @@ var _ nvml.Interface = &Interface{} // DeviceOnSameBoardFunc: func(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) { // panic("mock out the DeviceOnSameBoard method") // }, +// DevicePerfMetricsGetSamples_v1Func: func(device nvml.Device, perfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1) nvml.Return { +// panic("mock out the DevicePerfMetricsGetSamples_v1 method") +// }, // DevicePowerSmoothingActivatePresetProfileFunc: func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { // panic("mock out the DevicePowerSmoothingActivatePresetProfile method") // }, @@ -729,6 +747,9 @@ var _ nvml.Interface = &Interface{} // DeviceSetAccountingModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { // panic("mock out the DeviceSetAccountingMode method") // }, +// DeviceSetAdaptiveTgpMode_v1Func: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { +// panic("mock out the DeviceSetAdaptiveTgpMode_v1 method") +// }, // DeviceSetApplicationsClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { // panic("mock out the DeviceSetApplicationsClocks method") // }, @@ -783,6 +804,9 @@ var _ nvml.Interface = &Interface{} // DeviceSetMemClkVfOffsetFunc: func(device nvml.Device, n int) nvml.Return { // panic("mock out the DeviceSetMemClkVfOffset method") // }, +// DeviceSetMemoryLimits_v1Func: func(device nvml.Device, s string, n1 int, n2 int) nvml.Return { +// panic("mock out the DeviceSetMemoryLimits_v1 method") +// }, // DeviceSetMemoryLockedClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { // panic("mock out the DeviceSetMemoryLockedClocks method") // }, @@ -798,6 +822,9 @@ var _ nvml.Interface = &Interface{} // DeviceSetNvlinkBwModeFunc: func(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { // panic("mock out the DeviceSetNvlinkBwMode method") // }, +// DeviceSetNvlinkBwModeAsync_v1Func: func(device nvml.Device, nvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1) nvml.Return { +// panic("mock out the DeviceSetNvlinkBwModeAsync_v1 method") +// }, // DeviceSetPersistenceModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { // panic("mock out the DeviceSetPersistenceMode method") // }, @@ -858,9 +885,27 @@ var _ nvml.Interface = &Interface{} // EventSetFreeFunc: func(eventSet nvml.EventSet) nvml.Return { // panic("mock out the EventSetFree method") // }, +// EventSetGetContextCount_v1Func: func(eventSet nvml.EventSet) (uint32, nvml.Return) { +// panic("mock out the EventSetGetContextCount_v1 method") +// }, +// EventSetGetContextData_v1Func: func(eventSet nvml.EventSet, v uint32, bytes []byte) (uint32, nvml.Return) { +// panic("mock out the EventSetGetContextData_v1 method") +// }, +// EventSetGetContextInfo_v1Func: func(eventSet nvml.EventSet, v uint32) (nvml.OperationalEventContextInfo_v1, nvml.Return) { +// panic("mock out the EventSetGetContextInfo_v1 method") +// }, +// EventSetGetGpuOperationalEventContextLegacyXid_v1Func: func(eventSet nvml.EventSet, v uint32) (nvml.GpuOperationalEventContextLegacyXid_v1, nvml.Return) { +// panic("mock out the EventSetGetGpuOperationalEventContextLegacyXid_v1 method") +// }, +// EventSetRegisterGpuOperationalEvents_v1Func: func(eventSet nvml.EventSet, gpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1) nvml.Return { +// panic("mock out the EventSetRegisterGpuOperationalEvents_v1 method") +// }, // EventSetWaitFunc: func(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) { // panic("mock out the EventSetWait method") // }, +// EventSetWait_v3Func: func(eventSet nvml.EventSet, v uint32) (nvml.EventData_v2, nvml.Return) { +// panic("mock out the EventSetWait_v3 method") +// }, // ExtensionsFunc: func() nvml.ExtendedInterface { // panic("mock out the Extensions method") // }, @@ -1170,6 +1215,9 @@ var _ nvml.Interface = &Interface{} // VgpuTypeGetGpuInstanceProfileIdFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { // panic("mock out the VgpuTypeGetGpuInstanceProfileId method") // }, +// VgpuTypeGetIDFunc: func(vgpuTypeId nvml.VgpuTypeId) uint32 { +// panic("mock out the VgpuTypeGetID method") +// }, // VgpuTypeGetLicenseFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { // panic("mock out the VgpuTypeGetLicense method") // }, @@ -1252,6 +1300,9 @@ type Interface struct { // DeviceGetAdaptiveClockInfoStatusFunc mocks the DeviceGetAdaptiveClockInfoStatus method. DeviceGetAdaptiveClockInfoStatusFunc func(device nvml.Device) (uint32, nvml.Return) + // DeviceGetAdaptiveTgpModeInfo_v1Func mocks the DeviceGetAdaptiveTgpModeInfo_v1 method. + DeviceGetAdaptiveTgpModeInfo_v1Func func(device nvml.Device) (nvml.AdaptiveTgpModeInfo_v1, nvml.Return) + // DeviceGetAddressingModeFunc mocks the DeviceGetAddressingMode method. DeviceGetAddressingModeFunc func(device nvml.Device) (nvml.DeviceAddressingMode, nvml.Return) @@ -1273,6 +1324,9 @@ type Interface struct { // DeviceGetBBXTimeData_v1Func mocks the DeviceGetBBXTimeData_v1 method. DeviceGetBBXTimeData_v1Func func(device nvml.Device) (nvml.BBXTimeData_v1, nvml.Return) + // DeviceGetBankRemapperStatus_v1Func mocks the DeviceGetBankRemapperStatus_v1 method. + DeviceGetBankRemapperStatus_v1Func func(device nvml.Device) (nvml.EccBankRemapperStatus_v1, nvml.Return) + // DeviceGetBoardIdFunc mocks the DeviceGetBoardId method. DeviceGetBoardIdFunc func(device nvml.Device) (uint32, nvml.Return) @@ -1444,6 +1498,9 @@ type Interface struct { // DeviceGetGpuFabricInfoVFunc mocks the DeviceGetGpuFabricInfoV method. DeviceGetGpuFabricInfoVFunc func(device nvml.Device) nvml.GpuFabricInfoHandler + // DeviceGetGpuFabricInfo_v4Func mocks the DeviceGetGpuFabricInfo_v4 method. + DeviceGetGpuFabricInfo_v4Func func(device nvml.Device) (nvml.GpuFabricInfo_v4, nvml.Return) + // DeviceGetGpuInstanceByIdFunc mocks the DeviceGetGpuInstanceById method. DeviceGetGpuInstanceByIdFunc func(device nvml.Device, n int) (nvml.GpuInstance, nvml.Return) @@ -1570,6 +1627,9 @@ type Interface struct { // DeviceGetMemoryInfo_v2Func mocks the DeviceGetMemoryInfo_v2 method. DeviceGetMemoryInfo_v2Func func(device nvml.Device) (nvml.Memory_v2, nvml.Return) + // DeviceGetMemoryLimits_v1Func mocks the DeviceGetMemoryLimits_v1 method. + DeviceGetMemoryLimits_v1Func func(device nvml.Device, s string) (nvml.GetMemoryLimits_v1, nvml.Return) + // DeviceGetMigDeviceHandleByIndexFunc mocks the DeviceGetMigDeviceHandleByIndex method. DeviceGetMigDeviceHandleByIndexFunc func(device nvml.Device, n int) (nvml.Device, nvml.Return) @@ -1621,6 +1681,9 @@ type Interface struct { // DeviceGetNvLinkStateFunc mocks the DeviceGetNvLinkState method. DeviceGetNvLinkStateFunc func(device nvml.Device, n int) (nvml.EnableState, nvml.Return) + // DeviceGetNvLinkTelemetrySamples_v1Func mocks the DeviceGetNvLinkTelemetrySamples_v1 method. + DeviceGetNvLinkTelemetrySamples_v1Func func(device nvml.Device, nvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1) nvml.Return + // DeviceGetNvLinkUtilizationControlFunc mocks the DeviceGetNvLinkUtilizationControl method. DeviceGetNvLinkUtilizationControlFunc func(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) @@ -1861,6 +1924,9 @@ type Interface struct { // DeviceOnSameBoardFunc mocks the DeviceOnSameBoard method. DeviceOnSameBoardFunc func(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) + // DevicePerfMetricsGetSamples_v1Func mocks the DevicePerfMetricsGetSamples_v1 method. + DevicePerfMetricsGetSamples_v1Func func(device nvml.Device, perfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1) nvml.Return + // DevicePowerSmoothingActivatePresetProfileFunc mocks the DevicePowerSmoothingActivatePresetProfile method. DevicePowerSmoothingActivatePresetProfileFunc func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return @@ -1909,6 +1975,9 @@ type Interface struct { // DeviceSetAccountingModeFunc mocks the DeviceSetAccountingMode method. DeviceSetAccountingModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return + // DeviceSetAdaptiveTgpMode_v1Func mocks the DeviceSetAdaptiveTgpMode_v1 method. + DeviceSetAdaptiveTgpMode_v1Func func(device nvml.Device, enableState nvml.EnableState) nvml.Return + // DeviceSetApplicationsClocksFunc mocks the DeviceSetApplicationsClocks method. DeviceSetApplicationsClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return @@ -1963,6 +2032,9 @@ type Interface struct { // DeviceSetMemClkVfOffsetFunc mocks the DeviceSetMemClkVfOffset method. DeviceSetMemClkVfOffsetFunc func(device nvml.Device, n int) nvml.Return + // DeviceSetMemoryLimits_v1Func mocks the DeviceSetMemoryLimits_v1 method. + DeviceSetMemoryLimits_v1Func func(device nvml.Device, s string, n1 int, n2 int) nvml.Return + // DeviceSetMemoryLockedClocksFunc mocks the DeviceSetMemoryLockedClocks method. DeviceSetMemoryLockedClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return @@ -1978,6 +2050,9 @@ type Interface struct { // DeviceSetNvlinkBwModeFunc mocks the DeviceSetNvlinkBwMode method. DeviceSetNvlinkBwModeFunc func(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return + // DeviceSetNvlinkBwModeAsync_v1Func mocks the DeviceSetNvlinkBwModeAsync_v1 method. + DeviceSetNvlinkBwModeAsync_v1Func func(device nvml.Device, nvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1) nvml.Return + // DeviceSetPersistenceModeFunc mocks the DeviceSetPersistenceMode method. DeviceSetPersistenceModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return @@ -2038,9 +2113,27 @@ type Interface struct { // EventSetFreeFunc mocks the EventSetFree method. EventSetFreeFunc func(eventSet nvml.EventSet) nvml.Return + // EventSetGetContextCount_v1Func mocks the EventSetGetContextCount_v1 method. + EventSetGetContextCount_v1Func func(eventSet nvml.EventSet) (uint32, nvml.Return) + + // EventSetGetContextData_v1Func mocks the EventSetGetContextData_v1 method. + EventSetGetContextData_v1Func func(eventSet nvml.EventSet, v uint32, bytes []byte) (uint32, nvml.Return) + + // EventSetGetContextInfo_v1Func mocks the EventSetGetContextInfo_v1 method. + EventSetGetContextInfo_v1Func func(eventSet nvml.EventSet, v uint32) (nvml.OperationalEventContextInfo_v1, nvml.Return) + + // EventSetGetGpuOperationalEventContextLegacyXid_v1Func mocks the EventSetGetGpuOperationalEventContextLegacyXid_v1 method. + EventSetGetGpuOperationalEventContextLegacyXid_v1Func func(eventSet nvml.EventSet, v uint32) (nvml.GpuOperationalEventContextLegacyXid_v1, nvml.Return) + + // EventSetRegisterGpuOperationalEvents_v1Func mocks the EventSetRegisterGpuOperationalEvents_v1 method. + EventSetRegisterGpuOperationalEvents_v1Func func(eventSet nvml.EventSet, gpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1) nvml.Return + // EventSetWaitFunc mocks the EventSetWait method. EventSetWaitFunc func(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) + // EventSetWait_v3Func mocks the EventSetWait_v3 method. + EventSetWait_v3Func func(eventSet nvml.EventSet, v uint32) (nvml.EventData_v2, nvml.Return) + // ExtensionsFunc mocks the Extensions method. ExtensionsFunc func() nvml.ExtendedInterface @@ -2350,6 +2443,9 @@ type Interface struct { // VgpuTypeGetGpuInstanceProfileIdFunc mocks the VgpuTypeGetGpuInstanceProfileId method. VgpuTypeGetGpuInstanceProfileIdFunc func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) + // VgpuTypeGetIDFunc mocks the VgpuTypeGetID method. + VgpuTypeGetIDFunc func(vgpuTypeId nvml.VgpuTypeId) uint32 + // VgpuTypeGetLicenseFunc mocks the VgpuTypeGetLicense method. VgpuTypeGetLicenseFunc func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) @@ -2483,6 +2579,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetAdaptiveTgpModeInfo_v1 holds details about calls to the DeviceGetAdaptiveTgpModeInfo_v1 method. + DeviceGetAdaptiveTgpModeInfo_v1 []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetAddressingMode holds details about calls to the DeviceGetAddressingMode method. DeviceGetAddressingMode []struct { // Device is the device argument value. @@ -2520,6 +2621,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetBankRemapperStatus_v1 holds details about calls to the DeviceGetBankRemapperStatus_v1 method. + DeviceGetBankRemapperStatus_v1 []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetBoardId holds details about calls to the DeviceGetBoardId method. DeviceGetBoardId []struct { // Device is the device argument value. @@ -2831,6 +2937,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetGpuFabricInfo_v4 holds details about calls to the DeviceGetGpuFabricInfo_v4 method. + DeviceGetGpuFabricInfo_v4 []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetGpuInstanceById holds details about calls to the DeviceGetGpuInstanceById method. DeviceGetGpuInstanceById []struct { // Device is the device argument value. @@ -3071,6 +3182,13 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetMemoryLimits_v1 holds details about calls to the DeviceGetMemoryLimits_v1 method. + DeviceGetMemoryLimits_v1 []struct { + // Device is the device argument value. + Device nvml.Device + // S is the s argument value. + S string + } // DeviceGetMigDeviceHandleByIndex holds details about calls to the DeviceGetMigDeviceHandleByIndex method. DeviceGetMigDeviceHandleByIndex []struct { // Device is the device argument value. @@ -3176,6 +3294,13 @@ type Interface struct { // N is the n argument value. N int } + // DeviceGetNvLinkTelemetrySamples_v1 holds details about calls to the DeviceGetNvLinkTelemetrySamples_v1 method. + DeviceGetNvLinkTelemetrySamples_v1 []struct { + // Device is the device argument value. + Device nvml.Device + // NvlinkTelemetrySamples_v1 is the nvlinkTelemetrySamples_v1 argument value. + NvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1 + } // DeviceGetNvLinkUtilizationControl holds details about calls to the DeviceGetNvLinkUtilizationControl method. DeviceGetNvLinkUtilizationControl []struct { // Device is the device argument value. @@ -3642,6 +3767,13 @@ type Interface struct { // Device2 is the device2 argument value. Device2 nvml.Device } + // DevicePerfMetricsGetSamples_v1 holds details about calls to the DevicePerfMetricsGetSamples_v1 method. + DevicePerfMetricsGetSamples_v1 []struct { + // Device is the device argument value. + Device nvml.Device + // PerfMetricsSamples_v1 is the perfMetricsSamples_v1 argument value. + PerfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1 + } // DevicePowerSmoothingActivatePresetProfile holds details about calls to the DevicePowerSmoothingActivatePresetProfile method. DevicePowerSmoothingActivatePresetProfile []struct { // Device is the device argument value. @@ -3754,6 +3886,13 @@ type Interface struct { // EnableState is the enableState argument value. EnableState nvml.EnableState } + // DeviceSetAdaptiveTgpMode_v1 holds details about calls to the DeviceSetAdaptiveTgpMode_v1 method. + DeviceSetAdaptiveTgpMode_v1 []struct { + // Device is the device argument value. + Device nvml.Device + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } // DeviceSetApplicationsClocks holds details about calls to the DeviceSetApplicationsClocks method. DeviceSetApplicationsClocks []struct { // Device is the device argument value. @@ -3890,6 +4029,17 @@ type Interface struct { // N is the n argument value. N int } + // DeviceSetMemoryLimits_v1 holds details about calls to the DeviceSetMemoryLimits_v1 method. + DeviceSetMemoryLimits_v1 []struct { + // Device is the device argument value. + Device nvml.Device + // S is the s argument value. + S string + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } // DeviceSetMemoryLockedClocks holds details about calls to the DeviceSetMemoryLockedClocks method. DeviceSetMemoryLockedClocks []struct { // Device is the device argument value. @@ -3933,6 +4083,13 @@ type Interface struct { // NvlinkSetBwMode is the nvlinkSetBwMode argument value. NvlinkSetBwMode *nvml.NvlinkSetBwMode } + // DeviceSetNvlinkBwModeAsync_v1 holds details about calls to the DeviceSetNvlinkBwModeAsync_v1 method. + DeviceSetNvlinkBwModeAsync_v1 []struct { + // Device is the device argument value. + Device nvml.Device + // NvlinkSetBwModeAsync_v1 is the nvlinkSetBwModeAsync_v1 argument value. + NvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1 + } // DeviceSetPersistenceMode holds details about calls to the DeviceSetPersistenceMode method. DeviceSetPersistenceMode []struct { // Device is the device argument value. @@ -4063,6 +4220,41 @@ type Interface struct { // EventSet is the eventSet argument value. EventSet nvml.EventSet } + // EventSetGetContextCount_v1 holds details about calls to the EventSetGetContextCount_v1 method. + EventSetGetContextCount_v1 []struct { + // EventSet is the eventSet argument value. + EventSet nvml.EventSet + } + // EventSetGetContextData_v1 holds details about calls to the EventSetGetContextData_v1 method. + EventSetGetContextData_v1 []struct { + // EventSet is the eventSet argument value. + EventSet nvml.EventSet + // V is the v argument value. + V uint32 + // Bytes is the bytes argument value. + Bytes []byte + } + // EventSetGetContextInfo_v1 holds details about calls to the EventSetGetContextInfo_v1 method. + EventSetGetContextInfo_v1 []struct { + // EventSet is the eventSet argument value. + EventSet nvml.EventSet + // V is the v argument value. + V uint32 + } + // EventSetGetGpuOperationalEventContextLegacyXid_v1 holds details about calls to the EventSetGetGpuOperationalEventContextLegacyXid_v1 method. + EventSetGetGpuOperationalEventContextLegacyXid_v1 []struct { + // EventSet is the eventSet argument value. + EventSet nvml.EventSet + // V is the v argument value. + V uint32 + } + // EventSetRegisterGpuOperationalEvents_v1 holds details about calls to the EventSetRegisterGpuOperationalEvents_v1 method. + EventSetRegisterGpuOperationalEvents_v1 []struct { + // EventSet is the eventSet argument value. + EventSet nvml.EventSet + // GpuOperationalEventConfig_v1 is the gpuOperationalEventConfig_v1 argument value. + GpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1 + } // EventSetWait holds details about calls to the EventSetWait method. EventSetWait []struct { // EventSet is the eventSet argument value. @@ -4070,6 +4262,13 @@ type Interface struct { // V is the v argument value. V uint32 } + // EventSetWait_v3 holds details about calls to the EventSetWait_v3 method. + EventSetWait_v3 []struct { + // EventSet is the eventSet argument value. + EventSet nvml.EventSet + // V is the v argument value. + V uint32 + } // Extensions holds details about calls to the Extensions method. Extensions []struct { } @@ -4599,6 +4798,11 @@ type Interface struct { // VgpuTypeId is the vgpuTypeId argument value. VgpuTypeId nvml.VgpuTypeId } + // VgpuTypeGetID holds details about calls to the VgpuTypeGetID method. + VgpuTypeGetID []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } // VgpuTypeGetLicense holds details about calls to the VgpuTypeGetLicense method. VgpuTypeGetLicense []struct { // VgpuTypeId is the vgpuTypeId argument value. @@ -4639,397 +4843,413 @@ type Interface struct { N int } } - lockComputeInstanceDestroy sync.RWMutex - lockComputeInstanceGetInfo sync.RWMutex - lockDeviceClearAccountingPids sync.RWMutex - lockDeviceClearCpuAffinity sync.RWMutex - lockDeviceClearEccErrorCounts sync.RWMutex - lockDeviceClearFieldValues sync.RWMutex - lockDeviceCreateGpuInstance sync.RWMutex - lockDeviceCreateGpuInstanceWithPlacement sync.RWMutex - lockDeviceDiscoverGpus sync.RWMutex - lockDeviceFreezeNvLinkUtilizationCounter sync.RWMutex - lockDeviceGetAPIRestriction sync.RWMutex - lockDeviceGetAccountingBufferSize sync.RWMutex - lockDeviceGetAccountingMode sync.RWMutex - lockDeviceGetAccountingPids sync.RWMutex - lockDeviceGetAccountingStats sync.RWMutex - lockDeviceGetAccountingStats_v2 sync.RWMutex - lockDeviceGetActiveVgpus sync.RWMutex - lockDeviceGetAdaptiveClockInfoStatus sync.RWMutex - lockDeviceGetAddressingMode sync.RWMutex - lockDeviceGetApplicationsClock sync.RWMutex - lockDeviceGetArchitecture sync.RWMutex - lockDeviceGetAttributes sync.RWMutex - lockDeviceGetAutoBoostedClocksEnabled sync.RWMutex - lockDeviceGetBAR1MemoryInfo sync.RWMutex - lockDeviceGetBBXTimeData_v1 sync.RWMutex - lockDeviceGetBoardId sync.RWMutex - lockDeviceGetBoardPartNumber sync.RWMutex - lockDeviceGetBrand sync.RWMutex - lockDeviceGetBridgeChipInfo sync.RWMutex - lockDeviceGetBusType sync.RWMutex - lockDeviceGetC2cModeInfoV sync.RWMutex - lockDeviceGetCapabilities sync.RWMutex - lockDeviceGetClkMonStatus sync.RWMutex - lockDeviceGetClock sync.RWMutex - lockDeviceGetClockInfo sync.RWMutex - lockDeviceGetClockOffsets sync.RWMutex - lockDeviceGetComputeInstanceId sync.RWMutex - lockDeviceGetComputeMode sync.RWMutex - lockDeviceGetComputeRunningProcesses sync.RWMutex - lockDeviceGetConfComputeGpuAttestationReport sync.RWMutex - lockDeviceGetConfComputeGpuCertificate sync.RWMutex - lockDeviceGetConfComputeMemSizeInfo sync.RWMutex - lockDeviceGetConfComputeProtectedMemoryUsage sync.RWMutex - lockDeviceGetCoolerInfo sync.RWMutex - lockDeviceGetCount sync.RWMutex - lockDeviceGetCpuAffinity sync.RWMutex - lockDeviceGetCpuAffinityWithinScope sync.RWMutex - lockDeviceGetCreatableVgpus sync.RWMutex - lockDeviceGetCudaComputeCapability sync.RWMutex - lockDeviceGetCurrPcieLinkGeneration sync.RWMutex - lockDeviceGetCurrPcieLinkWidth sync.RWMutex - lockDeviceGetCurrentClockFreqs sync.RWMutex - lockDeviceGetCurrentClocksEventReasons sync.RWMutex - lockDeviceGetCurrentClocksThrottleReasons sync.RWMutex - lockDeviceGetDecoderUtilization sync.RWMutex - lockDeviceGetDefaultApplicationsClock sync.RWMutex - lockDeviceGetDefaultEccMode sync.RWMutex - lockDeviceGetDetailedEccErrors sync.RWMutex - lockDeviceGetDeviceHandleFromMigDeviceHandle sync.RWMutex - lockDeviceGetDisplayActive sync.RWMutex - lockDeviceGetDisplayMode sync.RWMutex - lockDeviceGetDramEncryptionMode sync.RWMutex - lockDeviceGetDriverModel sync.RWMutex - lockDeviceGetDriverModel_v2 sync.RWMutex - lockDeviceGetDynamicPstatesInfo sync.RWMutex - lockDeviceGetEccMode sync.RWMutex - lockDeviceGetEncoderCapacity sync.RWMutex - lockDeviceGetEncoderSessions sync.RWMutex - lockDeviceGetEncoderStats sync.RWMutex - lockDeviceGetEncoderUtilization sync.RWMutex - lockDeviceGetEnforcedPowerLimit sync.RWMutex - lockDeviceGetFBCSessions sync.RWMutex - lockDeviceGetFBCStats sync.RWMutex - lockDeviceGetFanControlPolicy_v2 sync.RWMutex - lockDeviceGetFanSpeed sync.RWMutex - lockDeviceGetFanSpeedRPM sync.RWMutex - lockDeviceGetFanSpeed_v2 sync.RWMutex - lockDeviceGetFieldValues sync.RWMutex - lockDeviceGetGpcClkMinMaxVfOffset sync.RWMutex - lockDeviceGetGpcClkVfOffset sync.RWMutex - lockDeviceGetGpuFabricInfo sync.RWMutex - lockDeviceGetGpuFabricInfoV sync.RWMutex - lockDeviceGetGpuInstanceById sync.RWMutex - lockDeviceGetGpuInstanceId sync.RWMutex - lockDeviceGetGpuInstancePossiblePlacements sync.RWMutex - lockDeviceGetGpuInstanceProfileInfo sync.RWMutex - lockDeviceGetGpuInstanceProfileInfoByIdV sync.RWMutex - lockDeviceGetGpuInstanceProfileInfoV sync.RWMutex - lockDeviceGetGpuInstanceRemainingCapacity sync.RWMutex - lockDeviceGetGpuInstances sync.RWMutex - lockDeviceGetGpuMaxPcieLinkGeneration sync.RWMutex - lockDeviceGetGpuOperationMode sync.RWMutex - lockDeviceGetGraphicsRunningProcesses sync.RWMutex - lockDeviceGetGridLicensableFeatures sync.RWMutex - lockDeviceGetGspFirmwareMode sync.RWMutex - lockDeviceGetGspFirmwareVersion sync.RWMutex - lockDeviceGetHandleByIndex sync.RWMutex - lockDeviceGetHandleByPciBusId sync.RWMutex - lockDeviceGetHandleBySerial sync.RWMutex - lockDeviceGetHandleByUUID sync.RWMutex - lockDeviceGetHandleByUUIDV sync.RWMutex - lockDeviceGetHostVgpuMode sync.RWMutex - lockDeviceGetHostname_v1 sync.RWMutex - lockDeviceGetIndex sync.RWMutex - lockDeviceGetInforomConfigurationChecksum sync.RWMutex - lockDeviceGetInforomImageVersion sync.RWMutex - lockDeviceGetInforomVersion sync.RWMutex - lockDeviceGetIrqNum sync.RWMutex - lockDeviceGetJpgUtilization sync.RWMutex - lockDeviceGetLastBBXFlushTime sync.RWMutex - lockDeviceGetMPSComputeRunningProcesses sync.RWMutex - lockDeviceGetMarginTemperature sync.RWMutex - lockDeviceGetMaxClockInfo sync.RWMutex - lockDeviceGetMaxCustomerBoostClock sync.RWMutex - lockDeviceGetMaxMigDeviceCount sync.RWMutex - lockDeviceGetMaxPcieLinkGeneration sync.RWMutex - lockDeviceGetMaxPcieLinkWidth sync.RWMutex - lockDeviceGetMemClkMinMaxVfOffset sync.RWMutex - lockDeviceGetMemClkVfOffset sync.RWMutex - lockDeviceGetMemoryAffinity sync.RWMutex - lockDeviceGetMemoryBusWidth sync.RWMutex - lockDeviceGetMemoryErrorCounter sync.RWMutex - lockDeviceGetMemoryInfo sync.RWMutex - lockDeviceGetMemoryInfo_v2 sync.RWMutex - lockDeviceGetMigDeviceHandleByIndex sync.RWMutex - lockDeviceGetMigMode sync.RWMutex - lockDeviceGetMinMaxClockOfPState sync.RWMutex - lockDeviceGetMinMaxFanSpeed sync.RWMutex - lockDeviceGetMinorNumber sync.RWMutex - lockDeviceGetModuleId sync.RWMutex - lockDeviceGetMultiGpuBoard sync.RWMutex - lockDeviceGetName sync.RWMutex - lockDeviceGetNumFans sync.RWMutex - lockDeviceGetNumGpuCores sync.RWMutex - lockDeviceGetNumaNodeId sync.RWMutex - lockDeviceGetNvLinkCapability sync.RWMutex - lockDeviceGetNvLinkErrorCounter sync.RWMutex - lockDeviceGetNvLinkInfo sync.RWMutex - lockDeviceGetNvLinkRemoteDeviceType sync.RWMutex - lockDeviceGetNvLinkRemotePciInfo sync.RWMutex - lockDeviceGetNvLinkState sync.RWMutex - lockDeviceGetNvLinkUtilizationControl sync.RWMutex - lockDeviceGetNvLinkUtilizationCounter sync.RWMutex - lockDeviceGetNvLinkVersion sync.RWMutex - lockDeviceGetNvlinkBwMode sync.RWMutex - lockDeviceGetNvlinkSupportedBwModes sync.RWMutex - lockDeviceGetOfaUtilization sync.RWMutex - lockDeviceGetP2PStatus sync.RWMutex - lockDeviceGetPciInfo sync.RWMutex - lockDeviceGetPciInfoExt sync.RWMutex - lockDeviceGetPcieLinkMaxSpeed sync.RWMutex - lockDeviceGetPcieReplayCounter sync.RWMutex - lockDeviceGetPcieSpeed sync.RWMutex - lockDeviceGetPcieThroughput sync.RWMutex - lockDeviceGetPdi sync.RWMutex - lockDeviceGetPerformanceModes sync.RWMutex - lockDeviceGetPerformanceState sync.RWMutex - lockDeviceGetPersistenceMode sync.RWMutex - lockDeviceGetPgpuMetadataString sync.RWMutex - lockDeviceGetPlatformInfo sync.RWMutex - lockDeviceGetPowerManagementDefaultLimit sync.RWMutex - lockDeviceGetPowerManagementLimit sync.RWMutex - lockDeviceGetPowerManagementLimitConstraints sync.RWMutex - lockDeviceGetPowerManagementMode sync.RWMutex - lockDeviceGetPowerMizerMode_v1 sync.RWMutex - lockDeviceGetPowerSource sync.RWMutex - lockDeviceGetPowerState sync.RWMutex - lockDeviceGetPowerUsage sync.RWMutex - lockDeviceGetProcessUtilization sync.RWMutex - lockDeviceGetProcessesUtilizationInfo sync.RWMutex - lockDeviceGetRemappedRows sync.RWMutex - lockDeviceGetRemappedRows_v2 sync.RWMutex - lockDeviceGetRepairStatus sync.RWMutex - lockDeviceGetRetiredPages sync.RWMutex - lockDeviceGetRetiredPagesPendingStatus sync.RWMutex - lockDeviceGetRetiredPages_v2 sync.RWMutex - lockDeviceGetRowRemapperHistogram sync.RWMutex - lockDeviceGetRunningProcessDetailList sync.RWMutex - lockDeviceGetSamples sync.RWMutex - lockDeviceGetSerial sync.RWMutex - lockDeviceGetSramEccErrorStatus sync.RWMutex - lockDeviceGetSramUniqueUncorrectedEccErrorCounts sync.RWMutex - lockDeviceGetSupportedClocksEventReasons sync.RWMutex - lockDeviceGetSupportedClocksThrottleReasons sync.RWMutex - lockDeviceGetSupportedEventTypes sync.RWMutex - lockDeviceGetSupportedGraphicsClocks sync.RWMutex - lockDeviceGetSupportedMemoryClocks sync.RWMutex - lockDeviceGetSupportedPerformanceStates sync.RWMutex - lockDeviceGetSupportedVgpus sync.RWMutex - lockDeviceGetTargetFanSpeed sync.RWMutex - lockDeviceGetTemperature sync.RWMutex - lockDeviceGetTemperatureThreshold sync.RWMutex - lockDeviceGetTemperatureV sync.RWMutex - lockDeviceGetThermalSettings sync.RWMutex - lockDeviceGetTopologyCommonAncestor sync.RWMutex - lockDeviceGetTopologyNearestGpus sync.RWMutex - lockDeviceGetTotalEccErrors sync.RWMutex - lockDeviceGetTotalEnergyConsumption sync.RWMutex - lockDeviceGetUUID sync.RWMutex - lockDeviceGetUnrepairableMemoryFlag_v1 sync.RWMutex - lockDeviceGetUtilizationRates sync.RWMutex - lockDeviceGetVbiosVersion sync.RWMutex - lockDeviceGetVgpuCapabilities sync.RWMutex - lockDeviceGetVgpuHeterogeneousMode sync.RWMutex - lockDeviceGetVgpuInstancesUtilizationInfo sync.RWMutex - lockDeviceGetVgpuMetadata sync.RWMutex - lockDeviceGetVgpuProcessUtilization sync.RWMutex - lockDeviceGetVgpuProcessesUtilizationInfo sync.RWMutex - lockDeviceGetVgpuSchedulerCapabilities sync.RWMutex - lockDeviceGetVgpuSchedulerLog sync.RWMutex - lockDeviceGetVgpuSchedulerLog_v2 sync.RWMutex - lockDeviceGetVgpuSchedulerState sync.RWMutex - lockDeviceGetVgpuSchedulerState_v2 sync.RWMutex - lockDeviceGetVgpuTypeCreatablePlacements sync.RWMutex - lockDeviceGetVgpuTypeSupportedPlacements sync.RWMutex - lockDeviceGetVgpuUtilization sync.RWMutex - lockDeviceGetViolationStatus sync.RWMutex - lockDeviceGetVirtualizationMode sync.RWMutex - lockDeviceIsMigDeviceHandle sync.RWMutex - lockDeviceModifyDrainState sync.RWMutex - lockDeviceOnSameBoard sync.RWMutex - lockDevicePowerSmoothingActivatePresetProfile sync.RWMutex - lockDevicePowerSmoothingSetState sync.RWMutex - lockDevicePowerSmoothingUpdatePresetProfileParam sync.RWMutex - lockDeviceQueryDrainState sync.RWMutex - lockDeviceReadPRMCounters_v1 sync.RWMutex - lockDeviceReadWritePRM_v1 sync.RWMutex - lockDeviceRegisterEvents sync.RWMutex - lockDeviceRemoveGpu sync.RWMutex - lockDeviceRemoveGpu_v2 sync.RWMutex - lockDeviceResetApplicationsClocks sync.RWMutex - lockDeviceResetGpuLockedClocks sync.RWMutex - lockDeviceResetMemoryLockedClocks sync.RWMutex - lockDeviceResetNvLinkErrorCounters sync.RWMutex - lockDeviceResetNvLinkUtilizationCounter sync.RWMutex - lockDeviceSetAPIRestriction sync.RWMutex - lockDeviceSetAccountingMode sync.RWMutex - lockDeviceSetApplicationsClocks sync.RWMutex - lockDeviceSetAutoBoostedClocksEnabled sync.RWMutex - lockDeviceSetClockOffsets sync.RWMutex - lockDeviceSetComputeMode sync.RWMutex - lockDeviceSetConfComputeUnprotectedMemSize sync.RWMutex - lockDeviceSetCpuAffinity sync.RWMutex - lockDeviceSetDefaultAutoBoostedClocksEnabled sync.RWMutex - lockDeviceSetDefaultFanSpeed_v2 sync.RWMutex - lockDeviceSetDramEncryptionMode sync.RWMutex - lockDeviceSetDriverModel sync.RWMutex - lockDeviceSetEccMode sync.RWMutex - lockDeviceSetFanControlPolicy sync.RWMutex - lockDeviceSetFanSpeed_v2 sync.RWMutex - lockDeviceSetGpcClkVfOffset sync.RWMutex - lockDeviceSetGpuLockedClocks sync.RWMutex - lockDeviceSetGpuOperationMode sync.RWMutex - lockDeviceSetHostname_v1 sync.RWMutex - lockDeviceSetMemClkVfOffset sync.RWMutex - lockDeviceSetMemoryLockedClocks sync.RWMutex - lockDeviceSetMigMode sync.RWMutex - lockDeviceSetNvLinkDeviceLowPowerThreshold sync.RWMutex - lockDeviceSetNvLinkUtilizationControl sync.RWMutex - lockDeviceSetNvlinkBwMode sync.RWMutex - lockDeviceSetPersistenceMode sync.RWMutex - lockDeviceSetPowerManagementLimit sync.RWMutex - lockDeviceSetPowerManagementLimit_v2 sync.RWMutex - lockDeviceSetRusdSettings_v1 sync.RWMutex - lockDeviceSetTemperatureThreshold sync.RWMutex - lockDeviceSetVgpuCapabilities sync.RWMutex - lockDeviceSetVgpuHeterogeneousMode sync.RWMutex - lockDeviceSetVgpuSchedulerState sync.RWMutex - lockDeviceSetVgpuSchedulerState_v2 sync.RWMutex - lockDeviceSetVirtualizationMode sync.RWMutex - lockDeviceValidateInforom sync.RWMutex - lockDeviceVgpuForceGspUnload sync.RWMutex - lockDeviceWorkloadPowerProfileClearRequestedProfiles sync.RWMutex - lockDeviceWorkloadPowerProfileGetCurrentProfiles sync.RWMutex - lockDeviceWorkloadPowerProfileGetProfilesInfo sync.RWMutex - lockDeviceWorkloadPowerProfileSetRequestedProfiles sync.RWMutex - lockDeviceWorkloadPowerProfileUpdateProfiles_v1 sync.RWMutex - lockErrorString sync.RWMutex - lockEventSetCreate sync.RWMutex - lockEventSetFree sync.RWMutex - lockEventSetWait sync.RWMutex - lockExtensions sync.RWMutex - lockGetExcludedDeviceCount sync.RWMutex - lockGetExcludedDeviceInfoByIndex sync.RWMutex - lockGetVgpuCompatibility sync.RWMutex - lockGetVgpuDriverCapabilities sync.RWMutex - lockGetVgpuVersion sync.RWMutex - lockGpmMetricsGet sync.RWMutex - lockGpmMetricsGetV sync.RWMutex - lockGpmMigSampleGet sync.RWMutex - lockGpmQueryDeviceSupport sync.RWMutex - lockGpmQueryDeviceSupportV sync.RWMutex - lockGpmQueryIfStreamingEnabled sync.RWMutex - lockGpmSampleAlloc sync.RWMutex - lockGpmSampleFree sync.RWMutex - lockGpmSampleGet sync.RWMutex - lockGpmSetStreamingEnabled sync.RWMutex - lockGpuInstanceCreateComputeInstance sync.RWMutex - lockGpuInstanceCreateComputeInstanceWithPlacement sync.RWMutex - lockGpuInstanceDestroy sync.RWMutex - lockGpuInstanceGetActiveVgpus sync.RWMutex - lockGpuInstanceGetComputeInstanceById sync.RWMutex - lockGpuInstanceGetComputeInstancePossiblePlacements sync.RWMutex - lockGpuInstanceGetComputeInstanceProfileInfo sync.RWMutex - lockGpuInstanceGetComputeInstanceProfileInfoV sync.RWMutex - lockGpuInstanceGetComputeInstanceRemainingCapacity sync.RWMutex - lockGpuInstanceGetComputeInstances sync.RWMutex - lockGpuInstanceGetCreatableVgpus sync.RWMutex - lockGpuInstanceGetInfo sync.RWMutex - lockGpuInstanceGetVgpuHeterogeneousMode sync.RWMutex - lockGpuInstanceGetVgpuSchedulerLog sync.RWMutex - lockGpuInstanceGetVgpuSchedulerLog_v2 sync.RWMutex - lockGpuInstanceGetVgpuSchedulerState sync.RWMutex - lockGpuInstanceGetVgpuSchedulerState_v2 sync.RWMutex - lockGpuInstanceGetVgpuTypeCreatablePlacements sync.RWMutex - lockGpuInstanceSetVgpuHeterogeneousMode sync.RWMutex - lockGpuInstanceSetVgpuSchedulerState sync.RWMutex - lockGpuInstanceSetVgpuSchedulerState_v2 sync.RWMutex - lockInit sync.RWMutex - lockInitWithFlags sync.RWMutex - lockSetVgpuVersion sync.RWMutex - lockShutdown sync.RWMutex - lockSystemEventSetCreate sync.RWMutex - lockSystemEventSetFree sync.RWMutex - lockSystemEventSetWait sync.RWMutex - lockSystemGetCPER_v1 sync.RWMutex - lockSystemGetConfComputeCapabilities sync.RWMutex - lockSystemGetConfComputeGpusReadyState sync.RWMutex - lockSystemGetConfComputeKeyRotationThresholdInfo sync.RWMutex - lockSystemGetConfComputeSettings sync.RWMutex - lockSystemGetConfComputeState sync.RWMutex - lockSystemGetCudaDriverVersion sync.RWMutex - lockSystemGetCudaDriverVersion_v2 sync.RWMutex - lockSystemGetDriverBranch sync.RWMutex - lockSystemGetDriverVersion sync.RWMutex - lockSystemGetHicVersion sync.RWMutex - lockSystemGetNVMLVersion sync.RWMutex - lockSystemGetNvlinkBwMode sync.RWMutex - lockSystemGetProcessName sync.RWMutex - lockSystemGetTopologyGpuSet sync.RWMutex - lockSystemRegisterEvents sync.RWMutex - lockSystemSetConfComputeGpusReadyState sync.RWMutex - lockSystemSetConfComputeKeyRotationThresholdInfo sync.RWMutex - lockSystemSetNvlinkBwMode sync.RWMutex - lockUnitGetCount sync.RWMutex - lockUnitGetDevices sync.RWMutex - lockUnitGetFanSpeedInfo sync.RWMutex - lockUnitGetHandleByIndex sync.RWMutex - lockUnitGetLedState sync.RWMutex - lockUnitGetPsuInfo sync.RWMutex - lockUnitGetTemperature sync.RWMutex - lockUnitGetUnitInfo sync.RWMutex - lockUnitSetLedState sync.RWMutex - lockVgpuInstanceClearAccountingPids sync.RWMutex - lockVgpuInstanceGetAccountingMode sync.RWMutex - lockVgpuInstanceGetAccountingPids sync.RWMutex - lockVgpuInstanceGetAccountingStats sync.RWMutex - lockVgpuInstanceGetEccMode sync.RWMutex - lockVgpuInstanceGetEncoderCapacity sync.RWMutex - lockVgpuInstanceGetEncoderSessions sync.RWMutex - lockVgpuInstanceGetEncoderStats sync.RWMutex - lockVgpuInstanceGetFBCSessions sync.RWMutex - lockVgpuInstanceGetFBCStats sync.RWMutex - lockVgpuInstanceGetFbUsage sync.RWMutex - lockVgpuInstanceGetFrameRateLimit sync.RWMutex - lockVgpuInstanceGetGpuInstanceId sync.RWMutex - lockVgpuInstanceGetGpuPciId sync.RWMutex - lockVgpuInstanceGetLicenseInfo sync.RWMutex - lockVgpuInstanceGetLicenseStatus sync.RWMutex - lockVgpuInstanceGetMdevUUID sync.RWMutex - lockVgpuInstanceGetMetadata sync.RWMutex - lockVgpuInstanceGetRuntimeStateSize sync.RWMutex - lockVgpuInstanceGetType sync.RWMutex - lockVgpuInstanceGetUUID sync.RWMutex - lockVgpuInstanceGetVmDriverVersion sync.RWMutex - lockVgpuInstanceGetVmID sync.RWMutex - lockVgpuInstanceSetEncoderCapacity sync.RWMutex - lockVgpuTypeGetBAR1Info sync.RWMutex - lockVgpuTypeGetCapabilities sync.RWMutex - lockVgpuTypeGetClass sync.RWMutex - lockVgpuTypeGetDeviceID sync.RWMutex - lockVgpuTypeGetFrameRateLimit sync.RWMutex - lockVgpuTypeGetFramebufferSize sync.RWMutex - lockVgpuTypeGetGpuInstanceProfileId sync.RWMutex - lockVgpuTypeGetLicense sync.RWMutex - lockVgpuTypeGetMaxInstances sync.RWMutex - lockVgpuTypeGetMaxInstancesPerGpuInstance sync.RWMutex - lockVgpuTypeGetMaxInstancesPerVm sync.RWMutex - lockVgpuTypeGetName sync.RWMutex - lockVgpuTypeGetNumDisplayHeads sync.RWMutex - lockVgpuTypeGetResolution sync.RWMutex + lockComputeInstanceDestroy sync.RWMutex + lockComputeInstanceGetInfo sync.RWMutex + lockDeviceClearAccountingPids sync.RWMutex + lockDeviceClearCpuAffinity sync.RWMutex + lockDeviceClearEccErrorCounts sync.RWMutex + lockDeviceClearFieldValues sync.RWMutex + lockDeviceCreateGpuInstance sync.RWMutex + lockDeviceCreateGpuInstanceWithPlacement sync.RWMutex + lockDeviceDiscoverGpus sync.RWMutex + lockDeviceFreezeNvLinkUtilizationCounter sync.RWMutex + lockDeviceGetAPIRestriction sync.RWMutex + lockDeviceGetAccountingBufferSize sync.RWMutex + lockDeviceGetAccountingMode sync.RWMutex + lockDeviceGetAccountingPids sync.RWMutex + lockDeviceGetAccountingStats sync.RWMutex + lockDeviceGetAccountingStats_v2 sync.RWMutex + lockDeviceGetActiveVgpus sync.RWMutex + lockDeviceGetAdaptiveClockInfoStatus sync.RWMutex + lockDeviceGetAdaptiveTgpModeInfo_v1 sync.RWMutex + lockDeviceGetAddressingMode sync.RWMutex + lockDeviceGetApplicationsClock sync.RWMutex + lockDeviceGetArchitecture sync.RWMutex + lockDeviceGetAttributes sync.RWMutex + lockDeviceGetAutoBoostedClocksEnabled sync.RWMutex + lockDeviceGetBAR1MemoryInfo sync.RWMutex + lockDeviceGetBBXTimeData_v1 sync.RWMutex + lockDeviceGetBankRemapperStatus_v1 sync.RWMutex + lockDeviceGetBoardId sync.RWMutex + lockDeviceGetBoardPartNumber sync.RWMutex + lockDeviceGetBrand sync.RWMutex + lockDeviceGetBridgeChipInfo sync.RWMutex + lockDeviceGetBusType sync.RWMutex + lockDeviceGetC2cModeInfoV sync.RWMutex + lockDeviceGetCapabilities sync.RWMutex + lockDeviceGetClkMonStatus sync.RWMutex + lockDeviceGetClock sync.RWMutex + lockDeviceGetClockInfo sync.RWMutex + lockDeviceGetClockOffsets sync.RWMutex + lockDeviceGetComputeInstanceId sync.RWMutex + lockDeviceGetComputeMode sync.RWMutex + lockDeviceGetComputeRunningProcesses sync.RWMutex + lockDeviceGetConfComputeGpuAttestationReport sync.RWMutex + lockDeviceGetConfComputeGpuCertificate sync.RWMutex + lockDeviceGetConfComputeMemSizeInfo sync.RWMutex + lockDeviceGetConfComputeProtectedMemoryUsage sync.RWMutex + lockDeviceGetCoolerInfo sync.RWMutex + lockDeviceGetCount sync.RWMutex + lockDeviceGetCpuAffinity sync.RWMutex + lockDeviceGetCpuAffinityWithinScope sync.RWMutex + lockDeviceGetCreatableVgpus sync.RWMutex + lockDeviceGetCudaComputeCapability sync.RWMutex + lockDeviceGetCurrPcieLinkGeneration sync.RWMutex + lockDeviceGetCurrPcieLinkWidth sync.RWMutex + lockDeviceGetCurrentClockFreqs sync.RWMutex + lockDeviceGetCurrentClocksEventReasons sync.RWMutex + lockDeviceGetCurrentClocksThrottleReasons sync.RWMutex + lockDeviceGetDecoderUtilization sync.RWMutex + lockDeviceGetDefaultApplicationsClock sync.RWMutex + lockDeviceGetDefaultEccMode sync.RWMutex + lockDeviceGetDetailedEccErrors sync.RWMutex + lockDeviceGetDeviceHandleFromMigDeviceHandle sync.RWMutex + lockDeviceGetDisplayActive sync.RWMutex + lockDeviceGetDisplayMode sync.RWMutex + lockDeviceGetDramEncryptionMode sync.RWMutex + lockDeviceGetDriverModel sync.RWMutex + lockDeviceGetDriverModel_v2 sync.RWMutex + lockDeviceGetDynamicPstatesInfo sync.RWMutex + lockDeviceGetEccMode sync.RWMutex + lockDeviceGetEncoderCapacity sync.RWMutex + lockDeviceGetEncoderSessions sync.RWMutex + lockDeviceGetEncoderStats sync.RWMutex + lockDeviceGetEncoderUtilization sync.RWMutex + lockDeviceGetEnforcedPowerLimit sync.RWMutex + lockDeviceGetFBCSessions sync.RWMutex + lockDeviceGetFBCStats sync.RWMutex + lockDeviceGetFanControlPolicy_v2 sync.RWMutex + lockDeviceGetFanSpeed sync.RWMutex + lockDeviceGetFanSpeedRPM sync.RWMutex + lockDeviceGetFanSpeed_v2 sync.RWMutex + lockDeviceGetFieldValues sync.RWMutex + lockDeviceGetGpcClkMinMaxVfOffset sync.RWMutex + lockDeviceGetGpcClkVfOffset sync.RWMutex + lockDeviceGetGpuFabricInfo sync.RWMutex + lockDeviceGetGpuFabricInfoV sync.RWMutex + lockDeviceGetGpuFabricInfo_v4 sync.RWMutex + lockDeviceGetGpuInstanceById sync.RWMutex + lockDeviceGetGpuInstanceId sync.RWMutex + lockDeviceGetGpuInstancePossiblePlacements sync.RWMutex + lockDeviceGetGpuInstanceProfileInfo sync.RWMutex + lockDeviceGetGpuInstanceProfileInfoByIdV sync.RWMutex + lockDeviceGetGpuInstanceProfileInfoV sync.RWMutex + lockDeviceGetGpuInstanceRemainingCapacity sync.RWMutex + lockDeviceGetGpuInstances sync.RWMutex + lockDeviceGetGpuMaxPcieLinkGeneration sync.RWMutex + lockDeviceGetGpuOperationMode sync.RWMutex + lockDeviceGetGraphicsRunningProcesses sync.RWMutex + lockDeviceGetGridLicensableFeatures sync.RWMutex + lockDeviceGetGspFirmwareMode sync.RWMutex + lockDeviceGetGspFirmwareVersion sync.RWMutex + lockDeviceGetHandleByIndex sync.RWMutex + lockDeviceGetHandleByPciBusId sync.RWMutex + lockDeviceGetHandleBySerial sync.RWMutex + lockDeviceGetHandleByUUID sync.RWMutex + lockDeviceGetHandleByUUIDV sync.RWMutex + lockDeviceGetHostVgpuMode sync.RWMutex + lockDeviceGetHostname_v1 sync.RWMutex + lockDeviceGetIndex sync.RWMutex + lockDeviceGetInforomConfigurationChecksum sync.RWMutex + lockDeviceGetInforomImageVersion sync.RWMutex + lockDeviceGetInforomVersion sync.RWMutex + lockDeviceGetIrqNum sync.RWMutex + lockDeviceGetJpgUtilization sync.RWMutex + lockDeviceGetLastBBXFlushTime sync.RWMutex + lockDeviceGetMPSComputeRunningProcesses sync.RWMutex + lockDeviceGetMarginTemperature sync.RWMutex + lockDeviceGetMaxClockInfo sync.RWMutex + lockDeviceGetMaxCustomerBoostClock sync.RWMutex + lockDeviceGetMaxMigDeviceCount sync.RWMutex + lockDeviceGetMaxPcieLinkGeneration sync.RWMutex + lockDeviceGetMaxPcieLinkWidth sync.RWMutex + lockDeviceGetMemClkMinMaxVfOffset sync.RWMutex + lockDeviceGetMemClkVfOffset sync.RWMutex + lockDeviceGetMemoryAffinity sync.RWMutex + lockDeviceGetMemoryBusWidth sync.RWMutex + lockDeviceGetMemoryErrorCounter sync.RWMutex + lockDeviceGetMemoryInfo sync.RWMutex + lockDeviceGetMemoryInfo_v2 sync.RWMutex + lockDeviceGetMemoryLimits_v1 sync.RWMutex + lockDeviceGetMigDeviceHandleByIndex sync.RWMutex + lockDeviceGetMigMode sync.RWMutex + lockDeviceGetMinMaxClockOfPState sync.RWMutex + lockDeviceGetMinMaxFanSpeed sync.RWMutex + lockDeviceGetMinorNumber sync.RWMutex + lockDeviceGetModuleId sync.RWMutex + lockDeviceGetMultiGpuBoard sync.RWMutex + lockDeviceGetName sync.RWMutex + lockDeviceGetNumFans sync.RWMutex + lockDeviceGetNumGpuCores sync.RWMutex + lockDeviceGetNumaNodeId sync.RWMutex + lockDeviceGetNvLinkCapability sync.RWMutex + lockDeviceGetNvLinkErrorCounter sync.RWMutex + lockDeviceGetNvLinkInfo sync.RWMutex + lockDeviceGetNvLinkRemoteDeviceType sync.RWMutex + lockDeviceGetNvLinkRemotePciInfo sync.RWMutex + lockDeviceGetNvLinkState sync.RWMutex + lockDeviceGetNvLinkTelemetrySamples_v1 sync.RWMutex + lockDeviceGetNvLinkUtilizationControl sync.RWMutex + lockDeviceGetNvLinkUtilizationCounter sync.RWMutex + lockDeviceGetNvLinkVersion sync.RWMutex + lockDeviceGetNvlinkBwMode sync.RWMutex + lockDeviceGetNvlinkSupportedBwModes sync.RWMutex + lockDeviceGetOfaUtilization sync.RWMutex + lockDeviceGetP2PStatus sync.RWMutex + lockDeviceGetPciInfo sync.RWMutex + lockDeviceGetPciInfoExt sync.RWMutex + lockDeviceGetPcieLinkMaxSpeed sync.RWMutex + lockDeviceGetPcieReplayCounter sync.RWMutex + lockDeviceGetPcieSpeed sync.RWMutex + lockDeviceGetPcieThroughput sync.RWMutex + lockDeviceGetPdi sync.RWMutex + lockDeviceGetPerformanceModes sync.RWMutex + lockDeviceGetPerformanceState sync.RWMutex + lockDeviceGetPersistenceMode sync.RWMutex + lockDeviceGetPgpuMetadataString sync.RWMutex + lockDeviceGetPlatformInfo sync.RWMutex + lockDeviceGetPowerManagementDefaultLimit sync.RWMutex + lockDeviceGetPowerManagementLimit sync.RWMutex + lockDeviceGetPowerManagementLimitConstraints sync.RWMutex + lockDeviceGetPowerManagementMode sync.RWMutex + lockDeviceGetPowerMizerMode_v1 sync.RWMutex + lockDeviceGetPowerSource sync.RWMutex + lockDeviceGetPowerState sync.RWMutex + lockDeviceGetPowerUsage sync.RWMutex + lockDeviceGetProcessUtilization sync.RWMutex + lockDeviceGetProcessesUtilizationInfo sync.RWMutex + lockDeviceGetRemappedRows sync.RWMutex + lockDeviceGetRemappedRows_v2 sync.RWMutex + lockDeviceGetRepairStatus sync.RWMutex + lockDeviceGetRetiredPages sync.RWMutex + lockDeviceGetRetiredPagesPendingStatus sync.RWMutex + lockDeviceGetRetiredPages_v2 sync.RWMutex + lockDeviceGetRowRemapperHistogram sync.RWMutex + lockDeviceGetRunningProcessDetailList sync.RWMutex + lockDeviceGetSamples sync.RWMutex + lockDeviceGetSerial sync.RWMutex + lockDeviceGetSramEccErrorStatus sync.RWMutex + lockDeviceGetSramUniqueUncorrectedEccErrorCounts sync.RWMutex + lockDeviceGetSupportedClocksEventReasons sync.RWMutex + lockDeviceGetSupportedClocksThrottleReasons sync.RWMutex + lockDeviceGetSupportedEventTypes sync.RWMutex + lockDeviceGetSupportedGraphicsClocks sync.RWMutex + lockDeviceGetSupportedMemoryClocks sync.RWMutex + lockDeviceGetSupportedPerformanceStates sync.RWMutex + lockDeviceGetSupportedVgpus sync.RWMutex + lockDeviceGetTargetFanSpeed sync.RWMutex + lockDeviceGetTemperature sync.RWMutex + lockDeviceGetTemperatureThreshold sync.RWMutex + lockDeviceGetTemperatureV sync.RWMutex + lockDeviceGetThermalSettings sync.RWMutex + lockDeviceGetTopologyCommonAncestor sync.RWMutex + lockDeviceGetTopologyNearestGpus sync.RWMutex + lockDeviceGetTotalEccErrors sync.RWMutex + lockDeviceGetTotalEnergyConsumption sync.RWMutex + lockDeviceGetUUID sync.RWMutex + lockDeviceGetUnrepairableMemoryFlag_v1 sync.RWMutex + lockDeviceGetUtilizationRates sync.RWMutex + lockDeviceGetVbiosVersion sync.RWMutex + lockDeviceGetVgpuCapabilities sync.RWMutex + lockDeviceGetVgpuHeterogeneousMode sync.RWMutex + lockDeviceGetVgpuInstancesUtilizationInfo sync.RWMutex + lockDeviceGetVgpuMetadata sync.RWMutex + lockDeviceGetVgpuProcessUtilization sync.RWMutex + lockDeviceGetVgpuProcessesUtilizationInfo sync.RWMutex + lockDeviceGetVgpuSchedulerCapabilities sync.RWMutex + lockDeviceGetVgpuSchedulerLog sync.RWMutex + lockDeviceGetVgpuSchedulerLog_v2 sync.RWMutex + lockDeviceGetVgpuSchedulerState sync.RWMutex + lockDeviceGetVgpuSchedulerState_v2 sync.RWMutex + lockDeviceGetVgpuTypeCreatablePlacements sync.RWMutex + lockDeviceGetVgpuTypeSupportedPlacements sync.RWMutex + lockDeviceGetVgpuUtilization sync.RWMutex + lockDeviceGetViolationStatus sync.RWMutex + lockDeviceGetVirtualizationMode sync.RWMutex + lockDeviceIsMigDeviceHandle sync.RWMutex + lockDeviceModifyDrainState sync.RWMutex + lockDeviceOnSameBoard sync.RWMutex + lockDevicePerfMetricsGetSamples_v1 sync.RWMutex + lockDevicePowerSmoothingActivatePresetProfile sync.RWMutex + lockDevicePowerSmoothingSetState sync.RWMutex + lockDevicePowerSmoothingUpdatePresetProfileParam sync.RWMutex + lockDeviceQueryDrainState sync.RWMutex + lockDeviceReadPRMCounters_v1 sync.RWMutex + lockDeviceReadWritePRM_v1 sync.RWMutex + lockDeviceRegisterEvents sync.RWMutex + lockDeviceRemoveGpu sync.RWMutex + lockDeviceRemoveGpu_v2 sync.RWMutex + lockDeviceResetApplicationsClocks sync.RWMutex + lockDeviceResetGpuLockedClocks sync.RWMutex + lockDeviceResetMemoryLockedClocks sync.RWMutex + lockDeviceResetNvLinkErrorCounters sync.RWMutex + lockDeviceResetNvLinkUtilizationCounter sync.RWMutex + lockDeviceSetAPIRestriction sync.RWMutex + lockDeviceSetAccountingMode sync.RWMutex + lockDeviceSetAdaptiveTgpMode_v1 sync.RWMutex + lockDeviceSetApplicationsClocks sync.RWMutex + lockDeviceSetAutoBoostedClocksEnabled sync.RWMutex + lockDeviceSetClockOffsets sync.RWMutex + lockDeviceSetComputeMode sync.RWMutex + lockDeviceSetConfComputeUnprotectedMemSize sync.RWMutex + lockDeviceSetCpuAffinity sync.RWMutex + lockDeviceSetDefaultAutoBoostedClocksEnabled sync.RWMutex + lockDeviceSetDefaultFanSpeed_v2 sync.RWMutex + lockDeviceSetDramEncryptionMode sync.RWMutex + lockDeviceSetDriverModel sync.RWMutex + lockDeviceSetEccMode sync.RWMutex + lockDeviceSetFanControlPolicy sync.RWMutex + lockDeviceSetFanSpeed_v2 sync.RWMutex + lockDeviceSetGpcClkVfOffset sync.RWMutex + lockDeviceSetGpuLockedClocks sync.RWMutex + lockDeviceSetGpuOperationMode sync.RWMutex + lockDeviceSetHostname_v1 sync.RWMutex + lockDeviceSetMemClkVfOffset sync.RWMutex + lockDeviceSetMemoryLimits_v1 sync.RWMutex + lockDeviceSetMemoryLockedClocks sync.RWMutex + lockDeviceSetMigMode sync.RWMutex + lockDeviceSetNvLinkDeviceLowPowerThreshold sync.RWMutex + lockDeviceSetNvLinkUtilizationControl sync.RWMutex + lockDeviceSetNvlinkBwMode sync.RWMutex + lockDeviceSetNvlinkBwModeAsync_v1 sync.RWMutex + lockDeviceSetPersistenceMode sync.RWMutex + lockDeviceSetPowerManagementLimit sync.RWMutex + lockDeviceSetPowerManagementLimit_v2 sync.RWMutex + lockDeviceSetRusdSettings_v1 sync.RWMutex + lockDeviceSetTemperatureThreshold sync.RWMutex + lockDeviceSetVgpuCapabilities sync.RWMutex + lockDeviceSetVgpuHeterogeneousMode sync.RWMutex + lockDeviceSetVgpuSchedulerState sync.RWMutex + lockDeviceSetVgpuSchedulerState_v2 sync.RWMutex + lockDeviceSetVirtualizationMode sync.RWMutex + lockDeviceValidateInforom sync.RWMutex + lockDeviceVgpuForceGspUnload sync.RWMutex + lockDeviceWorkloadPowerProfileClearRequestedProfiles sync.RWMutex + lockDeviceWorkloadPowerProfileGetCurrentProfiles sync.RWMutex + lockDeviceWorkloadPowerProfileGetProfilesInfo sync.RWMutex + lockDeviceWorkloadPowerProfileSetRequestedProfiles sync.RWMutex + lockDeviceWorkloadPowerProfileUpdateProfiles_v1 sync.RWMutex + lockErrorString sync.RWMutex + lockEventSetCreate sync.RWMutex + lockEventSetFree sync.RWMutex + lockEventSetGetContextCount_v1 sync.RWMutex + lockEventSetGetContextData_v1 sync.RWMutex + lockEventSetGetContextInfo_v1 sync.RWMutex + lockEventSetGetGpuOperationalEventContextLegacyXid_v1 sync.RWMutex + lockEventSetRegisterGpuOperationalEvents_v1 sync.RWMutex + lockEventSetWait sync.RWMutex + lockEventSetWait_v3 sync.RWMutex + lockExtensions sync.RWMutex + lockGetExcludedDeviceCount sync.RWMutex + lockGetExcludedDeviceInfoByIndex sync.RWMutex + lockGetVgpuCompatibility sync.RWMutex + lockGetVgpuDriverCapabilities sync.RWMutex + lockGetVgpuVersion sync.RWMutex + lockGpmMetricsGet sync.RWMutex + lockGpmMetricsGetV sync.RWMutex + lockGpmMigSampleGet sync.RWMutex + lockGpmQueryDeviceSupport sync.RWMutex + lockGpmQueryDeviceSupportV sync.RWMutex + lockGpmQueryIfStreamingEnabled sync.RWMutex + lockGpmSampleAlloc sync.RWMutex + lockGpmSampleFree sync.RWMutex + lockGpmSampleGet sync.RWMutex + lockGpmSetStreamingEnabled sync.RWMutex + lockGpuInstanceCreateComputeInstance sync.RWMutex + lockGpuInstanceCreateComputeInstanceWithPlacement sync.RWMutex + lockGpuInstanceDestroy sync.RWMutex + lockGpuInstanceGetActiveVgpus sync.RWMutex + lockGpuInstanceGetComputeInstanceById sync.RWMutex + lockGpuInstanceGetComputeInstancePossiblePlacements sync.RWMutex + lockGpuInstanceGetComputeInstanceProfileInfo sync.RWMutex + lockGpuInstanceGetComputeInstanceProfileInfoV sync.RWMutex + lockGpuInstanceGetComputeInstanceRemainingCapacity sync.RWMutex + lockGpuInstanceGetComputeInstances sync.RWMutex + lockGpuInstanceGetCreatableVgpus sync.RWMutex + lockGpuInstanceGetInfo sync.RWMutex + lockGpuInstanceGetVgpuHeterogeneousMode sync.RWMutex + lockGpuInstanceGetVgpuSchedulerLog sync.RWMutex + lockGpuInstanceGetVgpuSchedulerLog_v2 sync.RWMutex + lockGpuInstanceGetVgpuSchedulerState sync.RWMutex + lockGpuInstanceGetVgpuSchedulerState_v2 sync.RWMutex + lockGpuInstanceGetVgpuTypeCreatablePlacements sync.RWMutex + lockGpuInstanceSetVgpuHeterogeneousMode sync.RWMutex + lockGpuInstanceSetVgpuSchedulerState sync.RWMutex + lockGpuInstanceSetVgpuSchedulerState_v2 sync.RWMutex + lockInit sync.RWMutex + lockInitWithFlags sync.RWMutex + lockSetVgpuVersion sync.RWMutex + lockShutdown sync.RWMutex + lockSystemEventSetCreate sync.RWMutex + lockSystemEventSetFree sync.RWMutex + lockSystemEventSetWait sync.RWMutex + lockSystemGetCPER_v1 sync.RWMutex + lockSystemGetConfComputeCapabilities sync.RWMutex + lockSystemGetConfComputeGpusReadyState sync.RWMutex + lockSystemGetConfComputeKeyRotationThresholdInfo sync.RWMutex + lockSystemGetConfComputeSettings sync.RWMutex + lockSystemGetConfComputeState sync.RWMutex + lockSystemGetCudaDriverVersion sync.RWMutex + lockSystemGetCudaDriverVersion_v2 sync.RWMutex + lockSystemGetDriverBranch sync.RWMutex + lockSystemGetDriverVersion sync.RWMutex + lockSystemGetHicVersion sync.RWMutex + lockSystemGetNVMLVersion sync.RWMutex + lockSystemGetNvlinkBwMode sync.RWMutex + lockSystemGetProcessName sync.RWMutex + lockSystemGetTopologyGpuSet sync.RWMutex + lockSystemRegisterEvents sync.RWMutex + lockSystemSetConfComputeGpusReadyState sync.RWMutex + lockSystemSetConfComputeKeyRotationThresholdInfo sync.RWMutex + lockSystemSetNvlinkBwMode sync.RWMutex + lockUnitGetCount sync.RWMutex + lockUnitGetDevices sync.RWMutex + lockUnitGetFanSpeedInfo sync.RWMutex + lockUnitGetHandleByIndex sync.RWMutex + lockUnitGetLedState sync.RWMutex + lockUnitGetPsuInfo sync.RWMutex + lockUnitGetTemperature sync.RWMutex + lockUnitGetUnitInfo sync.RWMutex + lockUnitSetLedState sync.RWMutex + lockVgpuInstanceClearAccountingPids sync.RWMutex + lockVgpuInstanceGetAccountingMode sync.RWMutex + lockVgpuInstanceGetAccountingPids sync.RWMutex + lockVgpuInstanceGetAccountingStats sync.RWMutex + lockVgpuInstanceGetEccMode sync.RWMutex + lockVgpuInstanceGetEncoderCapacity sync.RWMutex + lockVgpuInstanceGetEncoderSessions sync.RWMutex + lockVgpuInstanceGetEncoderStats sync.RWMutex + lockVgpuInstanceGetFBCSessions sync.RWMutex + lockVgpuInstanceGetFBCStats sync.RWMutex + lockVgpuInstanceGetFbUsage sync.RWMutex + lockVgpuInstanceGetFrameRateLimit sync.RWMutex + lockVgpuInstanceGetGpuInstanceId sync.RWMutex + lockVgpuInstanceGetGpuPciId sync.RWMutex + lockVgpuInstanceGetLicenseInfo sync.RWMutex + lockVgpuInstanceGetLicenseStatus sync.RWMutex + lockVgpuInstanceGetMdevUUID sync.RWMutex + lockVgpuInstanceGetMetadata sync.RWMutex + lockVgpuInstanceGetRuntimeStateSize sync.RWMutex + lockVgpuInstanceGetType sync.RWMutex + lockVgpuInstanceGetUUID sync.RWMutex + lockVgpuInstanceGetVmDriverVersion sync.RWMutex + lockVgpuInstanceGetVmID sync.RWMutex + lockVgpuInstanceSetEncoderCapacity sync.RWMutex + lockVgpuTypeGetBAR1Info sync.RWMutex + lockVgpuTypeGetCapabilities sync.RWMutex + lockVgpuTypeGetClass sync.RWMutex + lockVgpuTypeGetDeviceID sync.RWMutex + lockVgpuTypeGetFrameRateLimit sync.RWMutex + lockVgpuTypeGetFramebufferSize sync.RWMutex + lockVgpuTypeGetGpuInstanceProfileId sync.RWMutex + lockVgpuTypeGetID sync.RWMutex + lockVgpuTypeGetLicense sync.RWMutex + lockVgpuTypeGetMaxInstances sync.RWMutex + lockVgpuTypeGetMaxInstancesPerGpuInstance sync.RWMutex + lockVgpuTypeGetMaxInstancesPerVm sync.RWMutex + lockVgpuTypeGetName sync.RWMutex + lockVgpuTypeGetNumDisplayHeads sync.RWMutex + lockVgpuTypeGetResolution sync.RWMutex } // ComputeInstanceDestroy calls ComputeInstanceDestroyFunc. @@ -5647,6 +5867,38 @@ func (mock *Interface) DeviceGetAdaptiveClockInfoStatusCalls() []struct { return calls } +// DeviceGetAdaptiveTgpModeInfo_v1 calls DeviceGetAdaptiveTgpModeInfo_v1Func. +func (mock *Interface) DeviceGetAdaptiveTgpModeInfo_v1(device nvml.Device) (nvml.AdaptiveTgpModeInfo_v1, nvml.Return) { + if mock.DeviceGetAdaptiveTgpModeInfo_v1Func == nil { + panic("Interface.DeviceGetAdaptiveTgpModeInfo_v1Func: method is nil but Interface.DeviceGetAdaptiveTgpModeInfo_v1 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetAdaptiveTgpModeInfo_v1.Lock() + mock.calls.DeviceGetAdaptiveTgpModeInfo_v1 = append(mock.calls.DeviceGetAdaptiveTgpModeInfo_v1, callInfo) + mock.lockDeviceGetAdaptiveTgpModeInfo_v1.Unlock() + return mock.DeviceGetAdaptiveTgpModeInfo_v1Func(device) +} + +// DeviceGetAdaptiveTgpModeInfo_v1Calls gets all the calls that were made to DeviceGetAdaptiveTgpModeInfo_v1. +// Check the length with: +// +// len(mockedInterface.DeviceGetAdaptiveTgpModeInfo_v1Calls()) +func (mock *Interface) DeviceGetAdaptiveTgpModeInfo_v1Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetAdaptiveTgpModeInfo_v1.RLock() + calls = mock.calls.DeviceGetAdaptiveTgpModeInfo_v1 + mock.lockDeviceGetAdaptiveTgpModeInfo_v1.RUnlock() + return calls +} + // DeviceGetAddressingMode calls DeviceGetAddressingModeFunc. func (mock *Interface) DeviceGetAddressingMode(device nvml.Device) (nvml.DeviceAddressingMode, nvml.Return) { if mock.DeviceGetAddressingModeFunc == nil { @@ -5875,6 +6127,38 @@ func (mock *Interface) DeviceGetBBXTimeData_v1Calls() []struct { return calls } +// DeviceGetBankRemapperStatus_v1 calls DeviceGetBankRemapperStatus_v1Func. +func (mock *Interface) DeviceGetBankRemapperStatus_v1(device nvml.Device) (nvml.EccBankRemapperStatus_v1, nvml.Return) { + if mock.DeviceGetBankRemapperStatus_v1Func == nil { + panic("Interface.DeviceGetBankRemapperStatus_v1Func: method is nil but Interface.DeviceGetBankRemapperStatus_v1 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetBankRemapperStatus_v1.Lock() + mock.calls.DeviceGetBankRemapperStatus_v1 = append(mock.calls.DeviceGetBankRemapperStatus_v1, callInfo) + mock.lockDeviceGetBankRemapperStatus_v1.Unlock() + return mock.DeviceGetBankRemapperStatus_v1Func(device) +} + +// DeviceGetBankRemapperStatus_v1Calls gets all the calls that were made to DeviceGetBankRemapperStatus_v1. +// Check the length with: +// +// len(mockedInterface.DeviceGetBankRemapperStatus_v1Calls()) +func (mock *Interface) DeviceGetBankRemapperStatus_v1Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetBankRemapperStatus_v1.RLock() + calls = mock.calls.DeviceGetBankRemapperStatus_v1 + mock.lockDeviceGetBankRemapperStatus_v1.RUnlock() + return calls +} + // DeviceGetBoardId calls DeviceGetBoardIdFunc. func (mock *Interface) DeviceGetBoardId(device nvml.Device) (uint32, nvml.Return) { if mock.DeviceGetBoardIdFunc == nil { @@ -7750,6 +8034,38 @@ func (mock *Interface) DeviceGetGpuFabricInfoVCalls() []struct { return calls } +// DeviceGetGpuFabricInfo_v4 calls DeviceGetGpuFabricInfo_v4Func. +func (mock *Interface) DeviceGetGpuFabricInfo_v4(device nvml.Device) (nvml.GpuFabricInfo_v4, nvml.Return) { + if mock.DeviceGetGpuFabricInfo_v4Func == nil { + panic("Interface.DeviceGetGpuFabricInfo_v4Func: method is nil but Interface.DeviceGetGpuFabricInfo_v4 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGpuFabricInfo_v4.Lock() + mock.calls.DeviceGetGpuFabricInfo_v4 = append(mock.calls.DeviceGetGpuFabricInfo_v4, callInfo) + mock.lockDeviceGetGpuFabricInfo_v4.Unlock() + return mock.DeviceGetGpuFabricInfo_v4Func(device) +} + +// DeviceGetGpuFabricInfo_v4Calls gets all the calls that were made to DeviceGetGpuFabricInfo_v4. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuFabricInfo_v4Calls()) +func (mock *Interface) DeviceGetGpuFabricInfo_v4Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGpuFabricInfo_v4.RLock() + calls = mock.calls.DeviceGetGpuFabricInfo_v4 + mock.lockDeviceGetGpuFabricInfo_v4.RUnlock() + return calls +} + // DeviceGetGpuInstanceById calls DeviceGetGpuInstanceByIdFunc. func (mock *Interface) DeviceGetGpuInstanceById(device nvml.Device, n int) (nvml.GpuInstance, nvml.Return) { if mock.DeviceGetGpuInstanceByIdFunc == nil { @@ -9154,6 +9470,42 @@ func (mock *Interface) DeviceGetMemoryInfo_v2Calls() []struct { return calls } +// DeviceGetMemoryLimits_v1 calls DeviceGetMemoryLimits_v1Func. +func (mock *Interface) DeviceGetMemoryLimits_v1(device nvml.Device, s string) (nvml.GetMemoryLimits_v1, nvml.Return) { + if mock.DeviceGetMemoryLimits_v1Func == nil { + panic("Interface.DeviceGetMemoryLimits_v1Func: method is nil but Interface.DeviceGetMemoryLimits_v1 was just called") + } + callInfo := struct { + Device nvml.Device + S string + }{ + Device: device, + S: s, + } + mock.lockDeviceGetMemoryLimits_v1.Lock() + mock.calls.DeviceGetMemoryLimits_v1 = append(mock.calls.DeviceGetMemoryLimits_v1, callInfo) + mock.lockDeviceGetMemoryLimits_v1.Unlock() + return mock.DeviceGetMemoryLimits_v1Func(device, s) +} + +// DeviceGetMemoryLimits_v1Calls gets all the calls that were made to DeviceGetMemoryLimits_v1. +// Check the length with: +// +// len(mockedInterface.DeviceGetMemoryLimits_v1Calls()) +func (mock *Interface) DeviceGetMemoryLimits_v1Calls() []struct { + Device nvml.Device + S string +} { + var calls []struct { + Device nvml.Device + S string + } + mock.lockDeviceGetMemoryLimits_v1.RLock() + calls = mock.calls.DeviceGetMemoryLimits_v1 + mock.lockDeviceGetMemoryLimits_v1.RUnlock() + return calls +} + // DeviceGetMigDeviceHandleByIndex calls DeviceGetMigDeviceHandleByIndexFunc. func (mock *Interface) DeviceGetMigDeviceHandleByIndex(device nvml.Device, n int) (nvml.Device, nvml.Return) { if mock.DeviceGetMigDeviceHandleByIndexFunc == nil { @@ -9738,6 +10090,42 @@ func (mock *Interface) DeviceGetNvLinkStateCalls() []struct { return calls } +// DeviceGetNvLinkTelemetrySamples_v1 calls DeviceGetNvLinkTelemetrySamples_v1Func. +func (mock *Interface) DeviceGetNvLinkTelemetrySamples_v1(device nvml.Device, nvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1) nvml.Return { + if mock.DeviceGetNvLinkTelemetrySamples_v1Func == nil { + panic("Interface.DeviceGetNvLinkTelemetrySamples_v1Func: method is nil but Interface.DeviceGetNvLinkTelemetrySamples_v1 was just called") + } + callInfo := struct { + Device nvml.Device + NvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1 + }{ + Device: device, + NvlinkTelemetrySamples_v1: nvlinkTelemetrySamples_v1, + } + mock.lockDeviceGetNvLinkTelemetrySamples_v1.Lock() + mock.calls.DeviceGetNvLinkTelemetrySamples_v1 = append(mock.calls.DeviceGetNvLinkTelemetrySamples_v1, callInfo) + mock.lockDeviceGetNvLinkTelemetrySamples_v1.Unlock() + return mock.DeviceGetNvLinkTelemetrySamples_v1Func(device, nvlinkTelemetrySamples_v1) +} + +// DeviceGetNvLinkTelemetrySamples_v1Calls gets all the calls that were made to DeviceGetNvLinkTelemetrySamples_v1. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkTelemetrySamples_v1Calls()) +func (mock *Interface) DeviceGetNvLinkTelemetrySamples_v1Calls() []struct { + Device nvml.Device + NvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1 +} { + var calls []struct { + Device nvml.Device + NvlinkTelemetrySamples_v1 *nvml.NvlinkTelemetrySamples_v1 + } + mock.lockDeviceGetNvLinkTelemetrySamples_v1.RLock() + calls = mock.calls.DeviceGetNvLinkTelemetrySamples_v1 + mock.lockDeviceGetNvLinkTelemetrySamples_v1.RUnlock() + return calls +} + // DeviceGetNvLinkUtilizationControl calls DeviceGetNvLinkUtilizationControlFunc. func (mock *Interface) DeviceGetNvLinkUtilizationControl(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { if mock.DeviceGetNvLinkUtilizationControlFunc == nil { @@ -12430,6 +12818,42 @@ func (mock *Interface) DeviceOnSameBoardCalls() []struct { return calls } +// DevicePerfMetricsGetSamples_v1 calls DevicePerfMetricsGetSamples_v1Func. +func (mock *Interface) DevicePerfMetricsGetSamples_v1(device nvml.Device, perfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1) nvml.Return { + if mock.DevicePerfMetricsGetSamples_v1Func == nil { + panic("Interface.DevicePerfMetricsGetSamples_v1Func: method is nil but Interface.DevicePerfMetricsGetSamples_v1 was just called") + } + callInfo := struct { + Device nvml.Device + PerfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1 + }{ + Device: device, + PerfMetricsSamples_v1: perfMetricsSamples_v1, + } + mock.lockDevicePerfMetricsGetSamples_v1.Lock() + mock.calls.DevicePerfMetricsGetSamples_v1 = append(mock.calls.DevicePerfMetricsGetSamples_v1, callInfo) + mock.lockDevicePerfMetricsGetSamples_v1.Unlock() + return mock.DevicePerfMetricsGetSamples_v1Func(device, perfMetricsSamples_v1) +} + +// DevicePerfMetricsGetSamples_v1Calls gets all the calls that were made to DevicePerfMetricsGetSamples_v1. +// Check the length with: +// +// len(mockedInterface.DevicePerfMetricsGetSamples_v1Calls()) +func (mock *Interface) DevicePerfMetricsGetSamples_v1Calls() []struct { + Device nvml.Device + PerfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1 +} { + var calls []struct { + Device nvml.Device + PerfMetricsSamples_v1 *nvml.PerfMetricsSamples_v1 + } + mock.lockDevicePerfMetricsGetSamples_v1.RLock() + calls = mock.calls.DevicePerfMetricsGetSamples_v1 + mock.lockDevicePerfMetricsGetSamples_v1.RUnlock() + return calls +} + // DevicePowerSmoothingActivatePresetProfile calls DevicePowerSmoothingActivatePresetProfileFunc. func (mock *Interface) DevicePowerSmoothingActivatePresetProfile(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { if mock.DevicePowerSmoothingActivatePresetProfileFunc == nil { @@ -13006,6 +13430,42 @@ func (mock *Interface) DeviceSetAccountingModeCalls() []struct { return calls } +// DeviceSetAdaptiveTgpMode_v1 calls DeviceSetAdaptiveTgpMode_v1Func. +func (mock *Interface) DeviceSetAdaptiveTgpMode_v1(device nvml.Device, enableState nvml.EnableState) nvml.Return { + if mock.DeviceSetAdaptiveTgpMode_v1Func == nil { + panic("Interface.DeviceSetAdaptiveTgpMode_v1Func: method is nil but Interface.DeviceSetAdaptiveTgpMode_v1 was just called") + } + callInfo := struct { + Device nvml.Device + EnableState nvml.EnableState + }{ + Device: device, + EnableState: enableState, + } + mock.lockDeviceSetAdaptiveTgpMode_v1.Lock() + mock.calls.DeviceSetAdaptiveTgpMode_v1 = append(mock.calls.DeviceSetAdaptiveTgpMode_v1, callInfo) + mock.lockDeviceSetAdaptiveTgpMode_v1.Unlock() + return mock.DeviceSetAdaptiveTgpMode_v1Func(device, enableState) +} + +// DeviceSetAdaptiveTgpMode_v1Calls gets all the calls that were made to DeviceSetAdaptiveTgpMode_v1. +// Check the length with: +// +// len(mockedInterface.DeviceSetAdaptiveTgpMode_v1Calls()) +func (mock *Interface) DeviceSetAdaptiveTgpMode_v1Calls() []struct { + Device nvml.Device + EnableState nvml.EnableState +} { + var calls []struct { + Device nvml.Device + EnableState nvml.EnableState + } + mock.lockDeviceSetAdaptiveTgpMode_v1.RLock() + calls = mock.calls.DeviceSetAdaptiveTgpMode_v1 + mock.lockDeviceSetAdaptiveTgpMode_v1.RUnlock() + return calls +} + // DeviceSetApplicationsClocks calls DeviceSetApplicationsClocksFunc. func (mock *Interface) DeviceSetApplicationsClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { if mock.DeviceSetApplicationsClocksFunc == nil { @@ -13674,6 +14134,50 @@ func (mock *Interface) DeviceSetMemClkVfOffsetCalls() []struct { return calls } +// DeviceSetMemoryLimits_v1 calls DeviceSetMemoryLimits_v1Func. +func (mock *Interface) DeviceSetMemoryLimits_v1(device nvml.Device, s string, n1 int, n2 int) nvml.Return { + if mock.DeviceSetMemoryLimits_v1Func == nil { + panic("Interface.DeviceSetMemoryLimits_v1Func: method is nil but Interface.DeviceSetMemoryLimits_v1 was just called") + } + callInfo := struct { + Device nvml.Device + S string + N1 int + N2 int + }{ + Device: device, + S: s, + N1: n1, + N2: n2, + } + mock.lockDeviceSetMemoryLimits_v1.Lock() + mock.calls.DeviceSetMemoryLimits_v1 = append(mock.calls.DeviceSetMemoryLimits_v1, callInfo) + mock.lockDeviceSetMemoryLimits_v1.Unlock() + return mock.DeviceSetMemoryLimits_v1Func(device, s, n1, n2) +} + +// DeviceSetMemoryLimits_v1Calls gets all the calls that were made to DeviceSetMemoryLimits_v1. +// Check the length with: +// +// len(mockedInterface.DeviceSetMemoryLimits_v1Calls()) +func (mock *Interface) DeviceSetMemoryLimits_v1Calls() []struct { + Device nvml.Device + S string + N1 int + N2 int +} { + var calls []struct { + Device nvml.Device + S string + N1 int + N2 int + } + mock.lockDeviceSetMemoryLimits_v1.RLock() + calls = mock.calls.DeviceSetMemoryLimits_v1 + mock.lockDeviceSetMemoryLimits_v1.RUnlock() + return calls +} + // DeviceSetMemoryLockedClocks calls DeviceSetMemoryLockedClocksFunc. func (mock *Interface) DeviceSetMemoryLockedClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { if mock.DeviceSetMemoryLockedClocksFunc == nil { @@ -13870,6 +14374,42 @@ func (mock *Interface) DeviceSetNvlinkBwModeCalls() []struct { return calls } +// DeviceSetNvlinkBwModeAsync_v1 calls DeviceSetNvlinkBwModeAsync_v1Func. +func (mock *Interface) DeviceSetNvlinkBwModeAsync_v1(device nvml.Device, nvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1) nvml.Return { + if mock.DeviceSetNvlinkBwModeAsync_v1Func == nil { + panic("Interface.DeviceSetNvlinkBwModeAsync_v1Func: method is nil but Interface.DeviceSetNvlinkBwModeAsync_v1 was just called") + } + callInfo := struct { + Device nvml.Device + NvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1 + }{ + Device: device, + NvlinkSetBwModeAsync_v1: nvlinkSetBwModeAsync_v1, + } + mock.lockDeviceSetNvlinkBwModeAsync_v1.Lock() + mock.calls.DeviceSetNvlinkBwModeAsync_v1 = append(mock.calls.DeviceSetNvlinkBwModeAsync_v1, callInfo) + mock.lockDeviceSetNvlinkBwModeAsync_v1.Unlock() + return mock.DeviceSetNvlinkBwModeAsync_v1Func(device, nvlinkSetBwModeAsync_v1) +} + +// DeviceSetNvlinkBwModeAsync_v1Calls gets all the calls that were made to DeviceSetNvlinkBwModeAsync_v1. +// Check the length with: +// +// len(mockedInterface.DeviceSetNvlinkBwModeAsync_v1Calls()) +func (mock *Interface) DeviceSetNvlinkBwModeAsync_v1Calls() []struct { + Device nvml.Device + NvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1 +} { + var calls []struct { + Device nvml.Device + NvlinkSetBwModeAsync_v1 *nvml.NvlinkSetBwModeAsync_v1 + } + mock.lockDeviceSetNvlinkBwModeAsync_v1.RLock() + calls = mock.calls.DeviceSetNvlinkBwModeAsync_v1 + mock.lockDeviceSetNvlinkBwModeAsync_v1.RUnlock() + return calls +} + // DeviceSetPersistenceMode calls DeviceSetPersistenceModeFunc. func (mock *Interface) DeviceSetPersistenceMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { if mock.DeviceSetPersistenceModeFunc == nil { @@ -14569,6 +15109,186 @@ func (mock *Interface) EventSetFreeCalls() []struct { return calls } +// EventSetGetContextCount_v1 calls EventSetGetContextCount_v1Func. +func (mock *Interface) EventSetGetContextCount_v1(eventSet nvml.EventSet) (uint32, nvml.Return) { + if mock.EventSetGetContextCount_v1Func == nil { + panic("Interface.EventSetGetContextCount_v1Func: method is nil but Interface.EventSetGetContextCount_v1 was just called") + } + callInfo := struct { + EventSet nvml.EventSet + }{ + EventSet: eventSet, + } + mock.lockEventSetGetContextCount_v1.Lock() + mock.calls.EventSetGetContextCount_v1 = append(mock.calls.EventSetGetContextCount_v1, callInfo) + mock.lockEventSetGetContextCount_v1.Unlock() + return mock.EventSetGetContextCount_v1Func(eventSet) +} + +// EventSetGetContextCount_v1Calls gets all the calls that were made to EventSetGetContextCount_v1. +// Check the length with: +// +// len(mockedInterface.EventSetGetContextCount_v1Calls()) +func (mock *Interface) EventSetGetContextCount_v1Calls() []struct { + EventSet nvml.EventSet +} { + var calls []struct { + EventSet nvml.EventSet + } + mock.lockEventSetGetContextCount_v1.RLock() + calls = mock.calls.EventSetGetContextCount_v1 + mock.lockEventSetGetContextCount_v1.RUnlock() + return calls +} + +// EventSetGetContextData_v1 calls EventSetGetContextData_v1Func. +func (mock *Interface) EventSetGetContextData_v1(eventSet nvml.EventSet, v uint32, bytes []byte) (uint32, nvml.Return) { + if mock.EventSetGetContextData_v1Func == nil { + panic("Interface.EventSetGetContextData_v1Func: method is nil but Interface.EventSetGetContextData_v1 was just called") + } + callInfo := struct { + EventSet nvml.EventSet + V uint32 + Bytes []byte + }{ + EventSet: eventSet, + V: v, + Bytes: bytes, + } + mock.lockEventSetGetContextData_v1.Lock() + mock.calls.EventSetGetContextData_v1 = append(mock.calls.EventSetGetContextData_v1, callInfo) + mock.lockEventSetGetContextData_v1.Unlock() + return mock.EventSetGetContextData_v1Func(eventSet, v, bytes) +} + +// EventSetGetContextData_v1Calls gets all the calls that were made to EventSetGetContextData_v1. +// Check the length with: +// +// len(mockedInterface.EventSetGetContextData_v1Calls()) +func (mock *Interface) EventSetGetContextData_v1Calls() []struct { + EventSet nvml.EventSet + V uint32 + Bytes []byte +} { + var calls []struct { + EventSet nvml.EventSet + V uint32 + Bytes []byte + } + mock.lockEventSetGetContextData_v1.RLock() + calls = mock.calls.EventSetGetContextData_v1 + mock.lockEventSetGetContextData_v1.RUnlock() + return calls +} + +// EventSetGetContextInfo_v1 calls EventSetGetContextInfo_v1Func. +func (mock *Interface) EventSetGetContextInfo_v1(eventSet nvml.EventSet, v uint32) (nvml.OperationalEventContextInfo_v1, nvml.Return) { + if mock.EventSetGetContextInfo_v1Func == nil { + panic("Interface.EventSetGetContextInfo_v1Func: method is nil but Interface.EventSetGetContextInfo_v1 was just called") + } + callInfo := struct { + EventSet nvml.EventSet + V uint32 + }{ + EventSet: eventSet, + V: v, + } + mock.lockEventSetGetContextInfo_v1.Lock() + mock.calls.EventSetGetContextInfo_v1 = append(mock.calls.EventSetGetContextInfo_v1, callInfo) + mock.lockEventSetGetContextInfo_v1.Unlock() + return mock.EventSetGetContextInfo_v1Func(eventSet, v) +} + +// EventSetGetContextInfo_v1Calls gets all the calls that were made to EventSetGetContextInfo_v1. +// Check the length with: +// +// len(mockedInterface.EventSetGetContextInfo_v1Calls()) +func (mock *Interface) EventSetGetContextInfo_v1Calls() []struct { + EventSet nvml.EventSet + V uint32 +} { + var calls []struct { + EventSet nvml.EventSet + V uint32 + } + mock.lockEventSetGetContextInfo_v1.RLock() + calls = mock.calls.EventSetGetContextInfo_v1 + mock.lockEventSetGetContextInfo_v1.RUnlock() + return calls +} + +// EventSetGetGpuOperationalEventContextLegacyXid_v1 calls EventSetGetGpuOperationalEventContextLegacyXid_v1Func. +func (mock *Interface) EventSetGetGpuOperationalEventContextLegacyXid_v1(eventSet nvml.EventSet, v uint32) (nvml.GpuOperationalEventContextLegacyXid_v1, nvml.Return) { + if mock.EventSetGetGpuOperationalEventContextLegacyXid_v1Func == nil { + panic("Interface.EventSetGetGpuOperationalEventContextLegacyXid_v1Func: method is nil but Interface.EventSetGetGpuOperationalEventContextLegacyXid_v1 was just called") + } + callInfo := struct { + EventSet nvml.EventSet + V uint32 + }{ + EventSet: eventSet, + V: v, + } + mock.lockEventSetGetGpuOperationalEventContextLegacyXid_v1.Lock() + mock.calls.EventSetGetGpuOperationalEventContextLegacyXid_v1 = append(mock.calls.EventSetGetGpuOperationalEventContextLegacyXid_v1, callInfo) + mock.lockEventSetGetGpuOperationalEventContextLegacyXid_v1.Unlock() + return mock.EventSetGetGpuOperationalEventContextLegacyXid_v1Func(eventSet, v) +} + +// EventSetGetGpuOperationalEventContextLegacyXid_v1Calls gets all the calls that were made to EventSetGetGpuOperationalEventContextLegacyXid_v1. +// Check the length with: +// +// len(mockedInterface.EventSetGetGpuOperationalEventContextLegacyXid_v1Calls()) +func (mock *Interface) EventSetGetGpuOperationalEventContextLegacyXid_v1Calls() []struct { + EventSet nvml.EventSet + V uint32 +} { + var calls []struct { + EventSet nvml.EventSet + V uint32 + } + mock.lockEventSetGetGpuOperationalEventContextLegacyXid_v1.RLock() + calls = mock.calls.EventSetGetGpuOperationalEventContextLegacyXid_v1 + mock.lockEventSetGetGpuOperationalEventContextLegacyXid_v1.RUnlock() + return calls +} + +// EventSetRegisterGpuOperationalEvents_v1 calls EventSetRegisterGpuOperationalEvents_v1Func. +func (mock *Interface) EventSetRegisterGpuOperationalEvents_v1(eventSet nvml.EventSet, gpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1) nvml.Return { + if mock.EventSetRegisterGpuOperationalEvents_v1Func == nil { + panic("Interface.EventSetRegisterGpuOperationalEvents_v1Func: method is nil but Interface.EventSetRegisterGpuOperationalEvents_v1 was just called") + } + callInfo := struct { + EventSet nvml.EventSet + GpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1 + }{ + EventSet: eventSet, + GpuOperationalEventConfig_v1: gpuOperationalEventConfig_v1, + } + mock.lockEventSetRegisterGpuOperationalEvents_v1.Lock() + mock.calls.EventSetRegisterGpuOperationalEvents_v1 = append(mock.calls.EventSetRegisterGpuOperationalEvents_v1, callInfo) + mock.lockEventSetRegisterGpuOperationalEvents_v1.Unlock() + return mock.EventSetRegisterGpuOperationalEvents_v1Func(eventSet, gpuOperationalEventConfig_v1) +} + +// EventSetRegisterGpuOperationalEvents_v1Calls gets all the calls that were made to EventSetRegisterGpuOperationalEvents_v1. +// Check the length with: +// +// len(mockedInterface.EventSetRegisterGpuOperationalEvents_v1Calls()) +func (mock *Interface) EventSetRegisterGpuOperationalEvents_v1Calls() []struct { + EventSet nvml.EventSet + GpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1 +} { + var calls []struct { + EventSet nvml.EventSet + GpuOperationalEventConfig_v1 *nvml.GpuOperationalEventConfig_v1 + } + mock.lockEventSetRegisterGpuOperationalEvents_v1.RLock() + calls = mock.calls.EventSetRegisterGpuOperationalEvents_v1 + mock.lockEventSetRegisterGpuOperationalEvents_v1.RUnlock() + return calls +} + // EventSetWait calls EventSetWaitFunc. func (mock *Interface) EventSetWait(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) { if mock.EventSetWaitFunc == nil { @@ -14605,6 +15325,42 @@ func (mock *Interface) EventSetWaitCalls() []struct { return calls } +// EventSetWait_v3 calls EventSetWait_v3Func. +func (mock *Interface) EventSetWait_v3(eventSet nvml.EventSet, v uint32) (nvml.EventData_v2, nvml.Return) { + if mock.EventSetWait_v3Func == nil { + panic("Interface.EventSetWait_v3Func: method is nil but Interface.EventSetWait_v3 was just called") + } + callInfo := struct { + EventSet nvml.EventSet + V uint32 + }{ + EventSet: eventSet, + V: v, + } + mock.lockEventSetWait_v3.Lock() + mock.calls.EventSetWait_v3 = append(mock.calls.EventSetWait_v3, callInfo) + mock.lockEventSetWait_v3.Unlock() + return mock.EventSetWait_v3Func(eventSet, v) +} + +// EventSetWait_v3Calls gets all the calls that were made to EventSetWait_v3. +// Check the length with: +// +// len(mockedInterface.EventSetWait_v3Calls()) +func (mock *Interface) EventSetWait_v3Calls() []struct { + EventSet nvml.EventSet + V uint32 +} { + var calls []struct { + EventSet nvml.EventSet + V uint32 + } + mock.lockEventSetWait_v3.RLock() + calls = mock.calls.EventSetWait_v3 + mock.lockEventSetWait_v3.RUnlock() + return calls +} + // Extensions calls ExtensionsFunc. func (mock *Interface) Extensions() nvml.ExtendedInterface { if mock.ExtensionsFunc == nil { @@ -17910,6 +18666,38 @@ func (mock *Interface) VgpuTypeGetGpuInstanceProfileIdCalls() []struct { return calls } +// VgpuTypeGetID calls VgpuTypeGetIDFunc. +func (mock *Interface) VgpuTypeGetID(vgpuTypeId nvml.VgpuTypeId) uint32 { + if mock.VgpuTypeGetIDFunc == nil { + panic("Interface.VgpuTypeGetIDFunc: method is nil but Interface.VgpuTypeGetID was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetID.Lock() + mock.calls.VgpuTypeGetID = append(mock.calls.VgpuTypeGetID, callInfo) + mock.lockVgpuTypeGetID.Unlock() + return mock.VgpuTypeGetIDFunc(vgpuTypeId) +} + +// VgpuTypeGetIDCalls gets all the calls that were made to VgpuTypeGetID. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetIDCalls()) +func (mock *Interface) VgpuTypeGetIDCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetID.RLock() + calls = mock.calls.VgpuTypeGetID + mock.lockVgpuTypeGetID.RUnlock() + return calls +} + // VgpuTypeGetLicense calls VgpuTypeGetLicenseFunc. func (mock *Interface) VgpuTypeGetLicense(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { if mock.VgpuTypeGetLicenseFunc == nil { diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go index 467d7468b..aa5f17455 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go @@ -42,6 +42,9 @@ var _ nvml.VgpuTypeId = &VgpuTypeId{} // GetGpuInstanceProfileIdFunc: func() (uint32, nvml.Return) { // panic("mock out the GetGpuInstanceProfileId method") // }, +// GetIDFunc: func() uint32 { +// panic("mock out the GetID method") +// }, // GetLicenseFunc: func() (string, nvml.Return) { // panic("mock out the GetLicense method") // }, @@ -94,6 +97,9 @@ type VgpuTypeId struct { // GetGpuInstanceProfileIdFunc mocks the GetGpuInstanceProfileId method. GetGpuInstanceProfileIdFunc func() (uint32, nvml.Return) + // GetIDFunc mocks the GetID method. + GetIDFunc func() uint32 + // GetLicenseFunc mocks the GetLicense method. GetLicenseFunc func() (string, nvml.Return) @@ -145,6 +151,9 @@ type VgpuTypeId struct { // GetGpuInstanceProfileId holds details about calls to the GetGpuInstanceProfileId method. GetGpuInstanceProfileId []struct { } + // GetID holds details about calls to the GetID method. + GetID []struct { + } // GetLicense holds details about calls to the GetLicense method. GetLicense []struct { } @@ -181,6 +190,7 @@ type VgpuTypeId struct { lockGetFrameRateLimit sync.RWMutex lockGetFramebufferSize sync.RWMutex lockGetGpuInstanceProfileId sync.RWMutex + lockGetID sync.RWMutex lockGetLicense sync.RWMutex lockGetMaxInstances sync.RWMutex lockGetMaxInstancesPerVm sync.RWMutex @@ -416,6 +426,33 @@ func (mock *VgpuTypeId) GetGpuInstanceProfileIdCalls() []struct { return calls } +// GetID calls GetIDFunc. +func (mock *VgpuTypeId) GetID() uint32 { + if mock.GetIDFunc == nil { + panic("VgpuTypeId.GetIDFunc: method is nil but VgpuTypeId.GetID was just called") + } + callInfo := struct { + }{} + mock.lockGetID.Lock() + mock.calls.GetID = append(mock.calls.GetID, callInfo) + mock.lockGetID.Unlock() + return mock.GetIDFunc() +} + +// GetIDCalls gets all the calls that were made to GetID. +// Check the length with: +// +// len(mockedVgpuTypeId.GetIDCalls()) +func (mock *VgpuTypeId) GetIDCalls() []struct { +} { + var calls []struct { + } + mock.lockGetID.RLock() + calls = mock.calls.GetID + mock.lockGetID.RUnlock() + return calls +} + // GetLicense calls GetLicenseFunc. func (mock *VgpuTypeId) GetLicense() (string, nvml.Return) { if mock.GetLicenseFunc == nil { diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.go index b3e3529f4..abe5a2f02 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.go @@ -1097,6 +1097,24 @@ func nvmlDeviceGetEnforcedPowerLimit(nvmlDevice nvmlDevice, Limit *uint32) Retur return __v } +// nvmlDeviceSetAdaptiveTgpMode_v1 function as declared in nvml/nvml.h +func nvmlDeviceSetAdaptiveTgpMode_v1(nvmlDevice nvmlDevice, Mode EnableState) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cMode, _ := (C.nvmlEnableState_t)(Mode), cgoAllocsUnknown + __ret := C.nvmlDeviceSetAdaptiveTgpMode_v1(cnvmlDevice, cMode) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceGetAdaptiveTgpModeInfo_v1 function as declared in nvml/nvml.h +func nvmlDeviceGetAdaptiveTgpModeInfo_v1(nvmlDevice nvmlDevice, Info *AdaptiveTgpModeInfo_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cInfo, _ := (*C.nvmlAdaptiveTgpModeInfo_v1_t)(unsafe.Pointer(Info)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetAdaptiveTgpModeInfo_v1(cnvmlDevice, cInfo) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetGpuOperationMode function as declared in nvml/nvml.h func nvmlDeviceGetGpuOperationMode(nvmlDevice nvmlDevice, Current *GpuOperationMode, Pending *GpuOperationMode) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -1125,6 +1143,24 @@ func nvmlDeviceGetMemoryInfo_v2(nvmlDevice nvmlDevice, Memory *Memory_v2) Return return __v } +// nvmlDeviceSetMemoryLimits_v1 function as declared in nvml/nvml.h +func nvmlDeviceSetMemoryLimits_v1(nvmlDevice nvmlDevice, Limits *SetMemoryLimits_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cLimits, _ := (*C.nvmlSetMemoryLimits_v1_t)(unsafe.Pointer(Limits)), cgoAllocsUnknown + __ret := C.nvmlDeviceSetMemoryLimits_v1(cnvmlDevice, cLimits) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceGetMemoryLimits_v1 function as declared in nvml/nvml.h +func nvmlDeviceGetMemoryLimits_v1(nvmlDevice nvmlDevice, Limits *GetMemoryLimits_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cLimits, _ := (*C.nvmlGetMemoryLimits_v1_t)(unsafe.Pointer(Limits)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetMemoryLimits_v1(cnvmlDevice, cLimits) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetComputeMode function as declared in nvml/nvml.h func nvmlDeviceGetComputeMode(nvmlDevice nvmlDevice, Mode *ComputeMode) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -1543,6 +1579,15 @@ func nvmlDeviceGetGpuFabricInfoV(nvmlDevice nvmlDevice, GpuFabricInfo *GpuFabric return __v } +// nvmlDeviceGetGpuFabricInfo_v4 function as declared in nvml/nvml.h +func nvmlDeviceGetGpuFabricInfo_v4(nvmlDevice nvmlDevice, GpuFabricInfo *GpuFabricInfo_v4) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cGpuFabricInfo, _ := (*C.nvmlGpuFabricInfo_v4_t)(unsafe.Pointer(GpuFabricInfo)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetGpuFabricInfo_v4(cnvmlDevice, cGpuFabricInfo) + __v := (Return)(__ret) + return __v +} + // nvmlSystemGetConfComputeCapabilities function as declared in nvml/nvml.h func nvmlSystemGetConfComputeCapabilities(Capabilities *ConfComputeSystemCaps) Return { cCapabilities, _ := (*C.nvmlConfComputeSystemCaps_t)(unsafe.Pointer(Capabilities)), cgoAllocsUnknown @@ -1855,6 +1900,15 @@ func nvmlDeviceGetHostname_v1(nvmlDevice nvmlDevice, Hostname *Hostname_v1) Retu return __v } +// nvmlDevicePerfMetricsGetSamples_v1 function as declared in nvml/nvml.h +func nvmlDevicePerfMetricsGetSamples_v1(nvmlDevice nvmlDevice, Samples *PerfMetricsSamples_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cSamples, _ := (*C.nvmlPerfMetricsSamples_v1_t)(unsafe.Pointer(Samples)), cgoAllocsUnknown + __ret := C.nvmlDevicePerfMetricsGetSamples_v1(cnvmlDevice, cSamples) + __v := (Return)(__ret) + return __v +} + // nvmlUnitSetLedState function as declared in nvml/nvml.h func nvmlUnitSetLedState(nvmlUnit nvmlUnit, Color LedColor) Return { cnvmlUnit, _ := *(*C.nvmlUnit_t)(unsafe.Pointer(&nvmlUnit)), cgoAllocsUnknown @@ -2264,6 +2318,15 @@ func nvmlDeviceSetNvlinkBwMode(nvmlDevice nvmlDevice, SetBwMode *NvlinkSetBwMode return __v } +// nvmlDeviceSetNvlinkBwModeAsync_v1 function as declared in nvml/nvml.h +func nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice nvmlDevice, SetBwModeAsync *NvlinkSetBwModeAsync_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cSetBwModeAsync, _ := (*C.nvmlNvlinkSetBwModeAsync_v1_t)(unsafe.Pointer(SetBwModeAsync)), cgoAllocsUnknown + __ret := C.nvmlDeviceSetNvlinkBwModeAsync_v1(cnvmlDevice, cSetBwModeAsync) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetNvLinkInfo function as declared in nvml/nvml.h func nvmlDeviceGetNvLinkInfo(nvmlDevice nvmlDevice, Info *NvLinkInfo) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -2273,6 +2336,15 @@ func nvmlDeviceGetNvLinkInfo(nvmlDevice nvmlDevice, Info *NvLinkInfo) Return { return __v } +// nvmlDeviceGetNvLinkTelemetrySamples_v1 function as declared in nvml/nvml.h +func nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice nvmlDevice, Samples *NvlinkTelemetrySamples_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cSamples, _ := (*C.nvmlNvlinkTelemetrySamples_v1_t)(unsafe.Pointer(Samples)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetNvLinkTelemetrySamples_v1(cnvmlDevice, cSamples) + __v := (Return)(__ret) + return __v +} + // nvmlEventSetCreate function as declared in nvml/nvml.h func nvmlEventSetCreate(Set *nvmlEventSet) Return { cSet, _ := (*C.nvmlEventSet_t)(unsafe.Pointer(Set)), cgoAllocsUnknown @@ -2310,6 +2382,65 @@ func nvmlEventSetWait_v2(Set nvmlEventSet, Data *nvmlEventData, Timeoutms uint32 return __v } +// nvmlEventSetRegisterGpuOperationalEvents_v1 function as declared in nvml/nvml.h +func nvmlEventSetRegisterGpuOperationalEvents_v1(nvmlEventSet nvmlEventSet, Config *GpuOperationalEventConfig_v1) Return { + cnvmlEventSet, _ := *(*C.nvmlEventSet_t)(unsafe.Pointer(&nvmlEventSet)), cgoAllocsUnknown + cConfig, _ := (*C.nvmlGpuOperationalEventConfig_v1_t)(unsafe.Pointer(Config)), cgoAllocsUnknown + __ret := C.nvmlEventSetRegisterGpuOperationalEvents_v1(cnvmlEventSet, cConfig) + __v := (Return)(__ret) + return __v +} + +// nvmlEventSetWait_v3 function as declared in nvml/nvml.h +func nvmlEventSetWait_v3(Set nvmlEventSet, Data *EventData_v2, Timeoutms uint32) Return { + cSet, _ := *(*C.nvmlEventSet_t)(unsafe.Pointer(&Set)), cgoAllocsUnknown + cData, _ := (*C.nvmlEventData_v2_t)(unsafe.Pointer(Data)), cgoAllocsUnknown + cTimeoutms, _ := (C.uint)(Timeoutms), cgoAllocsUnknown + __ret := C.nvmlEventSetWait_v3(cSet, cData, cTimeoutms) + __v := (Return)(__ret) + return __v +} + +// nvmlEventSetGetContextCount_v1 function as declared in nvml/nvml.h +func nvmlEventSetGetContextCount_v1(Set nvmlEventSet, Count *uint32) Return { + cSet, _ := *(*C.nvmlEventSet_t)(unsafe.Pointer(&Set)), cgoAllocsUnknown + cCount, _ := (*C.uint)(unsafe.Pointer(Count)), cgoAllocsUnknown + __ret := C.nvmlEventSetGetContextCount_v1(cSet, cCount) + __v := (Return)(__ret) + return __v +} + +// nvmlEventSetGetContextInfo_v1 function as declared in nvml/nvml.h +func nvmlEventSetGetContextInfo_v1(Set nvmlEventSet, Index uint32, Info *OperationalEventContextInfo_v1) Return { + cSet, _ := *(*C.nvmlEventSet_t)(unsafe.Pointer(&Set)), cgoAllocsUnknown + cIndex, _ := (C.uint)(Index), cgoAllocsUnknown + cInfo, _ := (*C.nvmlOperationalEventContextInfo_v1_t)(unsafe.Pointer(Info)), cgoAllocsUnknown + __ret := C.nvmlEventSetGetContextInfo_v1(cSet, cIndex, cInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlEventSetGetContextData_v1 function as declared in nvml/nvml.h +func nvmlEventSetGetContextData_v1(Set nvmlEventSet, Index uint32, Data unsafe.Pointer, DataSize *uint32) Return { + cSet, _ := *(*C.nvmlEventSet_t)(unsafe.Pointer(&Set)), cgoAllocsUnknown + cIndex, _ := (C.uint)(Index), cgoAllocsUnknown + cData, _ := Data, cgoAllocsUnknown + cDataSize, _ := (*C.uint)(unsafe.Pointer(DataSize)), cgoAllocsUnknown + __ret := C.nvmlEventSetGetContextData_v1(cSet, cIndex, cData, cDataSize) + __v := (Return)(__ret) + return __v +} + +// nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 function as declared in nvml/nvml.h +func nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(Set nvmlEventSet, Index uint32, Xid *GpuOperationalEventContextLegacyXid_v1) Return { + cSet, _ := *(*C.nvmlEventSet_t)(unsafe.Pointer(&Set)), cgoAllocsUnknown + cIndex, _ := (C.uint)(Index), cgoAllocsUnknown + cXid, _ := (*C.nvmlGpuOperationalEventContextLegacyXid_v1_t)(unsafe.Pointer(Xid)), cgoAllocsUnknown + __ret := C.nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(cSet, cIndex, cXid) + __v := (Return)(__ret) + return __v +} + // nvmlEventSetFree function as declared in nvml/nvml.h func nvmlEventSetFree(Set nvmlEventSet) Return { cSet, _ := *(*C.nvmlEventSet_t)(unsafe.Pointer(&Set)), cgoAllocsUnknown @@ -3685,6 +3816,15 @@ func nvmlDeviceSetRusdSettings_v1(nvmlDevice nvmlDevice, Settings *RusdSettings_ return __v } +// nvmlDeviceGetBankRemapperStatus_v1 function as declared in nvml/nvml.h +func nvmlDeviceGetBankRemapperStatus_v1(nvmlDevice nvmlDevice, PBankRemapperStatus *EccBankRemapperStatus_v1) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cPBankRemapperStatus, _ := (*C.nvmlEccBankRemapperStatus_v1_t)(unsafe.Pointer(PBankRemapperStatus)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetBankRemapperStatus_v1(cnvmlDevice, cPBankRemapperStatus) + __v := (Return)(__ret) + return __v +} + // nvmlInit_v1 function as declared in nvml/nvml.h func nvmlInit_v1() Return { __ret := C.nvmlInit() diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h index 1a7f43f85..5604f3379 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h @@ -1,5 +1,3 @@ -/*** NVML VERSION: 13.3.29 ***/ -/*** From https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvml_dev/linux-x86_64/cuda_nvml_dev-linux-x86_64-13.3.29-archive.tar.xz ***/ /* * Copyright 1993-2026 NVIDIA Corporation. All rights reserved. * @@ -282,6 +280,59 @@ typedef struct nvmlMemory_v2_st #define nvmlMemory_v2 NVML_STRUCT_VERSION(Memory, 2) //!< Version macro for \a nvmlMemory_v2_t +/** + * Value for "maximum" memory limit. + */ +#define NVML_DEVICE_MEMORY_LIMIT_MAX 0xFFFFFFFFFFFFFFFF + +/** + * @brief Describes the memory limits that can be set for the device + * + * This structure holds the necessary information that can be used to set the soft + * and hard memory limits of a device. + * + * The softLimit is the amount of memory that is guaranteed before allocations + * may fail due to memory pressure. + * + * The hardLimit is the maximum amount of memory that can be allocated. + * + * This should be cross-referenced with \ref nvmlDeviceGetMemoryInfo_v2 while in + * that cgroup to see how much memory is actually available to allocate for the device. + * + * To clear the limits, set softLimit to 0, and hardLimit to \ref NVML_DEVICE_MEMORY_LIMIT_MAX. + * Removing the cgroup will also clear any limits. + */ +typedef struct +{ + const char* nameSpace; //!<[in] Full path to sysfs cgroup file name + unsigned long long softLimit; //!<[in] Soft memory limit in Bytes. + unsigned long long hardLimit; //!<[in] Hard memory limit in Bytes. +} nvmlSetMemoryLimits_v1_t; + +/** + * @brief Describes the current memory limits that are set for the device + * + * This structure holds the necessary information that can be used to get the + * current soft and hard memory limits of a device. + * + * The softLimit is the amount of memory that is guaranteed before allocations + * may fail due to memory pressure. + * + * The hardLimit is the maximum amount of memory that can be allocated. + * + * This should be cross-referenced with \ref nvmlDeviceGetMemoryInfo_v2 while in + * that cgroup to see how much memory is actually available to allocate for the device. + * + * No limit is set when softLimit is 0 and hardLimit is \ref NVML_DEVICE_MEMORY_LIMIT_MAX. + */ +typedef struct +{ + const char* nameSpace; //!<[in] Full path to sysfs cgroup file name + unsigned long long softLimit; //!<[out] Currently set soft memory limit in Bytes. + unsigned long long hardLimit; //!<[out] Currently set hard memory limit in Bytes. + unsigned long long currentUsed; //!<[out] Currently used memory in Bytes. +} nvmlGetMemoryLimits_v1_t; + /** * BAR1 Memory allocation Information for a device */ @@ -870,6 +921,165 @@ typedef nvmlPdi_v1_t nvmlPdi_t; #define nvmlPdi_v1 NVML_STRUCT_VERSION(Pdi, 1) //!< Version macro for \a nvmlPdi_v1_t +#define NVML_PERF_METRICS_PWR_MODEL_DLPPM_1X_MAX_CORE_RAILS 2 //!< Maximum number of core rails for DLPPM 1x power model +#define NVML_PERF_METRICS_NNE_DESC_INFERENCE_LOOPS_MAX 8 //!< Maximum number of NNE descriptor inference loops +#define NVML_PERF_METRICS_PWR_MODEL_METRICS_DLPPM_1X_OBESRVED_INTIAL_DRAMCLK_ESTIMATES_MAX 3 //!< Maximum number of initial DRAMCLK estimates for DLPPM 1x observed metrics +#define NVML_PERF_METRICS_CONTROLLER_DLPPC_2X_PWR_POLICY_RELATIONSHIP_SET_LIMITS_MAX 4 //!< Maximum number of power policy relationship set limits for DLPPC 2x controller +#define NVML_PERF_METRICS_CONTROLLER_STATUS_DLPPC_2X_DRAMCLK_NUM 3 //!< Number of DRAMCLK frequencies tracked by DLPPC 2x controller status +#define NVML_PERF_METRICS_CONTROLLER_SAMPLE_CONTROLLER_MAX_NUM 4 //!< Maximum number of controllers that can be sampled +#define NVML_PERF_METRICS_SAMPLE_COUNT 13 //!< Total number of performance metrics samples that can be collected +#define NVML_PERF_METRICS_PWR_MODEL_SCALE_LOOPS_MAX_PFPP_1X 32 //!< Maximum number of power model scale loops for PFPP 1x +#define NVML_PERF_METRICS_PWR_MODEL_SCALE_METRICS_INPUT_MAX 16 //!< Maximum number of power model scale metrics inputs +#define NVML_PERF_METRICS_CONTROLLER_TYPE_DLPPC_2X 0 //!< Controller type identifier for DLPPC 2x +#define NVML_PERF_METRICS_CONTROLLER_TYPE_PFPP_1X 1 //!< Controller type identifier for PFPP 1x +#define NVML_PERF_METRICS_PWR_MODEL_SCALE_METRICS_PFPP_1X_GPCCLK_IDX 0 //!< Index for GPCCLK frequency in PFPP 1x scale metrics +#define NVML_PERF_CF_PM_SENSOR_MAX_SIGNALS 1024 //!< Maximum number of BA PM sensor signals + +/** + * Power tuple containing power consumption in milliwatts. + */ +typedef struct +{ + unsigned int pwrmW; //!< Power consumption in milliwatts +} nvmlPmgrPwrTuple_t; + +/** + * Metrics for a single power rail, including frequency and utilization. + */ +typedef struct +{ + unsigned int freqkHz; //!< Frequency in kilohertz + unsigned long long utilPct; //!< Utilization percentage (fixed-point) +} nvmlRailMetrics_t; + +/** + * Metrics for all core rails in the system. + */ +typedef struct +{ + nvmlRailMetrics_t rails[NVML_PERF_METRICS_PWR_MODEL_DLPPM_1X_MAX_CORE_RAILS]; //!< Array of core rail metrics +} nvmlCoreRailMetrics_t; + +/** + * Performance metrics for DLPPM 1x power model. + */ +typedef struct +{ + unsigned int perfms; //!< Performance metric in milliseconds +} nvmlPwrModelMetricsDlppm1xPerf_t; + +/** + * Complete power model metrics for DLPPM 1x, including rail metrics and TGP power. + */ +typedef struct +{ + unsigned char bValid; //!< Validity flag: non-zero if metrics are valid + nvmlCoreRailMetrics_t coreRail; //!< Core rail metrics + nvmlRailMetrics_t fbRail; //!< Fb rail metrics + nvmlPmgrPwrTuple_t tgpPwrTuple; //!< Total Graphics Power (TGP) in milliwatts + nvmlPwrModelMetricsDlppm1xPerf_t perfMetrics; //!< Performance metrics +} nvmlPwrModelMetricsDlppm1x_t; + +/** + * DRAMCLK estimates containing multiple estimated metrics for different DRAMCLK frequencies. + */ +typedef struct +{ + nvmlPwrModelMetricsDlppm1x_t estimatedMetrics[NVML_PERF_METRICS_NNE_DESC_INFERENCE_LOOPS_MAX]; //!< Array of estimated metrics for each inference loop + unsigned char numEstimatedMetrics; //!< Number of valid entries in estimatedMetrics array +} nvmlPwrModelMetricsDlppm1xDramclkEstimates_t; + +/** + * Observed metrics from the power model, including initial DRAMCLK estimates and current measurements. + */ +typedef struct +{ + nvmlPwrModelMetricsDlppm1xDramclkEstimates_t initialDramclkEst[NVML_PERF_METRICS_PWR_MODEL_METRICS_DLPPM_1X_OBESRVED_INTIAL_DRAMCLK_ESTIMATES_MAX]; //!< Initial DRAMCLK estimates for different scenarios + unsigned char bValid; //!< Validity flag: non-zero if observed metrics are valid + nvmlCoreRailMetrics_t coreRail; //!< Observed core rail metrics + nvmlRailMetrics_t fbRail; //!< Observed fb rail metrics + nvmlPmgrPwrTuple_t tgpPwrTuple; //!< Observed Total Graphics Power (TGP) in milliwatts + nvmlPwrModelMetricsDlppm1xPerf_t perfMetrics; //!< Observed performance metrics +} nvmlObservedMetrics_t; + +/** + * Performance metrics sample for DLPPC 2x controller. + */ +typedef struct +{ + nvmlObservedMetrics_t observedMetrics; //!< Observed metrics from the DLPPC 2x controller +} nvmlPerfMetricsDlppc2xSample_t; + +/** + * Power model metrics sample for PFPP 1x, containing frequency inputs and estimated TGP. + */ +typedef struct +{ + unsigned int freqkHz[NVML_PERF_METRICS_PWR_MODEL_SCALE_METRICS_INPUT_MAX]; //!< Array of input frequencies in kilohertz for each domain + unsigned int estTgpPwrmW; //!< Estimated Total Graphics Power in milliwatts +} nvmlPwrModelMetricsSamplePfpp1x_t; + +/** + * Operating point for PFPP 1x power model, defining a frequency-power pair. + */ +typedef struct +{ + unsigned int freqkHz; //!< Operating frequency in kilohertz + unsigned int pwrmW; //!< Power consumption at this frequency in milliwatts +} nvmlPwrModelOperatingPointPfpp1x_t; + +/** + * Complete power model metrics for PFPP 1x, including estimated metrics and key operating points. + */ +typedef struct +{ + unsigned char numVfPoints; //!< Number of valid vf points + nvmlPwrModelMetricsSamplePfpp1x_t estimatedMetrics[NVML_PERF_METRICS_PWR_MODEL_SCALE_LOOPS_MAX_PFPP_1X]; //!< Array of estimated metrics for different operating points + unsigned char bValid; //!< Validity flag: non-zero if metrics are valid + nvmlPwrModelOperatingPointPfpp1x_t maxPerfPerWattPoint; //!< Operating point with maximum performance per watt + nvmlPwrModelOperatingPointPfpp1x_t fmaxAtVmaxPoint; //!< Operating point at maximum frequency and voltage + unsigned int tgpHeadroommW; //!< TGP headroom in milliwatts +} nvmlPwrModelMetricsPfpp1x_t; + +/** + * Performance metrics sample for PFPP 1x controller. + */ +typedef struct +{ + nvmlPwrModelMetricsPfpp1x_t estimatedMetrics; //!< Estimated metrics from the PFPP 1x controller +} nvmlPerfMetricsPfpp1xSample_t; + +/** + * Performance metrics sample from a controller, which can be either DLPPC 2x or PFPP 1x. + */ +typedef struct +{ + unsigned int controllerType; //!< Controller type: NVML_PERF_METRICS_CONTROLLER_TYPE_DLPPC_2X or NVML_PERF_METRICS_CONTROLLER_TYPE_PFPP_1X + union{ + nvmlPerfMetricsDlppc2xSample_t dlppc2x; //!< DLPPC 2x controller sample data + nvmlPerfMetricsPfpp1xSample_t pfpp1x; //!< PFPP 1x controller sample data + } data; //!< Union containing controller-specific data +} nvmlPerfMetricControllerSample_t; + +/** + * Single performance metrics sample containing data from one or more controllers. + */ +typedef struct +{ + unsigned char numControllerData; //!< Number of valid controller samples in this sample + nvmlPerfMetricControllerSample_t controllerData[NVML_PERF_METRICS_CONTROLLER_SAMPLE_CONTROLLER_MAX_NUM]; //!< Array of controller samples +} nvmlPerfMetricsSample_t; + +/** + * Collection of performance metrics samples (version 1). + * This structure contains multiple samples for performance monitoring and profiling. + */ +typedef struct +{ + unsigned int numSamples; //!< Number of samples in the samples array + nvmlPerfMetricsSample_t samples[NVML_PERF_METRICS_SAMPLE_COUNT]; //!< Array of performance metrics samples +} nvmlPerfMetricsSamples_v1_t; + /** * BBX Time Data */ @@ -880,7 +1090,7 @@ typedef nvmlPdi_v1_t nvmlPdi_t; /** @} */ /***************************************************************************************************/ -/** @defgroup nvmlDeviceEnumvs Device Enums +/** @defgroup nvmlDeviceEnums Device Enums * @{ */ /***************************************************************************************************/ @@ -934,8 +1144,11 @@ typedef enum nvmlBrandType_enum NVML_BRAND_NVIDIA = 14, NVML_BRAND_GEFORCE_RTX = 15, // Unused NVML_BRAND_TITAN_RTX = 16, // Unused + NVML_BRAND_NVIDIA_DLA = 17, // Deprecated NVIDIA Deep Learning Accelerator + NVML_BRAND_NVIDIA_VGAMEDEV = 18, // NVIDIA RTX Virtual Game Dev + NVML_BRAND_NVIDIA_NPU = 19, // NVIDIA NPU // Keep this last - NVML_BRAND_COUNT = 18, + NVML_BRAND_COUNT = 20, } nvmlBrandType_t; /** @@ -943,22 +1156,22 @@ typedef enum nvmlBrandType_enum */ typedef enum nvmlTemperatureThresholds_enum { - NVML_TEMPERATURE_THRESHOLD_SHUTDOWN = 0, // Temperature at which the GPU will - // shut down for HW protection - NVML_TEMPERATURE_THRESHOLD_SLOWDOWN = 1, // Temperature at which the GPU will - // begin HW slowdown - NVML_TEMPERATURE_THRESHOLD_MEM_MAX = 2, // Memory Temperature at which the GPU will - // begin SW slowdown - NVML_TEMPERATURE_THRESHOLD_GPU_MAX = 3, // GPU Temperature at which the GPU - // can be throttled below base clock - NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MIN = 4, // Minimum GPU Temperature that can be - // set as acoustic threshold - NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_CURR = 5, // Current temperature that is set as - // acoustic threshold. - NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MAX = 6, // Maximum GPU temperature that can be - // set as acoustic threshold. - NVML_TEMPERATURE_THRESHOLD_GPS_CURR = 7, // Current temperature that is set as - // gps threshold. + NVML_TEMPERATURE_THRESHOLD_SHUTDOWN = 0, //!< Temperature at which the GPU will + //!< shut down for HW protection + NVML_TEMPERATURE_THRESHOLD_SLOWDOWN = 1, //!< Temperature at which the GPU will + //!< begin HW slowdown + NVML_TEMPERATURE_THRESHOLD_MEM_MAX = 2, //!< Memory Temperature at which the GPU will + //!< begin SW slowdown + NVML_TEMPERATURE_THRESHOLD_GPU_MAX = 3, //!< GPU Temperature at which the GPU + //!< can be throttled below base clock + NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MIN = 4, //!< Minimum GPU Temperature that can be + //!< set as acoustic threshold + NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_CURR = 5, //!< Current temperature that is set as + //!< acoustic threshold. + NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MAX = 6, //!< Maximum GPU temperature that can be + //!< set as acoustic threshold. + NVML_TEMPERATURE_THRESHOLD_GPS_CURR = 7, //!< Current temperature that is set as + //!< gps threshold. // Keep this last NVML_TEMPERATURE_THRESHOLD_COUNT } nvmlTemperatureThresholds_t; @@ -970,6 +1183,8 @@ typedef enum nvmlTemperatureSensors_enum { NVML_TEMPERATURE_GPU = 0, //!< Temperature sensor for the GPU die + NVML_TEMPERATURE_GPU_MAX = 1, //!< Temperature from the hottest part of the GPU die + // Keep this last NVML_TEMPERATURE_COUNT } nvmlTemperatureSensors_t; @@ -1559,8 +1774,13 @@ typedef struct #define NVML_DEVICE_ARCH_BLACKWELL 10 //!< Devices based on the NVIDIA Blackwell architecture +#define NVML_DEVICE_ARCH_DLA 11 //!< Devices based on the NVIDIA DLA architecture. +#define NVML_DEVICE_ARCH_DLA2 12 //!< Devices based on the NVIDIA DLA2 architecture. + #define NVML_DEVICE_ARCH_RUBIN 13 //!< Devices based on the NVIDIA Rubin architecture. +#define NVML_DEVICE_ARCH_NPU3 15 //!< Devices based on the NVIDIA NPU3 architecture. + #define NVML_DEVICE_ARCH_UNKNOWN 0xffffffff //!< Anything else, presumably something newer typedef unsigned int nvmlDeviceArchitecture_t; @@ -1675,6 +1895,15 @@ typedef struct #define nvmlPowerValue_v2 NVML_STRUCT_VERSION(PowerValue, 2) //!< Version macro for \a nvmlPowerValue_v2_t +typedef struct +{ + nvmlEnableState_t inBandEnableRequest; //!< [out] In-band enable requested (NVML_FEATURE_ENABLED) or not requested (NVML_FEATURE_DISABLED) + nvmlEnableState_t featureAllowedByAdmin; //!< [out] Feature allowed by out-of-band/admin (NVML_FEATURE_ENABLED) or not allowed (NVML_FEATURE_DISABLED) + nvmlEnableState_t adminOverrideEnabled; //!< [out] Out-of-band/admin override active (NVML_FEATURE_ENABLED) or inactive (NVML_FEATURE_DISABLED) + nvmlEnableState_t enablementStatus; //!< [out] Enablement after arbitration: active (NVML_FEATURE_ENABLED) or inactive (NVML_FEATURE_DISABLED) + unsigned int adjustedLimitMw; //!< [out] Adjusted TGP limit in milliwatts (valid only when feature is enabled) +} nvmlAdaptiveTgpModeInfo_v1_t; + /** @} */ /***************************************************************************************************/ @@ -1733,7 +1962,8 @@ typedef enum { NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX = 2, //!< Nvidia RTX NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION = NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX, //!< Deprecated, do not use. NVML_GRID_LICENSE_FEATURE_CODE_GAMING = 3, //!< Gaming - NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE = 4 //!< Compute + NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE = 4, //!< Compute + NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV = 5 //!< vGameDev } nvmlGridLicenseFeatureCode_t; /** @@ -2210,6 +2440,8 @@ typedef enum nvmlDeviceGpuRecoveryAction_s { NVML_GPU_RECOVERY_ACTION_DRAIN_P2P = 3, //!< Drain P2P NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET = 4, //!< Drain P2P and Reset Gpu NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN = 5, //!< Recover IMEX Domain. + NVML_GPU_RECOVERY_ACTION_BUS_RESET = 6, //!< Reset the GPU's PCIe bus + NVML_GPU_RECOVERY_ACTION_SYSTEM_REBOOT = 7, //!< Reboot the system } nvmlDeviceGpuRecoveryAction_t; /** @@ -2685,7 +2917,7 @@ typedef struct * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. */ #define NVML_FI_DEV_NVLINK_GET_SPEED 164 //!< NVLink Speed in MBps -#define NVML_FI_DEV_NVLINK_GET_STATE 165 //!< NVLink State - Active,Inactive +#define NVML_FI_DEV_NVLINK_GET_STATE 165 //!< NVLink State - one of NVML_NVLINK_STATE_* values #define NVML_FI_DEV_NVLINK_GET_VERSION 166 //!< NVLink Version #define NVML_FI_DEV_NVLINK_GET_POWER_STATE 167 //!< NVLink Power state. 0=HIGH_SPEED 1=LOW_SPEED @@ -2805,7 +3037,7 @@ typedef struct #define NVML_FI_DEV_DRAIN_AND_RESET_STATUS 227 //!< Deprecated, do not use (use NVML_FI_DEV_GET_GPU_RECOVERY_ACTION instead) #define NVML_FI_DEV_PCIE_OUTBOUND_ATOMICS_MASK 228 #define NVML_FI_DEV_PCIE_INBOUND_ATOMICS_MASK 229 -#define NVML_FI_DEV_GET_GPU_RECOVERY_ACTION 230 //!< GPU Recovery action - None/Reset/Reboot/Drain P2P/Drain and Reset +#define NVML_FI_DEV_GET_GPU_RECOVERY_ACTION 230 //!< GPU Recovery action. See \ref nvmlDeviceGpuRecoveryAction_t #define NVML_FI_DEV_C2C_LINK_ERROR_INTR 231 //!< C2C Link CRC Error Counter #define NVML_FI_DEV_C2C_LINK_ERROR_REPLAY 232 //!< C2C Link Replay Error Counter #define NVML_FI_DEV_C2C_LINK_ERROR_REPLAY_B2B 233 //!< C2C Link Back to Back Replay Error Counter @@ -2964,9 +3196,17 @@ typedef struct #define NVML_FI_DEV_MCLK_SWITCH_TYPE 298 //!< See NVML_MCLK_SWITCH_TYPE_ for all enumerations #define NVML_FI_DEV_MCLK_MIN_SWITCH_INTERVAL_MILLISECONDS 299 //!< minimum required elapsed time between runtime mclk switches, 0 = no rate limit #define NVML_FI_PWR_SMOOTHING_SOC_POWER_SMOOTHING_ENABLED 300 //!< State-Of-Charge Power Smoothing Enabled (0/DISABLED or 1/ENABLED) + #define NVML_FI_DEV_REMAPPED_ROWS_COR_INACTIVE 301 //!< Number of inactive row remappings due to correctable errors #define NVML_FI_DEV_REMAPPED_ROWS_UNC_INACTIVE 302 //!< Number of inactive row remappings due to uncorrectable errors -#define NVML_FI_MAX 303 //!< One greater than the largest field ID defined above + +/* Bank Remapper */ +#define NVML_FI_DEV_ACTIVE_BANK_REMAPPINGS 303 //!< Number of active bank remappings +#define NVML_FI_DEV_INACTIVE_BANK_REMAPPINGS 304 //!< Number of inactive bank remappings +#define NVML_FI_DEV_BANK_REMAPPER_HISTOGRAM_MAX 305 //!< Number of groups with full bank remap availability. +#define NVML_FI_DEV_BANK_REMAPPER_HISTOGRAM_NONE 306 //!< Number of groups with no spare bankremap availability. +#define NVML_FI_DEV_PENDING_BANK_REMAPPING 307 //!< If any banks are pending remapping. 1=yes 0=no +#define NVML_FI_MAX 308 //!< One greater than the largest field ID defined above /** * NVML_FI_DEV_MCLK_SWITCH_TYPE enumerations @@ -3254,6 +3494,108 @@ typedef struct nvmlEventData_st // 0xFFFFFFFF otherwise. } nvmlEventData_t; +/** + * @brief Log-level values used by GPU Operational Events. + * + * These values are used both for event reporting in \ref nvmlEventData_v2_t and for subscription + * filtering in \ref nvmlGpuOperationalEventConfig_v1_t. Higher numeric values represent more + * selective log levels. \c NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL disables log-level filtering + * when used as a subscription threshold. Event data may contain newer log-level values that are + * not named in this header; clients should handle unrecognized numeric values. + */ +typedef enum +{ + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL = 0, //!< Matches all GPU Operational Event log levels. + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY = 10, //!< High-volume telemetry events. + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG = 20, //!< Diagnostic events. + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE = 30, //!< Notable operational events. + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING = 40, //!< Warning events. + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR = 50, //!< Error events. +} nvmlGpuOperationalEventLogLevel_t; + +/** + * @brief Severity values used by Operational Events. + * + * These values are used both for event reporting in \ref nvmlEventData_v2_t and for subscription + * filtering in \ref nvmlGpuOperationalEventConfig_v1_t. Higher numeric values represent more + * selective severities. \c NVML_OPERATIONAL_EVENT_SEVERITY_ALL disables severity filtering when + * used as a subscription threshold. Event data may contain newer severity values that are not + * named in this header; clients should handle unrecognized numeric values. + */ +typedef enum +{ + NVML_OPERATIONAL_EVENT_SEVERITY_ALL = 0, //!< Matches all Operational Event severities. + NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL = 10, //!< Informational event. + NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED = 20, //!< Corrected error event. + NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE = 30, //!< Recoverable error event. + NVML_OPERATIONAL_EVENT_SEVERITY_FATAL = 40, //!< Fatal error event. +} nvmlOperationalEventSeverity_t; + +/** + * @brief Event data formats returned by \ref nvmlEventSetWait_v3. + */ +typedef enum +{ + NVML_EVENT_DATA_TYPE_NVML_EVENT = 0, //!< NVML event-bit data. \c eventType contains an NVML event bit. + NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT = 1, //!< Structured GPU Operational Event data. +} nvmlEventDataType_t; + +#define NVML_GPU_INSTANCE_ID_ANY 0xFFFFFFFFU //!< Sentinel value used when no MIG GPU instance ID applies. +#define NVML_COMPUTE_INSTANCE_ID_ANY 0xFFFFFFFFU //!< Sentinel value used when no MIG compute instance ID applies. + +#define NVML_OPERATIONAL_EVENT_ATTR_UNCONTAINED (1u << 0) //!< Event reports an uncontained condition. +#define NVML_OPERATIONAL_EVENT_ATTR_LATENT (1u << 1) //!< Event reports a latent condition. +#define NVML_OPERATIONAL_EVENT_ATTR_PROPAGATED (1u << 2) //!< Event was propagated from another source. +#define NVML_OPERATIONAL_EVENT_ATTR_COMPONENT_RESET (1u << 3) //!< Event involved a component reset. +#define NVML_OPERATIONAL_EVENT_ATTR_THRESHOLD_EXCEEDED (1u << 4) //!< Event reports an exceeded threshold. +#define NVML_OPERATIONAL_EVENT_ATTR_PRIMARY (1u << 5) //!< Event is the primary event in its group. +#define NVML_OPERATIONAL_EVENT_ATTR_OVERFLOW (1u << 6) //!< One or more events or associated payloads were dropped before this event was returned. + +#define NVML_OPERATIONAL_EVENT_GROUP_ATTR_RECOVERED (1u << 0) //!< Event group reports a recovered condition. +#define NVML_OPERATIONAL_EVENT_GROUP_ATTR_PREVERR (1u << 1) //!< Event group reports a previous error condition. +#define NVML_OPERATIONAL_EVENT_GROUP_ATTR_SIMULATED (1u << 2) //!< Event group was generated by simulation or testing. + +/** + * @brief NVML-defined GPU Operational Event context classifications. + * + * These values describe the NVML public interpretation of a context payload. The + * original source-defined context type is returned separately in + * \ref nvmlOperationalEventContextInfo_v1_t::sourceEventContextType. + */ +typedef enum +{ + NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_UNKNOWN = 0, //!< No NVML public interpretation is defined for this context payload. + NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_LEGACY_XID = 1, //!< Context payload can be decoded with \ref nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1. +} nvmlGpuOperationalEventContextType_t; + +/** + * @brief Metadata for a context record associated with the most recent event returned by + * \ref nvmlEventSetWait_v3. + * + * The context payload itself is returned by \ref nvmlEventSetGetContextData_v1. Context metadata + * remains valid until the next successful call to \ref nvmlEventSetWait_v3 on the same event set or + * until the event set is freed. + */ +typedef struct nvmlOperationalEventContextInfo_v1_st +{ + unsigned int nvmlGpuOperationalEventContextType; //!< [out] \ref nvmlGpuOperationalEventContextType_t value describing the NVML public interpretation of the context payload. + unsigned int sourceEventContextType; //!< [out] Source-defined context payload type identifier carried by the event. + unsigned int dataSize; //!< [out] Context payload size in bytes, excluding alignment padding. + unsigned short dataFormatVersion; //!< [out] Payload format version for \c sourceEventContextType. +} nvmlOperationalEventContextInfo_v1_t; + +/** + * @brief Decoded GPU legacy-Xid context data. + * + * This structure is returned by \ref nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 for + * context records whose \c nvmlGpuOperationalEventContextType is + * \ref NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_LEGACY_XID. + */ +typedef struct nvmlGpuOperationalEventContextLegacyXid_v1_st +{ + unsigned int xidCode; //!< [out] Legacy Xid code carried in a GPU Operational Event context. +} nvmlGpuOperationalEventContextLegacyXid_v1_t; + /** * System Event Set */ @@ -3424,6 +3766,20 @@ typedef nvmlSystemEventSetWaitRequest_v1_t nvmlSystemEventSetWaitRequest_t; */ #define nvmlClocksEventReasonDisplayClockSetting 0x0000000000000100LL //!< Display clock setting limited. +/** Board limit + * + * The board limit (operating) policy is currently limiting the GPU clocks. + * + */ +#define nvmlClocksEventReasonBoardLimit 0x0000000000000200LL //!< Board limit policy is limiting clocks. + +/** Reliability + * + * The reliability policy is currently limiting the GPU clocks. + * + */ +#define nvmlClocksEventReasonReliability 0x0000000000000400LL //!< Reliability policy is limiting clocks. + /** Bit mask representing no clocks throttling * * Clocks are as high as possible. @@ -3437,12 +3793,14 @@ typedef nvmlSystemEventSetWaitRequest_v1_t nvmlSystemEventSetWaitRequest_t; | nvmlClocksEventReasonGpuIdle \ | nvmlClocksEventReasonApplicationsClocksSetting \ | nvmlClocksEventReasonSwPowerCap \ - | nvmlClocksThrottleReasonHwSlowdown \ + | nvmlClocksThrottleReasonHwSlowdown \ | nvmlClocksEventReasonSyncBoost \ | nvmlClocksEventReasonSwThermalSlowdown \ - | nvmlClocksThrottleReasonHwThermalSlowdown \ - | nvmlClocksThrottleReasonHwPowerBrakeSlowdown \ + | nvmlClocksThrottleReasonHwThermalSlowdown \ + | nvmlClocksThrottleReasonHwPowerBrakeSlowdown \ | nvmlClocksEventReasonDisplayClockSetting \ + | nvmlClocksEventReasonBoardLimit \ + | nvmlClocksEventReasonReliability \ ) //!< Bitmask of all clock event reasons. /** @@ -3905,6 +4263,16 @@ typedef struct #define NVML_GPU_FABRIC_HEALTH_MASK_SHIFT_PARTITION_ASSIGNED 12 //!< Fabric Health Mask Bit Shift for Partition Assigned #define NVML_GPU_FABRIC_HEALTH_MASK_WIDTH_PARTITION_ASSIGNED 0x3 //!< Fabric Health Mask Width for Partition Assigned +/** + * Global Fabric Manager State + */ +#define NVML_GPU_FABRIC_HEALTH_MASK_GFM_STATE_NOT_SUPPORTED 0 //!< Fabric Health Mask: Global Fabric Manager State not supported +#define NVML_GPU_FABRIC_HEALTH_MASK_GFM_STATE_CONNECTED 1 //!< Fabric Health Mask: Global Fabric Manager State is Connected +#define NVML_GPU_FABRIC_HEALTH_MASK_GFM_STATE_DISCONNECTED 2 //!< Fabric Health Mask: Global Fabric Manager State is Disconnected + +#define NVML_GPU_FABRIC_HEALTH_MASK_SHIFT_GFM_STATE 14 //!< Fabric Health Mask Bit Shift for Global Fabric Manager State +#define NVML_GPU_FABRIC_HEALTH_MASK_WIDTH_GFM_STATE 0x3 //!< Fabric Health Mask Width for Global Fabric Manager State + /** * Fabric Health */ @@ -3958,11 +4326,14 @@ typedef struct #define nvmlGpuFabricInfo_v2 NVML_STRUCT_VERSION(GpuFabricInfo, 2) //!< Version macro for \a nvmlGpuFabricInfo_v2_t /** -* GPU Fabric information (v3). -*/ + * GPU Fabric information (v3). + * + * @deprecated nvmlGpuFabricInfo_v3_t is deprecated and will be removed in a future release. + * Use nvmlGpuFabricInfo_v4_t instead. + */ typedef struct { - unsigned int version; //!< Structure version identifier (set to nvmlGpuFabricInfo_v2) + unsigned int version; //!< Structure version identifier (set to nvmlGpuFabricInfo_v3) unsigned char clusterUuid[NVML_GPU_FABRIC_UUID_LEN]; //!< Uuid of the cluster to which this GPU belongs nvmlReturn_t status; //!< Probe Error status, if any. Must be checked only if Probe state returns "complete". unsigned int cliqueId; //!< ID of the fabric clique to which this GPU belongs @@ -3978,81 +4349,134 @@ typedef nvmlGpuFabricInfo_v3_t nvmlGpuFabricInfoV_t; */ #define nvmlGpuFabricInfo_v3 NVML_STRUCT_VERSION(GpuFabricInfo, 3) //!< Version macro for \a nvmlGpuFabricInfo_v3_t +/** + * Maximum number of fabric clique entries. + */ +#define NVML_GPU_FABRIC_CLIQUE_MAX 64 + +#define NVML_GPU_FABRIC_CLIQUE_TYPE_UNICAST_POINTER 0 //!< Unicast pointer-based access +#define NVML_GPU_FABRIC_CLIQUE_TYPE_MULTICAST_POINTER 1 //!< Multicast pointer-based access +#define NVML_GPU_FABRIC_CLIQUE_TYPE_UNICAST_LOGICAL_ENDPOINT 2 //!< Unicast logical-endpoint-based access +#define NVML_GPU_FABRIC_CLIQUE_TYPE_MULTICAST_LOGICAL_ENDPOINT 3 //!< Multicast logical-endpoint-based access + +/** + * Fabric clique entry. Each entry represents a single (type, id) pair + * describing a clique assignment for a given fabric operation type. + */ +typedef struct +{ + unsigned char type; //!< Clique type. See NVML_GPU_FABRIC_CLIQUE_TYPE_* + unsigned int id; //!< Clique ID assigned by the Fabric Manager +} nvmlGpuFabricClique_v1_t; + +/** + * GPU Fabric information (v4). + * + * Extends v3 by replacing the single \a cliqueId field with a flat array + * of (type, id) clique entries. The legacy v3 \a cliqueId maps to the + * \a id of the first \ref NVML_GPU_FABRIC_CLIQUE_TYPE_UNICAST_POINTER entry. + */ +typedef struct +{ + unsigned char clusterUuid[NVML_GPU_FABRIC_UUID_LEN]; //!< Uuid of the cluster to which this GPU belongs + nvmlReturn_t status; //!< Probe Error status, if any. Must be checked only if state returns "complete". + nvmlGpuFabricClique_v1_t cliques[NVML_GPU_FABRIC_CLIQUE_MAX]; //!< Clique entries, sorted by ascending type then ascending id + unsigned int numCliques; //!< Number of valid entries in \a cliques[] + nvmlGpuFabricState_t state; //!< Current Probe State. See NVML_GPU_FABRIC_STATE_* + unsigned int healthMask; //!< GPU Fabric health Status Mask. See NVML_GPU_FABRIC_HEALTH_MASK_* + unsigned char healthSummary; //!< GPU Fabric health summary. See NVML_GPU_FABRIC_HEALTH_SUMMARY_* +} nvmlGpuFabricInfo_v4_t; + /** @} */ -/***************************************************************************************************/ -/** @defgroup nvmlInitializationAndCleanup Initialization and Cleanup +/** + * @defgroup nvmlInitializationAndCleanup Initialization and Cleanup + * @brief NVML Methods that handle the NVML Library initialization and cleanup. + * * This chapter describes the methods that handle NVML initialization and cleanup. - * It is the user's responsibility to call \ref nvmlInit_v2() before calling any other methods, and - * nvmlShutdown() once NVML is no longer being used. - * @{ + * It is the user's responsibility to call \ref nvmlInit_v2() before calling any + * other methods, and \ref nvmlShutdown() once NVML is no longer being used. + * @{ */ -/***************************************************************************************************/ -#define NVML_INIT_FLAG_NO_GPUS (1 << 0) //!< Don't fail nvmlInit() when no GPUs are found -#define NVML_INIT_FLAG_NO_ATTACH (1 << 1) //!< Don't attach GPUs -#define NVML_INIT_FLAG_FORCE_INIT (1 << 2) //!< Force GPU initialization when a previous nvmlInit was called with NO_GPUS and NO_ATTACH flags +#define NVML_INIT_FLAG_NO_GPUS (1 << 0) //!< Initialize the NVML Library even when no devices are found. +#define NVML_INIT_FLAG_NO_ATTACH (1 << 1) //!< Initialize the NVML Library without attaching any discovered devices. +#define NVML_INIT_FLAG_FORCE_INIT (1 << 2) //!< Force device initialization even when a previous nvmlInit was called with the NO_GPUS and NO_ATTACH flags. /** - * Initialize NVML, but don't initialize any GPUs yet. + * @brief Initialize the NVML Library lazily, without allocating any device state. * - * \note nvmlInit_v3 introduces a "flags" argument, that allows passing boolean values - * modifying the behaviour of nvmlInit(). - * \note In NVML 5.319 new nvmlInit_v2 has replaced nvmlInit"_v1" (default in NVML 4.304 and older) that - * did initialize all GPU devices in the system. + * This will initialize the NVML Library state without enumerating any discovered + * devices. This will allow NVML to communicate with a device, even if other devices + * are in an unstable or bad state. Enumeration of a device can be done by obtaining + * the device handle via the nvmlDeviceGetHandleBy* class of APIs. * - * This allows NVML to communicate with a GPU - * when other GPUs in the system are unstable or in a bad state. When using this API, GPUs are - * discovered and initialized in nvmlDeviceGetHandleBy* functions instead. - * - * \note To contrast nvmlInit_v2 with nvmlInit"_v1", NVML 4.304 nvmlInit"_v1" will fail when any detected GPU is in - * a bad or unstable state. + * This method needs to be called once before any usage of NVML Library APIs. * * For all products. * - * This method, should be called once before invoking any other methods in the library. - * A reference count of the number of initializations is maintained. Shutdown only occurs - * when the reference count reaches zero. - * * @return - * - \ref NVML_SUCCESS if NVML has been properly initialized - * - \ref NVML_ERROR_DRIVER_NOT_LOADED if NVIDIA driver is not running - * - \ref NVML_ERROR_NO_PERMISSION if NVML does not have permission to talk to the driver - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_SUCCESS if the NVML Library was properly initialized. + * - \ref NVML_ERROR_DRIVER_NOT_LOADED if the NVIDIA driver is not running. + * - \ref NVML_ERROR_NO_PERMISSION if the NVML Library does not have permission to talk to the driver. + * - \ref NVML_ERROR_UNKNOWN if there is an unexpected error. + * + * @note A reference count of the number of initializations is maintained, and + * a corresponding call to \ref nvmlShutdown() needs to be issued once usage + * of the NVML Library is complete. Shutdown will only occur after the + * reference count reaches zero. + * + * @see nvmlShutdown() */ nvmlReturn_t DECLDIR nvmlInit_v2(void); /** - * nvmlInitWithFlags is a variant of nvmlInit(), that allows passing a set of boolean values - * modifying the behaviour of nvmlInit(). - * Other than the "flags" parameter it is completely similar to \ref nvmlInit_v2. + * @brief Initialize the NVML Library lazily, without allocating any device state, with additional init flags. + * + * A variant of \ref nvmlInit_v2(), this will initialize the NVML Library state without + * enumerating any discovered devices. An option to pass in additional flags + * is provided to modify the behavior of NVML Library init. The usage of these + * flags can be obtained from NVML_INIT_FLAG_*. These flags can be combined together. + * + * Other than the "flags" parameter, this method is completely identical to \ref nvmlInit_v2(). * * For all products. * - * @param flags behaviour modifier flags + * @param[in] flags NVML_INIT_FLAG_* flags that can modify NVML Init behavior. * * @return - * - \ref NVML_SUCCESS if NVML has been properly initialized - * - \ref NVML_ERROR_DRIVER_NOT_LOADED if NVIDIA driver is not running - * - \ref NVML_ERROR_NO_PERMISSION if NVML does not have permission to talk to the driver - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_SUCCESS if the NVML Library was properly initialized. + * - \ref NVML_ERROR_DRIVER_NOT_LOADED if the NVIDIA driver is not running. + * - \ref NVML_ERROR_NO_PERMISSION if the NVML Library does not have permission to talk to the driver. + * - \ref NVML_ERROR_UNKNOWN if there is an unexpected error. + * + * @note A reference count of the number of initializations is maintained, and + * a corresponding call to \ref nvmlShutdown() needs to be issued once usage + * of the NVML Library is complete. Shutdown will only occur after the + * reference count reaches zero. + * + * @see nvmlShutdown() */ nvmlReturn_t DECLDIR nvmlInitWithFlags(unsigned int flags); /** - * Shut down NVML by releasing all GPU resources previously allocated with \ref nvmlInit_v2(). + * @brief Shut down and cleanup NVML Library state. * - * For all products. + * This will shut down and cleanup NVML Library state by releasing all device and + * library resources previously allocated with \ref nvmlInit_v2() or \ref nvmlInitWithFlags(). + * This should be called after all NVML work is done, and once for each call to + * \ref nvmlInit_v2() or \ref nvmlInitWithFlags(). * - * This method should be called after NVML work is done, once for each call to \ref nvmlInit_v2() - * A reference count of the number of initializations is maintained. Shutdown only occurs - * when the reference count reaches zero. For backwards compatibility, no error is reported if - * nvmlShutdown() is called more times than nvmlInit(). + * Complete shutdown will only occur when the reference count of all prior NVML + * initializations reaches zero. No error will be reported if this is called + * more times than \ref nvmlInit_v2() or \ref nvmlInitWithFlags(). + * + * For all products. * * @return - * - \ref NVML_SUCCESS if NVML has been properly shut down - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_SUCCESS if the NVML Library was properly shut down. + * - \ref NVML_ERROR_UNINITIALIZED if the NVML Library was not previously initialized. + * - \ref NVML_ERROR_UNKNOWN if there is an unexpected error. */ nvmlReturn_t DECLDIR nvmlShutdown(void); @@ -4137,6 +4561,68 @@ const DECLDIR char* nvmlErrorString(nvmlReturn_t result); /** @} */ +/** + * @brief Configuration for registering structured GPU Operational Events with + * \ref nvmlEventSetRegisterGpuOperationalEvents_v1. + * + * Initialize the structure to zero and then set \c uuid to select the target GPU. Default values + * register new device-wide events with log-level and severity filters disabled. + */ +typedef struct nvmlGpuOperationalEventConfig_v1_st +{ + char uuid[NVML_DEVICE_UUID_V2_BUFFER_SIZE]; //!< [in] Target GPU UUID string. Must be a NULL-terminated "GPU-..." UUID. + unsigned int minLogLevel; //!< [in] \ref nvmlGpuOperationalEventLogLevel_t value for the minimum GPU Operational Event log level. \c NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL means no filter. + unsigned int minSeverity; //!< [in] \ref nvmlOperationalEventSeverity_t value for the minimum Operational Event severity threshold. \c NVML_OPERATIONAL_EVENT_SEVERITY_ALL means no filter. +} nvmlGpuOperationalEventConfig_v1_t; + +/** + * @brief Extended event payload returned by \ref nvmlEventSetWait_v3. + * + * This structure is used for both NVML event-bit and structured formats. For NVML event-bit data, + * \c dataType is \ref NVML_EVENT_DATA_TYPE_NVML_EVENT, \c eventType contains the NVML event bit, + * fields such as \c eventData, \c gpuInstanceId, and \c computeInstanceId preserve existing + * semantics, and structured-only fields are set to 0 or empty values. For structured GPU Operational + * Events, \c dataType is \ref NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT, \c eventType is set to + * \ref nvmlEventTypeNone, and the structured metadata fields are populated. + * + * Clients that subscribe to both NVML event-bit and structured formats on the same event set should branch + * on \c dataType to determine which format was returned. During the transition period, the + * same underlying incident may generate both an NVML event-bit notification and a structured notification; + * NVML does not deduplicate those notifications. + * + * Fields such as \c categoryId, \c sourceModule, \c moduleEventCode, \c scope, + * \c originator, \c moduleInstance, and \c chipletId are structured event metadata identifiers. + * NVML transports these identifiers but does not define the event catalog or source-defined + * metadata values. + */ +typedef struct nvmlEventData_v2_st +{ + char uuid[NVML_DEVICE_UUID_V2_BUFFER_SIZE]; //!< [out] UUID for the GPU where the event occurred. Empty if unavailable. + char sourceModule[16]; //!< [out] Source module signature for structured events. Not guaranteed to be NULL-terminated. Empty for NVML event-bit events. + unsigned long long eventType; //!< [out] NVML event bit for \ref NVML_EVENT_DATA_TYPE_NVML_EVENT events; \ref nvmlEventTypeNone for structured events. + unsigned long long eventData; //!< [out] Xid code for \ref nvmlEventTypeXidCriticalError, or 0 when not applicable. + unsigned long long groupCursor; //!< [out] Structured event group identifier. 0 for NVML event-bit events. + unsigned long long instanceId; //!< [out] Structured event sequence identifier. 0 for NVML event-bit events. + unsigned long long timestampUsec; //!< [out] Event timestamp in microseconds. 0 if unavailable. + unsigned long long traceId; //!< [out] Structured event trace identifier. 0 for NVML event-bit events. + unsigned int dataType; //!< [out] \ref nvmlEventDataType_t value indicating which event-data format is populated. + unsigned int gpuInstanceId; //!< [out] MIG GPU instance ID for NVML event-bit data, or \c NVML_GPU_INSTANCE_ID_ANY when not applicable. + unsigned int computeInstanceId; //!< [out] MIG compute instance ID for NVML event-bit data, or \c NVML_COMPUTE_INSTANCE_ID_ANY when not applicable. + unsigned int severity; //!< [out] \ref nvmlOperationalEventSeverity_t value for structured events. May contain newer severity values not named in this header. \c NVML_OPERATIONAL_EVENT_SEVERITY_ALL for NVML event-bit events. + unsigned int categoryId; //!< [out] Source-defined structured event category identifier. 0 for NVML event-bit events. + unsigned int moduleEventCode; //!< [out] Source-module-defined event code. Interpret with \c sourceModule. 0 for NVML event-bit events. + unsigned int scope; //!< [out] Structured event scope identifier. 0 for NVML event-bit events. + unsigned int originator; //!< [out] Structured event originator identifier. 0 for NVML event-bit events. + unsigned int moduleInstance; //!< [out] Structured event module instance identifier. 0 for NVML event-bit events. + unsigned int chipletId; //!< [out] Structured event chiplet identifier. 0 for NVML event-bit events. + unsigned int logLevel; //!< [out] \ref nvmlGpuOperationalEventLogLevel_t value for structured GPU Operational Events. May contain newer log-level values not named in this header. \c NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL for NVML event-bit events. + unsigned int attributes; //!< [out] Bitmask of \c NVML_OPERATIONAL_EVENT_ATTR_* values for structured events. May contain newer bits not named in this header. 0 for NVML event-bit events. May include \c NVML_OPERATIONAL_EVENT_ATTR_OVERFLOW if events or associated payloads were dropped. + unsigned int groupCperSize; //!< [out] Associated CPER record size in bytes. 0 when unavailable. + unsigned int groupAttributes; //!< [out] Bitmask of \c NVML_OPERATIONAL_EVENT_GROUP_ATTR_* values for structured events. May contain newer bits not named in this header. 0 for NVML event-bit events. + unsigned char groupSize; //!< [out] Total number of events in the structured event group. 0 for NVML event-bit events. + unsigned char groupIndex; //!< [out] Zero-based index within the structured event group. 0 for NVML event-bit events. +} nvmlEventData_v2_t; + /***************************************************************************************************/ /** @defgroup nvmlCPER CPER (Common Platform Error Record) * Types and API for retrieving CPER data. @@ -6618,7 +7104,6 @@ nvmlReturn_t DECLDIR nvmlDeviceGetPowerMizerMode_v1(nvmlDevice_t device, nvmlDev nvmlReturn_t DECLDIR nvmlDeviceSetPowerMizerMode_v1(nvmlDevice_t device, nvmlDevicePowerMizerModes_v1_t *powerMizerMode); - /** * Retrieves total energy consumption for this GPU in millijoules (mJ) since the driver was last reloaded * @@ -6658,6 +7143,58 @@ nvmlReturn_t DECLDIR nvmlDeviceGetTotalEnergyConsumption(nvmlDevice_t device, un */ nvmlReturn_t DECLDIR nvmlDeviceGetEnforcedPowerLimit(nvmlDevice_t device, unsigned int *limit); +/** + * Request to enable or disable Adaptive TGP Mode for a GPU. + * + * %RUBIN_OR_NEWER% + * Requires root/admin privileges. + * + * Adaptive TGP Mode assigns tailored power budgets to two binned GPU parts within the same + * module, reducing node-to-node and rack-to-rack performance variation. + * An out-of-band administrator policy may override the in-band request; + * use \ref nvmlDeviceGetAdaptiveTgpModeInfo_v1 to query the arbitrated state. + * + * @param device The identifier of the target device + * @param mode NVML_FEATURE_ENABLED or NVML_FEATURE_DISABLED + * + * @return + * - \ref NVML_SUCCESS if the request was accepted + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a mode is not a valid \ref nvmlEnableState_t + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support Adaptive TGP Mode + * - \ref NVML_ERROR_NO_PERMISSION if the caller lacks root/admin privileges + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlDeviceGetAdaptiveTgpModeInfo_v1() + */ +nvmlReturn_t DECLDIR nvmlDeviceSetAdaptiveTgpMode_v1(nvmlDevice_t device, nvmlEnableState_t mode); + +/** + * Retrieves Adaptive TGP Mode state and telemetry for a GPU. + * + * %RUBIN_OR_NEWER% + * + * Populates \a info with the in-band request, out-of-band enablement status, out-of-band + * override status, arbitrated enablement state, and adjusted base power limit. The adjusted base + * power is valid only when feature is enabled. + * See \ref nvmlAdaptiveTgpModeInfo_v1_t for field details. + * + * @param device The identifier of the target device + * @param info Reference in which to return the Adaptive TGP Mode information + * + * @return + * - \ref NVML_SUCCESS if \a info has been populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a info is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support Adaptive TGP Mode + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlDeviceSetAdaptiveTgpMode_v1() + */ +nvmlReturn_t DECLDIR nvmlDeviceGetAdaptiveTgpModeInfo_v1(nvmlDevice_t device, nvmlAdaptiveTgpModeInfo_v1_t *info); + /** * Retrieves the current GOM and pending GOM (the one that GPU will switch to after reboot). * @@ -6770,6 +7307,60 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMemoryInfo(nvmlDevice_t device, nvmlMemory_t * */ nvmlReturn_t DECLDIR nvmlDeviceGetMemoryInfo_v2(nvmlDevice_t device, nvmlMemory_v2_t *memory); +/** + * @brief Set the memory limits of the device for the cgroup partition. + * + * This method will set the memory limits of the device for the specified cgroup + * partition. The limits will indicate the amount of memory that can be allocated + * for the device for use of an application in that cgroup. + * + * For all products. + * For Linux only. + * Requires root/admin permissions. + * + * @param[in] device The identifier of the target device + * @param[in] limits A pointer to \ref nvmlSetMemoryLimits_v1_t where the limits can be set + * + * @return + * - \ref NVML_SUCCESS if the operation was successful + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a limits is NULL, + * the softLimit exceeds the hardLimit, or a limit + * exceeds total device memory + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_OPERATING_SYSTEM if the cgroup path cannot be opened + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @note MIG handles are not supported + */ +nvmlReturn_t DECLDIR nvmlDeviceSetMemoryLimits_v1(nvmlDevice_t device, nvmlSetMemoryLimits_v1_t *limits); + +/** + * @brief Get the memory limits of the device for the cgroup partition. + * + * This method will get the current memory limits of the device for the specified + * cgroup partition, as well as the current memory used against the limits. + * + * For all products. + * For Linux only. + * + * @param[in] device The identifier of the target device + * @param[in,out] limits A pointer to \ref nvmlGetMemoryLimits_v1_t + * + * @return + * - \ref NVML_SUCCESS if the operation was successful + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a limits is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_NOT_FOUND if the limits were not found for this device and cgroup + * - \ref NVML_ERROR_OPERATING_SYSTEM if the cgroup path cannot be opened + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @note MIG handles are not supported + */ +nvmlReturn_t DECLDIR nvmlDeviceGetMemoryLimits_v1(nvmlDevice_t device, nvmlGetMemoryLimits_v1_t *limits); + /** * Retrieves the current compute mode for the device or MIG device. * @@ -7318,6 +7909,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetFBCSessions(nvmlDevice_t device, unsigned int * * On Windows platforms the device driver can run in either WDDM, MCDM or WDM (TCC) modes. If a display is attached * to the device it must run in WDDM mode. MCDM mode is preferred if a display is not attached. TCC mode is deprecated. + * Driver-model availability is architecture-specific; attempting to set an unsupported driver model returns + * NVML_ERROR_NOT_SUPPORTED. * * See \ref nvmlDriverModel_t for details on available driver models. * @@ -7873,6 +8466,37 @@ DEPRECATED(13.0) nvmlReturn_t DECLDIR nvmlDeviceGetGpuFabricInfo(nvmlDevice_t de nvmlReturn_t DECLDIR nvmlDeviceGetGpuFabricInfoV(nvmlDevice_t device, nvmlGpuFabricInfoV_t *gpuFabricInfo); +/** + * Retrieves GPU fabric information including per-type clique assignments. + * + * Returns fabric clique data via \ref nvmlGpuFabricInfo_v4_t. + * Each entry in the \a cliques array is a (type, id) pair representing a single + * clique assignment. The number of valid entries is given by \a numCliques. + * Entries are sorted by ascending type (NVML_GPU_FABRIC_CLIQUE_TYPE_*), then by + * ascending clique id within each type. + * + * On Hopper systems, the driver reports Unicast Pointer and Multicast Pointer cliques. + * On Blackwell and Rubin, Unicast Logical Endpoint and Multicast Logical Endpoint + * are additionally reported. + * + * \code + * nvmlGpuFabricInfo_v4_t fabricInfo = {0}; + * nvmlReturn_t result = nvmlDeviceGetGpuFabricInfo_v4(device, &fabricInfo); + * \endcode + * + * For Hopper &tm; or newer fully supported devices. + * + * @param device The identifier of the target device + * @param gpuFabricInfo Information about GPU fabric state including per-type cliques + * + * @return + * - \ref NVML_SUCCESS Upon success + * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't support gpu fabric + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device or \a gpuFabricInfo is invalid + */ +nvmlReturn_t DECLDIR nvmlDeviceGetGpuFabricInfo_v4(nvmlDevice_t device, + nvmlGpuFabricInfo_v4_t *gpuFabricInfo); + /** * Get Conf Computing System capabilities. * @@ -8686,6 +9310,20 @@ nvmlReturn_t DECLDIR nvmlDeviceSetHostname_v1(nvmlDevice_t device, nvmlHostname_ */ nvmlReturn_t DECLDIR nvmlDeviceGetHostname_v1(nvmlDevice_t device, nvmlHostname_v1_t *hostname); +/** + * Get Performance Metric samples + * + * See \ref nvmlPerfMetricsSamples_v1_t for more information on the struct. + * + * @param[in] device The identifier of the target device + * @param[out] samples Reference to \a nvmlPerfMetricsSamples_v1_t. + * + * @return + * - \ref NVML_SUCCESS if the query is successful + * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device + **/ +nvmlReturn_t DECLDIR nvmlDevicePerfMetricsGetSamples_v1(nvmlDevice_t device, nvmlPerfMetricsSamples_v1_t *samples); + /** @} */ /***************************************************************************************************/ @@ -8882,6 +9520,9 @@ nvmlReturn_t DECLDIR nvmlDeviceClearEccErrorCounts(nvmlDevice_t device, nvmlEccC * On Windows platforms the device driver can run in either WDDM or WDM (TCC) mode. If a display is attached * to the device it must run in WDDM mode. * + * Driver-model availability is architecture-specific; attempting to set an unsupported driver model returns + * NVML_ERROR_NOT_SUPPORTED. + * * It is possible to force the change to WDM (TCC) while the display is still attached with a force flag (nvmlFlagForce). * This should only be done if the host is subsequently powered down and the display is detached from the device * before the next reboot. @@ -9408,9 +10049,10 @@ nvmlReturn_t DECLDIR nvmlDeviceClearAccountingPids(nvmlDevice_t device); /* * NVML_FI_DEV_NVLINK_GET_STATE state enums */ -#define NVML_NVLINK_STATE_INACTIVE 0x0 //!< NVLink is inactive. -#define NVML_NVLINK_STATE_ACTIVE 0x1 //!< NVLink is active. -#define NVML_NVLINK_STATE_SLEEP 0x2 //!< NVLink is in sleep state. +#define NVML_NVLINK_STATE_INACTIVE 0x0 //!< NVLink is inactive. +#define NVML_NVLINK_STATE_ACTIVE 0x1 //!< NVLink is active. +#define NVML_NVLINK_STATE_SLEEP 0x2 //!< NVLink is in sleep state. +#define NVML_NVLINK_STATE_ACTIVE_TRAFFIC_DISABLED 0x3 //!< NVLink is active, but not usable for traffic /** * Represents Nvlink Version @@ -9457,6 +10099,21 @@ typedef struct typedef nvmlNvlinkSetBwMode_v1_t nvmlNvlinkSetBwMode_t; #define nvmlNvlinkSetBwMode_v1 NVML_STRUCT_VERSION(NvlinkSetBwMode, 1) //!< Version macro for \a nvmlNvlinkSetBwMode_v1_t +/** + * @brief Describes the parameters involved to setting Nvlink RBM mode asynchronously. + * + * This structure holds the parameters needed to correctly set a Device's Nvlink + * Reduced Bandwidth Mode asynchronously. Polling for NVML_GPU_FABRIC_STATE_COMPLETED + * from \ref nvmlDeviceGetGpuFabricInfoV() is needed to check if the setting was applied. + * + */ +typedef struct +{ + unsigned int bSetBest; //!< [in] - Set to the best available Bandwidth mode + unsigned int bwMode; //!< [in] - Requested Bandwidth mode to set. Values can be found from \ref nvmlDeviceGetNvlinkSupportedBwModes() + unsigned int asyncPollTimeoutMs; //!< [out] - Time in ms to poll to validate bandwidth setting. +} nvmlNvlinkSetBwModeAsync_v1_t; + /** * Struct to represent per device NVLINK information v1 */ @@ -9858,6 +10515,26 @@ nvmlReturn_t DECLDIR nvmlDeviceGetNvlinkBwMode(nvmlDevice_t device, nvmlReturn_t DECLDIR nvmlDeviceSetNvlinkBwMode(nvmlDevice_t device, nvmlNvlinkSetBwMode_t *setBwMode); +/** + * Set the NvLink Reduced Bandwidth Mode asynchronously for the device. Polling should be + * done by checking for \a NVML_GPU_FABRIC_STATE_COMPLETED from \ref nvmlDeviceGetGpuFabricInfoV(). + * + * %RUBIN_OR_NEWER% + * + * @param[in] device The identifier of the target device + * @param[in,out] setBwModeAsync Reference to \ref nvmlNvlinkSetBwModeAsync_v1_t + * + * @return + * - \ref NVML_SUCCESS if the Bandwidth mode was successfully set + * - \ref NVML_ERROR_INVALID_ARGUMENT if device or \p setBwModeAsync is invalid + * - \ref NVML_ERROR_NO_PERMISSION if user does not have permission to change Bandwidth mode + * - \ref NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device + * + * @see nvmlDeviceGetGpuFabricInfoV() + * + **/ +nvmlReturn_t DECLDIR nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice_t device, nvmlNvlinkSetBwModeAsync_v1_t *setBwModeAsync); + /** * Query NVLINK information associated with this device. * @@ -9875,6 +10552,66 @@ nvmlReturn_t DECLDIR nvmlDeviceSetNvlinkBwMode(nvmlDevice_t device, */ nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkInfo(nvmlDevice_t device, nvmlNvLinkInfo_t *info); +/** + * Per-link NVLink telemetry sample types. + */ +typedef enum +{ + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX = 0, //!< Raw TX flit counter for a single link + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX = 1, //!< Raw RX flit counter for a single link + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT = 2 //!< Number of valid sample types +} nvmlNvlinkTelemetrySampleType_t; + +/** + * Struct representing one (link, metric) telemetry request / response slot. + */ +typedef struct +{ + unsigned int linkId; //!<[in] LinkId + unsigned int sampleType; //!<[in] Type of telemetry to sample, specified by `nvmlNvlinkTelemetrySampleType_t` + unsigned int sampleCount; //!<[in,out]: Number of samples users need to allocate. If set to 0, will return max + //! supported count of samples without touching the `samples` pointer. + unsigned long long *samples; //!<[in,out]: Array of samples allocated by the user. Can be set to NULL when getting count + nvmlReturn_t nvmlReturn; //!<[out]: Return code for retrieving this sample. This must be checked by the client + //! before looking at any output values, as they are invalid if `nvmlReturn != NVML_SUCCESS`. +} nvmlNvlinkTelemetrySample_v1_t; + +/** + * Batched NVLink telemetry request. + */ +typedef struct +{ + unsigned int telemetryCount; //!<[in] Number of valid entries in \a telemetrySamples + nvmlNvlinkTelemetrySample_v1_t *telemetrySamples; //!<[in,out] Caller-allocated array of \a telemetryCount request slots +} nvmlNvlinkTelemetrySamples_v1_t; + +/** + * \brief Retrieve a batch of historical NVLink per-link telemetry samples. + * + * Samples are taken at approximately 100 ms intervals. + * Intended for use with periodic polling every ~2 seconds. + * Longer polling intervals are possible, but can result in dropped samples + * if the supported `sampleCount` is too low for the given polling interval. + * + * %RUBIN_OR_NEWER% + * + * @param[in] device The device handle of the GPU to retrieve samples for + * @param[in,out] samples Request/response batch (see \ref nvmlNvlinkTelemetrySamples_v1_t) + * + * @return + * - \ref NVML_SUCCESS If the call succeeded. + * - \ref NVML_ERROR_INVALID_ARGUMENT If any required pointer is NULL, + * a given enum value is out of range, + * a slot's `linkId` is out of range, + * a slot's `sampleCount` is non-zero with a NULL `samples` pointer, or + * a slot's `sampleCount` is greater than the supported `sampleCount` for the given link. + * - \ref NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is otherwise inaccessible. + * - \ref NVML_ERROR_NOT_SUPPORTED If the given device does not support this API. + * - \ref NVML_ERROR_UNKNOWN On any unexpected error. + */ +nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice_t device, + nvmlNvlinkTelemetrySamples_v1_t *samples); + /** @} */ // @defgroup NvLink NvLink Methods /***************************************************************************************************/ @@ -9989,7 +10726,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetSupportedEventTypes(nvmlDevice_t device, unsig * @return * - \ref NVML_SUCCESS if the data has been set * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a data is NULL + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a set or \a data is NULL * - \ref NVML_ERROR_TIMEOUT if no event arrived in specified timeout or interrupt arrived * - \ref NVML_ERROR_GPU_IS_LOST if a GPU has fallen off the bus or is otherwise inaccessible * - \ref NVML_ERROR_UNKNOWN on any unexpected error @@ -9999,6 +10736,227 @@ nvmlReturn_t DECLDIR nvmlDeviceGetSupportedEventTypes(nvmlDevice_t device, unsig */ nvmlReturn_t DECLDIR nvmlEventSetWait_v2(nvmlEventSet_t set, nvmlEventData_t * data, unsigned int timeoutms); +/** + * @brief Adds a GPU Operational Event subscription to an event set. + * + * This API is separate from \ref nvmlDeviceRegisterEvents. Calling this API opts the event set into + * the structured GPU Operational Event format for the target GPU UUID. Subscriptions are identified + * by \a config; registering the same subscription more than once is treated as success. + * + * \ref nvmlDeviceRegisterEvents and \ref nvmlEventSetRegisterGpuOperationalEvents_v1 may both be used on the same + * event set. In that mixed-subscription model, NVML event-bit subscriptions continue to deliver event + * bits such as \ref nvmlEventTypeXidCriticalError, while GPU Operational Event subscriptions deliver + * \ref NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT records through \ref nvmlEventSetWait_v3 with + * \c eventType set to \ref nvmlEventTypeNone. The same underlying incident may generate both an NVML + * event-bit notification and a structured notification; NVML does not deduplicate those notifications. + * + * This API supports GPU UUID subscriptions. MIG UUIDs are not supported by this version. + * + * For Turing &tm; or newer fully supported devices. + * + * For Linux only. + * + * @param[in] eventSet Event set created by \ref nvmlEventSetCreate + * @param[in] config GPU Operational Event subscription configuration + * + * @return + * - \ref NVML_SUCCESS if the GPU Operational Event subscription was registered + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a eventSet or \a config is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if structured GPU Operational Events are not supported on this platform, + * or if the requested subscription is not supported + * - \ref NVML_ERROR_NO_PERMISSION if the caller lacks permission for the requested scope + * - \ref NVML_ERROR_INSUFFICIENT_RESOURCES + * if the event set cannot accept another subscription + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlGpuOperationalEventConfig_v1_t + * @see nvmlEventSetWait_v3 + * @see nvmlEventSetFree + */ +nvmlReturn_t DECLDIR nvmlEventSetRegisterGpuOperationalEvents_v1(nvmlEventSet_t eventSet, + const nvmlGpuOperationalEventConfig_v1_t *config); + +/** + * @brief Waits on an event set and returns the next event in the extended event format. + * + * This API is the unified wait surface for NVML event-bit subscriptions registered with + * \ref nvmlDeviceRegisterEvents and structured GPU Operational Event subscriptions registered with + * \ref nvmlEventSetRegisterGpuOperationalEvents_v1. + * + * The returned format is distinguished by \c dataType in \a data. If \c dataType is + * \ref NVML_EVENT_DATA_TYPE_NVML_EVENT, the event came from the \ref nvmlDeviceRegisterEvents path, + * \c eventType is an NVML event bit such as \ref nvmlEventTypeXidCriticalError, and the existing + * fields preserve their historical semantics. If \c dataType is + * \ref NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT, the event came from the structured format, + * \c eventType is \ref nvmlEventTypeNone, and the structured metadata fields are populated. + * + * When an event set contains only NVML event-bit subscriptions, this API normalizes those events into + * \ref nvmlEventData_v2_t. When an event set contains both NVML event-bit and structured subscriptions, + * each successful call returns the next available event from either path. Clients should branch on + * \c dataType to determine which format was returned. An event set is not required to have + * structured GPU Operational Event subscriptions to be used with this API. + * + * During the transition period, if a client subscribes to both NVML event-bit and structured notifications + * for the same GPU, the same underlying incident may generate both an NVML event-bit notification and a + * structured notification. NVML does not deduplicate those notifications. + * + * Context records for the returned event, if any, are made available through + * \ref nvmlEventSetGetContextCount_v1, \ref nvmlEventSetGetContextInfo_v1, and + * \ref nvmlEventSetGetContextData_v1. Context records remain associated with the event set until the + * next successful call to \ref nvmlEventSetWait_v3 on the same event set or until the event set is freed. + * + * For Turing &tm; or newer fully supported devices. + * + * For Linux only. + * + * @param[in] set Reference to set of events to wait on + * @param[out] data Reference in which to return extended event data + * @param[in] timeoutms Maximum amount of wait time in milliseconds for registered event + * + * @return + * - \ref NVML_SUCCESS if the data has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a set or \a data is NULL + * - \ref NVML_ERROR_TIMEOUT if no event arrived in specified timeout or interrupt arrived + * - \ref NVML_ERROR_NOT_SUPPORTED if this API is not available on the platform or driver + * - \ref NVML_ERROR_MEMORY if system memory is insufficient + * - \ref NVML_ERROR_GPU_IS_LOST if a GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlEventData_v2_t + * @see nvmlDeviceRegisterEvents + * @see nvmlEventSetRegisterGpuOperationalEvents_v1 + * @see nvmlEventSetGetContextCount_v1 + */ +nvmlReturn_t DECLDIR nvmlEventSetWait_v3(nvmlEventSet_t set, nvmlEventData_v2_t *data, unsigned int timeoutms); + +/** + * @brief Gets the number of context records for the most recent event returned by + * \ref nvmlEventSetWait_v3 on this event set. + * + * This count is tied to the event set, not to a caller-owned copy of \ref nvmlEventData_v2_t. It is + * replaced by the next successful call to \ref nvmlEventSetWait_v3 on the same event set. + * + * For Turing &tm; or newer fully supported devices. + * + * For Linux only. + * + * @param[in] set Event set previously used with \ref nvmlEventSetWait_v3 + * @param[out] count Reference in which to return the number of context records + * + * @return + * - \ref NVML_SUCCESS if \a count has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a set or \a count is NULL + * - \ref NVML_ERROR_NOT_FOUND if no event has been returned by \ref nvmlEventSetWait_v3 + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlEventSetWait_v3 + * @see nvmlEventSetGetContextInfo_v1 + * @see nvmlEventSetGetContextData_v1 + */ +nvmlReturn_t DECLDIR nvmlEventSetGetContextCount_v1(nvmlEventSet_t set, unsigned int *count); + +/** + * @brief Gets metadata for a context record from the most recent event returned by + * \ref nvmlEventSetWait_v3. + * + * The returned metadata identifies the NVML public interpretation, the source-defined context payload + * type, payload size, and payload format version. The raw payload for any context record can be + * copied with \ref nvmlEventSetGetContextData_v1 and decoded using the public operational event + * schema or documentation for + * \ref nvmlOperationalEventContextInfo_v1_t::sourceEventContextType. When + * \c nvmlGpuOperationalEventContextType names a type-specific accessor, callers may use that + * accessor instead. Metadata is replaced by the next successful call to \ref nvmlEventSetWait_v3 + * on the same event set. + * + * For Turing &tm; or newer fully supported devices. + * + * For Linux only. + * + * @param[in] set Event set previously used with \ref nvmlEventSetWait_v3 + * @param[in] index Zero-based context index + * @param[out] info Reference in which to return context metadata + * + * @return + * - \ref NVML_SUCCESS if the context metadata has been returned + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if arguments are invalid or \a index is out of range + * - \ref NVML_ERROR_NOT_FOUND if no event has been returned by \ref nvmlEventSetWait_v3 + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlOperationalEventContextInfo_v1_t + * @see nvmlEventSetGetContextCount_v1 + * @see nvmlEventSetGetContextData_v1 + */ +nvmlReturn_t DECLDIR nvmlEventSetGetContextInfo_v1(nvmlEventSet_t set, unsigned int index, + nvmlOperationalEventContextInfo_v1_t *info); + +/** + * @brief Copies the raw payload for a context record from the most recent event returned by + * \ref nvmlEventSetWait_v3. + * + * Passing \a data as NULL performs a size query. In that case \a dataSize is set to the required + * payload size and the function returns \ref NVML_ERROR_INSUFFICIENT_SIZE when the payload is + * non-empty. If the context payload is empty, \a dataSize is set to 0 and the function returns + * \ref NVML_SUCCESS. + * + * For Turing &tm; or newer fully supported devices. + * + * For Linux only. + * + * @param[in] set Event set previously used with \ref nvmlEventSetWait_v3 + * @param[in] index Zero-based context index + * @param[out] data Optional caller-owned buffer for raw context payload + * @param[in,out] dataSize Size of \a data on input; actual or required size on output + * + * @return + * - \ref NVML_SUCCESS if the raw context payload has been copied + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if arguments are invalid or \a index is out of range + * - \ref NVML_ERROR_NOT_FOUND if no event has been returned by \ref nvmlEventSetWait_v3 + * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a data is NULL or too small for a non-empty payload + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlEventSetWait_v3 + * @see nvmlEventSetGetContextCount_v1 + * @see nvmlEventSetGetContextInfo_v1 + */ +nvmlReturn_t DECLDIR nvmlEventSetGetContextData_v1(nvmlEventSet_t set, unsigned int index, + void *data, unsigned int *dataSize); + +/** + * @brief Gets decoded GPU legacy-Xid context data for a context record from the most recent event returned + * by \ref nvmlEventSetWait_v3. + * + * This helper succeeds only for context records whose \c nvmlGpuOperationalEventContextType is + * \ref NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_LEGACY_XID. Other context records remain available + * through \ref nvmlEventSetGetContextData_v1. + * + * For Turing &tm; or newer fully supported devices. + * + * For Linux only. + * + * @param[in] set Event set previously used with \ref nvmlEventSetWait_v3 + * @param[in] index Zero-based context index + * @param[out] xid Reference in which to return legacy-Xid context data + * + * @return + * - \ref NVML_SUCCESS if the GPU legacy-Xid context has been returned + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if arguments are invalid or \a index is out of range + * - \ref NVML_ERROR_NOT_FOUND if no event has been returned or the context is not a GPU legacy-Xid context + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlGpuOperationalEventContextLegacyXid_v1_t + * @see nvmlEventSetGetContextInfo_v1 + * @see nvmlEventSetGetContextData_v1 + */ +nvmlReturn_t DECLDIR nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(nvmlEventSet_t set, unsigned int index, + nvmlGpuOperationalEventContextLegacyXid_v1_t *xid); + /** * Releases events in the set * @@ -12404,33 +13362,44 @@ typedef struct */ nvmlReturn_t DECLDIR nvmlDeviceReadWritePRM_v1(nvmlDevice_t device, nvmlPRMTLV_v1_t *buffer); -/** @} */ - /** * PRM Counter IDs */ typedef enum { - NVML_PRM_COUNTER_ID_NONE = 0, + NVML_PRM_COUNTER_ID_NONE = 0, //!< Sentinel + // /* Physical Layer Counters (PPCNT group 0x12) */ - NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS = 1, - NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS = 2, + NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS = 1, //!< PPCNT group 0x12, link_down_events + NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS = 2, //!< PPCNT group 0x12, successful_recovery_events + /* Recovery counters (PPCNT group 0x1A) */ - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS = 101, - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY = 102, - NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES = 103, + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS = 101, //!< PPCNT group 0x1A, total_successful_recovery_events + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY = 102, //!< PPCNT group 0x1A, time_since_last_recovery + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES = 103, //!< PPCNT group 0x1A, time_between_last_two_recoveries + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY = 104, //!< PPCNT group 0x1A, time_in_last_host_serdes_feq_recovery + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY = 105, //!< PPCNT group 0x1A, total_time_in_host_serdes_feq_recovery + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT = 106, //!< PPCNT group 0x1A, total_host_serdes_feq_recovery_count + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT = 107, //!< PPCNT group 0x1A, total_host_serdes_feq_successful_recovery_count + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT = 108, //!< PPCNT group 0x1A, last_host_serdes_feq_attempts_count + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS = 109, //!< PPCNT group 0x1A, last_successful_recovery_step_attempts + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME = 110, //!< PPCNT group 0x1A, last_successful_recovery_time + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME = 111, //!< PPCNT group 0x1A, total_successful_recovery_time + /* Infiniband PortCounters Attribute (PPCNT group 0x20) */ - NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT = 201, + NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT = 201, //!< PPCNT group 0x20, port_xmit_wait + /* PLR counters (PPCNT group 0x22) */ - NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES = 301, - NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR = 302, - NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE = 303, - NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES = 304, - NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES = 305, - NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS = 306, - NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS = 307, + NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES = 301, //!< PPCNT group 0x22, plr_rcv_codes + NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR = 302, //!< PPCNT group 0x22, plr_rcv_code_err + NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE = 303, //!< PPCNT group 0x22, plr_rcv_uncorrectable_code + NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES = 304, //!< PPCNT group 0x22, plr_xmit_codes + NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES = 305, //!< PPCNT group 0x22, plr_xmit_retry_codes + NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS = 306, //!< PPCNT group 0x22, plr_xmit_retry_events + NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS = 307, //!< PPCNT group 0x22, plr_sync_events + /* PPRM counters */ - NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY = 1001, + NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY = 1001, //!< PPRM, oper_recovery } nvmlPRMCounterId_t; /** @@ -12490,6 +13459,7 @@ typedef struct * - \ref NVML_ERROR_UNKNOWN on any other error */ nvmlReturn_t DECLDIR nvmlDeviceReadPRMCounters_v1(nvmlDevice_t device, nvmlPRMCounterList_v1_t *counterList); +/** @} */ /***************************************************************************************************/ /** @defgroup nvmlMultiInstanceGPU Multi Instance GPU Management @@ -13574,152 +14544,152 @@ typedef enum NVML_GPM_METRIC_NVLINK_L16_TX_PER_SEC = 95, //!< NvLink write bandwidth for link 16 in MiB/sec NVML_GPM_METRIC_NVLINK_L17_RX_PER_SEC = 96, //!< NvLink read bandwidth for link 17 in MiB/sec NVML_GPM_METRIC_NVLINK_L17_TX_PER_SEC = 97, //!< NvLink write bandwidth for link 17 in MiB/sec - NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC = 100, - NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC = 101, - NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC = 102, - NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC = 103, - NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC = 104, - NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC = 105, - NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC = 106, - NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC = 107, - NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC = 108, - NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC = 109, - NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC = 110, - NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC = 111, - NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC = 112, - NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC = 113, - NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC = 114, - NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC = 115, - NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC = 116, - NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC = 117, - NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC = 118, - NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC = 119, - NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC = 120, - NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC = 121, - NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC = 122, - NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC = 123, - NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC = 124, - NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC = 125, - NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC = 126, - NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC = 127, - NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC = 128, - NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC = 129, - NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC = 130, - NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC = 131, - NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC = 132, - NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC = 133, - NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC = 134, - NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC = 135, - NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC = 136, - NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC = 137, - NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC = 138, - NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC = 139, - NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC = 140, - NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC = 141, - NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC = 142, - NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC = 143, - NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC = 144, - NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC = 145, - NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC = 146, - NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC = 147, - NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC = 148, - NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC = 149, - NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC = 150, - NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC = 151, - NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC = 152, - NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC = 153, - NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC = 154, - NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC = 155, - NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC = 156, - NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC = 157, - NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC = 158, - NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC = 159, - NVML_GPM_METRIC_HOSTMEM_CACHE_HIT = 160, - NVML_GPM_METRIC_HOSTMEM_CACHE_MISS = 161, - NVML_GPM_METRIC_PEERMEM_CACHE_HIT = 162, - NVML_GPM_METRIC_PEERMEM_CACHE_MISS = 163, - NVML_GPM_METRIC_DRAM_CACHE_HIT = 164, - NVML_GPM_METRIC_DRAM_CACHE_MISS = 165, - NVML_GPM_METRIC_NVENC_0_UTIL = 166, - NVML_GPM_METRIC_NVENC_1_UTIL = 167, - NVML_GPM_METRIC_NVENC_2_UTIL = 168, - NVML_GPM_METRIC_NVENC_3_UTIL = 169, - NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED = 170, - NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE = 171, - NVML_GPM_METRIC_GR0_CTXSW_REQUESTS = 172, - NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ = 173, - NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT = 174, - NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED = 175, - NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE = 176, - NVML_GPM_METRIC_GR1_CTXSW_REQUESTS = 177, - NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ = 178, - NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT = 179, - NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED = 180, - NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE = 181, - NVML_GPM_METRIC_GR2_CTXSW_REQUESTS = 182, - NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ = 183, - NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT = 184, - NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED = 185, - NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE = 186, - NVML_GPM_METRIC_GR3_CTXSW_REQUESTS = 187, - NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ = 188, - NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT = 189, - NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED = 190, - NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE = 191, - NVML_GPM_METRIC_GR4_CTXSW_REQUESTS = 192, - NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ = 193, - NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT = 194, - NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED = 195, - NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE = 196, - NVML_GPM_METRIC_GR5_CTXSW_REQUESTS = 197, - NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ = 198, - NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT = 199, - NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED = 200, - NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE = 201, - NVML_GPM_METRIC_GR6_CTXSW_REQUESTS = 202, - NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ = 203, - NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT = 204, - NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED = 205, - NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE = 206, - NVML_GPM_METRIC_GR7_CTXSW_REQUESTS = 207, - NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ = 208, - NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT = 209, - NVML_GPM_METRIC_NVLINK_L18_RX_PER_SEC = 212, - NVML_GPM_METRIC_NVLINK_L18_TX_PER_SEC = 213, - NVML_GPM_METRIC_NVLINK_L19_RX_PER_SEC = 214, - NVML_GPM_METRIC_NVLINK_L19_TX_PER_SEC = 215, - NVML_GPM_METRIC_NVLINK_L20_RX_PER_SEC = 216, - NVML_GPM_METRIC_NVLINK_L20_TX_PER_SEC = 217, - NVML_GPM_METRIC_NVLINK_L21_RX_PER_SEC = 218, - NVML_GPM_METRIC_NVLINK_L21_TX_PER_SEC = 219, - NVML_GPM_METRIC_NVLINK_L22_RX_PER_SEC = 220, - NVML_GPM_METRIC_NVLINK_L22_TX_PER_SEC = 221, - NVML_GPM_METRIC_NVLINK_L23_RX_PER_SEC = 222, - NVML_GPM_METRIC_NVLINK_L23_TX_PER_SEC = 223, - NVML_GPM_METRIC_NVLINK_L24_RX_PER_SEC = 224, - NVML_GPM_METRIC_NVLINK_L24_TX_PER_SEC = 225, - NVML_GPM_METRIC_NVLINK_L25_RX_PER_SEC = 226, - NVML_GPM_METRIC_NVLINK_L25_TX_PER_SEC = 227, - NVML_GPM_METRIC_NVLINK_L26_RX_PER_SEC = 228, - NVML_GPM_METRIC_NVLINK_L26_TX_PER_SEC = 229, - NVML_GPM_METRIC_NVLINK_L27_RX_PER_SEC = 230, - NVML_GPM_METRIC_NVLINK_L27_TX_PER_SEC = 231, - NVML_GPM_METRIC_NVLINK_L28_RX_PER_SEC = 232, - NVML_GPM_METRIC_NVLINK_L28_TX_PER_SEC = 233, - NVML_GPM_METRIC_NVLINK_L29_RX_PER_SEC = 234, - NVML_GPM_METRIC_NVLINK_L29_TX_PER_SEC = 235, - NVML_GPM_METRIC_NVLINK_L30_RX_PER_SEC = 236, - NVML_GPM_METRIC_NVLINK_L30_TX_PER_SEC = 237, - NVML_GPM_METRIC_NVLINK_L31_RX_PER_SEC = 238, - NVML_GPM_METRIC_NVLINK_L31_TX_PER_SEC = 239, - NVML_GPM_METRIC_NVLINK_L32_RX_PER_SEC = 240, - NVML_GPM_METRIC_NVLINK_L32_TX_PER_SEC = 241, - NVML_GPM_METRIC_NVLINK_L33_RX_PER_SEC = 242, - NVML_GPM_METRIC_NVLINK_L33_TX_PER_SEC = 243, - NVML_GPM_METRIC_NVLINK_L34_RX_PER_SEC = 244, - NVML_GPM_METRIC_NVLINK_L34_TX_PER_SEC = 245, - NVML_GPM_METRIC_NVLINK_L35_RX_PER_SEC = 246, - NVML_GPM_METRIC_NVLINK_L35_TX_PER_SEC = 247, + NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC = 100, //!< C2C total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC = 101, //!< C2C total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC = 102, //!< C2C data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC = 103, //!< C2C data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC = 104, //!< C2C link 0 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC = 105, //!< C2C link 0 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC = 106, //!< C2C link 0 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC = 107, //!< C2C link 0 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC = 108, //!< C2C link 1 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC = 109, //!< C2C link 1 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC = 110, //!< C2C link 1 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC = 111, //!< C2C link 1 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC = 112, //!< C2C link 2 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC = 113, //!< C2C link 2 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC = 114, //!< C2C link 2 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC = 115, //!< C2C link 2 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC = 116, //!< C2C link 3 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC = 117, //!< C2C link 3 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC = 118, //!< C2C link 3 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC = 119, //!< C2C link 3 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC = 120, //!< C2C link 4 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC = 121, //!< C2C link 4 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC = 122, //!< C2C link 4 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC = 123, //!< C2C link 4 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC = 124, //!< C2C link 5 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC = 125, //!< C2C link 5 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC = 126, //!< C2C link 5 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC = 127, //!< C2C link 5 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC = 128, //!< C2C link 6 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC = 129, //!< C2C link 6 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC = 130, //!< C2C link 6 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC = 131, //!< C2C link 6 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC = 132, //!< C2C link 7 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC = 133, //!< C2C link 7 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC = 134, //!< C2C link 7 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC = 135, //!< C2C link 7 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC = 136, //!< C2C link 8 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC = 137, //!< C2C link 8 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC = 138, //!< C2C link 8 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC = 139, //!< C2C link 8 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC = 140, //!< C2C link 9 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC = 141, //!< C2C link 9 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC = 142, //!< C2C link 9 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC = 143, //!< C2C link 9 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC = 144, //!< C2C link 10 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC = 145, //!< C2C link 10 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC = 146, //!< C2C link 10 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC = 147, //!< C2C link 10 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC = 148, //!< C2C link 11 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC = 149, //!< C2C link 11 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC = 150, //!< C2C link 11 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC = 151, //!< C2C link 11 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC = 152, //!< C2C link 12 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC = 153, //!< C2C link 12 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC = 154, //!< C2C link 12 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC = 155, //!< C2C link 12 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC = 156, //!< C2C link 13 total transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC = 157, //!< C2C link 13 total receive bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC = 158, //!< C2C link 13 data transmit bandwidth in MiB/sec + NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC = 159, //!< C2C link 13 data receive bandwidth in MiB/sec + NVML_GPM_METRIC_HOSTMEM_CACHE_HIT = 160, //!< Percentage of host memory cache hits. 0.0 - 100.0 + NVML_GPM_METRIC_HOSTMEM_CACHE_MISS = 161, //!< Percentage of host memory cache misses. 0.0 - 100.0 + NVML_GPM_METRIC_PEERMEM_CACHE_HIT = 162, //!< Percentage of peer memory cache hits. 0.0 - 100.0 + NVML_GPM_METRIC_PEERMEM_CACHE_MISS = 163, //!< Percentage of peer memory cache misses. 0.0 - 100.0 + NVML_GPM_METRIC_DRAM_CACHE_HIT = 164, //!< Percentage of DRAM cache hits. 0.0 - 100.0 + NVML_GPM_METRIC_DRAM_CACHE_MISS = 165, //!< Percentage of DRAM cache misses. 0.0 - 100.0 + NVML_GPM_METRIC_NVENC_0_UTIL = 166, //!< Percent utilization of NVENC 0. 0.0 - 100.0 + NVML_GPM_METRIC_NVENC_1_UTIL = 167, //!< Percent utilization of NVENC 1. 0.0 - 100.0 + NVML_GPM_METRIC_NVENC_2_UTIL = 168, //!< Percent utilization of NVENC 2. 0.0 - 100.0 + NVML_GPM_METRIC_NVENC_3_UTIL = 169, //!< Percent utilization of NVENC 3. 0.0 - 100.0 + NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED = 170, //!< Total context switch cycles elapsed for GR engine 0 + NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE = 171, //!< Active context switch cycles for GR engine 0 + NVML_GPM_METRIC_GR0_CTXSW_REQUESTS = 172, //!< Number of context switch requests for GR engine 0 + NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ = 173, //!< Average context switch cycles per request for GR engine 0 + NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT = 174, //!< Percentage of time GR engine 0 context switches were active. 0.0 - 100.0 + NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED = 175, //!< Total context switch cycles elapsed for GR engine 1 + NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE = 176, //!< Active context switch cycles for GR engine 1 + NVML_GPM_METRIC_GR1_CTXSW_REQUESTS = 177, //!< Number of context switch requests for GR engine 1 + NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ = 178, //!< Average context switch cycles per request for GR engine 1 + NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT = 179, //!< Percentage of time GR engine 1 context switches were active. 0.0 - 100.0 + NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED = 180, //!< Total context switch cycles elapsed for GR engine 2 + NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE = 181, //!< Active context switch cycles for GR engine 2 + NVML_GPM_METRIC_GR2_CTXSW_REQUESTS = 182, //!< Number of context switch requests for GR engine 2 + NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ = 183, //!< Average context switch cycles per request for GR engine 2 + NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT = 184, //!< Percentage of time GR engine 2 context switches were active. 0.0 - 100.0 + NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED = 185, //!< Total context switch cycles elapsed for GR engine 3 + NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE = 186, //!< Active context switch cycles for GR engine 3 + NVML_GPM_METRIC_GR3_CTXSW_REQUESTS = 187, //!< Number of context switch requests for GR engine 3 + NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ = 188, //!< Average context switch cycles per request for GR engine 3 + NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT = 189, //!< Percentage of time GR engine 3 context switches were active. 0.0 - 100.0 + NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED = 190, //!< Total context switch cycles elapsed for GR engine 4 + NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE = 191, //!< Active context switch cycles for GR engine 4 + NVML_GPM_METRIC_GR4_CTXSW_REQUESTS = 192, //!< Number of context switch requests for GR engine 4 + NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ = 193, //!< Average context switch cycles per request for GR engine 4 + NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT = 194, //!< Percentage of time GR engine 4 context switches were active. 0.0 - 100.0 + NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED = 195, //!< Total context switch cycles elapsed for GR engine 5 + NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE = 196, //!< Active context switch cycles for GR engine 5 + NVML_GPM_METRIC_GR5_CTXSW_REQUESTS = 197, //!< Number of context switch requests for GR engine 5 + NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ = 198, //!< Average context switch cycles per request for GR engine 5 + NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT = 199, //!< Percentage of time GR engine 5 context switches were active. 0.0 - 100.0 + NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED = 200, //!< Total context switch cycles elapsed for GR engine 6 + NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE = 201, //!< Active context switch cycles for GR engine 6 + NVML_GPM_METRIC_GR6_CTXSW_REQUESTS = 202, //!< Number of context switch requests for GR engine 6 + NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ = 203, //!< Average context switch cycles per request for GR engine 6 + NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT = 204, //!< Percentage of time GR engine 6 context switches were active. 0.0 - 100.0 + NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED = 205, //!< Total context switch cycles elapsed for GR engine 7 + NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE = 206, //!< Active context switch cycles for GR engine 7 + NVML_GPM_METRIC_GR7_CTXSW_REQUESTS = 207, //!< Number of context switch requests for GR engine 7 + NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ = 208, //!< Average context switch cycles per request for GR engine 7 + NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT = 209, //!< Percentage of time GR engine 7 context switches were active. 0.0 - 100.0 + NVML_GPM_METRIC_NVLINK_L18_RX_PER_SEC = 212, //!< NvLink read bandwidth for link 18 in MiB/sec + NVML_GPM_METRIC_NVLINK_L18_TX_PER_SEC = 213, //!< NvLink write bandwidth for link 18 in MiB/sec + NVML_GPM_METRIC_NVLINK_L19_RX_PER_SEC = 214, //!< NvLink read bandwidth for link 19 in MiB/sec + NVML_GPM_METRIC_NVLINK_L19_TX_PER_SEC = 215, //!< NvLink write bandwidth for link 19 in MiB/sec + NVML_GPM_METRIC_NVLINK_L20_RX_PER_SEC = 216, //!< NvLink read bandwidth for link 20 in MiB/sec + NVML_GPM_METRIC_NVLINK_L20_TX_PER_SEC = 217, //!< NvLink write bandwidth for link 20 in MiB/sec + NVML_GPM_METRIC_NVLINK_L21_RX_PER_SEC = 218, //!< NvLink read bandwidth for link 21 in MiB/sec + NVML_GPM_METRIC_NVLINK_L21_TX_PER_SEC = 219, //!< NvLink write bandwidth for link 21 in MiB/sec + NVML_GPM_METRIC_NVLINK_L22_RX_PER_SEC = 220, //!< NvLink read bandwidth for link 22 in MiB/sec + NVML_GPM_METRIC_NVLINK_L22_TX_PER_SEC = 221, //!< NvLink write bandwidth for link 22 in MiB/sec + NVML_GPM_METRIC_NVLINK_L23_RX_PER_SEC = 222, //!< NvLink read bandwidth for link 23 in MiB/sec + NVML_GPM_METRIC_NVLINK_L23_TX_PER_SEC = 223, //!< NvLink write bandwidth for link 23 in MiB/sec + NVML_GPM_METRIC_NVLINK_L24_RX_PER_SEC = 224, //!< NvLink read bandwidth for link 24 in MiB/sec + NVML_GPM_METRIC_NVLINK_L24_TX_PER_SEC = 225, //!< NvLink write bandwidth for link 24 in MiB/sec + NVML_GPM_METRIC_NVLINK_L25_RX_PER_SEC = 226, //!< NvLink read bandwidth for link 25 in MiB/sec + NVML_GPM_METRIC_NVLINK_L25_TX_PER_SEC = 227, //!< NvLink write bandwidth for link 25 in MiB/sec + NVML_GPM_METRIC_NVLINK_L26_RX_PER_SEC = 228, //!< NvLink read bandwidth for link 26 in MiB/sec + NVML_GPM_METRIC_NVLINK_L26_TX_PER_SEC = 229, //!< NvLink write bandwidth for link 26 in MiB/sec + NVML_GPM_METRIC_NVLINK_L27_RX_PER_SEC = 230, //!< NvLink read bandwidth for link 27 in MiB/sec + NVML_GPM_METRIC_NVLINK_L27_TX_PER_SEC = 231, //!< NvLink write bandwidth for link 27 in MiB/sec + NVML_GPM_METRIC_NVLINK_L28_RX_PER_SEC = 232, //!< NvLink read bandwidth for link 28 in MiB/sec + NVML_GPM_METRIC_NVLINK_L28_TX_PER_SEC = 233, //!< NvLink write bandwidth for link 28 in MiB/sec + NVML_GPM_METRIC_NVLINK_L29_RX_PER_SEC = 234, //!< NvLink read bandwidth for link 29 in MiB/sec + NVML_GPM_METRIC_NVLINK_L29_TX_PER_SEC = 235, //!< NvLink write bandwidth for link 29 in MiB/sec + NVML_GPM_METRIC_NVLINK_L30_RX_PER_SEC = 236, //!< NvLink read bandwidth for link 30 in MiB/sec + NVML_GPM_METRIC_NVLINK_L30_TX_PER_SEC = 237, //!< NvLink write bandwidth for link 30 in MiB/sec + NVML_GPM_METRIC_NVLINK_L31_RX_PER_SEC = 238, //!< NvLink read bandwidth for link 31 in MiB/sec + NVML_GPM_METRIC_NVLINK_L31_TX_PER_SEC = 239, //!< NvLink write bandwidth for link 31 in MiB/sec + NVML_GPM_METRIC_NVLINK_L32_RX_PER_SEC = 240, //!< NvLink read bandwidth for link 32 in MiB/sec + NVML_GPM_METRIC_NVLINK_L32_TX_PER_SEC = 241, //!< NvLink write bandwidth for link 32 in MiB/sec + NVML_GPM_METRIC_NVLINK_L33_RX_PER_SEC = 242, //!< NvLink read bandwidth for link 33 in MiB/sec + NVML_GPM_METRIC_NVLINK_L33_TX_PER_SEC = 243, //!< NvLink write bandwidth for link 33 in MiB/sec + NVML_GPM_METRIC_NVLINK_L34_RX_PER_SEC = 244, //!< NvLink read bandwidth for link 34 in MiB/sec + NVML_GPM_METRIC_NVLINK_L34_TX_PER_SEC = 245, //!< NvLink write bandwidth for link 34 in MiB/sec + NVML_GPM_METRIC_NVLINK_L35_RX_PER_SEC = 246, //!< NvLink read bandwidth for link 35 in MiB/sec + NVML_GPM_METRIC_NVLINK_L35_TX_PER_SEC = 247, //!< NvLink write bandwidth for link 35 in MiB/sec NVML_GPM_METRIC_SM_CYCLES_ELAPSED = 248, //!< The GPU's SM cycles elapsed since reboot NVML_GPM_METRIC_SM_CYCLES_ACTIVE = 249, //!< The GPU's SM activity since reboot NVML_GPM_METRIC_MMA_CYCLES_ACTIVE = 250, //!< The GPU's SM MMA tensor activity since reboot @@ -13731,8 +14701,8 @@ typedef enum NVML_GPM_METRIC_PCIE_RX = 256, //!< The PCIe RX traffic since reboot NVML_GPM_METRIC_INTEGER_CYCLES_ACTIVE = 257, //!< The GPU's SM integer activity since reboot NVML_GPM_METRIC_FP64_CYCLES_ACTIVE = 258, //!< The GPU's SM FP64 activity since reboot - NVML_GPM_METRIC_FP32_CYCLES_ACTIVE = 259, //!< The GPU's SM FP64 activity since reboot - NVML_GPM_METRIC_FP16_CYCLES_ACTIVE = 260, //!< The GPU's SM FP64 activity since reboot + NVML_GPM_METRIC_FP32_CYCLES_ACTIVE = 259, //!< The GPU's SM FP32 activity since reboot + NVML_GPM_METRIC_FP16_CYCLES_ACTIVE = 260, //!< The GPU's SM FP16 activity since reboot NVML_GPM_METRIC_NVLINK_L0_RX = 261, //!< NvLink read for link 0 in bytes since reboot NVML_GPM_METRIC_NVLINK_L0_TX = 262, //!< NvLink write for link 0 in bytes since reboot NVML_GPM_METRIC_NVLINK_L1_RX = 263, //!< NvLink read for link 1 in bytes since reboot @@ -13805,7 +14775,151 @@ typedef enum NVML_GPM_METRIC_NVLINK_L34_TX = 330, //!< NvLink write for link 34 in bytes since reboot NVML_GPM_METRIC_NVLINK_L35_RX = 331, //!< NvLink read for link 35 in bytes since reboot NVML_GPM_METRIC_NVLINK_L35_TX = 332, //!< NvLink write for link 35 in bytes since reboot - NVML_GPM_METRIC_MAX = 333, //!< Maximum value above +1 + NVML_GPM_METRIC_NVLINK_L36_RX = 333, //!< NvLink read for link 36 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L36_TX = 334, //!< NvLink write for link 36 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L37_RX = 335, //!< NvLink read for link 37 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L37_TX = 336, //!< NvLink write for link 37 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L38_RX = 337, //!< NvLink read for link 38 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L38_TX = 338, //!< NvLink write for link 38 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L39_RX = 339, //!< NvLink read for link 39 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L39_TX = 340, //!< NvLink write for link 39 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L40_RX = 341, //!< NvLink read for link 40 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L40_TX = 342, //!< NvLink write for link 40 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L41_RX = 343, //!< NvLink read for link 41 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L41_TX = 344, //!< NvLink write for link 41 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L42_RX = 345, //!< NvLink read for link 42 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L42_TX = 346, //!< NvLink write for link 42 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L43_RX = 347, //!< NvLink read for link 43 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L43_TX = 348, //!< NvLink write for link 43 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L44_RX = 349, //!< NvLink read for link 44 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L44_TX = 350, //!< NvLink write for link 44 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L45_RX = 351, //!< NvLink read for link 45 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L45_TX = 352, //!< NvLink write for link 45 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L46_RX = 353, //!< NvLink read for link 46 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L46_TX = 354, //!< NvLink write for link 46 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L47_RX = 355, //!< NvLink read for link 47 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L47_TX = 356, //!< NvLink write for link 47 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L48_RX = 357, //!< NvLink read for link 48 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L48_TX = 358, //!< NvLink write for link 48 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L49_RX = 359, //!< NvLink read for link 49 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L49_TX = 360, //!< NvLink write for link 49 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L50_RX = 361, //!< NvLink read for link 50 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L50_TX = 362, //!< NvLink write for link 50 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L51_RX = 363, //!< NvLink read for link 51 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L51_TX = 364, //!< NvLink write for link 51 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L52_RX = 365, //!< NvLink read for link 52 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L52_TX = 366, //!< NvLink write for link 52 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L53_RX = 367, //!< NvLink read for link 53 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L53_TX = 368, //!< NvLink write for link 53 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L54_RX = 369, //!< NvLink read for link 54 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L54_TX = 370, //!< NvLink write for link 54 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L55_RX = 371, //!< NvLink read for link 55 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L55_TX = 372, //!< NvLink write for link 55 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L56_RX = 373, //!< NvLink read for link 56 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L56_TX = 374, //!< NvLink write for link 56 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L57_RX = 375, //!< NvLink read for link 57 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L57_TX = 376, //!< NvLink write for link 57 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L58_RX = 377, //!< NvLink read for link 58 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L58_TX = 378, //!< NvLink write for link 58 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L59_RX = 379, //!< NvLink read for link 59 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L59_TX = 380, //!< NvLink write for link 59 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L60_RX = 381, //!< NvLink read for link 60 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L60_TX = 382, //!< NvLink write for link 60 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L61_RX = 383, //!< NvLink read for link 61 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L61_TX = 384, //!< NvLink write for link 61 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L62_RX = 385, //!< NvLink read for link 62 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L62_TX = 386, //!< NvLink write for link 62 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L63_RX = 387, //!< NvLink read for link 63 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L63_TX = 388, //!< NvLink write for link 63 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L64_RX = 389, //!< NvLink read for link 64 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L64_TX = 390, //!< NvLink write for link 64 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L65_RX = 391, //!< NvLink read for link 65 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L65_TX = 392, //!< NvLink write for link 65 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L66_RX = 393, //!< NvLink read for link 66 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L66_TX = 394, //!< NvLink write for link 66 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L67_RX = 395, //!< NvLink read for link 67 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L67_TX = 396, //!< NvLink write for link 67 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L68_RX = 397, //!< NvLink read for link 68 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L68_TX = 398, //!< NvLink write for link 68 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L69_RX = 399, //!< NvLink read for link 69 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L69_TX = 400, //!< NvLink write for link 69 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L70_RX = 401, //!< NvLink read for link 70 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L70_TX = 402, //!< NvLink write for link 70 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L71_RX = 403, //!< NvLink read for link 71 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L71_TX = 404, //!< NvLink write for link 71 in bytes since reboot + NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC = 405, //!< NvLink read bandwidth for link 36 in MiB/sec + NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC = 406, //!< NvLink write bandwidth for link 36 in MiB/sec + NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC = 407, //!< NvLink read bandwidth for link 37 in MiB/sec + NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC = 408, //!< NvLink write bandwidth for link 37 in MiB/sec + NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC = 409, //!< NvLink read bandwidth for link 38 in MiB/sec + NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC = 410, //!< NvLink write bandwidth for link 38 in MiB/sec + NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC = 411, //!< NvLink read bandwidth for link 39 in MiB/sec + NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC = 412, //!< NvLink write bandwidth for link 39 in MiB/sec + NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC = 413, //!< NvLink read bandwidth for link 40 in MiB/sec + NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC = 414, //!< NvLink write bandwidth for link 40 in MiB/sec + NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC = 415, //!< NvLink read bandwidth for link 41 in MiB/sec + NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC = 416, //!< NvLink write bandwidth for link 41 in MiB/sec + NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC = 417, //!< NvLink read bandwidth for link 42 in MiB/sec + NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC = 418, //!< NvLink write bandwidth for link 42 in MiB/sec + NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC = 419, //!< NvLink read bandwidth for link 43 in MiB/sec + NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC = 420, //!< NvLink write bandwidth for link 43 in MiB/sec + NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC = 421, //!< NvLink read bandwidth for link 44 in MiB/sec + NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC = 422, //!< NvLink write bandwidth for link 44 in MiB/sec + NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC = 423, //!< NvLink read bandwidth for link 45 in MiB/sec + NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC = 424, //!< NvLink write bandwidth for link 45 in MiB/sec + NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC = 425, //!< NvLink read bandwidth for link 46 in MiB/sec + NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC = 426, //!< NvLink write bandwidth for link 46 in MiB/sec + NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC = 427, //!< NvLink read bandwidth for link 47 in MiB/sec + NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC = 428, //!< NvLink write bandwidth for link 47 in MiB/sec + NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC = 429, //!< NvLink read bandwidth for link 48 in MiB/sec + NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC = 430, //!< NvLink write bandwidth for link 48 in MiB/sec + NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC = 431, //!< NvLink read bandwidth for link 49 in MiB/sec + NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC = 432, //!< NvLink write bandwidth for link 49 in MiB/sec + NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC = 433, //!< NvLink read bandwidth for link 50 in MiB/sec + NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC = 434, //!< NvLink write bandwidth for link 50 in MiB/sec + NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC = 435, //!< NvLink read bandwidth for link 51 in MiB/sec + NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC = 436, //!< NvLink write bandwidth for link 51 in MiB/sec + NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC = 437, //!< NvLink read bandwidth for link 52 in MiB/sec + NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC = 438, //!< NvLink write bandwidth for link 52 in MiB/sec + NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC = 439, //!< NvLink read bandwidth for link 53 in MiB/sec + NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC = 440, //!< NvLink write bandwidth for link 53 in MiB/sec + NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC = 441, //!< NvLink read bandwidth for link 54 in MiB/sec + NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC = 442, //!< NvLink write bandwidth for link 54 in MiB/sec + NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC = 443, //!< NvLink read bandwidth for link 55 in MiB/sec + NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC = 444, //!< NvLink write bandwidth for link 55 in MiB/sec + NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC = 445, //!< NvLink read bandwidth for link 56 in MiB/sec + NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC = 446, //!< NvLink write bandwidth for link 56 in MiB/sec + NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC = 447, //!< NvLink read bandwidth for link 57 in MiB/sec + NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC = 448, //!< NvLink write bandwidth for link 57 in MiB/sec + NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC = 449, //!< NvLink read bandwidth for link 58 in MiB/sec + NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC = 450, //!< NvLink write bandwidth for link 58 in MiB/sec + NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC = 451, //!< NvLink read bandwidth for link 59 in MiB/sec + NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC = 452, //!< NvLink write bandwidth for link 59 in MiB/sec + NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC = 453, //!< NvLink read bandwidth for link 60 in MiB/sec + NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC = 454, //!< NvLink write bandwidth for link 60 in MiB/sec + NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC = 455, //!< NvLink read bandwidth for link 61 in MiB/sec + NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC = 456, //!< NvLink write bandwidth for link 61 in MiB/sec + NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC = 457, //!< NvLink read bandwidth for link 62 in MiB/sec + NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC = 458, //!< NvLink write bandwidth for link 62 in MiB/sec + NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC = 459, //!< NvLink read bandwidth for link 63 in MiB/sec + NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC = 460, //!< NvLink write bandwidth for link 63 in MiB/sec + NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC = 461, //!< NvLink read bandwidth for link 64 in MiB/sec + NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC = 462, //!< NvLink write bandwidth for link 64 in MiB/sec + NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC = 463, //!< NvLink read bandwidth for link 65 in MiB/sec + NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC = 464, //!< NvLink write bandwidth for link 65 in MiB/sec + NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC = 465, //!< NvLink read bandwidth for link 66 in MiB/sec + NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC = 466, //!< NvLink write bandwidth for link 66 in MiB/sec + NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC = 467, //!< NvLink read bandwidth for link 67 in MiB/sec + NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC = 468, //!< NvLink write bandwidth for link 67 in MiB/sec + NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC = 469, //!< NvLink read bandwidth for link 68 in MiB/sec + NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC = 470, //!< NvLink write bandwidth for link 68 in MiB/sec + NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC = 471, //!< NvLink read bandwidth for link 69 in MiB/sec + NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC = 472, //!< NvLink write bandwidth for link 69 in MiB/sec + NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC = 473, //!< NvLink read bandwidth for link 70 in MiB/sec + NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC = 474, //!< NvLink write bandwidth for link 70 in MiB/sec + NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC = 475, //!< NvLink read bandwidth for link 71 in MiB/sec + NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC = 476, //!< NvLink write bandwidth for link 71 in MiB/sec + NVML_GPM_METRIC_MAX = 477, //!< Maximum value above +1 } nvmlGpmMetricId_t; /** @} */ // @defgroup nvmlGpmEnums @@ -14090,23 +15204,33 @@ typedef struct #define NVML_WORKLOAD_POWER_MAX_PROFILES (255) typedef enum { - NVML_POWER_PROFILE_MAX_P = 0, - NVML_POWER_PROFILE_MAX_Q = 1, - NVML_POWER_PROFILE_COMPUTE = 2, - NVML_POWER_PROFILE_MEMORY_BOUND = 3, - NVML_POWER_PROFILE_NETWORK = 4, - NVML_POWER_PROFILE_BALANCED = 5, - NVML_POWER_PROFILE_LLM_INFERENCE = 6, - NVML_POWER_PROFILE_LLM_TRAINING = 7, - NVML_POWER_PROFILE_RBM = 8, - NVML_POWER_PROFILE_DCPCIE = 9, - NVML_POWER_PROFILE_HMMA_SPARSE = 10, - NVML_POWER_PROFILE_HMMA_DENSE = 11, - NVML_POWER_PROFILE_SYNC_BALANCED = 12, - NVML_POWER_PROFILE_HPC = 13, - NVML_POWER_PROFILE_MIG = 14, - - NVML_POWER_PROFILE_MAX = 15, + NVML_POWER_PROFILE_MAX_P = 0, + NVML_POWER_PROFILE_MAX_Q = 1, + NVML_POWER_PROFILE_COMPUTE = 2, + NVML_POWER_PROFILE_MEMORY_BOUND = 3, + NVML_POWER_PROFILE_NETWORK = 4, + NVML_POWER_PROFILE_BALANCED = 5, + NVML_POWER_PROFILE_LLM_INFERENCE = 6, + NVML_POWER_PROFILE_LLM_TRAINING = 7, + NVML_POWER_PROFILE_RBM = 8, + NVML_POWER_PROFILE_DCPCIE = 9, + NVML_POWER_PROFILE_HMMA_SPARSE = 10, + NVML_POWER_PROFILE_HMMA_DENSE = 11, + NVML_POWER_PROFILE_SYNC_BALANCED = 12, + NVML_POWER_PROFILE_HPC = 13, + NVML_POWER_PROFILE_MIG = 14, + NVML_POWER_PROFILE_MAX_Q_1 = 15, + NVML_POWER_PROFILE_NETWORK_BOUND = 16, + NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE = 17, + NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE = 18, + NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE = 19, + NVML_POWER_PROFILE_TRAINING = 20, + NVML_POWER_PROFILE_INFERENCE = 21, + NVML_POWER_PROFILE_MAX_Q_2 = 22, + NVML_POWER_PROFILE_MAX_Q_3 = 23, + NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND = 24, + + NVML_POWER_PROFILE_MAX = 25, } nvmlPowerProfileType_t; /** @@ -14237,7 +15361,7 @@ nvmlReturn_t DECLDIR nvmlDeviceWorkloadPowerProfileGetCurrentProfiles(nvmlDevice * * For Blackwell &tm; or newer fully supported devices. * See \ref nvmlWorkloadPowerProfileRequestedProfiles_v1_t for more information on the struct. - * Reuqest one or more performance profiles be activated using the input bitmask + * Request one or more performance profiles be activated using the input bitmask * \a requestedProfilesMask, where each bit set corresponds to a supported bit from * the \a perfProfilesMask. These profiles will be added to existing list of * currently requested profiles. @@ -14293,7 +15417,7 @@ DEPRECATED(13.1) nvmlReturn_t DECLDIR nvmlDeviceWorkloadPowerProfileClearRequest * \a updateProfilesMask, where each bit set corresponds to a supported bit from * the \a perfProfilesMask. * The \a operation parameter specifies the operation to perform, see \ref nvmlPowerProfileOperation_t for more information. - * Requires root/admin permissions. + * Requires root/admin permissions or access to the NVIDIA WPPS capability. * * @param device The identifier of the target device * @param updateProfiles Reference to struct \a nvmlWorkloadPowerProfileUpdateProfiles_v1_t @@ -14511,6 +15635,45 @@ nvmlReturn_t DECLDIR nvmlDeviceGetRemappedRows_v2(nvmlDevice_t device, nvmlRemap **/ nvmlReturn_t DECLDIR nvmlDeviceSetRusdSettings_v1(nvmlDevice_t device, nvmlRusdSettings_v1_t *settings); +/** + * Structure to store bank remapper histogram + */ +typedef struct +{ + unsigned int maxSpareGroupCount; //!< Number of groups that have maximum spare. + unsigned int noSpareGroupCount; //!< Number of groups that have not spare. +} nvmlEccBankRemapperHistogram_v1_t; + +/** + * Structure to store bank remapper status + */ +typedef struct +{ + unsigned int activeRemappings; //!< Number of active remappings + unsigned int inactiveRemappings; //!< Number of inactive remappings + unsigned int bPending; //!< Whether there exists any pending bank remapping. 0 for no pending remapping, 1 for pending remapping. + nvmlEccBankRemapperHistogram_v1_t histogram; //!< Bank remapper histogram +} nvmlEccBankRemapperStatus_v1_t; + +/** + * Get bank remapper status. + * + * %RUBIN_OR_NEWER% + * + * @param device The identifier of the target device + * @param pBankRemapperStatus Reference to \a nvmlEccBankRemapperStatus_t + * + * @return + * - \ref NVML_SUCCESS if \a pBankRemapperStatus was populated + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a pBankRemapperStatus is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device doesn't support this feature + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceGetBankRemapperStatus_v1(nvmlDevice_t device, + nvmlEccBankRemapperStatus_v1_t *pBankRemapperStatus); + /** * NVML API versioning support */ diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/types_gen.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/types_gen.go index e2fd31165..7b398b513 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/types_gen.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/types_gen.go @@ -73,6 +73,19 @@ type Memory_v2 struct { Used uint64 } +type SetMemoryLimits_v1 struct { + NameSpace *int8 + SoftLimit uint64 + HardLimit uint64 +} + +type GetMemoryLimits_v1 struct { + NameSpace *int8 + SoftLimit uint64 + HardLimit uint64 + CurrentUsed uint64 +} + type BAR1Memory struct { Bar1Total uint64 Bar1Free uint64 @@ -254,6 +267,91 @@ type Pdi struct { Value uint64 } +type PmgrPwrTuple struct { + PwrmW uint32 +} + +type RailMetrics struct { + FreqkHz uint32 + UtilPct uint64 +} + +type CoreRailMetrics struct { + Rails [2]RailMetrics +} + +type PwrModelMetricsDlppm1xPerf struct { + Perfms uint32 +} + +type PwrModelMetricsDlppm1x struct { + BValid uint8 + CoreRail CoreRailMetrics + FbRail RailMetrics + TgpPwrTuple PmgrPwrTuple + PerfMetrics PwrModelMetricsDlppm1xPerf +} + +type PwrModelMetricsDlppm1xDramclkEstimates struct { + EstimatedMetrics [8]PwrModelMetricsDlppm1x + NumEstimatedMetrics uint8 + Pad_cgo_0 [7]byte +} + +type ObservedMetrics struct { + InitialDramclkEst [3]PwrModelMetricsDlppm1xDramclkEstimates + BValid uint8 + CoreRail CoreRailMetrics + FbRail RailMetrics + TgpPwrTuple PmgrPwrTuple + PerfMetrics PwrModelMetricsDlppm1xPerf +} + +type PerfMetricsDlppc2xSample struct { + ObservedMetrics ObservedMetrics +} + +type PwrModelMetricsSamplePfpp1x struct { + FreqkHz [16]uint32 + EstTgpPwrmW uint32 +} + +type PwrModelOperatingPointPfpp1x struct { + FreqkHz uint32 + PwrmW uint32 +} + +type PwrModelMetricsPfpp1x struct { + NumVfPoints uint8 + EstimatedMetrics [32]PwrModelMetricsSamplePfpp1x + BValid uint8 + MaxPerfPerWattPoint PwrModelOperatingPointPfpp1x + FmaxAtVmaxPoint PwrModelOperatingPointPfpp1x + TgpHeadroommW uint32 +} + +type PerfMetricsPfpp1xSample struct { + EstimatedMetrics PwrModelMetricsPfpp1x +} + +type PerfMetricControllerSample struct { + ControllerType uint32 + Pad_cgo_0 [4]byte + Data [2208]byte +} + +type PerfMetricsSample struct { + NumControllerData uint8 + Pad_cgo_0 [7]byte + ControllerData [4]PerfMetricControllerSample +} + +type PerfMetricsSamples_v1 struct { + NumSamples uint32 + Pad_cgo_0 [4]byte + Samples [13]PerfMetricsSample +} + type BBXTimeData_v1 struct { TimeRun uint32 } @@ -518,6 +616,14 @@ type PowerValue_v2 struct { PowerValueMw uint32 } +type AdaptiveTgpModeInfo_v1 struct { + InBandEnableRequest uint32 + FeatureAllowedByAdmin uint32 + AdminOverrideEnabled uint32 + EnablementStatus uint32 + AdjustedLimitMw uint32 +} + type nvmlVgpuTypeId uint32 type nvmlVgpuInstance uint32 @@ -976,6 +1082,18 @@ type nvmlEventData struct { ComputeInstanceId uint32 } +type OperationalEventContextInfo_v1 struct { + NvmlGpuOperationalEventContextType uint32 + SourceEventContextType uint32 + DataSize uint32 + DataFormatVersion uint16 + Pad_cgo_0 [2]byte +} + +type GpuOperationalEventContextLegacyXid_v1 struct { + XidCode uint32 +} + type SystemEventSet struct { Handle *_Ctype_struct_nvmlSystemEventSet_st } @@ -1200,6 +1318,56 @@ type GpuFabricInfoV struct { Pad_cgo_0 [3]byte } +type GpuFabricClique_v1 struct { + Type uint8 + Id uint32 +} + +type GpuFabricInfo_v4 struct { + ClusterUuid [16]uint8 + Status uint32 + Cliques [64]GpuFabricClique_v1 + NumCliques uint32 + State uint8 + HealthMask uint32 + HealthSummary uint8 + Pad_cgo_0 [3]byte +} + +type GpuOperationalEventConfig_v1 struct { + Uuid [96]int8 + MinLogLevel uint32 + MinSeverity uint32 +} + +type EventData_v2 struct { + Uuid [96]int8 + SourceModule [16]int8 + EventType uint64 + EventData uint64 + GroupCursor uint64 + InstanceId uint64 + TimestampUsec uint64 + TraceId uint64 + DataType uint32 + GpuInstanceId uint32 + ComputeInstanceId uint32 + Severity uint32 + CategoryId uint32 + ModuleEventCode uint32 + Scope uint32 + Originator uint32 + ModuleInstance uint32 + ChipletId uint32 + LogLevel uint32 + Attributes uint32 + GroupCperSize uint32 + GroupAttributes uint32 + GroupSize uint8 + GroupIndex uint8 + Pad_cgo_0 [6]byte +} + type CPERCursorHandle uint64 type CPERCursor_v1 struct { @@ -1279,6 +1447,12 @@ type NvlinkSetBwMode struct { Pad_cgo_0 [3]byte } +type NvlinkSetBwModeAsync_v1 struct { + BSetBest uint32 + BwMode uint32 + AsyncPollTimeoutMs uint32 +} + type NvLinkInfo_v1 struct { Version uint32 IsNvleEnabled uint32 @@ -1308,6 +1482,20 @@ type NvLinkInfo struct { FirmwareInfo NvlinkFirmwareInfo } +type NvlinkTelemetrySample_v1 struct { + LinkId uint32 + SampleType uint32 + SampleCount uint32 + Samples *uint64 + NvmlReturn uint32 + Pad_cgo_0 [4]byte +} + +type NvlinkTelemetrySamples_v1 struct { + TelemetryCount uint32 + TelemetrySamples *NvlinkTelemetrySample_v1 +} + type VgpuVersion struct { MinVersion uint32 MaxVersion uint32 @@ -1513,7 +1701,7 @@ type nvmlGpmMetricsGetType struct { NumMetrics uint32 Sample1 nvmlGpmSample Sample2 nvmlGpmSample - Metrics [333]GpmMetric + Metrics [477]GpmMetric } type GpmSupport struct { @@ -1613,3 +1801,15 @@ type PowerSmoothingState struct { Version uint32 State uint32 } + +type EccBankRemapperHistogram_v1 struct { + MaxSpareGroupCount uint32 + NoSpareGroupCount uint32 +} + +type EccBankRemapperStatus_v1 struct { + ActiveRemappings uint32 + InactiveRemappings uint32 + BPending uint32 + Histogram EccBankRemapperHistogram_v1 +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/vgpu.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/vgpu.go index 9ab649a42..0fc71f48f 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/vgpu.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/vgpu.go @@ -42,6 +42,19 @@ func (vgpuTypeId nvmlVgpuTypeId) GetClass() (string, Return) { return string(vgpuTypeClass[:clen(vgpuTypeClass)]), ret } +// nvml.VgpuTypeGetID() +// It doesn't have an NVML C API symbol because the base type `nvmlVgpuTypeId` +// is a non-exported type defined as `uint32`. When using the `VgpuTypeId` type, +// it is not possible to read the underlying value without using reflection. +// This method adds an idiomatic Go getter to access the type's value. +func (l *library) VgpuTypeGetID(vgpuTypeId VgpuTypeId) uint32 { + return vgpuTypeId.GetID() +} + +func (vgpuTypeId nvmlVgpuTypeId) GetID() uint32 { + return uint32(vgpuTypeId) +} + // nvml.VgpuTypeGetName() func (l *library) VgpuTypeGetName(vgpuTypeId VgpuTypeId) (string, Return) { return vgpuTypeId.GetName() diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/zz_generated.api.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/zz_generated.api.go index b11945b9a..c9910d031 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/zz_generated.api.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/zz_generated.api.go @@ -20,397 +20,413 @@ package nvml // The variables below represent package level methods from the library type. var ( - ComputeInstanceDestroy = libnvml.ComputeInstanceDestroy - ComputeInstanceGetInfo = libnvml.ComputeInstanceGetInfo - DeviceClearAccountingPids = libnvml.DeviceClearAccountingPids - DeviceClearCpuAffinity = libnvml.DeviceClearCpuAffinity - DeviceClearEccErrorCounts = libnvml.DeviceClearEccErrorCounts - DeviceClearFieldValues = libnvml.DeviceClearFieldValues - DeviceCreateGpuInstance = libnvml.DeviceCreateGpuInstance - DeviceCreateGpuInstanceWithPlacement = libnvml.DeviceCreateGpuInstanceWithPlacement - DeviceDiscoverGpus = libnvml.DeviceDiscoverGpus - DeviceFreezeNvLinkUtilizationCounter = libnvml.DeviceFreezeNvLinkUtilizationCounter - DeviceGetAPIRestriction = libnvml.DeviceGetAPIRestriction - DeviceGetAccountingBufferSize = libnvml.DeviceGetAccountingBufferSize - DeviceGetAccountingMode = libnvml.DeviceGetAccountingMode - DeviceGetAccountingPids = libnvml.DeviceGetAccountingPids - DeviceGetAccountingStats = libnvml.DeviceGetAccountingStats - DeviceGetAccountingStats_v2 = libnvml.DeviceGetAccountingStats_v2 - DeviceGetActiveVgpus = libnvml.DeviceGetActiveVgpus - DeviceGetAdaptiveClockInfoStatus = libnvml.DeviceGetAdaptiveClockInfoStatus - DeviceGetAddressingMode = libnvml.DeviceGetAddressingMode - DeviceGetApplicationsClock = libnvml.DeviceGetApplicationsClock - DeviceGetArchitecture = libnvml.DeviceGetArchitecture - DeviceGetAttributes = libnvml.DeviceGetAttributes - DeviceGetAutoBoostedClocksEnabled = libnvml.DeviceGetAutoBoostedClocksEnabled - DeviceGetBAR1MemoryInfo = libnvml.DeviceGetBAR1MemoryInfo - DeviceGetBBXTimeData_v1 = libnvml.DeviceGetBBXTimeData_v1 - DeviceGetBoardId = libnvml.DeviceGetBoardId - DeviceGetBoardPartNumber = libnvml.DeviceGetBoardPartNumber - DeviceGetBrand = libnvml.DeviceGetBrand - DeviceGetBridgeChipInfo = libnvml.DeviceGetBridgeChipInfo - DeviceGetBusType = libnvml.DeviceGetBusType - DeviceGetC2cModeInfoV = libnvml.DeviceGetC2cModeInfoV - DeviceGetCapabilities = libnvml.DeviceGetCapabilities - DeviceGetClkMonStatus = libnvml.DeviceGetClkMonStatus - DeviceGetClock = libnvml.DeviceGetClock - DeviceGetClockInfo = libnvml.DeviceGetClockInfo - DeviceGetClockOffsets = libnvml.DeviceGetClockOffsets - DeviceGetComputeInstanceId = libnvml.DeviceGetComputeInstanceId - DeviceGetComputeMode = libnvml.DeviceGetComputeMode - DeviceGetComputeRunningProcesses = libnvml.DeviceGetComputeRunningProcesses - DeviceGetConfComputeGpuAttestationReport = libnvml.DeviceGetConfComputeGpuAttestationReport - DeviceGetConfComputeGpuCertificate = libnvml.DeviceGetConfComputeGpuCertificate - DeviceGetConfComputeMemSizeInfo = libnvml.DeviceGetConfComputeMemSizeInfo - DeviceGetConfComputeProtectedMemoryUsage = libnvml.DeviceGetConfComputeProtectedMemoryUsage - DeviceGetCoolerInfo = libnvml.DeviceGetCoolerInfo - DeviceGetCount = libnvml.DeviceGetCount - DeviceGetCpuAffinity = libnvml.DeviceGetCpuAffinity - DeviceGetCpuAffinityWithinScope = libnvml.DeviceGetCpuAffinityWithinScope - DeviceGetCreatableVgpus = libnvml.DeviceGetCreatableVgpus - DeviceGetCudaComputeCapability = libnvml.DeviceGetCudaComputeCapability - DeviceGetCurrPcieLinkGeneration = libnvml.DeviceGetCurrPcieLinkGeneration - DeviceGetCurrPcieLinkWidth = libnvml.DeviceGetCurrPcieLinkWidth - DeviceGetCurrentClockFreqs = libnvml.DeviceGetCurrentClockFreqs - DeviceGetCurrentClocksEventReasons = libnvml.DeviceGetCurrentClocksEventReasons - DeviceGetCurrentClocksThrottleReasons = libnvml.DeviceGetCurrentClocksThrottleReasons - DeviceGetDecoderUtilization = libnvml.DeviceGetDecoderUtilization - DeviceGetDefaultApplicationsClock = libnvml.DeviceGetDefaultApplicationsClock - DeviceGetDefaultEccMode = libnvml.DeviceGetDefaultEccMode - DeviceGetDetailedEccErrors = libnvml.DeviceGetDetailedEccErrors - DeviceGetDeviceHandleFromMigDeviceHandle = libnvml.DeviceGetDeviceHandleFromMigDeviceHandle - DeviceGetDisplayActive = libnvml.DeviceGetDisplayActive - DeviceGetDisplayMode = libnvml.DeviceGetDisplayMode - DeviceGetDramEncryptionMode = libnvml.DeviceGetDramEncryptionMode - DeviceGetDriverModel = libnvml.DeviceGetDriverModel - DeviceGetDriverModel_v2 = libnvml.DeviceGetDriverModel_v2 - DeviceGetDynamicPstatesInfo = libnvml.DeviceGetDynamicPstatesInfo - DeviceGetEccMode = libnvml.DeviceGetEccMode - DeviceGetEncoderCapacity = libnvml.DeviceGetEncoderCapacity - DeviceGetEncoderSessions = libnvml.DeviceGetEncoderSessions - DeviceGetEncoderStats = libnvml.DeviceGetEncoderStats - DeviceGetEncoderUtilization = libnvml.DeviceGetEncoderUtilization - DeviceGetEnforcedPowerLimit = libnvml.DeviceGetEnforcedPowerLimit - DeviceGetFBCSessions = libnvml.DeviceGetFBCSessions - DeviceGetFBCStats = libnvml.DeviceGetFBCStats - DeviceGetFanControlPolicy_v2 = libnvml.DeviceGetFanControlPolicy_v2 - DeviceGetFanSpeed = libnvml.DeviceGetFanSpeed - DeviceGetFanSpeedRPM = libnvml.DeviceGetFanSpeedRPM - DeviceGetFanSpeed_v2 = libnvml.DeviceGetFanSpeed_v2 - DeviceGetFieldValues = libnvml.DeviceGetFieldValues - DeviceGetGpcClkMinMaxVfOffset = libnvml.DeviceGetGpcClkMinMaxVfOffset - DeviceGetGpcClkVfOffset = libnvml.DeviceGetGpcClkVfOffset - DeviceGetGpuFabricInfo = libnvml.DeviceGetGpuFabricInfo - DeviceGetGpuFabricInfoV = libnvml.DeviceGetGpuFabricInfoV - DeviceGetGpuInstanceById = libnvml.DeviceGetGpuInstanceById - DeviceGetGpuInstanceId = libnvml.DeviceGetGpuInstanceId - DeviceGetGpuInstancePossiblePlacements = libnvml.DeviceGetGpuInstancePossiblePlacements - DeviceGetGpuInstanceProfileInfo = libnvml.DeviceGetGpuInstanceProfileInfo - DeviceGetGpuInstanceProfileInfoByIdV = libnvml.DeviceGetGpuInstanceProfileInfoByIdV - DeviceGetGpuInstanceProfileInfoV = libnvml.DeviceGetGpuInstanceProfileInfoV - DeviceGetGpuInstanceRemainingCapacity = libnvml.DeviceGetGpuInstanceRemainingCapacity - DeviceGetGpuInstances = libnvml.DeviceGetGpuInstances - DeviceGetGpuMaxPcieLinkGeneration = libnvml.DeviceGetGpuMaxPcieLinkGeneration - DeviceGetGpuOperationMode = libnvml.DeviceGetGpuOperationMode - DeviceGetGraphicsRunningProcesses = libnvml.DeviceGetGraphicsRunningProcesses - DeviceGetGridLicensableFeatures = libnvml.DeviceGetGridLicensableFeatures - DeviceGetGspFirmwareMode = libnvml.DeviceGetGspFirmwareMode - DeviceGetGspFirmwareVersion = libnvml.DeviceGetGspFirmwareVersion - DeviceGetHandleByIndex = libnvml.DeviceGetHandleByIndex - DeviceGetHandleByPciBusId = libnvml.DeviceGetHandleByPciBusId - DeviceGetHandleBySerial = libnvml.DeviceGetHandleBySerial - DeviceGetHandleByUUID = libnvml.DeviceGetHandleByUUID - DeviceGetHandleByUUIDV = libnvml.DeviceGetHandleByUUIDV - DeviceGetHostVgpuMode = libnvml.DeviceGetHostVgpuMode - DeviceGetHostname_v1 = libnvml.DeviceGetHostname_v1 - DeviceGetIndex = libnvml.DeviceGetIndex - DeviceGetInforomConfigurationChecksum = libnvml.DeviceGetInforomConfigurationChecksum - DeviceGetInforomImageVersion = libnvml.DeviceGetInforomImageVersion - DeviceGetInforomVersion = libnvml.DeviceGetInforomVersion - DeviceGetIrqNum = libnvml.DeviceGetIrqNum - DeviceGetJpgUtilization = libnvml.DeviceGetJpgUtilization - DeviceGetLastBBXFlushTime = libnvml.DeviceGetLastBBXFlushTime - DeviceGetMPSComputeRunningProcesses = libnvml.DeviceGetMPSComputeRunningProcesses - DeviceGetMarginTemperature = libnvml.DeviceGetMarginTemperature - DeviceGetMaxClockInfo = libnvml.DeviceGetMaxClockInfo - DeviceGetMaxCustomerBoostClock = libnvml.DeviceGetMaxCustomerBoostClock - DeviceGetMaxMigDeviceCount = libnvml.DeviceGetMaxMigDeviceCount - DeviceGetMaxPcieLinkGeneration = libnvml.DeviceGetMaxPcieLinkGeneration - DeviceGetMaxPcieLinkWidth = libnvml.DeviceGetMaxPcieLinkWidth - DeviceGetMemClkMinMaxVfOffset = libnvml.DeviceGetMemClkMinMaxVfOffset - DeviceGetMemClkVfOffset = libnvml.DeviceGetMemClkVfOffset - DeviceGetMemoryAffinity = libnvml.DeviceGetMemoryAffinity - DeviceGetMemoryBusWidth = libnvml.DeviceGetMemoryBusWidth - DeviceGetMemoryErrorCounter = libnvml.DeviceGetMemoryErrorCounter - DeviceGetMemoryInfo = libnvml.DeviceGetMemoryInfo - DeviceGetMemoryInfo_v2 = libnvml.DeviceGetMemoryInfo_v2 - DeviceGetMigDeviceHandleByIndex = libnvml.DeviceGetMigDeviceHandleByIndex - DeviceGetMigMode = libnvml.DeviceGetMigMode - DeviceGetMinMaxClockOfPState = libnvml.DeviceGetMinMaxClockOfPState - DeviceGetMinMaxFanSpeed = libnvml.DeviceGetMinMaxFanSpeed - DeviceGetMinorNumber = libnvml.DeviceGetMinorNumber - DeviceGetModuleId = libnvml.DeviceGetModuleId - DeviceGetMultiGpuBoard = libnvml.DeviceGetMultiGpuBoard - DeviceGetName = libnvml.DeviceGetName - DeviceGetNumFans = libnvml.DeviceGetNumFans - DeviceGetNumGpuCores = libnvml.DeviceGetNumGpuCores - DeviceGetNumaNodeId = libnvml.DeviceGetNumaNodeId - DeviceGetNvLinkCapability = libnvml.DeviceGetNvLinkCapability - DeviceGetNvLinkErrorCounter = libnvml.DeviceGetNvLinkErrorCounter - DeviceGetNvLinkInfo = libnvml.DeviceGetNvLinkInfo - DeviceGetNvLinkRemoteDeviceType = libnvml.DeviceGetNvLinkRemoteDeviceType - DeviceGetNvLinkRemotePciInfo = libnvml.DeviceGetNvLinkRemotePciInfo - DeviceGetNvLinkState = libnvml.DeviceGetNvLinkState - DeviceGetNvLinkUtilizationControl = libnvml.DeviceGetNvLinkUtilizationControl - DeviceGetNvLinkUtilizationCounter = libnvml.DeviceGetNvLinkUtilizationCounter - DeviceGetNvLinkVersion = libnvml.DeviceGetNvLinkVersion - DeviceGetNvlinkBwMode = libnvml.DeviceGetNvlinkBwMode - DeviceGetNvlinkSupportedBwModes = libnvml.DeviceGetNvlinkSupportedBwModes - DeviceGetOfaUtilization = libnvml.DeviceGetOfaUtilization - DeviceGetP2PStatus = libnvml.DeviceGetP2PStatus - DeviceGetPciInfo = libnvml.DeviceGetPciInfo - DeviceGetPciInfoExt = libnvml.DeviceGetPciInfoExt - DeviceGetPcieLinkMaxSpeed = libnvml.DeviceGetPcieLinkMaxSpeed - DeviceGetPcieReplayCounter = libnvml.DeviceGetPcieReplayCounter - DeviceGetPcieSpeed = libnvml.DeviceGetPcieSpeed - DeviceGetPcieThroughput = libnvml.DeviceGetPcieThroughput - DeviceGetPdi = libnvml.DeviceGetPdi - DeviceGetPerformanceModes = libnvml.DeviceGetPerformanceModes - DeviceGetPerformanceState = libnvml.DeviceGetPerformanceState - DeviceGetPersistenceMode = libnvml.DeviceGetPersistenceMode - DeviceGetPgpuMetadataString = libnvml.DeviceGetPgpuMetadataString - DeviceGetPlatformInfo = libnvml.DeviceGetPlatformInfo - DeviceGetPowerManagementDefaultLimit = libnvml.DeviceGetPowerManagementDefaultLimit - DeviceGetPowerManagementLimit = libnvml.DeviceGetPowerManagementLimit - DeviceGetPowerManagementLimitConstraints = libnvml.DeviceGetPowerManagementLimitConstraints - DeviceGetPowerManagementMode = libnvml.DeviceGetPowerManagementMode - DeviceGetPowerMizerMode_v1 = libnvml.DeviceGetPowerMizerMode_v1 - DeviceGetPowerSource = libnvml.DeviceGetPowerSource - DeviceGetPowerState = libnvml.DeviceGetPowerState - DeviceGetPowerUsage = libnvml.DeviceGetPowerUsage - DeviceGetProcessUtilization = libnvml.DeviceGetProcessUtilization - DeviceGetProcessesUtilizationInfo = libnvml.DeviceGetProcessesUtilizationInfo - DeviceGetRemappedRows = libnvml.DeviceGetRemappedRows - DeviceGetRemappedRows_v2 = libnvml.DeviceGetRemappedRows_v2 - DeviceGetRepairStatus = libnvml.DeviceGetRepairStatus - DeviceGetRetiredPages = libnvml.DeviceGetRetiredPages - DeviceGetRetiredPagesPendingStatus = libnvml.DeviceGetRetiredPagesPendingStatus - DeviceGetRetiredPages_v2 = libnvml.DeviceGetRetiredPages_v2 - DeviceGetRowRemapperHistogram = libnvml.DeviceGetRowRemapperHistogram - DeviceGetRunningProcessDetailList = libnvml.DeviceGetRunningProcessDetailList - DeviceGetSamples = libnvml.DeviceGetSamples - DeviceGetSerial = libnvml.DeviceGetSerial - DeviceGetSramEccErrorStatus = libnvml.DeviceGetSramEccErrorStatus - DeviceGetSramUniqueUncorrectedEccErrorCounts = libnvml.DeviceGetSramUniqueUncorrectedEccErrorCounts - DeviceGetSupportedClocksEventReasons = libnvml.DeviceGetSupportedClocksEventReasons - DeviceGetSupportedClocksThrottleReasons = libnvml.DeviceGetSupportedClocksThrottleReasons - DeviceGetSupportedEventTypes = libnvml.DeviceGetSupportedEventTypes - DeviceGetSupportedGraphicsClocks = libnvml.DeviceGetSupportedGraphicsClocks - DeviceGetSupportedMemoryClocks = libnvml.DeviceGetSupportedMemoryClocks - DeviceGetSupportedPerformanceStates = libnvml.DeviceGetSupportedPerformanceStates - DeviceGetSupportedVgpus = libnvml.DeviceGetSupportedVgpus - DeviceGetTargetFanSpeed = libnvml.DeviceGetTargetFanSpeed - DeviceGetTemperature = libnvml.DeviceGetTemperature - DeviceGetTemperatureThreshold = libnvml.DeviceGetTemperatureThreshold - DeviceGetTemperatureV = libnvml.DeviceGetTemperatureV - DeviceGetThermalSettings = libnvml.DeviceGetThermalSettings - DeviceGetTopologyCommonAncestor = libnvml.DeviceGetTopologyCommonAncestor - DeviceGetTopologyNearestGpus = libnvml.DeviceGetTopologyNearestGpus - DeviceGetTotalEccErrors = libnvml.DeviceGetTotalEccErrors - DeviceGetTotalEnergyConsumption = libnvml.DeviceGetTotalEnergyConsumption - DeviceGetUUID = libnvml.DeviceGetUUID - DeviceGetUnrepairableMemoryFlag_v1 = libnvml.DeviceGetUnrepairableMemoryFlag_v1 - DeviceGetUtilizationRates = libnvml.DeviceGetUtilizationRates - DeviceGetVbiosVersion = libnvml.DeviceGetVbiosVersion - DeviceGetVgpuCapabilities = libnvml.DeviceGetVgpuCapabilities - DeviceGetVgpuHeterogeneousMode = libnvml.DeviceGetVgpuHeterogeneousMode - DeviceGetVgpuInstancesUtilizationInfo = libnvml.DeviceGetVgpuInstancesUtilizationInfo - DeviceGetVgpuMetadata = libnvml.DeviceGetVgpuMetadata - DeviceGetVgpuProcessUtilization = libnvml.DeviceGetVgpuProcessUtilization - DeviceGetVgpuProcessesUtilizationInfo = libnvml.DeviceGetVgpuProcessesUtilizationInfo - DeviceGetVgpuSchedulerCapabilities = libnvml.DeviceGetVgpuSchedulerCapabilities - DeviceGetVgpuSchedulerLog = libnvml.DeviceGetVgpuSchedulerLog - DeviceGetVgpuSchedulerLog_v2 = libnvml.DeviceGetVgpuSchedulerLog_v2 - DeviceGetVgpuSchedulerState = libnvml.DeviceGetVgpuSchedulerState - DeviceGetVgpuSchedulerState_v2 = libnvml.DeviceGetVgpuSchedulerState_v2 - DeviceGetVgpuTypeCreatablePlacements = libnvml.DeviceGetVgpuTypeCreatablePlacements - DeviceGetVgpuTypeSupportedPlacements = libnvml.DeviceGetVgpuTypeSupportedPlacements - DeviceGetVgpuUtilization = libnvml.DeviceGetVgpuUtilization - DeviceGetViolationStatus = libnvml.DeviceGetViolationStatus - DeviceGetVirtualizationMode = libnvml.DeviceGetVirtualizationMode - DeviceIsMigDeviceHandle = libnvml.DeviceIsMigDeviceHandle - DeviceModifyDrainState = libnvml.DeviceModifyDrainState - DeviceOnSameBoard = libnvml.DeviceOnSameBoard - DevicePowerSmoothingActivatePresetProfile = libnvml.DevicePowerSmoothingActivatePresetProfile - DevicePowerSmoothingSetState = libnvml.DevicePowerSmoothingSetState - DevicePowerSmoothingUpdatePresetProfileParam = libnvml.DevicePowerSmoothingUpdatePresetProfileParam - DeviceQueryDrainState = libnvml.DeviceQueryDrainState - DeviceReadPRMCounters_v1 = libnvml.DeviceReadPRMCounters_v1 - DeviceReadWritePRM_v1 = libnvml.DeviceReadWritePRM_v1 - DeviceRegisterEvents = libnvml.DeviceRegisterEvents - DeviceRemoveGpu = libnvml.DeviceRemoveGpu - DeviceRemoveGpu_v2 = libnvml.DeviceRemoveGpu_v2 - DeviceResetApplicationsClocks = libnvml.DeviceResetApplicationsClocks - DeviceResetGpuLockedClocks = libnvml.DeviceResetGpuLockedClocks - DeviceResetMemoryLockedClocks = libnvml.DeviceResetMemoryLockedClocks - DeviceResetNvLinkErrorCounters = libnvml.DeviceResetNvLinkErrorCounters - DeviceResetNvLinkUtilizationCounter = libnvml.DeviceResetNvLinkUtilizationCounter - DeviceSetAPIRestriction = libnvml.DeviceSetAPIRestriction - DeviceSetAccountingMode = libnvml.DeviceSetAccountingMode - DeviceSetApplicationsClocks = libnvml.DeviceSetApplicationsClocks - DeviceSetAutoBoostedClocksEnabled = libnvml.DeviceSetAutoBoostedClocksEnabled - DeviceSetClockOffsets = libnvml.DeviceSetClockOffsets - DeviceSetComputeMode = libnvml.DeviceSetComputeMode - DeviceSetConfComputeUnprotectedMemSize = libnvml.DeviceSetConfComputeUnprotectedMemSize - DeviceSetCpuAffinity = libnvml.DeviceSetCpuAffinity - DeviceSetDefaultAutoBoostedClocksEnabled = libnvml.DeviceSetDefaultAutoBoostedClocksEnabled - DeviceSetDefaultFanSpeed_v2 = libnvml.DeviceSetDefaultFanSpeed_v2 - DeviceSetDramEncryptionMode = libnvml.DeviceSetDramEncryptionMode - DeviceSetDriverModel = libnvml.DeviceSetDriverModel - DeviceSetEccMode = libnvml.DeviceSetEccMode - DeviceSetFanControlPolicy = libnvml.DeviceSetFanControlPolicy - DeviceSetFanSpeed_v2 = libnvml.DeviceSetFanSpeed_v2 - DeviceSetGpcClkVfOffset = libnvml.DeviceSetGpcClkVfOffset - DeviceSetGpuLockedClocks = libnvml.DeviceSetGpuLockedClocks - DeviceSetGpuOperationMode = libnvml.DeviceSetGpuOperationMode - DeviceSetHostname_v1 = libnvml.DeviceSetHostname_v1 - DeviceSetMemClkVfOffset = libnvml.DeviceSetMemClkVfOffset - DeviceSetMemoryLockedClocks = libnvml.DeviceSetMemoryLockedClocks - DeviceSetMigMode = libnvml.DeviceSetMigMode - DeviceSetNvLinkDeviceLowPowerThreshold = libnvml.DeviceSetNvLinkDeviceLowPowerThreshold - DeviceSetNvLinkUtilizationControl = libnvml.DeviceSetNvLinkUtilizationControl - DeviceSetNvlinkBwMode = libnvml.DeviceSetNvlinkBwMode - DeviceSetPersistenceMode = libnvml.DeviceSetPersistenceMode - DeviceSetPowerManagementLimit = libnvml.DeviceSetPowerManagementLimit - DeviceSetPowerManagementLimit_v2 = libnvml.DeviceSetPowerManagementLimit_v2 - DeviceSetRusdSettings_v1 = libnvml.DeviceSetRusdSettings_v1 - DeviceSetTemperatureThreshold = libnvml.DeviceSetTemperatureThreshold - DeviceSetVgpuCapabilities = libnvml.DeviceSetVgpuCapabilities - DeviceSetVgpuHeterogeneousMode = libnvml.DeviceSetVgpuHeterogeneousMode - DeviceSetVgpuSchedulerState = libnvml.DeviceSetVgpuSchedulerState - DeviceSetVgpuSchedulerState_v2 = libnvml.DeviceSetVgpuSchedulerState_v2 - DeviceSetVirtualizationMode = libnvml.DeviceSetVirtualizationMode - DeviceValidateInforom = libnvml.DeviceValidateInforom - DeviceVgpuForceGspUnload = libnvml.DeviceVgpuForceGspUnload - DeviceWorkloadPowerProfileClearRequestedProfiles = libnvml.DeviceWorkloadPowerProfileClearRequestedProfiles - DeviceWorkloadPowerProfileGetCurrentProfiles = libnvml.DeviceWorkloadPowerProfileGetCurrentProfiles - DeviceWorkloadPowerProfileGetProfilesInfo = libnvml.DeviceWorkloadPowerProfileGetProfilesInfo - DeviceWorkloadPowerProfileSetRequestedProfiles = libnvml.DeviceWorkloadPowerProfileSetRequestedProfiles - DeviceWorkloadPowerProfileUpdateProfiles_v1 = libnvml.DeviceWorkloadPowerProfileUpdateProfiles_v1 - ErrorString = libnvml.ErrorString - EventSetCreate = libnvml.EventSetCreate - EventSetFree = libnvml.EventSetFree - EventSetWait = libnvml.EventSetWait - Extensions = libnvml.Extensions - GetExcludedDeviceCount = libnvml.GetExcludedDeviceCount - GetExcludedDeviceInfoByIndex = libnvml.GetExcludedDeviceInfoByIndex - GetVgpuCompatibility = libnvml.GetVgpuCompatibility - GetVgpuDriverCapabilities = libnvml.GetVgpuDriverCapabilities - GetVgpuVersion = libnvml.GetVgpuVersion - GpmMetricsGet = libnvml.GpmMetricsGet - GpmMetricsGetV = libnvml.GpmMetricsGetV - GpmMigSampleGet = libnvml.GpmMigSampleGet - GpmQueryDeviceSupport = libnvml.GpmQueryDeviceSupport - GpmQueryDeviceSupportV = libnvml.GpmQueryDeviceSupportV - GpmQueryIfStreamingEnabled = libnvml.GpmQueryIfStreamingEnabled - GpmSampleAlloc = libnvml.GpmSampleAlloc - GpmSampleFree = libnvml.GpmSampleFree - GpmSampleGet = libnvml.GpmSampleGet - GpmSetStreamingEnabled = libnvml.GpmSetStreamingEnabled - GpuInstanceCreateComputeInstance = libnvml.GpuInstanceCreateComputeInstance - GpuInstanceCreateComputeInstanceWithPlacement = libnvml.GpuInstanceCreateComputeInstanceWithPlacement - GpuInstanceDestroy = libnvml.GpuInstanceDestroy - GpuInstanceGetActiveVgpus = libnvml.GpuInstanceGetActiveVgpus - GpuInstanceGetComputeInstanceById = libnvml.GpuInstanceGetComputeInstanceById - GpuInstanceGetComputeInstancePossiblePlacements = libnvml.GpuInstanceGetComputeInstancePossiblePlacements - GpuInstanceGetComputeInstanceProfileInfo = libnvml.GpuInstanceGetComputeInstanceProfileInfo - GpuInstanceGetComputeInstanceProfileInfoV = libnvml.GpuInstanceGetComputeInstanceProfileInfoV - GpuInstanceGetComputeInstanceRemainingCapacity = libnvml.GpuInstanceGetComputeInstanceRemainingCapacity - GpuInstanceGetComputeInstances = libnvml.GpuInstanceGetComputeInstances - GpuInstanceGetCreatableVgpus = libnvml.GpuInstanceGetCreatableVgpus - GpuInstanceGetInfo = libnvml.GpuInstanceGetInfo - GpuInstanceGetVgpuHeterogeneousMode = libnvml.GpuInstanceGetVgpuHeterogeneousMode - GpuInstanceGetVgpuSchedulerLog = libnvml.GpuInstanceGetVgpuSchedulerLog - GpuInstanceGetVgpuSchedulerLog_v2 = libnvml.GpuInstanceGetVgpuSchedulerLog_v2 - GpuInstanceGetVgpuSchedulerState = libnvml.GpuInstanceGetVgpuSchedulerState - GpuInstanceGetVgpuSchedulerState_v2 = libnvml.GpuInstanceGetVgpuSchedulerState_v2 - GpuInstanceGetVgpuTypeCreatablePlacements = libnvml.GpuInstanceGetVgpuTypeCreatablePlacements - GpuInstanceSetVgpuHeterogeneousMode = libnvml.GpuInstanceSetVgpuHeterogeneousMode - GpuInstanceSetVgpuSchedulerState = libnvml.GpuInstanceSetVgpuSchedulerState - GpuInstanceSetVgpuSchedulerState_v2 = libnvml.GpuInstanceSetVgpuSchedulerState_v2 - Init = libnvml.Init - InitWithFlags = libnvml.InitWithFlags - SetVgpuVersion = libnvml.SetVgpuVersion - Shutdown = libnvml.Shutdown - SystemEventSetCreate = libnvml.SystemEventSetCreate - SystemEventSetFree = libnvml.SystemEventSetFree - SystemEventSetWait = libnvml.SystemEventSetWait - SystemGetCPER_v1 = libnvml.SystemGetCPER_v1 - SystemGetConfComputeCapabilities = libnvml.SystemGetConfComputeCapabilities - SystemGetConfComputeGpusReadyState = libnvml.SystemGetConfComputeGpusReadyState - SystemGetConfComputeKeyRotationThresholdInfo = libnvml.SystemGetConfComputeKeyRotationThresholdInfo - SystemGetConfComputeSettings = libnvml.SystemGetConfComputeSettings - SystemGetConfComputeState = libnvml.SystemGetConfComputeState - SystemGetCudaDriverVersion = libnvml.SystemGetCudaDriverVersion - SystemGetCudaDriverVersion_v2 = libnvml.SystemGetCudaDriverVersion_v2 - SystemGetDriverBranch = libnvml.SystemGetDriverBranch - SystemGetDriverVersion = libnvml.SystemGetDriverVersion - SystemGetHicVersion = libnvml.SystemGetHicVersion - SystemGetNVMLVersion = libnvml.SystemGetNVMLVersion - SystemGetNvlinkBwMode = libnvml.SystemGetNvlinkBwMode - SystemGetProcessName = libnvml.SystemGetProcessName - SystemGetTopologyGpuSet = libnvml.SystemGetTopologyGpuSet - SystemRegisterEvents = libnvml.SystemRegisterEvents - SystemSetConfComputeGpusReadyState = libnvml.SystemSetConfComputeGpusReadyState - SystemSetConfComputeKeyRotationThresholdInfo = libnvml.SystemSetConfComputeKeyRotationThresholdInfo - SystemSetNvlinkBwMode = libnvml.SystemSetNvlinkBwMode - UnitGetCount = libnvml.UnitGetCount - UnitGetDevices = libnvml.UnitGetDevices - UnitGetFanSpeedInfo = libnvml.UnitGetFanSpeedInfo - UnitGetHandleByIndex = libnvml.UnitGetHandleByIndex - UnitGetLedState = libnvml.UnitGetLedState - UnitGetPsuInfo = libnvml.UnitGetPsuInfo - UnitGetTemperature = libnvml.UnitGetTemperature - UnitGetUnitInfo = libnvml.UnitGetUnitInfo - UnitSetLedState = libnvml.UnitSetLedState - VgpuInstanceClearAccountingPids = libnvml.VgpuInstanceClearAccountingPids - VgpuInstanceGetAccountingMode = libnvml.VgpuInstanceGetAccountingMode - VgpuInstanceGetAccountingPids = libnvml.VgpuInstanceGetAccountingPids - VgpuInstanceGetAccountingStats = libnvml.VgpuInstanceGetAccountingStats - VgpuInstanceGetEccMode = libnvml.VgpuInstanceGetEccMode - VgpuInstanceGetEncoderCapacity = libnvml.VgpuInstanceGetEncoderCapacity - VgpuInstanceGetEncoderSessions = libnvml.VgpuInstanceGetEncoderSessions - VgpuInstanceGetEncoderStats = libnvml.VgpuInstanceGetEncoderStats - VgpuInstanceGetFBCSessions = libnvml.VgpuInstanceGetFBCSessions - VgpuInstanceGetFBCStats = libnvml.VgpuInstanceGetFBCStats - VgpuInstanceGetFbUsage = libnvml.VgpuInstanceGetFbUsage - VgpuInstanceGetFrameRateLimit = libnvml.VgpuInstanceGetFrameRateLimit - VgpuInstanceGetGpuInstanceId = libnvml.VgpuInstanceGetGpuInstanceId - VgpuInstanceGetGpuPciId = libnvml.VgpuInstanceGetGpuPciId - VgpuInstanceGetLicenseInfo = libnvml.VgpuInstanceGetLicenseInfo - VgpuInstanceGetLicenseStatus = libnvml.VgpuInstanceGetLicenseStatus - VgpuInstanceGetMdevUUID = libnvml.VgpuInstanceGetMdevUUID - VgpuInstanceGetMetadata = libnvml.VgpuInstanceGetMetadata - VgpuInstanceGetRuntimeStateSize = libnvml.VgpuInstanceGetRuntimeStateSize - VgpuInstanceGetType = libnvml.VgpuInstanceGetType - VgpuInstanceGetUUID = libnvml.VgpuInstanceGetUUID - VgpuInstanceGetVmDriverVersion = libnvml.VgpuInstanceGetVmDriverVersion - VgpuInstanceGetVmID = libnvml.VgpuInstanceGetVmID - VgpuInstanceSetEncoderCapacity = libnvml.VgpuInstanceSetEncoderCapacity - VgpuTypeGetBAR1Info = libnvml.VgpuTypeGetBAR1Info - VgpuTypeGetCapabilities = libnvml.VgpuTypeGetCapabilities - VgpuTypeGetClass = libnvml.VgpuTypeGetClass - VgpuTypeGetDeviceID = libnvml.VgpuTypeGetDeviceID - VgpuTypeGetFrameRateLimit = libnvml.VgpuTypeGetFrameRateLimit - VgpuTypeGetFramebufferSize = libnvml.VgpuTypeGetFramebufferSize - VgpuTypeGetGpuInstanceProfileId = libnvml.VgpuTypeGetGpuInstanceProfileId - VgpuTypeGetLicense = libnvml.VgpuTypeGetLicense - VgpuTypeGetMaxInstances = libnvml.VgpuTypeGetMaxInstances - VgpuTypeGetMaxInstancesPerGpuInstance = libnvml.VgpuTypeGetMaxInstancesPerGpuInstance - VgpuTypeGetMaxInstancesPerVm = libnvml.VgpuTypeGetMaxInstancesPerVm - VgpuTypeGetName = libnvml.VgpuTypeGetName - VgpuTypeGetNumDisplayHeads = libnvml.VgpuTypeGetNumDisplayHeads - VgpuTypeGetResolution = libnvml.VgpuTypeGetResolution + ComputeInstanceDestroy = libnvml.ComputeInstanceDestroy + ComputeInstanceGetInfo = libnvml.ComputeInstanceGetInfo + DeviceClearAccountingPids = libnvml.DeviceClearAccountingPids + DeviceClearCpuAffinity = libnvml.DeviceClearCpuAffinity + DeviceClearEccErrorCounts = libnvml.DeviceClearEccErrorCounts + DeviceClearFieldValues = libnvml.DeviceClearFieldValues + DeviceCreateGpuInstance = libnvml.DeviceCreateGpuInstance + DeviceCreateGpuInstanceWithPlacement = libnvml.DeviceCreateGpuInstanceWithPlacement + DeviceDiscoverGpus = libnvml.DeviceDiscoverGpus + DeviceFreezeNvLinkUtilizationCounter = libnvml.DeviceFreezeNvLinkUtilizationCounter + DeviceGetAPIRestriction = libnvml.DeviceGetAPIRestriction + DeviceGetAccountingBufferSize = libnvml.DeviceGetAccountingBufferSize + DeviceGetAccountingMode = libnvml.DeviceGetAccountingMode + DeviceGetAccountingPids = libnvml.DeviceGetAccountingPids + DeviceGetAccountingStats = libnvml.DeviceGetAccountingStats + DeviceGetAccountingStats_v2 = libnvml.DeviceGetAccountingStats_v2 + DeviceGetActiveVgpus = libnvml.DeviceGetActiveVgpus + DeviceGetAdaptiveClockInfoStatus = libnvml.DeviceGetAdaptiveClockInfoStatus + DeviceGetAdaptiveTgpModeInfo_v1 = libnvml.DeviceGetAdaptiveTgpModeInfo_v1 + DeviceGetAddressingMode = libnvml.DeviceGetAddressingMode + DeviceGetApplicationsClock = libnvml.DeviceGetApplicationsClock + DeviceGetArchitecture = libnvml.DeviceGetArchitecture + DeviceGetAttributes = libnvml.DeviceGetAttributes + DeviceGetAutoBoostedClocksEnabled = libnvml.DeviceGetAutoBoostedClocksEnabled + DeviceGetBAR1MemoryInfo = libnvml.DeviceGetBAR1MemoryInfo + DeviceGetBBXTimeData_v1 = libnvml.DeviceGetBBXTimeData_v1 + DeviceGetBankRemapperStatus_v1 = libnvml.DeviceGetBankRemapperStatus_v1 + DeviceGetBoardId = libnvml.DeviceGetBoardId + DeviceGetBoardPartNumber = libnvml.DeviceGetBoardPartNumber + DeviceGetBrand = libnvml.DeviceGetBrand + DeviceGetBridgeChipInfo = libnvml.DeviceGetBridgeChipInfo + DeviceGetBusType = libnvml.DeviceGetBusType + DeviceGetC2cModeInfoV = libnvml.DeviceGetC2cModeInfoV + DeviceGetCapabilities = libnvml.DeviceGetCapabilities + DeviceGetClkMonStatus = libnvml.DeviceGetClkMonStatus + DeviceGetClock = libnvml.DeviceGetClock + DeviceGetClockInfo = libnvml.DeviceGetClockInfo + DeviceGetClockOffsets = libnvml.DeviceGetClockOffsets + DeviceGetComputeInstanceId = libnvml.DeviceGetComputeInstanceId + DeviceGetComputeMode = libnvml.DeviceGetComputeMode + DeviceGetComputeRunningProcesses = libnvml.DeviceGetComputeRunningProcesses + DeviceGetConfComputeGpuAttestationReport = libnvml.DeviceGetConfComputeGpuAttestationReport + DeviceGetConfComputeGpuCertificate = libnvml.DeviceGetConfComputeGpuCertificate + DeviceGetConfComputeMemSizeInfo = libnvml.DeviceGetConfComputeMemSizeInfo + DeviceGetConfComputeProtectedMemoryUsage = libnvml.DeviceGetConfComputeProtectedMemoryUsage + DeviceGetCoolerInfo = libnvml.DeviceGetCoolerInfo + DeviceGetCount = libnvml.DeviceGetCount + DeviceGetCpuAffinity = libnvml.DeviceGetCpuAffinity + DeviceGetCpuAffinityWithinScope = libnvml.DeviceGetCpuAffinityWithinScope + DeviceGetCreatableVgpus = libnvml.DeviceGetCreatableVgpus + DeviceGetCudaComputeCapability = libnvml.DeviceGetCudaComputeCapability + DeviceGetCurrPcieLinkGeneration = libnvml.DeviceGetCurrPcieLinkGeneration + DeviceGetCurrPcieLinkWidth = libnvml.DeviceGetCurrPcieLinkWidth + DeviceGetCurrentClockFreqs = libnvml.DeviceGetCurrentClockFreqs + DeviceGetCurrentClocksEventReasons = libnvml.DeviceGetCurrentClocksEventReasons + DeviceGetCurrentClocksThrottleReasons = libnvml.DeviceGetCurrentClocksThrottleReasons + DeviceGetDecoderUtilization = libnvml.DeviceGetDecoderUtilization + DeviceGetDefaultApplicationsClock = libnvml.DeviceGetDefaultApplicationsClock + DeviceGetDefaultEccMode = libnvml.DeviceGetDefaultEccMode + DeviceGetDetailedEccErrors = libnvml.DeviceGetDetailedEccErrors + DeviceGetDeviceHandleFromMigDeviceHandle = libnvml.DeviceGetDeviceHandleFromMigDeviceHandle + DeviceGetDisplayActive = libnvml.DeviceGetDisplayActive + DeviceGetDisplayMode = libnvml.DeviceGetDisplayMode + DeviceGetDramEncryptionMode = libnvml.DeviceGetDramEncryptionMode + DeviceGetDriverModel = libnvml.DeviceGetDriverModel + DeviceGetDriverModel_v2 = libnvml.DeviceGetDriverModel_v2 + DeviceGetDynamicPstatesInfo = libnvml.DeviceGetDynamicPstatesInfo + DeviceGetEccMode = libnvml.DeviceGetEccMode + DeviceGetEncoderCapacity = libnvml.DeviceGetEncoderCapacity + DeviceGetEncoderSessions = libnvml.DeviceGetEncoderSessions + DeviceGetEncoderStats = libnvml.DeviceGetEncoderStats + DeviceGetEncoderUtilization = libnvml.DeviceGetEncoderUtilization + DeviceGetEnforcedPowerLimit = libnvml.DeviceGetEnforcedPowerLimit + DeviceGetFBCSessions = libnvml.DeviceGetFBCSessions + DeviceGetFBCStats = libnvml.DeviceGetFBCStats + DeviceGetFanControlPolicy_v2 = libnvml.DeviceGetFanControlPolicy_v2 + DeviceGetFanSpeed = libnvml.DeviceGetFanSpeed + DeviceGetFanSpeedRPM = libnvml.DeviceGetFanSpeedRPM + DeviceGetFanSpeed_v2 = libnvml.DeviceGetFanSpeed_v2 + DeviceGetFieldValues = libnvml.DeviceGetFieldValues + DeviceGetGpcClkMinMaxVfOffset = libnvml.DeviceGetGpcClkMinMaxVfOffset + DeviceGetGpcClkVfOffset = libnvml.DeviceGetGpcClkVfOffset + DeviceGetGpuFabricInfo = libnvml.DeviceGetGpuFabricInfo + DeviceGetGpuFabricInfoV = libnvml.DeviceGetGpuFabricInfoV + DeviceGetGpuFabricInfo_v4 = libnvml.DeviceGetGpuFabricInfo_v4 + DeviceGetGpuInstanceById = libnvml.DeviceGetGpuInstanceById + DeviceGetGpuInstanceId = libnvml.DeviceGetGpuInstanceId + DeviceGetGpuInstancePossiblePlacements = libnvml.DeviceGetGpuInstancePossiblePlacements + DeviceGetGpuInstanceProfileInfo = libnvml.DeviceGetGpuInstanceProfileInfo + DeviceGetGpuInstanceProfileInfoByIdV = libnvml.DeviceGetGpuInstanceProfileInfoByIdV + DeviceGetGpuInstanceProfileInfoV = libnvml.DeviceGetGpuInstanceProfileInfoV + DeviceGetGpuInstanceRemainingCapacity = libnvml.DeviceGetGpuInstanceRemainingCapacity + DeviceGetGpuInstances = libnvml.DeviceGetGpuInstances + DeviceGetGpuMaxPcieLinkGeneration = libnvml.DeviceGetGpuMaxPcieLinkGeneration + DeviceGetGpuOperationMode = libnvml.DeviceGetGpuOperationMode + DeviceGetGraphicsRunningProcesses = libnvml.DeviceGetGraphicsRunningProcesses + DeviceGetGridLicensableFeatures = libnvml.DeviceGetGridLicensableFeatures + DeviceGetGspFirmwareMode = libnvml.DeviceGetGspFirmwareMode + DeviceGetGspFirmwareVersion = libnvml.DeviceGetGspFirmwareVersion + DeviceGetHandleByIndex = libnvml.DeviceGetHandleByIndex + DeviceGetHandleByPciBusId = libnvml.DeviceGetHandleByPciBusId + DeviceGetHandleBySerial = libnvml.DeviceGetHandleBySerial + DeviceGetHandleByUUID = libnvml.DeviceGetHandleByUUID + DeviceGetHandleByUUIDV = libnvml.DeviceGetHandleByUUIDV + DeviceGetHostVgpuMode = libnvml.DeviceGetHostVgpuMode + DeviceGetHostname_v1 = libnvml.DeviceGetHostname_v1 + DeviceGetIndex = libnvml.DeviceGetIndex + DeviceGetInforomConfigurationChecksum = libnvml.DeviceGetInforomConfigurationChecksum + DeviceGetInforomImageVersion = libnvml.DeviceGetInforomImageVersion + DeviceGetInforomVersion = libnvml.DeviceGetInforomVersion + DeviceGetIrqNum = libnvml.DeviceGetIrqNum + DeviceGetJpgUtilization = libnvml.DeviceGetJpgUtilization + DeviceGetLastBBXFlushTime = libnvml.DeviceGetLastBBXFlushTime + DeviceGetMPSComputeRunningProcesses = libnvml.DeviceGetMPSComputeRunningProcesses + DeviceGetMarginTemperature = libnvml.DeviceGetMarginTemperature + DeviceGetMaxClockInfo = libnvml.DeviceGetMaxClockInfo + DeviceGetMaxCustomerBoostClock = libnvml.DeviceGetMaxCustomerBoostClock + DeviceGetMaxMigDeviceCount = libnvml.DeviceGetMaxMigDeviceCount + DeviceGetMaxPcieLinkGeneration = libnvml.DeviceGetMaxPcieLinkGeneration + DeviceGetMaxPcieLinkWidth = libnvml.DeviceGetMaxPcieLinkWidth + DeviceGetMemClkMinMaxVfOffset = libnvml.DeviceGetMemClkMinMaxVfOffset + DeviceGetMemClkVfOffset = libnvml.DeviceGetMemClkVfOffset + DeviceGetMemoryAffinity = libnvml.DeviceGetMemoryAffinity + DeviceGetMemoryBusWidth = libnvml.DeviceGetMemoryBusWidth + DeviceGetMemoryErrorCounter = libnvml.DeviceGetMemoryErrorCounter + DeviceGetMemoryInfo = libnvml.DeviceGetMemoryInfo + DeviceGetMemoryInfo_v2 = libnvml.DeviceGetMemoryInfo_v2 + DeviceGetMemoryLimits_v1 = libnvml.DeviceGetMemoryLimits_v1 + DeviceGetMigDeviceHandleByIndex = libnvml.DeviceGetMigDeviceHandleByIndex + DeviceGetMigMode = libnvml.DeviceGetMigMode + DeviceGetMinMaxClockOfPState = libnvml.DeviceGetMinMaxClockOfPState + DeviceGetMinMaxFanSpeed = libnvml.DeviceGetMinMaxFanSpeed + DeviceGetMinorNumber = libnvml.DeviceGetMinorNumber + DeviceGetModuleId = libnvml.DeviceGetModuleId + DeviceGetMultiGpuBoard = libnvml.DeviceGetMultiGpuBoard + DeviceGetName = libnvml.DeviceGetName + DeviceGetNumFans = libnvml.DeviceGetNumFans + DeviceGetNumGpuCores = libnvml.DeviceGetNumGpuCores + DeviceGetNumaNodeId = libnvml.DeviceGetNumaNodeId + DeviceGetNvLinkCapability = libnvml.DeviceGetNvLinkCapability + DeviceGetNvLinkErrorCounter = libnvml.DeviceGetNvLinkErrorCounter + DeviceGetNvLinkInfo = libnvml.DeviceGetNvLinkInfo + DeviceGetNvLinkRemoteDeviceType = libnvml.DeviceGetNvLinkRemoteDeviceType + DeviceGetNvLinkRemotePciInfo = libnvml.DeviceGetNvLinkRemotePciInfo + DeviceGetNvLinkState = libnvml.DeviceGetNvLinkState + DeviceGetNvLinkTelemetrySamples_v1 = libnvml.DeviceGetNvLinkTelemetrySamples_v1 + DeviceGetNvLinkUtilizationControl = libnvml.DeviceGetNvLinkUtilizationControl + DeviceGetNvLinkUtilizationCounter = libnvml.DeviceGetNvLinkUtilizationCounter + DeviceGetNvLinkVersion = libnvml.DeviceGetNvLinkVersion + DeviceGetNvlinkBwMode = libnvml.DeviceGetNvlinkBwMode + DeviceGetNvlinkSupportedBwModes = libnvml.DeviceGetNvlinkSupportedBwModes + DeviceGetOfaUtilization = libnvml.DeviceGetOfaUtilization + DeviceGetP2PStatus = libnvml.DeviceGetP2PStatus + DeviceGetPciInfo = libnvml.DeviceGetPciInfo + DeviceGetPciInfoExt = libnvml.DeviceGetPciInfoExt + DeviceGetPcieLinkMaxSpeed = libnvml.DeviceGetPcieLinkMaxSpeed + DeviceGetPcieReplayCounter = libnvml.DeviceGetPcieReplayCounter + DeviceGetPcieSpeed = libnvml.DeviceGetPcieSpeed + DeviceGetPcieThroughput = libnvml.DeviceGetPcieThroughput + DeviceGetPdi = libnvml.DeviceGetPdi + DeviceGetPerformanceModes = libnvml.DeviceGetPerformanceModes + DeviceGetPerformanceState = libnvml.DeviceGetPerformanceState + DeviceGetPersistenceMode = libnvml.DeviceGetPersistenceMode + DeviceGetPgpuMetadataString = libnvml.DeviceGetPgpuMetadataString + DeviceGetPlatformInfo = libnvml.DeviceGetPlatformInfo + DeviceGetPowerManagementDefaultLimit = libnvml.DeviceGetPowerManagementDefaultLimit + DeviceGetPowerManagementLimit = libnvml.DeviceGetPowerManagementLimit + DeviceGetPowerManagementLimitConstraints = libnvml.DeviceGetPowerManagementLimitConstraints + DeviceGetPowerManagementMode = libnvml.DeviceGetPowerManagementMode + DeviceGetPowerMizerMode_v1 = libnvml.DeviceGetPowerMizerMode_v1 + DeviceGetPowerSource = libnvml.DeviceGetPowerSource + DeviceGetPowerState = libnvml.DeviceGetPowerState + DeviceGetPowerUsage = libnvml.DeviceGetPowerUsage + DeviceGetProcessUtilization = libnvml.DeviceGetProcessUtilization + DeviceGetProcessesUtilizationInfo = libnvml.DeviceGetProcessesUtilizationInfo + DeviceGetRemappedRows = libnvml.DeviceGetRemappedRows + DeviceGetRemappedRows_v2 = libnvml.DeviceGetRemappedRows_v2 + DeviceGetRepairStatus = libnvml.DeviceGetRepairStatus + DeviceGetRetiredPages = libnvml.DeviceGetRetiredPages + DeviceGetRetiredPagesPendingStatus = libnvml.DeviceGetRetiredPagesPendingStatus + DeviceGetRetiredPages_v2 = libnvml.DeviceGetRetiredPages_v2 + DeviceGetRowRemapperHistogram = libnvml.DeviceGetRowRemapperHistogram + DeviceGetRunningProcessDetailList = libnvml.DeviceGetRunningProcessDetailList + DeviceGetSamples = libnvml.DeviceGetSamples + DeviceGetSerial = libnvml.DeviceGetSerial + DeviceGetSramEccErrorStatus = libnvml.DeviceGetSramEccErrorStatus + DeviceGetSramUniqueUncorrectedEccErrorCounts = libnvml.DeviceGetSramUniqueUncorrectedEccErrorCounts + DeviceGetSupportedClocksEventReasons = libnvml.DeviceGetSupportedClocksEventReasons + DeviceGetSupportedClocksThrottleReasons = libnvml.DeviceGetSupportedClocksThrottleReasons + DeviceGetSupportedEventTypes = libnvml.DeviceGetSupportedEventTypes + DeviceGetSupportedGraphicsClocks = libnvml.DeviceGetSupportedGraphicsClocks + DeviceGetSupportedMemoryClocks = libnvml.DeviceGetSupportedMemoryClocks + DeviceGetSupportedPerformanceStates = libnvml.DeviceGetSupportedPerformanceStates + DeviceGetSupportedVgpus = libnvml.DeviceGetSupportedVgpus + DeviceGetTargetFanSpeed = libnvml.DeviceGetTargetFanSpeed + DeviceGetTemperature = libnvml.DeviceGetTemperature + DeviceGetTemperatureThreshold = libnvml.DeviceGetTemperatureThreshold + DeviceGetTemperatureV = libnvml.DeviceGetTemperatureV + DeviceGetThermalSettings = libnvml.DeviceGetThermalSettings + DeviceGetTopologyCommonAncestor = libnvml.DeviceGetTopologyCommonAncestor + DeviceGetTopologyNearestGpus = libnvml.DeviceGetTopologyNearestGpus + DeviceGetTotalEccErrors = libnvml.DeviceGetTotalEccErrors + DeviceGetTotalEnergyConsumption = libnvml.DeviceGetTotalEnergyConsumption + DeviceGetUUID = libnvml.DeviceGetUUID + DeviceGetUnrepairableMemoryFlag_v1 = libnvml.DeviceGetUnrepairableMemoryFlag_v1 + DeviceGetUtilizationRates = libnvml.DeviceGetUtilizationRates + DeviceGetVbiosVersion = libnvml.DeviceGetVbiosVersion + DeviceGetVgpuCapabilities = libnvml.DeviceGetVgpuCapabilities + DeviceGetVgpuHeterogeneousMode = libnvml.DeviceGetVgpuHeterogeneousMode + DeviceGetVgpuInstancesUtilizationInfo = libnvml.DeviceGetVgpuInstancesUtilizationInfo + DeviceGetVgpuMetadata = libnvml.DeviceGetVgpuMetadata + DeviceGetVgpuProcessUtilization = libnvml.DeviceGetVgpuProcessUtilization + DeviceGetVgpuProcessesUtilizationInfo = libnvml.DeviceGetVgpuProcessesUtilizationInfo + DeviceGetVgpuSchedulerCapabilities = libnvml.DeviceGetVgpuSchedulerCapabilities + DeviceGetVgpuSchedulerLog = libnvml.DeviceGetVgpuSchedulerLog + DeviceGetVgpuSchedulerLog_v2 = libnvml.DeviceGetVgpuSchedulerLog_v2 + DeviceGetVgpuSchedulerState = libnvml.DeviceGetVgpuSchedulerState + DeviceGetVgpuSchedulerState_v2 = libnvml.DeviceGetVgpuSchedulerState_v2 + DeviceGetVgpuTypeCreatablePlacements = libnvml.DeviceGetVgpuTypeCreatablePlacements + DeviceGetVgpuTypeSupportedPlacements = libnvml.DeviceGetVgpuTypeSupportedPlacements + DeviceGetVgpuUtilization = libnvml.DeviceGetVgpuUtilization + DeviceGetViolationStatus = libnvml.DeviceGetViolationStatus + DeviceGetVirtualizationMode = libnvml.DeviceGetVirtualizationMode + DeviceIsMigDeviceHandle = libnvml.DeviceIsMigDeviceHandle + DeviceModifyDrainState = libnvml.DeviceModifyDrainState + DeviceOnSameBoard = libnvml.DeviceOnSameBoard + DevicePerfMetricsGetSamples_v1 = libnvml.DevicePerfMetricsGetSamples_v1 + DevicePowerSmoothingActivatePresetProfile = libnvml.DevicePowerSmoothingActivatePresetProfile + DevicePowerSmoothingSetState = libnvml.DevicePowerSmoothingSetState + DevicePowerSmoothingUpdatePresetProfileParam = libnvml.DevicePowerSmoothingUpdatePresetProfileParam + DeviceQueryDrainState = libnvml.DeviceQueryDrainState + DeviceReadPRMCounters_v1 = libnvml.DeviceReadPRMCounters_v1 + DeviceReadWritePRM_v1 = libnvml.DeviceReadWritePRM_v1 + DeviceRegisterEvents = libnvml.DeviceRegisterEvents + DeviceRemoveGpu = libnvml.DeviceRemoveGpu + DeviceRemoveGpu_v2 = libnvml.DeviceRemoveGpu_v2 + DeviceResetApplicationsClocks = libnvml.DeviceResetApplicationsClocks + DeviceResetGpuLockedClocks = libnvml.DeviceResetGpuLockedClocks + DeviceResetMemoryLockedClocks = libnvml.DeviceResetMemoryLockedClocks + DeviceResetNvLinkErrorCounters = libnvml.DeviceResetNvLinkErrorCounters + DeviceResetNvLinkUtilizationCounter = libnvml.DeviceResetNvLinkUtilizationCounter + DeviceSetAPIRestriction = libnvml.DeviceSetAPIRestriction + DeviceSetAccountingMode = libnvml.DeviceSetAccountingMode + DeviceSetAdaptiveTgpMode_v1 = libnvml.DeviceSetAdaptiveTgpMode_v1 + DeviceSetApplicationsClocks = libnvml.DeviceSetApplicationsClocks + DeviceSetAutoBoostedClocksEnabled = libnvml.DeviceSetAutoBoostedClocksEnabled + DeviceSetClockOffsets = libnvml.DeviceSetClockOffsets + DeviceSetComputeMode = libnvml.DeviceSetComputeMode + DeviceSetConfComputeUnprotectedMemSize = libnvml.DeviceSetConfComputeUnprotectedMemSize + DeviceSetCpuAffinity = libnvml.DeviceSetCpuAffinity + DeviceSetDefaultAutoBoostedClocksEnabled = libnvml.DeviceSetDefaultAutoBoostedClocksEnabled + DeviceSetDefaultFanSpeed_v2 = libnvml.DeviceSetDefaultFanSpeed_v2 + DeviceSetDramEncryptionMode = libnvml.DeviceSetDramEncryptionMode + DeviceSetDriverModel = libnvml.DeviceSetDriverModel + DeviceSetEccMode = libnvml.DeviceSetEccMode + DeviceSetFanControlPolicy = libnvml.DeviceSetFanControlPolicy + DeviceSetFanSpeed_v2 = libnvml.DeviceSetFanSpeed_v2 + DeviceSetGpcClkVfOffset = libnvml.DeviceSetGpcClkVfOffset + DeviceSetGpuLockedClocks = libnvml.DeviceSetGpuLockedClocks + DeviceSetGpuOperationMode = libnvml.DeviceSetGpuOperationMode + DeviceSetHostname_v1 = libnvml.DeviceSetHostname_v1 + DeviceSetMemClkVfOffset = libnvml.DeviceSetMemClkVfOffset + DeviceSetMemoryLimits_v1 = libnvml.DeviceSetMemoryLimits_v1 + DeviceSetMemoryLockedClocks = libnvml.DeviceSetMemoryLockedClocks + DeviceSetMigMode = libnvml.DeviceSetMigMode + DeviceSetNvLinkDeviceLowPowerThreshold = libnvml.DeviceSetNvLinkDeviceLowPowerThreshold + DeviceSetNvLinkUtilizationControl = libnvml.DeviceSetNvLinkUtilizationControl + DeviceSetNvlinkBwMode = libnvml.DeviceSetNvlinkBwMode + DeviceSetNvlinkBwModeAsync_v1 = libnvml.DeviceSetNvlinkBwModeAsync_v1 + DeviceSetPersistenceMode = libnvml.DeviceSetPersistenceMode + DeviceSetPowerManagementLimit = libnvml.DeviceSetPowerManagementLimit + DeviceSetPowerManagementLimit_v2 = libnvml.DeviceSetPowerManagementLimit_v2 + DeviceSetRusdSettings_v1 = libnvml.DeviceSetRusdSettings_v1 + DeviceSetTemperatureThreshold = libnvml.DeviceSetTemperatureThreshold + DeviceSetVgpuCapabilities = libnvml.DeviceSetVgpuCapabilities + DeviceSetVgpuHeterogeneousMode = libnvml.DeviceSetVgpuHeterogeneousMode + DeviceSetVgpuSchedulerState = libnvml.DeviceSetVgpuSchedulerState + DeviceSetVgpuSchedulerState_v2 = libnvml.DeviceSetVgpuSchedulerState_v2 + DeviceSetVirtualizationMode = libnvml.DeviceSetVirtualizationMode + DeviceValidateInforom = libnvml.DeviceValidateInforom + DeviceVgpuForceGspUnload = libnvml.DeviceVgpuForceGspUnload + DeviceWorkloadPowerProfileClearRequestedProfiles = libnvml.DeviceWorkloadPowerProfileClearRequestedProfiles + DeviceWorkloadPowerProfileGetCurrentProfiles = libnvml.DeviceWorkloadPowerProfileGetCurrentProfiles + DeviceWorkloadPowerProfileGetProfilesInfo = libnvml.DeviceWorkloadPowerProfileGetProfilesInfo + DeviceWorkloadPowerProfileSetRequestedProfiles = libnvml.DeviceWorkloadPowerProfileSetRequestedProfiles + DeviceWorkloadPowerProfileUpdateProfiles_v1 = libnvml.DeviceWorkloadPowerProfileUpdateProfiles_v1 + ErrorString = libnvml.ErrorString + EventSetCreate = libnvml.EventSetCreate + EventSetFree = libnvml.EventSetFree + EventSetGetContextCount_v1 = libnvml.EventSetGetContextCount_v1 + EventSetGetContextData_v1 = libnvml.EventSetGetContextData_v1 + EventSetGetContextInfo_v1 = libnvml.EventSetGetContextInfo_v1 + EventSetGetGpuOperationalEventContextLegacyXid_v1 = libnvml.EventSetGetGpuOperationalEventContextLegacyXid_v1 + EventSetRegisterGpuOperationalEvents_v1 = libnvml.EventSetRegisterGpuOperationalEvents_v1 + EventSetWait = libnvml.EventSetWait + EventSetWait_v3 = libnvml.EventSetWait_v3 + Extensions = libnvml.Extensions + GetExcludedDeviceCount = libnvml.GetExcludedDeviceCount + GetExcludedDeviceInfoByIndex = libnvml.GetExcludedDeviceInfoByIndex + GetVgpuCompatibility = libnvml.GetVgpuCompatibility + GetVgpuDriverCapabilities = libnvml.GetVgpuDriverCapabilities + GetVgpuVersion = libnvml.GetVgpuVersion + GpmMetricsGet = libnvml.GpmMetricsGet + GpmMetricsGetV = libnvml.GpmMetricsGetV + GpmMigSampleGet = libnvml.GpmMigSampleGet + GpmQueryDeviceSupport = libnvml.GpmQueryDeviceSupport + GpmQueryDeviceSupportV = libnvml.GpmQueryDeviceSupportV + GpmQueryIfStreamingEnabled = libnvml.GpmQueryIfStreamingEnabled + GpmSampleAlloc = libnvml.GpmSampleAlloc + GpmSampleFree = libnvml.GpmSampleFree + GpmSampleGet = libnvml.GpmSampleGet + GpmSetStreamingEnabled = libnvml.GpmSetStreamingEnabled + GpuInstanceCreateComputeInstance = libnvml.GpuInstanceCreateComputeInstance + GpuInstanceCreateComputeInstanceWithPlacement = libnvml.GpuInstanceCreateComputeInstanceWithPlacement + GpuInstanceDestroy = libnvml.GpuInstanceDestroy + GpuInstanceGetActiveVgpus = libnvml.GpuInstanceGetActiveVgpus + GpuInstanceGetComputeInstanceById = libnvml.GpuInstanceGetComputeInstanceById + GpuInstanceGetComputeInstancePossiblePlacements = libnvml.GpuInstanceGetComputeInstancePossiblePlacements + GpuInstanceGetComputeInstanceProfileInfo = libnvml.GpuInstanceGetComputeInstanceProfileInfo + GpuInstanceGetComputeInstanceProfileInfoV = libnvml.GpuInstanceGetComputeInstanceProfileInfoV + GpuInstanceGetComputeInstanceRemainingCapacity = libnvml.GpuInstanceGetComputeInstanceRemainingCapacity + GpuInstanceGetComputeInstances = libnvml.GpuInstanceGetComputeInstances + GpuInstanceGetCreatableVgpus = libnvml.GpuInstanceGetCreatableVgpus + GpuInstanceGetInfo = libnvml.GpuInstanceGetInfo + GpuInstanceGetVgpuHeterogeneousMode = libnvml.GpuInstanceGetVgpuHeterogeneousMode + GpuInstanceGetVgpuSchedulerLog = libnvml.GpuInstanceGetVgpuSchedulerLog + GpuInstanceGetVgpuSchedulerLog_v2 = libnvml.GpuInstanceGetVgpuSchedulerLog_v2 + GpuInstanceGetVgpuSchedulerState = libnvml.GpuInstanceGetVgpuSchedulerState + GpuInstanceGetVgpuSchedulerState_v2 = libnvml.GpuInstanceGetVgpuSchedulerState_v2 + GpuInstanceGetVgpuTypeCreatablePlacements = libnvml.GpuInstanceGetVgpuTypeCreatablePlacements + GpuInstanceSetVgpuHeterogeneousMode = libnvml.GpuInstanceSetVgpuHeterogeneousMode + GpuInstanceSetVgpuSchedulerState = libnvml.GpuInstanceSetVgpuSchedulerState + GpuInstanceSetVgpuSchedulerState_v2 = libnvml.GpuInstanceSetVgpuSchedulerState_v2 + Init = libnvml.Init + InitWithFlags = libnvml.InitWithFlags + SetVgpuVersion = libnvml.SetVgpuVersion + Shutdown = libnvml.Shutdown + SystemEventSetCreate = libnvml.SystemEventSetCreate + SystemEventSetFree = libnvml.SystemEventSetFree + SystemEventSetWait = libnvml.SystemEventSetWait + SystemGetCPER_v1 = libnvml.SystemGetCPER_v1 + SystemGetConfComputeCapabilities = libnvml.SystemGetConfComputeCapabilities + SystemGetConfComputeGpusReadyState = libnvml.SystemGetConfComputeGpusReadyState + SystemGetConfComputeKeyRotationThresholdInfo = libnvml.SystemGetConfComputeKeyRotationThresholdInfo + SystemGetConfComputeSettings = libnvml.SystemGetConfComputeSettings + SystemGetConfComputeState = libnvml.SystemGetConfComputeState + SystemGetCudaDriverVersion = libnvml.SystemGetCudaDriverVersion + SystemGetCudaDriverVersion_v2 = libnvml.SystemGetCudaDriverVersion_v2 + SystemGetDriverBranch = libnvml.SystemGetDriverBranch + SystemGetDriverVersion = libnvml.SystemGetDriverVersion + SystemGetHicVersion = libnvml.SystemGetHicVersion + SystemGetNVMLVersion = libnvml.SystemGetNVMLVersion + SystemGetNvlinkBwMode = libnvml.SystemGetNvlinkBwMode + SystemGetProcessName = libnvml.SystemGetProcessName + SystemGetTopologyGpuSet = libnvml.SystemGetTopologyGpuSet + SystemRegisterEvents = libnvml.SystemRegisterEvents + SystemSetConfComputeGpusReadyState = libnvml.SystemSetConfComputeGpusReadyState + SystemSetConfComputeKeyRotationThresholdInfo = libnvml.SystemSetConfComputeKeyRotationThresholdInfo + SystemSetNvlinkBwMode = libnvml.SystemSetNvlinkBwMode + UnitGetCount = libnvml.UnitGetCount + UnitGetDevices = libnvml.UnitGetDevices + UnitGetFanSpeedInfo = libnvml.UnitGetFanSpeedInfo + UnitGetHandleByIndex = libnvml.UnitGetHandleByIndex + UnitGetLedState = libnvml.UnitGetLedState + UnitGetPsuInfo = libnvml.UnitGetPsuInfo + UnitGetTemperature = libnvml.UnitGetTemperature + UnitGetUnitInfo = libnvml.UnitGetUnitInfo + UnitSetLedState = libnvml.UnitSetLedState + VgpuInstanceClearAccountingPids = libnvml.VgpuInstanceClearAccountingPids + VgpuInstanceGetAccountingMode = libnvml.VgpuInstanceGetAccountingMode + VgpuInstanceGetAccountingPids = libnvml.VgpuInstanceGetAccountingPids + VgpuInstanceGetAccountingStats = libnvml.VgpuInstanceGetAccountingStats + VgpuInstanceGetEccMode = libnvml.VgpuInstanceGetEccMode + VgpuInstanceGetEncoderCapacity = libnvml.VgpuInstanceGetEncoderCapacity + VgpuInstanceGetEncoderSessions = libnvml.VgpuInstanceGetEncoderSessions + VgpuInstanceGetEncoderStats = libnvml.VgpuInstanceGetEncoderStats + VgpuInstanceGetFBCSessions = libnvml.VgpuInstanceGetFBCSessions + VgpuInstanceGetFBCStats = libnvml.VgpuInstanceGetFBCStats + VgpuInstanceGetFbUsage = libnvml.VgpuInstanceGetFbUsage + VgpuInstanceGetFrameRateLimit = libnvml.VgpuInstanceGetFrameRateLimit + VgpuInstanceGetGpuInstanceId = libnvml.VgpuInstanceGetGpuInstanceId + VgpuInstanceGetGpuPciId = libnvml.VgpuInstanceGetGpuPciId + VgpuInstanceGetLicenseInfo = libnvml.VgpuInstanceGetLicenseInfo + VgpuInstanceGetLicenseStatus = libnvml.VgpuInstanceGetLicenseStatus + VgpuInstanceGetMdevUUID = libnvml.VgpuInstanceGetMdevUUID + VgpuInstanceGetMetadata = libnvml.VgpuInstanceGetMetadata + VgpuInstanceGetRuntimeStateSize = libnvml.VgpuInstanceGetRuntimeStateSize + VgpuInstanceGetType = libnvml.VgpuInstanceGetType + VgpuInstanceGetUUID = libnvml.VgpuInstanceGetUUID + VgpuInstanceGetVmDriverVersion = libnvml.VgpuInstanceGetVmDriverVersion + VgpuInstanceGetVmID = libnvml.VgpuInstanceGetVmID + VgpuInstanceSetEncoderCapacity = libnvml.VgpuInstanceSetEncoderCapacity + VgpuTypeGetBAR1Info = libnvml.VgpuTypeGetBAR1Info + VgpuTypeGetCapabilities = libnvml.VgpuTypeGetCapabilities + VgpuTypeGetClass = libnvml.VgpuTypeGetClass + VgpuTypeGetDeviceID = libnvml.VgpuTypeGetDeviceID + VgpuTypeGetFrameRateLimit = libnvml.VgpuTypeGetFrameRateLimit + VgpuTypeGetFramebufferSize = libnvml.VgpuTypeGetFramebufferSize + VgpuTypeGetGpuInstanceProfileId = libnvml.VgpuTypeGetGpuInstanceProfileId + VgpuTypeGetID = libnvml.VgpuTypeGetID + VgpuTypeGetLicense = libnvml.VgpuTypeGetLicense + VgpuTypeGetMaxInstances = libnvml.VgpuTypeGetMaxInstances + VgpuTypeGetMaxInstancesPerGpuInstance = libnvml.VgpuTypeGetMaxInstancesPerGpuInstance + VgpuTypeGetMaxInstancesPerVm = libnvml.VgpuTypeGetMaxInstancesPerVm + VgpuTypeGetName = libnvml.VgpuTypeGetName + VgpuTypeGetNumDisplayHeads = libnvml.VgpuTypeGetNumDisplayHeads + VgpuTypeGetResolution = libnvml.VgpuTypeGetResolution ) // Interface represents the interface for the library type. @@ -435,6 +451,7 @@ type Interface interface { DeviceGetAccountingStats_v2(Device, uint32) (AccountingStats_v2, Return) DeviceGetActiveVgpus(Device) ([]VgpuInstance, Return) DeviceGetAdaptiveClockInfoStatus(Device) (uint32, Return) + DeviceGetAdaptiveTgpModeInfo_v1(Device) (AdaptiveTgpModeInfo_v1, Return) DeviceGetAddressingMode(Device) (DeviceAddressingMode, Return) DeviceGetApplicationsClock(Device, ClockType) (uint32, Return) DeviceGetArchitecture(Device) (DeviceArchitecture, Return) @@ -442,6 +459,7 @@ type Interface interface { DeviceGetAutoBoostedClocksEnabled(Device) (EnableState, EnableState, Return) DeviceGetBAR1MemoryInfo(Device) (BAR1Memory, Return) DeviceGetBBXTimeData_v1(Device) (BBXTimeData_v1, Return) + DeviceGetBankRemapperStatus_v1(Device) (EccBankRemapperStatus_v1, Return) DeviceGetBoardId(Device) (uint32, Return) DeviceGetBoardPartNumber(Device) (string, Return) DeviceGetBrand(Device) (BrandType, Return) @@ -499,6 +517,7 @@ type Interface interface { DeviceGetGpcClkVfOffset(Device) (int, Return) DeviceGetGpuFabricInfo(Device) (GpuFabricInfo, Return) DeviceGetGpuFabricInfoV(Device) GpuFabricInfoHandler + DeviceGetGpuFabricInfo_v4(Device) (GpuFabricInfo_v4, Return) DeviceGetGpuInstanceById(Device, int) (GpuInstance, Return) DeviceGetGpuInstanceId(Device) (int, Return) DeviceGetGpuInstancePossiblePlacements(Device, *GpuInstanceProfileInfo) ([]GpuInstancePlacement, Return) @@ -541,6 +560,7 @@ type Interface interface { DeviceGetMemoryErrorCounter(Device, MemoryErrorType, EccCounterType, MemoryLocation) (uint64, Return) DeviceGetMemoryInfo(Device) (Memory, Return) DeviceGetMemoryInfo_v2(Device) (Memory_v2, Return) + DeviceGetMemoryLimits_v1(Device, string) (GetMemoryLimits_v1, Return) DeviceGetMigDeviceHandleByIndex(Device, int) (Device, Return) DeviceGetMigMode(Device) (int, int, Return) DeviceGetMinMaxClockOfPState(Device, ClockType, Pstates) (uint32, uint32, Return) @@ -558,6 +578,7 @@ type Interface interface { DeviceGetNvLinkRemoteDeviceType(Device, int) (IntNvLinkDeviceType, Return) DeviceGetNvLinkRemotePciInfo(Device, int) (PciInfo, Return) DeviceGetNvLinkState(Device, int) (EnableState, Return) + DeviceGetNvLinkTelemetrySamples_v1(Device, *NvlinkTelemetrySamples_v1) Return DeviceGetNvLinkUtilizationControl(Device, int, int) (NvLinkUtilizationControl, Return) DeviceGetNvLinkUtilizationCounter(Device, int, int) (uint64, uint64, Return) DeviceGetNvLinkVersion(Device, int) (uint32, Return) @@ -638,6 +659,7 @@ type Interface interface { DeviceIsMigDeviceHandle(Device) (bool, Return) DeviceModifyDrainState(*PciInfo, EnableState) Return DeviceOnSameBoard(Device, Device) (int, Return) + DevicePerfMetricsGetSamples_v1(Device, *PerfMetricsSamples_v1) Return DevicePowerSmoothingActivatePresetProfile(Device, *PowerSmoothingProfile) Return DevicePowerSmoothingSetState(Device, *PowerSmoothingState) Return DevicePowerSmoothingUpdatePresetProfileParam(Device, *PowerSmoothingProfile) Return @@ -654,6 +676,7 @@ type Interface interface { DeviceResetNvLinkUtilizationCounter(Device, int, int) Return DeviceSetAPIRestriction(Device, RestrictedAPI, EnableState) Return DeviceSetAccountingMode(Device, EnableState) Return + DeviceSetAdaptiveTgpMode_v1(Device, EnableState) Return DeviceSetApplicationsClocks(Device, uint32, uint32) Return DeviceSetAutoBoostedClocksEnabled(Device, EnableState) Return DeviceSetClockOffsets(Device, ClockOffset) Return @@ -672,11 +695,13 @@ type Interface interface { DeviceSetGpuOperationMode(Device, GpuOperationMode) Return DeviceSetHostname_v1(Device, string) Return DeviceSetMemClkVfOffset(Device, int) Return + DeviceSetMemoryLimits_v1(Device, string, int, int) Return DeviceSetMemoryLockedClocks(Device, uint32, uint32) Return DeviceSetMigMode(Device, int) (Return, Return) DeviceSetNvLinkDeviceLowPowerThreshold(Device, *NvLinkPowerThres) Return DeviceSetNvLinkUtilizationControl(Device, int, int, *NvLinkUtilizationControl, bool) Return DeviceSetNvlinkBwMode(Device, *NvlinkSetBwMode) Return + DeviceSetNvlinkBwModeAsync_v1(Device, *NvlinkSetBwModeAsync_v1) Return DeviceSetPersistenceMode(Device, EnableState) Return DeviceSetPowerManagementLimit(Device, uint32) Return DeviceSetPowerManagementLimit_v2(Device, *PowerValue_v2) Return @@ -697,7 +722,13 @@ type Interface interface { ErrorString(Return) string EventSetCreate() (EventSet, Return) EventSetFree(EventSet) Return + EventSetGetContextCount_v1(EventSet) (uint32, Return) + EventSetGetContextData_v1(EventSet, uint32, []byte) (uint32, Return) + EventSetGetContextInfo_v1(EventSet, uint32) (OperationalEventContextInfo_v1, Return) + EventSetGetGpuOperationalEventContextLegacyXid_v1(EventSet, uint32) (GpuOperationalEventContextLegacyXid_v1, Return) + EventSetRegisterGpuOperationalEvents_v1(EventSet, *GpuOperationalEventConfig_v1) Return EventSetWait(EventSet, uint32) (EventData, Return) + EventSetWait_v3(EventSet, uint32) (EventData_v2, Return) Extensions() ExtendedInterface GetExcludedDeviceCount() (int, Return) GetExcludedDeviceInfoByIndex(int) (ExcludedDeviceInfo, Return) @@ -801,6 +832,7 @@ type Interface interface { VgpuTypeGetFrameRateLimit(VgpuTypeId) (uint32, Return) VgpuTypeGetFramebufferSize(VgpuTypeId) (uint64, Return) VgpuTypeGetGpuInstanceProfileId(VgpuTypeId) (uint32, Return) + VgpuTypeGetID(VgpuTypeId) uint32 VgpuTypeGetLicense(VgpuTypeId) (string, Return) VgpuTypeGetMaxInstances(Device, VgpuTypeId) (int, Return) VgpuTypeGetMaxInstancesPerGpuInstance(*VgpuTypeMaxInstance) Return @@ -829,6 +861,7 @@ type Device interface { GetAccountingStats_v2(uint32) (AccountingStats_v2, Return) GetActiveVgpus() ([]VgpuInstance, Return) GetAdaptiveClockInfoStatus() (uint32, Return) + GetAdaptiveTgpModeInfo_v1() (AdaptiveTgpModeInfo_v1, Return) GetAddressingMode() (DeviceAddressingMode, Return) GetApplicationsClock(ClockType) (uint32, Return) GetArchitecture() (DeviceArchitecture, Return) @@ -836,6 +869,7 @@ type Device interface { GetAutoBoostedClocksEnabled() (EnableState, EnableState, Return) GetBAR1MemoryInfo() (BAR1Memory, Return) GetBBXTimeData_v1() (BBXTimeData_v1, Return) + GetBankRemapperStatus_v1() (EccBankRemapperStatus_v1, Return) GetBoardId() (uint32, Return) GetBoardPartNumber() (string, Return) GetBrand() (BrandType, Return) @@ -892,6 +926,7 @@ type Device interface { GetGpcClkVfOffset() (int, Return) GetGpuFabricInfo() (GpuFabricInfo, Return) GetGpuFabricInfoV() GpuFabricInfoHandler + GetGpuFabricInfo_v4() (GpuFabricInfo_v4, Return) GetGpuInstanceById(int) (GpuInstance, Return) GetGpuInstanceId() (int, Return) GetGpuInstancePossiblePlacements(*GpuInstanceProfileInfo) ([]GpuInstancePlacement, Return) @@ -929,6 +964,7 @@ type Device interface { GetMemoryErrorCounter(MemoryErrorType, EccCounterType, MemoryLocation) (uint64, Return) GetMemoryInfo() (Memory, Return) GetMemoryInfo_v2() (Memory_v2, Return) + GetMemoryLimits_v1(string) (GetMemoryLimits_v1, Return) GetMigDeviceHandleByIndex(int) (Device, Return) GetMigMode() (int, int, Return) GetMinMaxClockOfPState(ClockType, Pstates) (uint32, uint32, Return) @@ -946,6 +982,7 @@ type Device interface { GetNvLinkRemoteDeviceType(int) (IntNvLinkDeviceType, Return) GetNvLinkRemotePciInfo(int) (PciInfo, Return) GetNvLinkState(int) (EnableState, Return) + GetNvLinkTelemetrySamples_v1(*NvlinkTelemetrySamples_v1) Return GetNvLinkUtilizationControl(int, int) (NvLinkUtilizationControl, Return) GetNvLinkUtilizationCounter(int, int) (uint64, uint64, Return) GetNvLinkVersion(int) (uint32, Return) @@ -1031,6 +1068,7 @@ type Device interface { GpmSetStreamingEnabled(uint32) Return IsMigDeviceHandle() (bool, Return) OnSameBoard(Device) (int, Return) + PerfMetricsGetSamples_v1(*PerfMetricsSamples_v1) Return PowerSmoothingActivatePresetProfile(*PowerSmoothingProfile) Return PowerSmoothingSetState(*PowerSmoothingState) Return PowerSmoothingUpdatePresetProfileParam(*PowerSmoothingProfile) Return @@ -1044,6 +1082,7 @@ type Device interface { ResetNvLinkUtilizationCounter(int, int) Return SetAPIRestriction(RestrictedAPI, EnableState) Return SetAccountingMode(EnableState) Return + SetAdaptiveTgpMode_v1(EnableState) Return SetApplicationsClocks(uint32, uint32) Return SetAutoBoostedClocksEnabled(EnableState) Return SetClockOffsets(ClockOffset) Return @@ -1062,11 +1101,13 @@ type Device interface { SetGpuOperationMode(GpuOperationMode) Return SetHostname_v1(string) Return SetMemClkVfOffset(int) Return + SetMemoryLimits_v1(string, int, int) Return SetMemoryLockedClocks(uint32, uint32) Return SetMigMode(int) (Return, Return) SetNvLinkDeviceLowPowerThreshold(*NvLinkPowerThres) Return SetNvLinkUtilizationControl(int, int, *NvLinkUtilizationControl, bool) Return SetNvlinkBwMode(*NvlinkSetBwMode) Return + SetNvlinkBwModeAsync_v1(*NvlinkSetBwModeAsync_v1) Return SetPersistenceMode(EnableState) Return SetPowerManagementLimit(uint32) Return SetPowerManagementLimit_v2(*PowerValue_v2) Return @@ -1127,7 +1168,13 @@ type ComputeInstance interface { //go:generate moq -out mock/eventset.go -pkg mock . EventSet:EventSet type EventSet interface { Free() Return + GetContextCount_v1() (uint32, Return) + GetContextData_v1(uint32, []byte) (uint32, Return) + GetContextInfo_v1(uint32) (OperationalEventContextInfo_v1, Return) + GetGpuOperationalEventContextLegacyXid_v1(uint32) (GpuOperationalEventContextLegacyXid_v1, Return) + RegisterGpuOperationalEvents_v1(*GpuOperationalEventConfig_v1) Return Wait(uint32) (EventData, Return) + Wait_v3(uint32) (EventData_v2, Return) } // GpmSample represents the interface for the nvmlGpmSample type. @@ -1194,6 +1241,7 @@ type VgpuTypeId interface { GetFrameRateLimit() (uint32, Return) GetFramebufferSize() (uint64, Return) GetGpuInstanceProfileId() (uint32, Return) + GetID() uint32 GetLicense() (string, Return) GetMaxInstances(Device) (int, Return) GetMaxInstancesPerVm() (int, Return) diff --git a/vendor/github.com/coreos/go-systemd/v22/LICENSE b/vendor/github.com/coreos/go-systemd/v22/LICENSE new file mode 100644 index 000000000..37ec93a14 --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/LICENSE @@ -0,0 +1,191 @@ +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: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +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 +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 + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/coreos/go-systemd/v22/NOTICE b/vendor/github.com/coreos/go-systemd/v22/NOTICE new file mode 100644 index 000000000..23a0ada2f --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/NOTICE @@ -0,0 +1,5 @@ +CoreOS Project +Copyright 2018 CoreOS, Inc + +This product includes software developed at CoreOS, Inc. +(http://www.coreos.com/). diff --git a/vendor/github.com/coreos/go-systemd/v22/dbus/dbus.go b/vendor/github.com/coreos/go-systemd/v22/dbus/dbus.go new file mode 100644 index 000000000..e966c156d --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/dbus.go @@ -0,0 +1,267 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package dbus provides integration with the systemd D-Bus API. +// See http://www.freedesktop.org/wiki/Software/systemd/dbus/ +package dbus + +import ( + "context" + "encoding/hex" + "fmt" + "os" + "strconv" + "strings" + "sync" + + "github.com/godbus/dbus/v5" +) + +const ( + alpha = `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` + num = `0123456789` + alphanum = alpha + num + signalBuffer = 100 +) + +// needsEscape checks whether a byte in a potential dbus ObjectPath needs to be escaped +func needsEscape(i int, b byte) bool { + // Escape everything that is not a-z-A-Z-0-9 + // Also escape 0-9 if it's the first character + return strings.IndexByte(alphanum, b) == -1 || + (i == 0 && strings.IndexByte(num, b) != -1) +} + +// PathBusEscape sanitizes a constituent string of a dbus ObjectPath using the +// rules that systemd uses for serializing special characters. +func PathBusEscape(path string) string { + // Special case the empty string + if len(path) == 0 { + return "_" + } + n := []byte{} + for i := 0; i < len(path); i++ { + c := path[i] + if needsEscape(i, c) { + e := fmt.Sprintf("_%x", c) + n = append(n, []byte(e)...) + } else { + n = append(n, c) + } + } + return string(n) +} + +// pathBusUnescape is the inverse of PathBusEscape. +func pathBusUnescape(path string) string { + if path == "_" { + return "" + } + n := []byte{} + for i := 0; i < len(path); i++ { + c := path[i] + if c == '_' && i+2 < len(path) { + res, err := hex.DecodeString(path[i+1 : i+3]) + if err == nil { + n = append(n, res...) + } + i += 2 + } else { + n = append(n, c) + } + } + return string(n) +} + +// Conn is a connection to systemd's dbus endpoint. +type Conn struct { + // sysconn/sysobj are only used to call dbus methods + sysconn *dbus.Conn + sysobj dbus.BusObject + + // sigconn/sigobj are only used to receive dbus signals + sigconn *dbus.Conn + sigobj dbus.BusObject + + jobListener struct { + jobs map[dbus.ObjectPath][]chan<- string + sync.Mutex + } + subStateSubscriber struct { + updateCh chan<- *SubStateUpdate + errCh chan<- error + sync.Mutex + ignore map[dbus.ObjectPath]int64 + cleanIgnore int64 + } + propertiesSubscriber struct { + updateCh chan<- *PropertiesUpdate + errCh chan<- error + sync.Mutex + } +} + +// Deprecated: use NewWithContext instead. +func New() (*Conn, error) { + return NewWithContext(context.Background()) +} + +// NewWithContext establishes a connection to any available bus and authenticates. +// Callers should call Close() when done with the connection. +func NewWithContext(ctx context.Context) (*Conn, error) { + conn, err := NewSystemConnectionContext(ctx) + if err != nil && os.Geteuid() == 0 { + return NewSystemdConnectionContext(ctx) + } + return conn, err +} + +// Deprecated: use NewSystemConnectionContext instead. +func NewSystemConnection() (*Conn, error) { + return NewSystemConnectionContext(context.Background()) +} + +// NewSystemConnectionContext establishes a connection to the system bus and authenticates. +// Callers should call Close() when done with the connection. +func NewSystemConnectionContext(ctx context.Context) (*Conn, error) { + return NewConnection(func() (*dbus.Conn, error) { + return dbusAuthHelloConnection(ctx, dbus.SystemBusPrivate) + }) +} + +// Deprecated: use NewUserConnectionContext instead. +func NewUserConnection() (*Conn, error) { + return NewUserConnectionContext(context.Background()) +} + +// NewUserConnectionContext establishes a connection to the session bus and +// authenticates. This can be used to connect to systemd user instances. +// Callers should call Close() when done with the connection. +func NewUserConnectionContext(ctx context.Context) (*Conn, error) { + return NewConnection(func() (*dbus.Conn, error) { + return dbusAuthHelloConnection(ctx, dbus.SessionBusPrivate) + }) +} + +// Deprecated: use NewSystemdConnectionContext instead. +func NewSystemdConnection() (*Conn, error) { + return NewSystemdConnectionContext(context.Background()) +} + +// NewSystemdConnectionContext establishes a private, direct connection to systemd. +// This can be used for communicating with systemd without a dbus daemon. +// Callers should call Close() when done with the connection. +func NewSystemdConnectionContext(ctx context.Context) (*Conn, error) { + return NewConnection(func() (*dbus.Conn, error) { + // We skip Hello when talking directly to systemd. + return dbusAuthConnection(ctx, func(opts ...dbus.ConnOption) (*dbus.Conn, error) { + return dbus.Dial("unix:path=/run/systemd/private", opts...) + }) + }) +} + +// Close closes an established connection. +func (c *Conn) Close() { + c.sysconn.Close() + c.sigconn.Close() +} + +// Connected returns whether conn is connected +func (c *Conn) Connected() bool { + return c.sysconn.Connected() && c.sigconn.Connected() +} + +// NewConnection establishes a connection to a bus using a caller-supplied function. +// This allows connecting to remote buses through a user-supplied mechanism. +// The supplied function may be called multiple times, and should return independent connections. +// The returned connection must be fully initialised: the org.freedesktop.DBus.Hello call must have succeeded, +// and any authentication should be handled by the function. +func NewConnection(dialBus func() (*dbus.Conn, error)) (*Conn, error) { + sysconn, err := dialBus() + if err != nil { + return nil, err + } + + sigconn, err := dialBus() + if err != nil { + sysconn.Close() + return nil, err + } + + c := &Conn{ + sysconn: sysconn, + sysobj: systemdObject(sysconn), + sigconn: sigconn, + sigobj: systemdObject(sigconn), + } + + c.subStateSubscriber.ignore = make(map[dbus.ObjectPath]int64) + c.jobListener.jobs = make(map[dbus.ObjectPath][]chan<- string) + + // Setup the listeners on jobs so that we can get completions + c.sigconn.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, + "type='signal', interface='org.freedesktop.systemd1.Manager', member='JobRemoved'") + + c.dispatch() + return c, nil +} + +// GetManagerProperty returns the value of a property on the org.freedesktop.systemd1.Manager +// interface. The value is returned in its string representation, as defined at +// https://developer.gnome.org/glib/unstable/gvariant-text.html. +func (c *Conn) GetManagerProperty(prop string) (string, error) { + variant, err := c.sysobj.GetProperty("org.freedesktop.systemd1.Manager." + prop) + if err != nil { + return "", err + } + return variant.String(), nil +} + +func dbusAuthConnection(ctx context.Context, createBus func(opts ...dbus.ConnOption) (*dbus.Conn, error)) (*dbus.Conn, error) { + conn, err := createBus(dbus.WithContext(ctx)) + if err != nil { + return nil, err + } + + // Only use EXTERNAL method, and hardcode the uid (not username) + // to avoid a username lookup (which requires a dynamically linked + // libc) + methods := []dbus.Auth{dbus.AuthExternal(strconv.Itoa(os.Getuid()))} + + err = conn.Auth(methods) + if err != nil { + conn.Close() + return nil, err + } + + return conn, nil +} + +func dbusAuthHelloConnection(ctx context.Context, createBus func(opts ...dbus.ConnOption) (*dbus.Conn, error)) (*dbus.Conn, error) { + conn, err := dbusAuthConnection(ctx, createBus) + if err != nil { + return nil, err + } + + if err = conn.Hello(); err != nil { + conn.Close() + return nil, err + } + + return conn, nil +} + +func systemdObject(conn *dbus.Conn) dbus.BusObject { + return conn.Object("org.freedesktop.systemd1", dbus.ObjectPath("/org/freedesktop/systemd1")) +} diff --git a/vendor/github.com/coreos/go-systemd/v22/dbus/methods.go b/vendor/github.com/coreos/go-systemd/v22/dbus/methods.go new file mode 100644 index 000000000..490248b86 --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/methods.go @@ -0,0 +1,735 @@ +// Copyright 2015, 2018 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbus + +import ( + "context" + "errors" + "fmt" + "path" + "strconv" + + "github.com/godbus/dbus/v5" +) + +// Who specifies which process to send a signal to via the [Conn.KillUnitWithTarget]. +type Who string + +const ( + // All sends the signal to all processes in the unit. + All Who = "all" + // Main sends the signal to the main process of the unit. + Main Who = "main" + // Control sends the signal to the control process of the unit. + Control Who = "control" +) + +func (c *Conn) jobComplete(signal *dbus.Signal) { + var id uint32 + var job dbus.ObjectPath + var unit string + var result string + + _ = dbus.Store(signal.Body, &id, &job, &unit, &result) + c.jobListener.Lock() + for _, out := range c.jobListener.jobs[job] { + out <- result + } + delete(c.jobListener.jobs, job) + c.jobListener.Unlock() +} + +func (c *Conn) startJob(ctx context.Context, ch chan<- string, job string, args ...any) (int, error) { + if ch != nil { + c.jobListener.Lock() + defer c.jobListener.Unlock() + } + + var p dbus.ObjectPath + err := c.sysobj.CallWithContext(ctx, job, 0, args...).Store(&p) + if err != nil { + return 0, err + } + + if ch != nil { + c.jobListener.jobs[p] = append(c.jobListener.jobs[p], ch) + } + + // ignore error since 0 is fine if conversion fails + jobID, _ := strconv.Atoi(path.Base(string(p))) + + return jobID, nil +} + +// Deprecated: use StartUnitContext instead. +func (c *Conn) StartUnit(name string, mode string, ch chan<- string) (int, error) { + return c.StartUnitContext(context.Background(), name, mode, ch) +} + +// StartUnitContext enqueues a start job and depending jobs, if any (unless otherwise +// specified by the mode string). +// +// Takes the unit to activate, plus a mode string. The mode needs to be one of +// replace, fail, isolate, ignore-dependencies, ignore-requirements. If +// "replace" the call will start the unit and its dependencies, possibly +// replacing already queued jobs that conflict with this. If "fail" the call +// will start the unit and its dependencies, but will fail if this would change +// an already queued job. If "isolate" the call will start the unit in question +// and terminate all units that aren't dependencies of it. If +// "ignore-dependencies" it will start a unit but ignore all its dependencies. +// If "ignore-requirements" it will start a unit but only ignore the +// requirement dependencies. It is not recommended to make use of the latter +// two options. +// +// If the provided channel is non-nil, a result string will be sent to it upon +// job completion: one of done, canceled, timeout, failed, dependency, skipped. +// done indicates successful execution of a job. canceled indicates that a job +// has been canceled before it finished execution. timeout indicates that the +// job timeout was reached. failed indicates that the job failed. dependency +// indicates that a job this job has been depending on failed and the job hence +// has been removed too. skipped indicates that a job was skipped because it +// didn't apply to the units current state. +// +// Important: It is the caller's responsibility to unblock the provided channel write, +// either by reading from the channel or by using a buffered channel. Until the write +// is unblocked, the Conn object cannot handle other jobs. +// +// If no error occurs, the ID of the underlying systemd job will be returned. There +// does exist the possibility for no error to be returned, but for the returned job +// ID to be 0. In this case, the actual underlying ID is not 0 and this datapoint +// should not be considered authoritative. +// +// If an error does occur, it will be returned to the user alongside a job ID of 0. +func (c *Conn) StartUnitContext(ctx context.Context, name string, mode string, ch chan<- string) (int, error) { + return c.startJob(ctx, ch, "org.freedesktop.systemd1.Manager.StartUnit", name, mode) +} + +// Deprecated: use StopUnitContext instead. +func (c *Conn) StopUnit(name string, mode string, ch chan<- string) (int, error) { + return c.StopUnitContext(context.Background(), name, mode, ch) +} + +// StopUnitContext is similar to StartUnitContext, but stops the specified unit +// rather than starting it. +func (c *Conn) StopUnitContext(ctx context.Context, name string, mode string, ch chan<- string) (int, error) { + return c.startJob(ctx, ch, "org.freedesktop.systemd1.Manager.StopUnit", name, mode) +} + +// Deprecated: use ReloadUnitContext instead. +func (c *Conn) ReloadUnit(name string, mode string, ch chan<- string) (int, error) { + return c.ReloadUnitContext(context.Background(), name, mode, ch) +} + +// ReloadUnitContext reloads a unit. Reloading is done only if the unit +// is already running, and fails otherwise. +func (c *Conn) ReloadUnitContext(ctx context.Context, name string, mode string, ch chan<- string) (int, error) { + return c.startJob(ctx, ch, "org.freedesktop.systemd1.Manager.ReloadUnit", name, mode) +} + +// Deprecated: use RestartUnitContext instead. +func (c *Conn) RestartUnit(name string, mode string, ch chan<- string) (int, error) { + return c.RestartUnitContext(context.Background(), name, mode, ch) +} + +// RestartUnitContext restarts a service. If a service is restarted that isn't +// running it will be started. +func (c *Conn) RestartUnitContext(ctx context.Context, name string, mode string, ch chan<- string) (int, error) { + return c.startJob(ctx, ch, "org.freedesktop.systemd1.Manager.RestartUnit", name, mode) +} + +// Deprecated: use TryRestartUnitContext instead. +func (c *Conn) TryRestartUnit(name string, mode string, ch chan<- string) (int, error) { + return c.TryRestartUnitContext(context.Background(), name, mode, ch) +} + +// TryRestartUnitContext is like RestartUnitContext, except that a service that +// isn't running is not affected by the restart. +func (c *Conn) TryRestartUnitContext(ctx context.Context, name string, mode string, ch chan<- string) (int, error) { + return c.startJob(ctx, ch, "org.freedesktop.systemd1.Manager.TryRestartUnit", name, mode) +} + +// Deprecated: use ReloadOrRestartUnitContext instead. +func (c *Conn) ReloadOrRestartUnit(name string, mode string, ch chan<- string) (int, error) { + return c.ReloadOrRestartUnitContext(context.Background(), name, mode, ch) +} + +// ReloadOrRestartUnitContext attempts a reload if the unit supports it and use +// a restart otherwise. +func (c *Conn) ReloadOrRestartUnitContext(ctx context.Context, name string, mode string, ch chan<- string) (int, error) { + return c.startJob(ctx, ch, "org.freedesktop.systemd1.Manager.ReloadOrRestartUnit", name, mode) +} + +// Deprecated: use ReloadOrTryRestartUnitContext instead. +func (c *Conn) ReloadOrTryRestartUnit(name string, mode string, ch chan<- string) (int, error) { + return c.ReloadOrTryRestartUnitContext(context.Background(), name, mode, ch) +} + +// ReloadOrTryRestartUnitContext attempts a reload if the unit supports it, +// and use a "Try" flavored restart otherwise. +func (c *Conn) ReloadOrTryRestartUnitContext(ctx context.Context, name string, mode string, ch chan<- string) (int, error) { + return c.startJob(ctx, ch, "org.freedesktop.systemd1.Manager.ReloadOrTryRestartUnit", name, mode) +} + +// Deprecated: use StartTransientUnitContext instead. +func (c *Conn) StartTransientUnit(name string, mode string, properties []Property, ch chan<- string) (int, error) { + return c.StartTransientUnitContext(context.Background(), name, mode, properties, ch) +} + +// StartTransientUnitContext may be used to create and start a transient unit, which +// will be released as soon as it is not running or referenced anymore or the +// system is rebooted. name is the unit name including suffix, and must be +// unique. mode is the same as in StartUnitContext, properties contains properties +// of the unit. +func (c *Conn) StartTransientUnitContext(ctx context.Context, name string, mode string, properties []Property, ch chan<- string) (int, error) { + return c.StartTransientUnitAux(ctx, name, mode, properties, make([]PropertyCollection, 0), ch) +} + +// StartTransientUnitAux is the same as StartTransientUnitContext but allows passing +// auxiliary units in the aux parameter. +func (c *Conn) StartTransientUnitAux(ctx context.Context, name string, mode string, properties []Property, aux []PropertyCollection, ch chan<- string) (int, error) { + return c.startJob(ctx, ch, "org.freedesktop.systemd1.Manager.StartTransientUnit", name, mode, properties, aux) +} + +// Deprecated: use [Conn.KillUnitWithTarget] instead. +func (c *Conn) KillUnit(name string, signal int32) { + c.KillUnitContext(context.Background(), name, signal) +} + +// KillUnitContext takes the unit name and a UNIX signal number to send. +// All of the unit's processes are killed. +// +// Deprecated: use [Conn.KillUnitWithTarget] instead, with target argument set to [All]. +func (c *Conn) KillUnitContext(ctx context.Context, name string, signal int32) { + _ = c.KillUnitWithTarget(ctx, name, All, signal) +} + +// KillUnitWithTarget sends a signal to the specified unit. +// The target argument can be one of [All], [Main], or [Control]. +func (c *Conn) KillUnitWithTarget(ctx context.Context, name string, target Who, signal int32) error { + return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.KillUnit", 0, name, string(target), signal).Store() +} + +// Deprecated: use ResetFailedUnitContext instead. +func (c *Conn) ResetFailedUnit(name string) error { + return c.ResetFailedUnitContext(context.Background(), name) +} + +// ResetFailedUnitContext resets the "failed" state of a specific unit. +func (c *Conn) ResetFailedUnitContext(ctx context.Context, name string) error { + return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.ResetFailedUnit", 0, name).Store() +} + +// Deprecated: use SystemStateContext instead. +func (c *Conn) SystemState() (*Property, error) { + return c.SystemStateContext(context.Background()) +} + +// SystemStateContext returns the systemd state. Equivalent to +// systemctl is-system-running. +func (c *Conn) SystemStateContext(ctx context.Context) (*Property, error) { + var err error + var prop dbus.Variant + + obj := c.sysconn.Object("org.freedesktop.systemd1", "/org/freedesktop/systemd1") + err = obj.CallWithContext(ctx, "org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.systemd1.Manager", "SystemState").Store(&prop) + if err != nil { + return nil, err + } + + return &Property{Name: "SystemState", Value: prop}, nil +} + +// getProperties takes the unit path and returns all of its dbus object properties, for the given dbus interface. +func (c *Conn) getProperties(ctx context.Context, path dbus.ObjectPath, dbusInterface string) (map[string]any, error) { + var err error + var props map[string]dbus.Variant + + if !path.IsValid() { + return nil, fmt.Errorf("invalid unit name: %v", path) + } + + obj := c.sysconn.Object("org.freedesktop.systemd1", path) + err = obj.CallWithContext(ctx, "org.freedesktop.DBus.Properties.GetAll", 0, dbusInterface).Store(&props) + if err != nil { + return nil, err + } + + out := make(map[string]any, len(props)) + for k, v := range props { + out[k] = v.Value() + } + + return out, nil +} + +// Deprecated: use GetUnitPropertiesContext instead. +func (c *Conn) GetUnitProperties(unit string) (map[string]any, error) { + return c.GetUnitPropertiesContext(context.Background(), unit) +} + +// GetUnitPropertiesContext takes the (unescaped) unit name and returns all of +// its dbus object properties. +func (c *Conn) GetUnitPropertiesContext(ctx context.Context, unit string) (map[string]any, error) { + path := unitPath(unit) + return c.getProperties(ctx, path, "org.freedesktop.systemd1.Unit") +} + +// Deprecated: use GetUnitPathPropertiesContext instead. +func (c *Conn) GetUnitPathProperties(path dbus.ObjectPath) (map[string]any, error) { + return c.GetUnitPathPropertiesContext(context.Background(), path) +} + +// GetUnitPathPropertiesContext takes the (escaped) unit path and returns all +// of its dbus object properties. +func (c *Conn) GetUnitPathPropertiesContext(ctx context.Context, path dbus.ObjectPath) (map[string]any, error) { + return c.getProperties(ctx, path, "org.freedesktop.systemd1.Unit") +} + +// Deprecated: use GetAllPropertiesContext instead. +func (c *Conn) GetAllProperties(unit string) (map[string]any, error) { + return c.GetAllPropertiesContext(context.Background(), unit) +} + +// GetAllPropertiesContext takes the (unescaped) unit name and returns all of +// its dbus object properties. +func (c *Conn) GetAllPropertiesContext(ctx context.Context, unit string) (map[string]any, error) { + path := unitPath(unit) + return c.getProperties(ctx, path, "") +} + +func (c *Conn) getProperty(ctx context.Context, unit string, dbusInterface string, propertyName string) (*Property, error) { + var err error + var prop dbus.Variant + + path := unitPath(unit) + if !path.IsValid() { + return nil, errors.New("invalid unit name: " + unit) + } + + obj := c.sysconn.Object("org.freedesktop.systemd1", path) + err = obj.CallWithContext(ctx, "org.freedesktop.DBus.Properties.Get", 0, dbusInterface, propertyName).Store(&prop) + if err != nil { + return nil, err + } + + return &Property{Name: propertyName, Value: prop}, nil +} + +// Deprecated: use GetUnitPropertyContext instead. +func (c *Conn) GetUnitProperty(unit string, propertyName string) (*Property, error) { + return c.GetUnitPropertyContext(context.Background(), unit, propertyName) +} + +// GetUnitPropertyContext takes an (unescaped) unit name, and a property name, +// and returns the property value. +func (c *Conn) GetUnitPropertyContext(ctx context.Context, unit string, propertyName string) (*Property, error) { + return c.getProperty(ctx, unit, "org.freedesktop.systemd1.Unit", propertyName) +} + +// Deprecated: use GetServicePropertyContext instead. +func (c *Conn) GetServiceProperty(service string, propertyName string) (*Property, error) { + return c.GetServicePropertyContext(context.Background(), service, propertyName) +} + +// GetServicePropertyContext returns property for given service name and property name. +func (c *Conn) GetServicePropertyContext(ctx context.Context, service string, propertyName string) (*Property, error) { + return c.getProperty(ctx, service, "org.freedesktop.systemd1.Service", propertyName) +} + +// Deprecated: use GetUnitTypePropertiesContext instead. +func (c *Conn) GetUnitTypeProperties(unit string, unitType string) (map[string]any, error) { + return c.GetUnitTypePropertiesContext(context.Background(), unit, unitType) +} + +// GetUnitTypePropertiesContext returns the extra properties for a unit, specific to the unit type. +// Valid values for unitType: Service, Socket, Target, Device, Mount, Automount, Snapshot, Timer, Swap, Path, Slice, Scope. +// Returns "dbus.Error: Unknown interface" error if the unitType is not the correct type of the unit. +func (c *Conn) GetUnitTypePropertiesContext(ctx context.Context, unit string, unitType string) (map[string]any, error) { + path := unitPath(unit) + return c.getProperties(ctx, path, "org.freedesktop.systemd1."+unitType) +} + +// Deprecated: use SetUnitPropertiesContext instead. +func (c *Conn) SetUnitProperties(name string, runtime bool, properties ...Property) error { + return c.SetUnitPropertiesContext(context.Background(), name, runtime, properties...) +} + +// SetUnitPropertiesContext may be used to modify certain unit properties at runtime. +// Not all properties may be changed at runtime, but many resource management +// settings (primarily those in systemd.cgroup(5)) may. The changes are applied +// instantly, and stored on disk for future boots, unless runtime is true, in which +// case the settings only apply until the next reboot. name is the name of the unit +// to modify. properties are the settings to set, encoded as an array of property +// name and value pairs. +func (c *Conn) SetUnitPropertiesContext(ctx context.Context, name string, runtime bool, properties ...Property) error { + return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.SetUnitProperties", 0, name, runtime, properties).Store() +} + +// Deprecated: use GetUnitTypePropertyContext instead. +func (c *Conn) GetUnitTypeProperty(unit string, unitType string, propertyName string) (*Property, error) { + return c.GetUnitTypePropertyContext(context.Background(), unit, unitType, propertyName) +} + +// GetUnitTypePropertyContext takes a property name, a unit name, and a unit type, +// and returns a property value. For valid values of unitType, see GetUnitTypePropertiesContext. +func (c *Conn) GetUnitTypePropertyContext(ctx context.Context, unit string, unitType string, propertyName string) (*Property, error) { + return c.getProperty(ctx, unit, "org.freedesktop.systemd1."+unitType, propertyName) +} + +type UnitStatus struct { + Name string // The primary unit name as string + Description string // The human readable description string + LoadState string // The load state (i.e. whether the unit file has been loaded successfully) + ActiveState string // The active state (i.e. whether the unit is currently started or not) + SubState string // The sub state (a more fine-grained version of the active state that is specific to the unit type, which the active state is not) + Followed string // A unit that is being followed in its state by this unit, if there is any, otherwise the empty string. + Path dbus.ObjectPath // The unit object path + JobId uint32 // If there is a job queued for the job unit the numeric job id, 0 otherwise + JobType string // The job type as string + JobPath dbus.ObjectPath // The job object path +} + +type storeFunc func(retvalues ...any) error + +// convertSlice converts a []any result into a slice of the target type T +// using dbus.Store to handle the type conversion. +func convertSlice[T any](result []any) ([]T, error) { + converted := make([]T, len(result)) + convertedInterface := make([]any, len(converted)) + for i := range converted { + convertedInterface[i] = &converted[i] + } + + err := dbus.Store(result, convertedInterface...) + if err != nil { + return nil, err + } + + return converted, nil +} + +// storeSlice fetches D-Bus array results via the provided storeFunc +// and converts them into a slice of the target type T. +func storeSlice[T any](f storeFunc) ([]T, error) { + var result []any + err := f(&result) + if err != nil { + return nil, err + } + + return convertSlice[T](result) +} + +// GetUnitByPID returns the unit object path of the unit a process ID +// belongs to. It takes a UNIX PID and returns the object path. The PID must +// refer to an existing system process +func (c *Conn) GetUnitByPID(ctx context.Context, pid uint32) (dbus.ObjectPath, error) { + var result dbus.ObjectPath + + err := c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.GetUnitByPID", 0, pid).Store(&result) + + return result, err +} + +// GetUnitNameByPID returns the name of the unit a process ID belongs to. It +// takes a UNIX PID and returns the object path. The PID must refer to an +// existing system process +func (c *Conn) GetUnitNameByPID(ctx context.Context, pid uint32) (string, error) { + path, err := c.GetUnitByPID(ctx, pid) + if err != nil { + return "", err + } + + return unitName(path), nil +} + +// Deprecated: use ListUnitsContext instead. +func (c *Conn) ListUnits() ([]UnitStatus, error) { + return c.ListUnitsContext(context.Background()) +} + +// ListUnitsContext returns an array with all currently loaded units. Note that +// units may be known by multiple names at the same time, and hence there might +// be more unit names loaded than actual units behind them. +// Also note that a unit is only loaded if it is active and/or enabled. +// Units that are both disabled and inactive will thus not be returned. +func (c *Conn) ListUnitsContext(ctx context.Context) ([]UnitStatus, error) { + return storeSlice[UnitStatus](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.ListUnits", 0).Store) +} + +// Deprecated: use ListUnitsFilteredContext instead. +func (c *Conn) ListUnitsFiltered(states []string) ([]UnitStatus, error) { + return c.ListUnitsFilteredContext(context.Background(), states) +} + +// ListUnitsFilteredContext returns an array with units filtered by state. +// It takes a list of units' statuses to filter. +func (c *Conn) ListUnitsFilteredContext(ctx context.Context, states []string) ([]UnitStatus, error) { + return storeSlice[UnitStatus](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.ListUnitsFiltered", 0, states).Store) +} + +// Deprecated: use ListUnitsByPatternsContext instead. +func (c *Conn) ListUnitsByPatterns(states []string, patterns []string) ([]UnitStatus, error) { + return c.ListUnitsByPatternsContext(context.Background(), states, patterns) +} + +// ListUnitsByPatternsContext returns an array with units. +// It takes a list of units' statuses and names to filter. +// Note that units may be known by multiple names at the same time, +// and hence there might be more unit names loaded than actual units behind them. +func (c *Conn) ListUnitsByPatternsContext(ctx context.Context, states []string, patterns []string) ([]UnitStatus, error) { + return storeSlice[UnitStatus](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.ListUnitsByPatterns", 0, states, patterns).Store) +} + +// Deprecated: use ListUnitsByNamesContext instead. +func (c *Conn) ListUnitsByNames(units []string) ([]UnitStatus, error) { + return c.ListUnitsByNamesContext(context.Background(), units) +} + +// ListUnitsByNamesContext returns an array with units. It takes a list of units' +// names and returns an UnitStatus array. Comparing to ListUnitsByPatternsContext +// method, this method returns statuses even for inactive or non-existing +// units. Input array should contain exact unit names, but not patterns. +// +// Requires systemd v230 or higher. +func (c *Conn) ListUnitsByNamesContext(ctx context.Context, units []string) ([]UnitStatus, error) { + return storeSlice[UnitStatus](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.ListUnitsByNames", 0, units).Store) +} + +type UnitFile struct { + Path string + Type string +} + +// Deprecated: use ListUnitFilesContext instead. +func (c *Conn) ListUnitFiles() ([]UnitFile, error) { + return c.ListUnitFilesContext(context.Background()) +} + +// ListUnitFilesContext returns an array of all available units on disk. +func (c *Conn) ListUnitFilesContext(ctx context.Context) ([]UnitFile, error) { + return storeSlice[UnitFile](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.ListUnitFiles", 0).Store) +} + +// Deprecated: use ListUnitFilesByPatternsContext instead. +func (c *Conn) ListUnitFilesByPatterns(states []string, patterns []string) ([]UnitFile, error) { + return c.ListUnitFilesByPatternsContext(context.Background(), states, patterns) +} + +// ListUnitFilesByPatternsContext returns an array of all available units on disk matched the patterns. +func (c *Conn) ListUnitFilesByPatternsContext(ctx context.Context, states []string, patterns []string) ([]UnitFile, error) { + return storeSlice[UnitFile](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.ListUnitFilesByPatterns", 0, states, patterns).Store) +} + +type LinkUnitFileChange EnableUnitFileChange + +// Deprecated: use LinkUnitFilesContext instead. +func (c *Conn) LinkUnitFiles(files []string, runtime bool, force bool) ([]LinkUnitFileChange, error) { + return c.LinkUnitFilesContext(context.Background(), files, runtime, force) +} + +// LinkUnitFilesContext links unit files (that are located outside of the +// usual unit search paths) into the unit search path. +// +// It takes a list of absolute paths to unit files to link and two +// booleans. +// +// The first boolean controls whether the unit shall be +// enabled for runtime only (true, /run), or persistently (false, +// /etc). +// +// The second controls whether symlinks pointing to other units shall +// be replaced if necessary. +// +// This call returns a list of the changes made. The list consists of +// structures with three strings: the type of the change (one of symlink +// or unlink), the file name of the symlink and the destination of the +// symlink. +func (c *Conn) LinkUnitFilesContext(ctx context.Context, files []string, runtime bool, force bool) ([]LinkUnitFileChange, error) { + return storeSlice[LinkUnitFileChange](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.LinkUnitFiles", 0, files, runtime, force).Store) +} + +// Deprecated: use EnableUnitFilesContext instead. +func (c *Conn) EnableUnitFiles(files []string, runtime bool, force bool) (bool, []EnableUnitFileChange, error) { + return c.EnableUnitFilesContext(context.Background(), files, runtime, force) +} + +// EnableUnitFilesContext may be used to enable one or more units in the system +// (by creating symlinks to them in /etc or /run). +// +// It takes a list of unit files to enable (either just file names or full +// absolute paths if the unit files are residing outside the usual unit +// search paths), and two booleans: the first controls whether the unit shall +// be enabled for runtime only (true, /run), or persistently (false, /etc). +// The second one controls whether symlinks pointing to other units shall +// be replaced if necessary. +// +// This call returns one boolean and an array with the changes made. The +// boolean signals whether the unit files contained any enablement +// information (i.e. an [Install]) section. The changes list consists of +// structures with three strings: the type of the change (one of symlink +// or unlink), the file name of the symlink and the destination of the +// symlink. +func (c *Conn) EnableUnitFilesContext(ctx context.Context, files []string, runtime bool, force bool) (bool, []EnableUnitFileChange, error) { + var carries_install_info bool + var result []any + + err := c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.EnableUnitFiles", 0, files, runtime, force).Store(&carries_install_info, &result) + if err != nil { + return false, nil, err + } + + changes, err := convertSlice[EnableUnitFileChange](result) + if err != nil { + return false, nil, err + } + + return carries_install_info, changes, nil +} + +type EnableUnitFileChange struct { + Type string // Type of the change (one of symlink or unlink) + Filename string // File name of the symlink + Destination string // Destination of the symlink +} + +// Deprecated: use DisableUnitFilesContext instead. +func (c *Conn) DisableUnitFiles(files []string, runtime bool) ([]DisableUnitFileChange, error) { + return c.DisableUnitFilesContext(context.Background(), files, runtime) +} + +// DisableUnitFilesContext may be used to disable one or more units in the +// system (by removing symlinks to them from /etc or /run). +// +// It takes a list of unit files to disable (either just file names or full +// absolute paths if the unit files are residing outside the usual unit +// search paths), and one boolean: whether the unit was enabled for runtime +// only (true, /run), or persistently (false, /etc). +// +// This call returns an array with the changes made. The changes list +// consists of structures with three strings: the type of the change (one of +// symlink or unlink), the file name of the symlink and the destination of the +// symlink. +func (c *Conn) DisableUnitFilesContext(ctx context.Context, files []string, runtime bool) ([]DisableUnitFileChange, error) { + return storeSlice[DisableUnitFileChange](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.DisableUnitFiles", 0, files, runtime).Store) +} + +type DisableUnitFileChange struct { + Type string // Type of the change (one of symlink or unlink) + Filename string // File name of the symlink + Destination string // Destination of the symlink +} + +// Deprecated: use MaskUnitFilesContext instead. +func (c *Conn) MaskUnitFiles(files []string, runtime bool, force bool) ([]MaskUnitFileChange, error) { + return c.MaskUnitFilesContext(context.Background(), files, runtime, force) +} + +// MaskUnitFilesContext masks one or more units in the system. +// +// The files argument contains a list of units to mask (either just file names +// or full absolute paths if the unit files are residing outside the usual unit +// search paths). +// +// The runtime argument is used to specify whether the unit was enabled for +// runtime only (true, /run/systemd/..), or persistently (false, +// /etc/systemd/..). +func (c *Conn) MaskUnitFilesContext(ctx context.Context, files []string, runtime bool, force bool) ([]MaskUnitFileChange, error) { + return storeSlice[MaskUnitFileChange](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.MaskUnitFiles", 0, files, runtime, force).Store) +} + +type MaskUnitFileChange struct { + Type string // Type of the change (one of symlink or unlink) + Filename string // File name of the symlink + Destination string // Destination of the symlink +} + +// Deprecated: use UnmaskUnitFilesContext instead. +func (c *Conn) UnmaskUnitFiles(files []string, runtime bool) ([]UnmaskUnitFileChange, error) { + return c.UnmaskUnitFilesContext(context.Background(), files, runtime) +} + +// UnmaskUnitFilesContext unmasks one or more units in the system. +// +// It takes the list of unit files to mask (either just file names or full +// absolute paths if the unit files are residing outside the usual unit search +// paths), and a boolean runtime flag to specify whether the unit was enabled +// for runtime only (true, /run/systemd/..), or persistently (false, +// /etc/systemd/..). +func (c *Conn) UnmaskUnitFilesContext(ctx context.Context, files []string, runtime bool) ([]UnmaskUnitFileChange, error) { + return storeSlice[UnmaskUnitFileChange](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.UnmaskUnitFiles", 0, files, runtime).Store) +} + +type UnmaskUnitFileChange struct { + Type string // Type of the change (one of symlink or unlink) + Filename string // File name of the symlink + Destination string // Destination of the symlink +} + +// Deprecated: use ReloadContext instead. +func (c *Conn) Reload() error { + return c.ReloadContext(context.Background()) +} + +// ReloadContext instructs systemd to scan for and reload unit files. This is +// an equivalent to systemctl daemon-reload. +func (c *Conn) ReloadContext(ctx context.Context) error { + return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.Reload", 0).Store() +} + +func unitPath(name string) dbus.ObjectPath { + return dbus.ObjectPath("/org/freedesktop/systemd1/unit/" + PathBusEscape(name)) +} + +// unitName returns the unescaped base element of the supplied escaped path. +func unitName(dpath dbus.ObjectPath) string { + return pathBusUnescape(path.Base(string(dpath))) +} + +// JobStatus holds a currently queued job definition. +type JobStatus struct { + Id uint32 // The numeric job id + Unit string // The primary unit name for this job + JobType string // The job type as string + Status string // The job state as string + JobPath dbus.ObjectPath // The job object path + UnitPath dbus.ObjectPath // The unit object path +} + +// Deprecated: use ListJobsContext instead. +func (c *Conn) ListJobs() ([]JobStatus, error) { + return c.ListJobsContext(context.Background()) +} + +// ListJobsContext returns an array with all currently queued jobs. +func (c *Conn) ListJobsContext(ctx context.Context) ([]JobStatus, error) { + return storeSlice[JobStatus](c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.ListJobs", 0).Store) +} + +// FreezeUnit freezes the cgroup associated with the unit. +// Note that FreezeUnit and [Conn.ThawUnit] are only supported on systems running with cgroup v2. +func (c *Conn) FreezeUnit(ctx context.Context, unit string) error { + return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.FreezeUnit", 0, unit).Store() +} + +// ThawUnit unfreezes the cgroup associated with the unit. +func (c *Conn) ThawUnit(ctx context.Context, unit string) error { + return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.ThawUnit", 0, unit).Store() +} + +// AttachProcessesToUnit moves existing processes, identified by pids, into an existing systemd unit. +func (c *Conn) AttachProcessesToUnit(ctx context.Context, unit, subcgroup string, pids []uint32) error { + return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.AttachProcessesToUnit", 0, unit, subcgroup, pids).Store() +} diff --git a/vendor/github.com/coreos/go-systemd/v22/dbus/properties.go b/vendor/github.com/coreos/go-systemd/v22/dbus/properties.go new file mode 100644 index 000000000..fb42b6273 --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/properties.go @@ -0,0 +1,237 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbus + +import ( + "github.com/godbus/dbus/v5" +) + +// From the systemd docs: +// +// The properties array of StartTransientUnit() may take many of the settings +// that may also be configured in unit files. Not all parameters are currently +// accepted though, but we plan to cover more properties with future release. +// Currently you may set the Description, Slice and all dependency types of +// units, as well as RemainAfterExit, ExecStart for service units, +// TimeoutStopUSec and PIDs for scope units, and CPUAccounting, CPUShares, +// BlockIOAccounting, BlockIOWeight, BlockIOReadBandwidth, +// BlockIOWriteBandwidth, BlockIODeviceWeight, MemoryAccounting, MemoryLimit, +// DevicePolicy, DeviceAllow for services/scopes/slices. These fields map +// directly to their counterparts in unit files and as normal D-Bus object +// properties. The exception here is the PIDs field of scope units which is +// used for construction of the scope only and specifies the initial PIDs to +// add to the scope object. + +type Property struct { + Name string + Value dbus.Variant +} + +type PropertyCollection struct { + Name string + Properties []Property +} + +type execStart struct { + Path string // the binary path to execute + Args []string // an array with all arguments to pass to the executed command, starting with argument 0 + UncleanIsFailure bool // a boolean whether it should be considered a failure if the process exits uncleanly +} + +// PropExecStart sets the ExecStart service property. The first argument is a +// slice with the binary path to execute followed by the arguments to pass to +// the executed command. See +// http://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= +func PropExecStart(command []string, uncleanIsFailure bool) Property { + execStarts := []execStart{ + { + Path: command[0], + Args: command, + UncleanIsFailure: uncleanIsFailure, + }, + } + + return Property{ + Name: "ExecStart", + Value: dbus.MakeVariant(execStarts), + } +} + +// PropRemainAfterExit sets the RemainAfterExit service property. See +// http://www.freedesktop.org/software/systemd/man/systemd.service.html#RemainAfterExit= +func PropRemainAfterExit(b bool) Property { + return Property{ + Name: "RemainAfterExit", + Value: dbus.MakeVariant(b), + } +} + +// PropType sets the Type service property. See +// http://www.freedesktop.org/software/systemd/man/systemd.service.html#Type= +func PropType(t string) Property { + return Property{ + Name: "Type", + Value: dbus.MakeVariant(t), + } +} + +// PropDescription sets the Description unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit#Description= +func PropDescription(desc string) Property { + return Property{ + Name: "Description", + Value: dbus.MakeVariant(desc), + } +} + +func propDependency(name string, units []string) Property { + return Property{ + Name: name, + Value: dbus.MakeVariant(units), + } +} + +// PropRequires sets the Requires unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Requires= +func PropRequires(units ...string) Property { + return propDependency("Requires", units) +} + +// PropRequiresOverridable sets the RequiresOverridable unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#RequiresOverridable= +func PropRequiresOverridable(units ...string) Property { + return propDependency("RequiresOverridable", units) +} + +// PropRequisite sets the Requisite unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Requisite= +func PropRequisite(units ...string) Property { + return propDependency("Requisite", units) +} + +// PropRequisiteOverridable sets the RequisiteOverridable unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#RequisiteOverridable= +func PropRequisiteOverridable(units ...string) Property { + return propDependency("RequisiteOverridable", units) +} + +// PropWants sets the Wants unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Wants= +func PropWants(units ...string) Property { + return propDependency("Wants", units) +} + +// PropBindsTo sets the BindsTo unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#BindsTo= +func PropBindsTo(units ...string) Property { + return propDependency("BindsTo", units) +} + +// PropRequiredBy sets the RequiredBy unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#RequiredBy= +func PropRequiredBy(units ...string) Property { + return propDependency("RequiredBy", units) +} + +// PropRequiredByOverridable sets the RequiredByOverridable unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#RequiredByOverridable= +func PropRequiredByOverridable(units ...string) Property { + return propDependency("RequiredByOverridable", units) +} + +// PropWantedBy sets the WantedBy unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#WantedBy= +func PropWantedBy(units ...string) Property { + return propDependency("WantedBy", units) +} + +// PropBoundBy sets the BoundBy unit property. See +// http://www.freedesktop.org/software/systemd/main/systemd.unit.html#BoundBy= +func PropBoundBy(units ...string) Property { + return propDependency("BoundBy", units) +} + +// PropConflicts sets the Conflicts unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Conflicts= +func PropConflicts(units ...string) Property { + return propDependency("Conflicts", units) +} + +// PropConflictedBy sets the ConflictedBy unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#ConflictedBy= +func PropConflictedBy(units ...string) Property { + return propDependency("ConflictedBy", units) +} + +// PropBefore sets the Before unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Before= +func PropBefore(units ...string) Property { + return propDependency("Before", units) +} + +// PropAfter sets the After unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#After= +func PropAfter(units ...string) Property { + return propDependency("After", units) +} + +// PropOnFailure sets the OnFailure unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#OnFailure= +func PropOnFailure(units ...string) Property { + return propDependency("OnFailure", units) +} + +// PropTriggers sets the Triggers unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Triggers= +func PropTriggers(units ...string) Property { + return propDependency("Triggers", units) +} + +// PropTriggeredBy sets the TriggeredBy unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#TriggeredBy= +func PropTriggeredBy(units ...string) Property { + return propDependency("TriggeredBy", units) +} + +// PropPropagatesReloadTo sets the PropagatesReloadTo unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#PropagatesReloadTo= +func PropPropagatesReloadTo(units ...string) Property { + return propDependency("PropagatesReloadTo", units) +} + +// PropRequiresMountsFor sets the RequiresMountsFor unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.unit.html#RequiresMountsFor= +func PropRequiresMountsFor(units ...string) Property { + return propDependency("RequiresMountsFor", units) +} + +// PropSlice sets the Slice unit property. See +// http://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#Slice= +func PropSlice(slice string) Property { + return Property{ + Name: "Slice", + Value: dbus.MakeVariant(slice), + } +} + +// PropPids sets the PIDs field of scope units used in the initial construction +// of the scope only and specifies the initial PIDs to add to the scope object. +// See https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/#properties +func PropPids(pids ...uint32) Property { + return Property{ + Name: "PIDs", + Value: dbus.MakeVariant(pids), + } +} diff --git a/vendor/github.com/coreos/go-systemd/v22/dbus/set.go b/vendor/github.com/coreos/go-systemd/v22/dbus/set.go new file mode 100644 index 000000000..c0b8fde1f --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/set.go @@ -0,0 +1,62 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbus + +import ( + "sync" +) + +type set struct { + data map[string]bool + mu sync.Mutex +} + +func (s *set) Add(value string) { + s.mu.Lock() + defer s.mu.Unlock() + s.data[value] = true +} + +func (s *set) Remove(value string) { + s.mu.Lock() + defer s.mu.Unlock() + delete(s.data, value) +} + +func (s *set) Contains(value string) (exists bool) { + s.mu.Lock() + defer s.mu.Unlock() + _, exists = s.data[value] + return +} + +func (s *set) Length() int { + s.mu.Lock() + defer s.mu.Unlock() + return len(s.data) +} + +func (s *set) Values() (values []string) { + s.mu.Lock() + defer s.mu.Unlock() + for val := range s.data { + values = append(values, val) + } + return +} + +func newSet() *set { + return &set{data: make(map[string]bool)} +} diff --git a/vendor/github.com/coreos/go-systemd/v22/dbus/subscription.go b/vendor/github.com/coreos/go-systemd/v22/dbus/subscription.go new file mode 100644 index 000000000..fe06f2fce --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/subscription.go @@ -0,0 +1,351 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbus + +import ( + "context" + "errors" + "log" + "time" + + "github.com/godbus/dbus/v5" +) + +const ( + cleanIgnoreInterval = int64(10 * time.Second) + ignoreInterval = int64(30 * time.Millisecond) +) + +// Subscribe sets up this connection to subscribe to all systemd dbus events. +// This is required before calling SubscribeUnits. When the connection closes +// systemd will automatically stop sending signals so there is no need to +// explicitly call Unsubscribe(). +func (c *Conn) Subscribe() error { + c.sigconn.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, + "type='signal',interface='org.freedesktop.systemd1.Manager',member='UnitNew'") + c.sigconn.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, + "type='signal',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'") + + return c.sigobj.Call("org.freedesktop.systemd1.Manager.Subscribe", 0).Store() +} + +// Unsubscribe this connection from systemd dbus events. +func (c *Conn) Unsubscribe() error { + return c.sigobj.Call("org.freedesktop.systemd1.Manager.Unsubscribe", 0).Store() +} + +func (c *Conn) dispatch() { + ch := make(chan *dbus.Signal, signalBuffer) + + c.sigconn.Signal(ch) + + go func() { + for { + signal, ok := <-ch + if !ok { + return + } + + if signal.Name == "org.freedesktop.systemd1.Manager.JobRemoved" { + c.jobComplete(signal) + } + + if c.subStateSubscriber.updateCh == nil && + c.propertiesSubscriber.updateCh == nil { + continue + } + + var unitPath dbus.ObjectPath + switch signal.Name { + case "org.freedesktop.systemd1.Manager.JobRemoved": + unitName := signal.Body[2].(string) + _ = c.sysobj.Call("org.freedesktop.systemd1.Manager.GetUnit", 0, unitName).Store(&unitPath) + case "org.freedesktop.systemd1.Manager.UnitNew": + unitPath = signal.Body[1].(dbus.ObjectPath) + case "org.freedesktop.DBus.Properties.PropertiesChanged": + if signal.Body[0].(string) == "org.freedesktop.systemd1.Unit" { + unitPath = signal.Path + + if len(signal.Body) >= 2 { + if changed, ok := signal.Body[1].(map[string]dbus.Variant); ok { + c.sendPropertiesUpdate(unitPath, changed) + } + } + } + } + + if unitPath == dbus.ObjectPath("") { + continue + } + + c.sendSubStateUpdate(unitPath) + } + }() +} + +// Deprecated: use SubscribeUnitsContext instead. +func (c *Conn) SubscribeUnits(interval time.Duration) (<-chan map[string]*UnitStatus, <-chan error) { + return c.SubscribeUnitsContext(context.Background(), interval) +} + +// SubscribeUnitsContext returns two unbuffered channels which will receive all changed units every +// interval. Deleted units are sent as nil. +func (c *Conn) SubscribeUnitsContext(ctx context.Context, interval time.Duration) (<-chan map[string]*UnitStatus, <-chan error) { + return c.SubscribeUnitsCustomContext(ctx, interval, 0, func(u1, u2 *UnitStatus) bool { return *u1 != *u2 }, nil) +} + +// Deprecated: use SubscribeUnitsCustomContext instead. +func (c *Conn) SubscribeUnitsCustom(interval time.Duration, buffer int, isChanged func(*UnitStatus, *UnitStatus) bool, filterUnit func(string) bool) (<-chan map[string]*UnitStatus, <-chan error) { + return c.SubscribeUnitsCustomContext(context.Background(), interval, buffer, isChanged, filterUnit) +} + +// SubscribeUnitsCustomContext is like [Conn.SubscribeUnitsContext] but lets you specify the buffer +// size of the channels, the comparison function for detecting changes and a filter +// function for cutting down on the noise that your channel receives. +func (c *Conn) SubscribeUnitsCustomContext(ctx context.Context, interval time.Duration, buffer int, isChanged func(*UnitStatus, *UnitStatus) bool, filterUnit func(string) bool) (<-chan map[string]*UnitStatus, <-chan error) { + old := make(map[string]*UnitStatus) + statusChan := make(chan map[string]*UnitStatus, buffer) + errChan := make(chan error, buffer) + + go func() { + for { + timerChan := time.After(interval) + + units, err := c.ListUnitsContext(ctx) + if err == nil { + cur := make(map[string]*UnitStatus) + for i := range units { + if filterUnit != nil && filterUnit(units[i].Name) { + continue + } + cur[units[i].Name] = &units[i] + } + + // add all new or changed units + changed := make(map[string]*UnitStatus) + for n, u := range cur { + if oldU, ok := old[n]; !ok || isChanged(oldU, u) { + changed[n] = u + } + delete(old, n) + } + + // add all deleted units + for oldN := range old { + changed[oldN] = nil + } + + old = cur + + if len(changed) != 0 { + statusChan <- changed + } + } else { + errChan <- err + } + + select { + case <-timerChan: + continue + case <-ctx.Done(): + close(statusChan) + close(errChan) + return + } + } + }() + + return statusChan, errChan +} + +type SubStateUpdate struct { + UnitName string + SubState string +} + +// SetSubStateSubscriber writes to updateCh when any unit's substate changes. +// Although this writes to updateCh on every state change, the reported state +// may be more recent than the change that generated it (due to an unavoidable +// race in the systemd dbus interface). That is, this method provides a good +// way to keep a current view of all units' states, but is not guaranteed to +// show every state transition they go through. Furthermore, state changes +// will only be written to the channel with non-blocking writes. If updateCh +// is full, it attempts to write an error to errCh; if errCh is full, the error +// passes silently. +func (c *Conn) SetSubStateSubscriber(updateCh chan<- *SubStateUpdate, errCh chan<- error) { + if c == nil { + msg := "nil receiver" + select { + case errCh <- errors.New(msg): + default: + log.Printf("full error channel while reporting: %s\n", msg) + } + return + } + + c.subStateSubscriber.Lock() + defer c.subStateSubscriber.Unlock() + c.subStateSubscriber.updateCh = updateCh + c.subStateSubscriber.errCh = errCh +} + +func (c *Conn) sendSubStateUpdate(unitPath dbus.ObjectPath) { + c.subStateSubscriber.Lock() + defer c.subStateSubscriber.Unlock() + + if c.subStateSubscriber.updateCh == nil { + return + } + + isIgnored := c.shouldIgnore(unitPath) + defer c.cleanIgnore() + if isIgnored { + return + } + + info, err := c.GetUnitPathProperties(unitPath) + if err != nil { + select { + case c.subStateSubscriber.errCh <- err: + default: + log.Printf("full error channel while reporting: %s\n", err) + } + return + } + defer c.updateIgnore(unitPath, info) + + name, ok := info["Id"].(string) + if !ok { + msg := "failed to cast info.Id" + select { + case c.subStateSubscriber.errCh <- errors.New(msg): + default: + log.Printf("full error channel while reporting: %s\n", err) + } + return + } + substate, ok := info["SubState"].(string) + if !ok { + msg := "failed to cast info.SubState" + select { + case c.subStateSubscriber.errCh <- errors.New(msg): + default: + log.Printf("full error channel while reporting: %s\n", msg) + } + return + } + + update := &SubStateUpdate{name, substate} + select { + case c.subStateSubscriber.updateCh <- update: + default: + msg := "update channel is full" + select { + case c.subStateSubscriber.errCh <- errors.New(msg): + default: + log.Printf("full error channel while reporting: %s\n", msg) + } + return + } +} + +// The ignore functions work around a wart in the systemd dbus interface. +// Requesting the properties of an unloaded unit will cause systemd to send a +// pair of UnitNew/UnitRemoved signals. Because we need to get a unit's +// properties on UnitNew (as that's the only indication of a new unit coming up +// for the first time), we would enter an infinite loop if we did not attempt +// to detect and ignore these spurious signals. The signal themselves are +// indistinguishable from relevant ones, so we (somewhat hackishly) ignore an +// unloaded unit's signals for a short time after requesting its properties. +// This means that we will miss e.g. a transient unit being restarted +// *immediately* upon failure and also a transient unit being started +// immediately after requesting its status (with systemctl status, for example, +// because this causes a UnitNew signal to be sent which then causes us to fetch +// the properties). + +func (c *Conn) shouldIgnore(path dbus.ObjectPath) bool { + t, ok := c.subStateSubscriber.ignore[path] + return ok && t >= time.Now().UnixNano() +} + +func (c *Conn) updateIgnore(path dbus.ObjectPath, info map[string]any) { + loadState, ok := info["LoadState"].(string) + if !ok { + return + } + + // unit is unloaded - it will trigger bad systemd dbus behavior + if loadState == "not-found" { + c.subStateSubscriber.ignore[path] = time.Now().UnixNano() + ignoreInterval + } +} + +// without this, ignore would grow unboundedly over time +func (c *Conn) cleanIgnore() { + now := time.Now().UnixNano() + if c.subStateSubscriber.cleanIgnore < now { + c.subStateSubscriber.cleanIgnore = now + cleanIgnoreInterval + + for p, t := range c.subStateSubscriber.ignore { + if t < now { + delete(c.subStateSubscriber.ignore, p) + } + } + } +} + +// PropertiesUpdate holds a map of a unit's changed properties +type PropertiesUpdate struct { + UnitName string + Changed map[string]dbus.Variant +} + +// SetPropertiesSubscriber writes to updateCh when any unit's properties +// change. Every property change reported by systemd will be sent; that is, no +// transitions will be "missed" (as they might be with SetSubStateSubscriber). +// However, state changes will only be written to the channel with non-blocking +// writes. If updateCh is full, it attempts to write an error to errCh; if +// errCh is full, the error passes silently. +func (c *Conn) SetPropertiesSubscriber(updateCh chan<- *PropertiesUpdate, errCh chan<- error) { + c.propertiesSubscriber.Lock() + defer c.propertiesSubscriber.Unlock() + c.propertiesSubscriber.updateCh = updateCh + c.propertiesSubscriber.errCh = errCh +} + +// we don't need to worry about shouldIgnore() here because +// sendPropertiesUpdate doesn't call GetProperties() +func (c *Conn) sendPropertiesUpdate(unitPath dbus.ObjectPath, changedProps map[string]dbus.Variant) { + c.propertiesSubscriber.Lock() + defer c.propertiesSubscriber.Unlock() + + if c.propertiesSubscriber.updateCh == nil { + return + } + + update := &PropertiesUpdate{unitName(unitPath), changedProps} + + select { + case c.propertiesSubscriber.updateCh <- update: + default: + msg := "update channel is full" + select { + case c.propertiesSubscriber.errCh <- errors.New(msg): + default: + log.Printf("full error channel while reporting: %s\n", msg) + } + return + } +} diff --git a/vendor/github.com/coreos/go-systemd/v22/dbus/subscription_set.go b/vendor/github.com/coreos/go-systemd/v22/dbus/subscription_set.go new file mode 100644 index 000000000..173ca3728 --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/v22/dbus/subscription_set.go @@ -0,0 +1,63 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package dbus + +import ( + "context" + "time" +) + +// SubscriptionSet returns a subscription set which is like conn.Subscribe but +// can filter to only return events for a set of units. +type SubscriptionSet struct { + *set + conn *Conn +} + +func (s *SubscriptionSet) filter(unit string) bool { + return !s.Contains(unit) +} + +// SubscribeContext starts listening for dbus events for all of the units in the set. +// Returns channels identical to conn.SubscribeUnits. +func (s *SubscriptionSet) SubscribeContext(ctx context.Context) (<-chan map[string]*UnitStatus, <-chan error) { + // TODO: Make fully evented by using systemd 209 with properties changed values + return s.conn.SubscribeUnitsCustomContext(ctx, time.Second, 0, + mismatchUnitStatus, + func(unit string) bool { return s.filter(unit) }, + ) +} + +// Deprecated: use SubscribeContext instead. +func (s *SubscriptionSet) Subscribe() (<-chan map[string]*UnitStatus, <-chan error) { + return s.SubscribeContext(context.Background()) +} + +// NewSubscriptionSet returns a new subscription set. +func (c *Conn) NewSubscriptionSet() *SubscriptionSet { + return &SubscriptionSet{newSet(), c} +} + +// mismatchUnitStatus returns true if the provided UnitStatus objects +// are not equivalent. false is returned if the objects are equivalent. +// Only the Name, Description and state-related fields are used in +// the comparison. +func mismatchUnitStatus(u1, u2 *UnitStatus) bool { + return u1.Name != u2.Name || + u1.Description != u2.Description || + u1.LoadState != u2.LoadState || + u1.ActiveState != u2.ActiveState || + u1.SubState != u2.SubState +} diff --git a/vendor/github.com/godbus/dbus/v5/CONTRIBUTING.md b/vendor/github.com/godbus/dbus/v5/CONTRIBUTING.md new file mode 100644 index 000000000..c88f9b2bd --- /dev/null +++ b/vendor/github.com/godbus/dbus/v5/CONTRIBUTING.md @@ -0,0 +1,50 @@ +# How to Contribute + +## Getting Started + +- Fork the repository on GitHub +- Read the [README](README.markdown) for build and test instructions +- Play with the project, submit bugs, submit patches! + +## Contribution Flow + +This is a rough outline of what a contributor's workflow looks like: + +- Create a topic branch from where you want to base your work (usually master). +- Make commits of logical units. +- Make sure your commit messages are in the proper format (see below). +- Push your changes to a topic branch in your fork of the repository. +- Make sure the tests pass, and add any new tests as appropriate. +- Submit a pull request to the original repository. + +Thanks for your contributions! + +### Format of the Commit Message + +We follow a rough convention for commit messages that is designed to answer two +questions: what changed and why. The subject line should feature the what and +the body of the commit should describe the why. + +``` +scripts: add the test-cluster command + +this uses tmux to setup a test cluster that you can easily kill and +start for debugging. + +Fixes #38 +``` + +The format can be described more formally as follows: + +``` +: + + + +