diff --git a/go.mod b/go.mod index 7a259e9f..9854d104 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22 require ( github.com/NVIDIA/go-nvlib v0.7.2 - github.com/NVIDIA/go-nvml v0.12.4-1 + github.com/NVIDIA/go-nvml v0.12.9-0 github.com/cyphar/filepath-securejoin v0.4.1 github.com/fsnotify/fsnotify v1.7.0 github.com/moby/sys/reexec v0.1.0 diff --git a/go.sum b/go.sum index 192cd8f4..a9c3dd3c 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/NVIDIA/go-nvlib v0.7.2 h1:7sy/NVUa4sM9FLKwH6CjBfHSWrJUmv8emVyxLTzjfOA= github.com/NVIDIA/go-nvlib v0.7.2/go.mod h1:2Kh2kYSP5IJ8EKf0/SYDzHiQKb9EJkwOf2LQzu6pXzY= -github.com/NVIDIA/go-nvml v0.12.4-1 h1:WKUvqshhWSNTfm47ETRhv0A0zJyr1ncCuHiXwoTrBEc= -github.com/NVIDIA/go-nvml v0.12.4-1/go.mod h1:8Llmj+1Rr+9VGGwZuRer5N/aCjxGuR5nPb/9ebBiIEQ= +github.com/NVIDIA/go-nvml v0.12.9-0 h1:e344UK8ZkeMeeLkdQtRhmXRxNf+u532LDZPGMtkdus0= +github.com/NVIDIA/go-nvml v0.12.9-0/go.mod h1:+KNA7c7gIBH7SKSJ1ntlwkfN80zdx8ovl4hrK3LmPt4= 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/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= 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 1ccb5016..09e82fc6 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/const.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/const.go @@ -52,6 +52,10 @@ const ( MAX_PHYSICAL_BRIDGE = 128 // MAX_THERMAL_SENSORS_PER_GPU as defined in nvml/nvml.h MAX_THERMAL_SENSORS_PER_GPU = 3 + // DEVICE_UUID_ASCII_LEN as defined in nvml/nvml.h + DEVICE_UUID_ASCII_LEN = 41 + // DEVICE_UUID_BINARY_LEN as defined in nvml/nvml.h + DEVICE_UUID_BINARY_LEN = 16 // FlagDefault as defined in nvml/nvml.h FlagDefault = 0 // FlagForce as defined in nvml/nvml.h @@ -62,54 +66,8 @@ const ( DOUBLE_BIT_ECC = 0 // MAX_GPU_PERF_PSTATES as defined in nvml/nvml.h MAX_GPU_PERF_PSTATES = 16 - // GRID_LICENSE_EXPIRY_NOT_AVAILABLE as defined in nvml/nvml.h - GRID_LICENSE_EXPIRY_NOT_AVAILABLE = 0 - // GRID_LICENSE_EXPIRY_INVALID as defined in nvml/nvml.h - GRID_LICENSE_EXPIRY_INVALID = 1 - // GRID_LICENSE_EXPIRY_VALID as defined in nvml/nvml.h - GRID_LICENSE_EXPIRY_VALID = 2 - // GRID_LICENSE_EXPIRY_NOT_APPLICABLE as defined in nvml/nvml.h - GRID_LICENSE_EXPIRY_NOT_APPLICABLE = 3 - // GRID_LICENSE_EXPIRY_PERMANENT as defined in nvml/nvml.h - GRID_LICENSE_EXPIRY_PERMANENT = 4 - // GRID_LICENSE_BUFFER_SIZE as defined in nvml/nvml.h - GRID_LICENSE_BUFFER_SIZE = 128 - // VGPU_NAME_BUFFER_SIZE as defined in nvml/nvml.h - VGPU_NAME_BUFFER_SIZE = 64 - // GRID_LICENSE_FEATURE_MAX_COUNT as defined in nvml/nvml.h - GRID_LICENSE_FEATURE_MAX_COUNT = 3 - // INVALID_VGPU_PLACEMENT_ID as defined in nvml/nvml.h - INVALID_VGPU_PLACEMENT_ID = 65535 - // VGPU_SCHEDULER_POLICY_UNKNOWN as defined in nvml/nvml.h - VGPU_SCHEDULER_POLICY_UNKNOWN = 0 - // VGPU_SCHEDULER_POLICY_BEST_EFFORT as defined in nvml/nvml.h - VGPU_SCHEDULER_POLICY_BEST_EFFORT = 1 - // VGPU_SCHEDULER_POLICY_EQUAL_SHARE as defined in nvml/nvml.h - VGPU_SCHEDULER_POLICY_EQUAL_SHARE = 2 - // VGPU_SCHEDULER_POLICY_FIXED_SHARE as defined in nvml/nvml.h - VGPU_SCHEDULER_POLICY_FIXED_SHARE = 3 - // SUPPORTED_VGPU_SCHEDULER_POLICY_COUNT as defined in nvml/nvml.h - SUPPORTED_VGPU_SCHEDULER_POLICY_COUNT = 3 - // SCHEDULER_SW_MAX_LOG_ENTRIES as defined in nvml/nvml.h - SCHEDULER_SW_MAX_LOG_ENTRIES = 200 - // VGPU_SCHEDULER_ARR_DEFAULT as defined in nvml/nvml.h - VGPU_SCHEDULER_ARR_DEFAULT = 0 - // VGPU_SCHEDULER_ARR_DISABLE as defined in nvml/nvml.h - VGPU_SCHEDULER_ARR_DISABLE = 1 - // VGPU_SCHEDULER_ARR_ENABLE as defined in nvml/nvml.h - VGPU_SCHEDULER_ARR_ENABLE = 2 - // GRID_LICENSE_STATE_UNKNOWN as defined in nvml/nvml.h - GRID_LICENSE_STATE_UNKNOWN = 0 - // GRID_LICENSE_STATE_UNINITIALIZED as defined in nvml/nvml.h - GRID_LICENSE_STATE_UNINITIALIZED = 1 - // GRID_LICENSE_STATE_UNLICENSED_UNRESTRICTED as defined in nvml/nvml.h - GRID_LICENSE_STATE_UNLICENSED_UNRESTRICTED = 2 - // GRID_LICENSE_STATE_UNLICENSED_RESTRICTED as defined in nvml/nvml.h - GRID_LICENSE_STATE_UNLICENSED_RESTRICTED = 3 - // GRID_LICENSE_STATE_UNLICENSED as defined in nvml/nvml.h - GRID_LICENSE_STATE_UNLICENSED = 4 - // GRID_LICENSE_STATE_LICENSED as defined in nvml/nvml.h - GRID_LICENSE_STATE_LICENSED = 5 + // PERF_MODES_BUFFER_SIZE as defined in nvml/nvml.h + PERF_MODES_BUFFER_SIZE = 2048 // GSP_FIRMWARE_VERSION_BUF_SIZE as defined in nvml/nvml.h GSP_FIRMWARE_VERSION_BUF_SIZE = 64 // DEVICE_ARCH_KEPLER as defined in nvml/nvml.h @@ -128,6 +86,10 @@ const ( DEVICE_ARCH_ADA = 8 // DEVICE_ARCH_HOPPER as defined in nvml/nvml.h DEVICE_ARCH_HOPPER = 9 + // DEVICE_ARCH_BLACKWELL as defined in nvml/nvml.h + DEVICE_ARCH_BLACKWELL = 10 + // DEVICE_ARCH_T23X as defined in nvml/nvml.h + DEVICE_ARCH_T23X = 11 // DEVICE_ARCH_UNKNOWN as defined in nvml/nvml.h DEVICE_ARCH_UNKNOWN = 4294967295 // BUS_TYPE_UNKNOWN as defined in nvml/nvml.h @@ -170,6 +132,82 @@ const ( ADAPTIVE_CLOCKING_INFO_STATUS_ENABLED = 1 // MAX_GPU_UTILIZATIONS as defined in nvml/nvml.h MAX_GPU_UTILIZATIONS = 8 + // PCIE_ATOMICS_CAP_FETCHADD32 as defined in nvml/nvml.h + PCIE_ATOMICS_CAP_FETCHADD32 = 1 + // PCIE_ATOMICS_CAP_FETCHADD64 as defined in nvml/nvml.h + PCIE_ATOMICS_CAP_FETCHADD64 = 2 + // PCIE_ATOMICS_CAP_SWAP32 as defined in nvml/nvml.h + PCIE_ATOMICS_CAP_SWAP32 = 4 + // PCIE_ATOMICS_CAP_SWAP64 as defined in nvml/nvml.h + PCIE_ATOMICS_CAP_SWAP64 = 8 + // PCIE_ATOMICS_CAP_CAS32 as defined in nvml/nvml.h + PCIE_ATOMICS_CAP_CAS32 = 16 + // PCIE_ATOMICS_CAP_CAS64 as defined in nvml/nvml.h + PCIE_ATOMICS_CAP_CAS64 = 32 + // PCIE_ATOMICS_CAP_CAS128 as defined in nvml/nvml.h + PCIE_ATOMICS_CAP_CAS128 = 64 + // PCIE_ATOMICS_OPS_MAX as defined in nvml/nvml.h + PCIE_ATOMICS_OPS_MAX = 7 + // POWER_SCOPE_GPU as defined in nvml/nvml.h + POWER_SCOPE_GPU = 0 + // POWER_SCOPE_MODULE as defined in nvml/nvml.h + POWER_SCOPE_MODULE = 1 + // POWER_SCOPE_MEMORY as defined in nvml/nvml.h + POWER_SCOPE_MEMORY = 2 + // GRID_LICENSE_EXPIRY_NOT_AVAILABLE as defined in nvml/nvml.h + GRID_LICENSE_EXPIRY_NOT_AVAILABLE = 0 + // GRID_LICENSE_EXPIRY_INVALID as defined in nvml/nvml.h + GRID_LICENSE_EXPIRY_INVALID = 1 + // GRID_LICENSE_EXPIRY_VALID as defined in nvml/nvml.h + GRID_LICENSE_EXPIRY_VALID = 2 + // GRID_LICENSE_EXPIRY_NOT_APPLICABLE as defined in nvml/nvml.h + GRID_LICENSE_EXPIRY_NOT_APPLICABLE = 3 + // GRID_LICENSE_EXPIRY_PERMANENT as defined in nvml/nvml.h + GRID_LICENSE_EXPIRY_PERMANENT = 4 + // GRID_LICENSE_BUFFER_SIZE as defined in nvml/nvml.h + GRID_LICENSE_BUFFER_SIZE = 128 + // VGPU_NAME_BUFFER_SIZE as defined in nvml/nvml.h + VGPU_NAME_BUFFER_SIZE = 64 + // GRID_LICENSE_FEATURE_MAX_COUNT as defined in nvml/nvml.h + GRID_LICENSE_FEATURE_MAX_COUNT = 3 + // INVALID_VGPU_PLACEMENT_ID as defined in nvml/nvml.h + INVALID_VGPU_PLACEMENT_ID = 65535 + // VGPU_PGPU_HETEROGENEOUS_MODE as defined in nvml/nvml.h + VGPU_PGPU_HETEROGENEOUS_MODE = 0 + // VGPU_PGPU_HOMOGENEOUS_MODE as defined in nvml/nvml.h + VGPU_PGPU_HOMOGENEOUS_MODE = 1 + // VGPU_SCHEDULER_POLICY_UNKNOWN as defined in nvml/nvml.h + VGPU_SCHEDULER_POLICY_UNKNOWN = 0 + // VGPU_SCHEDULER_POLICY_BEST_EFFORT as defined in nvml/nvml.h + VGPU_SCHEDULER_POLICY_BEST_EFFORT = 1 + // VGPU_SCHEDULER_POLICY_EQUAL_SHARE as defined in nvml/nvml.h + VGPU_SCHEDULER_POLICY_EQUAL_SHARE = 2 + // VGPU_SCHEDULER_POLICY_FIXED_SHARE as defined in nvml/nvml.h + VGPU_SCHEDULER_POLICY_FIXED_SHARE = 3 + // SUPPORTED_VGPU_SCHEDULER_POLICY_COUNT as defined in nvml/nvml.h + SUPPORTED_VGPU_SCHEDULER_POLICY_COUNT = 3 + // SCHEDULER_SW_MAX_LOG_ENTRIES as defined in nvml/nvml.h + SCHEDULER_SW_MAX_LOG_ENTRIES = 200 + // VGPU_SCHEDULER_ARR_DEFAULT as defined in nvml/nvml.h + VGPU_SCHEDULER_ARR_DEFAULT = 0 + // VGPU_SCHEDULER_ARR_DISABLE as defined in nvml/nvml.h + VGPU_SCHEDULER_ARR_DISABLE = 1 + // VGPU_SCHEDULER_ARR_ENABLE as defined in nvml/nvml.h + VGPU_SCHEDULER_ARR_ENABLE = 2 + // VGPU_SCHEDULER_ENGINE_TYPE_GRAPHICS as defined in nvml/nvml.h + VGPU_SCHEDULER_ENGINE_TYPE_GRAPHICS = 1 + // GRID_LICENSE_STATE_UNKNOWN as defined in nvml/nvml.h + GRID_LICENSE_STATE_UNKNOWN = 0 + // GRID_LICENSE_STATE_UNINITIALIZED as defined in nvml/nvml.h + GRID_LICENSE_STATE_UNINITIALIZED = 1 + // GRID_LICENSE_STATE_UNLICENSED_UNRESTRICTED as defined in nvml/nvml.h + GRID_LICENSE_STATE_UNLICENSED_UNRESTRICTED = 2 + // GRID_LICENSE_STATE_UNLICENSED_RESTRICTED as defined in nvml/nvml.h + GRID_LICENSE_STATE_UNLICENSED_RESTRICTED = 3 + // GRID_LICENSE_STATE_UNLICENSED as defined in nvml/nvml.h + GRID_LICENSE_STATE_UNLICENSED = 4 + // GRID_LICENSE_STATE_LICENSED as defined in nvml/nvml.h + GRID_LICENSE_STATE_LICENSED = 5 // FI_DEV_ECC_CURRENT as defined in nvml/nvml.h FI_DEV_ECC_CURRENT = 1 // FI_DEV_ECC_PENDING as defined in nvml/nvml.h @@ -562,10 +600,188 @@ const ( FI_DEV_TEMPERATURE_MEM_MAX_TLIMIT = 195 // FI_DEV_TEMPERATURE_GPU_MAX_TLIMIT as defined in nvml/nvml.h FI_DEV_TEMPERATURE_GPU_MAX_TLIMIT = 196 + // FI_DEV_PCIE_COUNT_TX_BYTES as defined in nvml/nvml.h + FI_DEV_PCIE_COUNT_TX_BYTES = 197 + // FI_DEV_PCIE_COUNT_RX_BYTES as defined in nvml/nvml.h + FI_DEV_PCIE_COUNT_RX_BYTES = 198 // FI_DEV_IS_MIG_MODE_INDEPENDENT_MIG_QUERY_CAPABLE as defined in nvml/nvml.h FI_DEV_IS_MIG_MODE_INDEPENDENT_MIG_QUERY_CAPABLE = 199 + // FI_DEV_NVLINK_GET_POWER_THRESHOLD_MAX as defined in nvml/nvml.h + FI_DEV_NVLINK_GET_POWER_THRESHOLD_MAX = 200 + // FI_DEV_NVLINK_COUNT_XMIT_PACKETS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_XMIT_PACKETS = 201 + // FI_DEV_NVLINK_COUNT_XMIT_BYTES as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_XMIT_BYTES = 202 + // FI_DEV_NVLINK_COUNT_RCV_PACKETS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_RCV_PACKETS = 203 + // FI_DEV_NVLINK_COUNT_RCV_BYTES as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_RCV_BYTES = 204 + // FI_DEV_NVLINK_COUNT_VL15_DROPPED as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_VL15_DROPPED = 205 + // FI_DEV_NVLINK_COUNT_MALFORMED_PACKET_ERRORS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_MALFORMED_PACKET_ERRORS = 206 + // FI_DEV_NVLINK_COUNT_BUFFER_OVERRUN_ERRORS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_BUFFER_OVERRUN_ERRORS = 207 + // FI_DEV_NVLINK_COUNT_RCV_ERRORS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_RCV_ERRORS = 208 + // FI_DEV_NVLINK_COUNT_RCV_REMOTE_ERRORS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_RCV_REMOTE_ERRORS = 209 + // FI_DEV_NVLINK_COUNT_RCV_GENERAL_ERRORS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_RCV_GENERAL_ERRORS = 210 + // FI_DEV_NVLINK_COUNT_LOCAL_LINK_INTEGRITY_ERRORS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_LOCAL_LINK_INTEGRITY_ERRORS = 211 + // FI_DEV_NVLINK_COUNT_XMIT_DISCARDS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_XMIT_DISCARDS = 212 + // FI_DEV_NVLINK_COUNT_LINK_RECOVERY_SUCCESSFUL_EVENTS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_LINK_RECOVERY_SUCCESSFUL_EVENTS = 213 + // FI_DEV_NVLINK_COUNT_LINK_RECOVERY_FAILED_EVENTS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_LINK_RECOVERY_FAILED_EVENTS = 214 + // FI_DEV_NVLINK_COUNT_LINK_RECOVERY_EVENTS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_LINK_RECOVERY_EVENTS = 215 + // FI_DEV_NVLINK_COUNT_RAW_BER_LANE0 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_RAW_BER_LANE0 = 216 + // FI_DEV_NVLINK_COUNT_RAW_BER_LANE1 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_RAW_BER_LANE1 = 217 + // FI_DEV_NVLINK_COUNT_RAW_BER as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_RAW_BER = 218 + // FI_DEV_NVLINK_COUNT_EFFECTIVE_ERRORS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_EFFECTIVE_ERRORS = 219 + // FI_DEV_NVLINK_COUNT_EFFECTIVE_BER as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_EFFECTIVE_BER = 220 + // FI_DEV_NVLINK_COUNT_SYMBOL_ERRORS as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_SYMBOL_ERRORS = 221 + // FI_DEV_NVLINK_COUNT_SYMBOL_BER as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_SYMBOL_BER = 222 + // FI_DEV_NVLINK_GET_POWER_THRESHOLD_MIN as defined in nvml/nvml.h + FI_DEV_NVLINK_GET_POWER_THRESHOLD_MIN = 223 + // FI_DEV_NVLINK_GET_POWER_THRESHOLD_UNITS as defined in nvml/nvml.h + FI_DEV_NVLINK_GET_POWER_THRESHOLD_UNITS = 224 + // FI_DEV_NVLINK_GET_POWER_THRESHOLD_SUPPORTED as defined in nvml/nvml.h + FI_DEV_NVLINK_GET_POWER_THRESHOLD_SUPPORTED = 225 + // FI_DEV_RESET_STATUS as defined in nvml/nvml.h + FI_DEV_RESET_STATUS = 226 + // FI_DEV_DRAIN_AND_RESET_STATUS as defined in nvml/nvml.h + FI_DEV_DRAIN_AND_RESET_STATUS = 227 + // FI_DEV_PCIE_OUTBOUND_ATOMICS_MASK as defined in nvml/nvml.h + FI_DEV_PCIE_OUTBOUND_ATOMICS_MASK = 228 + // FI_DEV_PCIE_INBOUND_ATOMICS_MASK as defined in nvml/nvml.h + FI_DEV_PCIE_INBOUND_ATOMICS_MASK = 229 + // FI_DEV_GET_GPU_RECOVERY_ACTION as defined in nvml/nvml.h + FI_DEV_GET_GPU_RECOVERY_ACTION = 230 + // FI_DEV_C2C_LINK_ERROR_INTR as defined in nvml/nvml.h + FI_DEV_C2C_LINK_ERROR_INTR = 231 + // FI_DEV_C2C_LINK_ERROR_REPLAY as defined in nvml/nvml.h + FI_DEV_C2C_LINK_ERROR_REPLAY = 232 + // FI_DEV_C2C_LINK_ERROR_REPLAY_B2B as defined in nvml/nvml.h + FI_DEV_C2C_LINK_ERROR_REPLAY_B2B = 233 + // FI_DEV_C2C_LINK_POWER_STATE as defined in nvml/nvml.h + FI_DEV_C2C_LINK_POWER_STATE = 234 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_0 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_0 = 235 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_1 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_1 = 236 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_2 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_2 = 237 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_3 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_3 = 238 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_4 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_4 = 239 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_5 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_5 = 240 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_6 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_6 = 241 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_7 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_7 = 242 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_8 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_8 = 243 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_9 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_9 = 244 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_10 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_10 = 245 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_11 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_11 = 246 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_12 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_12 = 247 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_13 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_13 = 248 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_14 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_14 = 249 + // FI_DEV_NVLINK_COUNT_FEC_HISTORY_15 as defined in nvml/nvml.h + FI_DEV_NVLINK_COUNT_FEC_HISTORY_15 = 250 + // FI_DEV_CLOCKS_EVENT_REASON_SW_POWER_CAP as defined in nvml/nvml.h + FI_DEV_CLOCKS_EVENT_REASON_SW_POWER_CAP = 74 + // FI_DEV_CLOCKS_EVENT_REASON_SYNC_BOOST as defined in nvml/nvml.h + FI_DEV_CLOCKS_EVENT_REASON_SYNC_BOOST = 76 + // FI_DEV_CLOCKS_EVENT_REASON_SW_THERM_SLOWDOWN as defined in nvml/nvml.h + FI_DEV_CLOCKS_EVENT_REASON_SW_THERM_SLOWDOWN = 251 + // FI_DEV_CLOCKS_EVENT_REASON_HW_THERM_SLOWDOWN as defined in nvml/nvml.h + FI_DEV_CLOCKS_EVENT_REASON_HW_THERM_SLOWDOWN = 252 + // FI_DEV_CLOCKS_EVENT_REASON_HW_POWER_BRAKE_SLOWDOWN as defined in nvml/nvml.h + FI_DEV_CLOCKS_EVENT_REASON_HW_POWER_BRAKE_SLOWDOWN = 253 + // FI_DEV_POWER_SYNC_BALANCING_FREQ as defined in nvml/nvml.h + FI_DEV_POWER_SYNC_BALANCING_FREQ = 254 + // FI_DEV_POWER_SYNC_BALANCING_AF as defined in nvml/nvml.h + FI_DEV_POWER_SYNC_BALANCING_AF = 255 + // FI_PWR_SMOOTHING_ENABLED as defined in nvml/nvml.h + FI_PWR_SMOOTHING_ENABLED = 256 + // FI_PWR_SMOOTHING_PRIV_LVL as defined in nvml/nvml.h + FI_PWR_SMOOTHING_PRIV_LVL = 257 + // FI_PWR_SMOOTHING_IMM_RAMP_DOWN_ENABLED as defined in nvml/nvml.h + FI_PWR_SMOOTHING_IMM_RAMP_DOWN_ENABLED = 258 + // FI_PWR_SMOOTHING_APPLIED_TMP_CEIL as defined in nvml/nvml.h + FI_PWR_SMOOTHING_APPLIED_TMP_CEIL = 259 + // FI_PWR_SMOOTHING_APPLIED_TMP_FLOOR as defined in nvml/nvml.h + FI_PWR_SMOOTHING_APPLIED_TMP_FLOOR = 260 + // FI_PWR_SMOOTHING_MAX_PERCENT_TMP_FLOOR_SETTING as defined in nvml/nvml.h + FI_PWR_SMOOTHING_MAX_PERCENT_TMP_FLOOR_SETTING = 261 + // FI_PWR_SMOOTHING_MIN_PERCENT_TMP_FLOOR_SETTING as defined in nvml/nvml.h + FI_PWR_SMOOTHING_MIN_PERCENT_TMP_FLOOR_SETTING = 262 + // FI_PWR_SMOOTHING_HW_CIRCUITRY_PERCENT_LIFETIME_REMAINING as defined in nvml/nvml.h + FI_PWR_SMOOTHING_HW_CIRCUITRY_PERCENT_LIFETIME_REMAINING = 263 + // FI_PWR_SMOOTHING_MAX_NUM_PRESET_PROFILES as defined in nvml/nvml.h + FI_PWR_SMOOTHING_MAX_NUM_PRESET_PROFILES = 264 + // FI_PWR_SMOOTHING_PROFILE_PERCENT_TMP_FLOOR as defined in nvml/nvml.h + FI_PWR_SMOOTHING_PROFILE_PERCENT_TMP_FLOOR = 265 + // FI_PWR_SMOOTHING_PROFILE_RAMP_UP_RATE as defined in nvml/nvml.h + FI_PWR_SMOOTHING_PROFILE_RAMP_UP_RATE = 266 + // FI_PWR_SMOOTHING_PROFILE_RAMP_DOWN_RATE as defined in nvml/nvml.h + FI_PWR_SMOOTHING_PROFILE_RAMP_DOWN_RATE = 267 + // FI_PWR_SMOOTHING_PROFILE_RAMP_DOWN_HYST_VAL as defined in nvml/nvml.h + FI_PWR_SMOOTHING_PROFILE_RAMP_DOWN_HYST_VAL = 268 + // FI_PWR_SMOOTHING_ACTIVE_PRESET_PROFILE as defined in nvml/nvml.h + FI_PWR_SMOOTHING_ACTIVE_PRESET_PROFILE = 269 + // FI_PWR_SMOOTHING_ADMIN_OVERRIDE_PERCENT_TMP_FLOOR as defined in nvml/nvml.h + FI_PWR_SMOOTHING_ADMIN_OVERRIDE_PERCENT_TMP_FLOOR = 270 + // FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_UP_RATE as defined in nvml/nvml.h + FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_UP_RATE = 271 + // FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_RATE as defined in nvml/nvml.h + FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_RATE = 272 + // FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_HYST_VAL as defined in nvml/nvml.h + FI_PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_HYST_VAL = 273 // FI_MAX as defined in nvml/nvml.h - FI_MAX = 200 + FI_MAX = 274 + // NVLINK_LOW_POWER_THRESHOLD_UNIT_100US as defined in nvml/nvml.h + NVLINK_LOW_POWER_THRESHOLD_UNIT_100US = 0 + // NVLINK_LOW_POWER_THRESHOLD_UNIT_50US as defined in nvml/nvml.h + NVLINK_LOW_POWER_THRESHOLD_UNIT_50US = 1 + // NVLINK_POWER_STATE_HIGH_SPEED as defined in nvml/nvml.h + NVLINK_POWER_STATE_HIGH_SPEED = 0 + // NVLINK_POWER_STATE_LOW as defined in nvml/nvml.h + NVLINK_POWER_STATE_LOW = 1 + // NVLINK_LOW_POWER_THRESHOLD_MIN as defined in nvml/nvml.h + NVLINK_LOW_POWER_THRESHOLD_MIN = 1 + // NVLINK_LOW_POWER_THRESHOLD_MAX as defined in nvml/nvml.h + NVLINK_LOW_POWER_THRESHOLD_MAX = 8191 + // NVLINK_LOW_POWER_THRESHOLD_RESET as defined in nvml/nvml.h + NVLINK_LOW_POWER_THRESHOLD_RESET = 4294967295 + // NVLINK_LOW_POWER_THRESHOLD_DEFAULT as defined in nvml/nvml.h + NVLINK_LOW_POWER_THRESHOLD_DEFAULT = 4294967295 + // C2C_POWER_STATE_FULL_POWER as defined in nvml/nvml.h + C2C_POWER_STATE_FULL_POWER = 0 + // C2C_POWER_STATE_LOW_POWER as defined in nvml/nvml.h + C2C_POWER_STATE_LOW_POWER = 1 + // EventTypeNone as defined in nvml/nvml.h + EventTypeNone = 0 // EventTypeSingleBitEccError as defined in nvml/nvml.h EventTypeSingleBitEccError = 1 // EventTypeDoubleBitEccError as defined in nvml/nvml.h @@ -580,10 +796,28 @@ const ( EventTypePowerSourceChange = 128 // EventMigConfigChange as defined in nvml/nvml.h EventMigConfigChange = 256 - // EventTypeNone as defined in nvml/nvml.h - EventTypeNone = 0 + // EventTypeSingleBitEccErrorStorm as defined in nvml/nvml.h + EventTypeSingleBitEccErrorStorm = 512 + // EventTypeDramRetirementEvent as defined in nvml/nvml.h + EventTypeDramRetirementEvent = 1024 + // EventTypeDramRetirementFailure as defined in nvml/nvml.h + EventTypeDramRetirementFailure = 2048 + // EventTypeNonFatalPoisonError as defined in nvml/nvml.h + EventTypeNonFatalPoisonError = 4096 + // EventTypeFatalPoisonError as defined in nvml/nvml.h + EventTypeFatalPoisonError = 8192 + // EventTypeGpuUnavailableError as defined in nvml/nvml.h + EventTypeGpuUnavailableError = 16384 + // EventTypeGpuRecoveryAction as defined in nvml/nvml.h + EventTypeGpuRecoveryAction = 32768 // EventTypeAll as defined in nvml/nvml.h - EventTypeAll = 415 + EventTypeAll = 65439 + // SystemEventTypeGpuDriverUnbind as defined in nvml/nvml.h + SystemEventTypeGpuDriverUnbind = 1 + // SystemEventTypeGpuDriverBind as defined in nvml/nvml.h + SystemEventTypeGpuDriverBind = 2 + // SystemEventTypeCount as defined in nvml/nvml.h + SystemEventTypeCount = 2 // ClocksEventReasonGpuIdle as defined in nvml/nvml.h ClocksEventReasonGpuIdle = 1 // ClocksEventReasonApplicationsClocksSetting as defined in nvml/nvml.h @@ -640,6 +874,10 @@ const ( CC_SYSTEM_CPU_CAPS_AMD_SEV = 1 // CC_SYSTEM_CPU_CAPS_INTEL_TDX as defined in nvml/nvml.h CC_SYSTEM_CPU_CAPS_INTEL_TDX = 2 + // CC_SYSTEM_CPU_CAPS_AMD_SEV_SNP as defined in nvml/nvml.h + CC_SYSTEM_CPU_CAPS_AMD_SEV_SNP = 3 + // CC_SYSTEM_CPU_CAPS_AMD_SNP_VTOM as defined in nvml/nvml.h + CC_SYSTEM_CPU_CAPS_AMD_SNP_VTOM = 4 // CC_SYSTEM_GPUS_CC_NOT_CAPABLE as defined in nvml/nvml.h CC_SYSTEM_GPUS_CC_NOT_CAPABLE = 0 // CC_SYSTEM_GPUS_CC_CAPABLE as defined in nvml/nvml.h @@ -683,7 +921,7 @@ const ( // CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MIN as defined in nvml/nvml.h CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MIN = 50 // CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MAX as defined in nvml/nvml.h - CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MAX = 75 + CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MAX = 65 // GPU_FABRIC_UUID_LEN as defined in nvml/nvml.h GPU_FABRIC_UUID_LEN = 16 // GPU_FABRIC_STATE_NOT_SUPPORTED as defined in nvml/nvml.h @@ -703,13 +941,37 @@ const ( // GPU_FABRIC_HEALTH_MASK_SHIFT_DEGRADED_BW as defined in nvml/nvml.h GPU_FABRIC_HEALTH_MASK_SHIFT_DEGRADED_BW = 0 // GPU_FABRIC_HEALTH_MASK_WIDTH_DEGRADED_BW as defined in nvml/nvml.h - GPU_FABRIC_HEALTH_MASK_WIDTH_DEGRADED_BW = 17 - // POWER_SCOPE_GPU as defined in nvml/nvml.h - POWER_SCOPE_GPU = 0 - // POWER_SCOPE_MODULE as defined in nvml/nvml.h - POWER_SCOPE_MODULE = 1 - // POWER_SCOPE_MEMORY as defined in nvml/nvml.h - POWER_SCOPE_MEMORY = 2 + GPU_FABRIC_HEALTH_MASK_WIDTH_DEGRADED_BW = 3 + // GPU_FABRIC_HEALTH_MASK_ROUTE_RECOVERY_NOT_SUPPORTED as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_ROUTE_RECOVERY_NOT_SUPPORTED = 0 + // GPU_FABRIC_HEALTH_MASK_ROUTE_RECOVERY_TRUE as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_ROUTE_RECOVERY_TRUE = 1 + // GPU_FABRIC_HEALTH_MASK_ROUTE_RECOVERY_FALSE as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_ROUTE_RECOVERY_FALSE = 2 + // GPU_FABRIC_HEALTH_MASK_SHIFT_ROUTE_RECOVERY as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_SHIFT_ROUTE_RECOVERY = 2 + // GPU_FABRIC_HEALTH_MASK_WIDTH_ROUTE_RECOVERY as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_WIDTH_ROUTE_RECOVERY = 3 + // GPU_FABRIC_HEALTH_MASK_ROUTE_UNHEALTHY_NOT_SUPPORTED as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_ROUTE_UNHEALTHY_NOT_SUPPORTED = 0 + // GPU_FABRIC_HEALTH_MASK_ROUTE_UNHEALTHY_TRUE as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_ROUTE_UNHEALTHY_TRUE = 1 + // GPU_FABRIC_HEALTH_MASK_ROUTE_UNHEALTHY_FALSE as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_ROUTE_UNHEALTHY_FALSE = 2 + // GPU_FABRIC_HEALTH_MASK_SHIFT_ROUTE_UNHEALTHY as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_SHIFT_ROUTE_UNHEALTHY = 4 + // GPU_FABRIC_HEALTH_MASK_WIDTH_ROUTE_UNHEALTHY as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_WIDTH_ROUTE_UNHEALTHY = 3 + // GPU_FABRIC_HEALTH_MASK_ACCESS_TIMEOUT_RECOVERY_NOT_SUPPORTED as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_ACCESS_TIMEOUT_RECOVERY_NOT_SUPPORTED = 0 + // GPU_FABRIC_HEALTH_MASK_ACCESS_TIMEOUT_RECOVERY_TRUE as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_ACCESS_TIMEOUT_RECOVERY_TRUE = 1 + // GPU_FABRIC_HEALTH_MASK_ACCESS_TIMEOUT_RECOVERY_FALSE as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_ACCESS_TIMEOUT_RECOVERY_FALSE = 2 + // GPU_FABRIC_HEALTH_MASK_SHIFT_ACCESS_TIMEOUT_RECOVERY as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_SHIFT_ACCESS_TIMEOUT_RECOVERY = 6 + // GPU_FABRIC_HEALTH_MASK_WIDTH_ACCESS_TIMEOUT_RECOVERY as defined in nvml/nvml.h + GPU_FABRIC_HEALTH_MASK_WIDTH_ACCESS_TIMEOUT_RECOVERY = 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 @@ -738,6 +1000,22 @@ const ( AFFINITY_SCOPE_NODE = 0 // AFFINITY_SCOPE_SOCKET as defined in nvml/nvml.h AFFINITY_SCOPE_SOCKET = 1 + // NVLINK_BER_MANTISSA_SHIFT as defined in nvml/nvml.h + NVLINK_BER_MANTISSA_SHIFT = 8 + // NVLINK_BER_MANTISSA_WIDTH as defined in nvml/nvml.h + NVLINK_BER_MANTISSA_WIDTH = 15 + // NVLINK_BER_EXP_SHIFT as defined in nvml/nvml.h + NVLINK_BER_EXP_SHIFT = 0 + // NVLINK_BER_EXP_WIDTH as defined in nvml/nvml.h + NVLINK_BER_EXP_WIDTH = 255 + // NVLINK_STATE_INACTIVE as defined in nvml/nvml.h + NVLINK_STATE_INACTIVE = 0 + // NVLINK_STATE_ACTIVE as defined in nvml/nvml.h + NVLINK_STATE_ACTIVE = 1 + // NVLINK_STATE_SLEEP as defined in nvml/nvml.h + NVLINK_STATE_SLEEP = 2 + // NVLINK_TOTAL_SUPPORTED_BW_MODES as defined in nvml/nvml.h + NVLINK_TOTAL_SUPPORTED_BW_MODES = 23 // DEVICE_MIG_DISABLE as defined in nvml/nvml.h DEVICE_MIG_DISABLE = 0 // DEVICE_MIG_ENABLE as defined in nvml/nvml.h @@ -762,10 +1040,30 @@ const ( GPU_INSTANCE_PROFILE_2_SLICE_REV1 = 8 // GPU_INSTANCE_PROFILE_1_SLICE_REV2 as defined in nvml/nvml.h GPU_INSTANCE_PROFILE_1_SLICE_REV2 = 9 + // GPU_INSTANCE_PROFILE_1_SLICE_GFX as defined in nvml/nvml.h + GPU_INSTANCE_PROFILE_1_SLICE_GFX = 10 + // GPU_INSTANCE_PROFILE_2_SLICE_GFX as defined in nvml/nvml.h + GPU_INSTANCE_PROFILE_2_SLICE_GFX = 11 + // GPU_INSTANCE_PROFILE_4_SLICE_GFX as defined in nvml/nvml.h + GPU_INSTANCE_PROFILE_4_SLICE_GFX = 12 + // GPU_INSTANCE_PROFILE_1_SLICE_NO_ME as defined in nvml/nvml.h + GPU_INSTANCE_PROFILE_1_SLICE_NO_ME = 13 + // GPU_INSTANCE_PROFILE_2_SLICE_NO_ME as defined in nvml/nvml.h + GPU_INSTANCE_PROFILE_2_SLICE_NO_ME = 14 + // GPU_INSTANCE_PROFILE_1_SLICE_ALL_ME as defined in nvml/nvml.h + GPU_INSTANCE_PROFILE_1_SLICE_ALL_ME = 15 + // GPU_INSTANCE_PROFILE_2_SLICE_ALL_ME as defined in nvml/nvml.h + GPU_INSTANCE_PROFILE_2_SLICE_ALL_ME = 16 // GPU_INSTANCE_PROFILE_COUNT as defined in nvml/nvml.h - GPU_INSTANCE_PROFILE_COUNT = 10 + GPU_INSTANCE_PROFILE_COUNT = 17 + // GPU_INSTANCE_PROFILE_CAPS_P2P as defined in nvml/nvml.h + GPU_INSTANCE_PROFILE_CAPS_P2P = 1 // GPU_INTSTANCE_PROFILE_CAPS_P2P as defined in nvml/nvml.h GPU_INTSTANCE_PROFILE_CAPS_P2P = 1 + // GPU_INSTANCE_PROFILE_CAPS_GFX as defined in nvml/nvml.h + GPU_INSTANCE_PROFILE_CAPS_GFX = 2 + // COMPUTE_INSTANCE_PROFILE_CAPS_GFX as defined in nvml/nvml.h + COMPUTE_INSTANCE_PROFILE_CAPS_GFX = 1 // COMPUTE_INSTANCE_PROFILE_1_SLICE as defined in nvml/nvml.h COMPUTE_INSTANCE_PROFILE_1_SLICE = 0 // COMPUTE_INSTANCE_PROFILE_2_SLICE as defined in nvml/nvml.h @@ -792,16 +1090,24 @@ const ( GPM_METRICS_GET_VERSION = 1 // GPM_SUPPORT_VERSION as defined in nvml/nvml.h GPM_SUPPORT_VERSION = 1 - // NVLINK_POWER_STATE_HIGH_SPEED as defined in nvml/nvml.h - NVLINK_POWER_STATE_HIGH_SPEED = 0 - // NVLINK_POWER_STATE_LOW as defined in nvml/nvml.h - NVLINK_POWER_STATE_LOW = 1 - // NVLINK_LOW_POWER_THRESHOLD_MIN as defined in nvml/nvml.h - NVLINK_LOW_POWER_THRESHOLD_MIN = 1 - // NVLINK_LOW_POWER_THRESHOLD_MAX as defined in nvml/nvml.h - NVLINK_LOW_POWER_THRESHOLD_MAX = 8191 - // NVLINK_LOW_POWER_THRESHOLD_RESET as defined in nvml/nvml.h - NVLINK_LOW_POWER_THRESHOLD_RESET = 4294967295 + // DEV_CAP_EGM as defined in nvml/nvml.h + DEV_CAP_EGM = 1 + // WORKLOAD_POWER_MAX_PROFILES as defined in nvml/nvml.h + WORKLOAD_POWER_MAX_PROFILES = 255 + // POWER_SMOOTHING_MAX_NUM_PROFILES as defined in nvml/nvml.h + POWER_SMOOTHING_MAX_NUM_PROFILES = 5 + // POWER_SMOOTHING_NUM_PROFILE_PARAMS as defined in nvml/nvml.h + POWER_SMOOTHING_NUM_PROFILE_PARAMS = 4 + // POWER_SMOOTHING_ADMIN_OVERRIDE_NOT_SET as defined in nvml/nvml.h + POWER_SMOOTHING_ADMIN_OVERRIDE_NOT_SET = 4294967295 + // POWER_SMOOTHING_PROFILE_PARAM_PERCENT_TMP_FLOOR as defined in nvml/nvml.h + POWER_SMOOTHING_PROFILE_PARAM_PERCENT_TMP_FLOOR = 0 + // POWER_SMOOTHING_PROFILE_PARAM_RAMP_UP_RATE as defined in nvml/nvml.h + POWER_SMOOTHING_PROFILE_PARAM_RAMP_UP_RATE = 1 + // POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_RATE as defined in nvml/nvml.h + POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_RATE = 2 + // POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_HYSTERESIS as defined in nvml/nvml.h + POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_HYSTERESIS = 3 ) // BridgeChipType as declared in nvml/nvml.h @@ -960,7 +1266,8 @@ const ( VALUE_TYPE_UNSIGNED_LONG_LONG ValueType = 3 VALUE_TYPE_SIGNED_LONG_LONG ValueType = 4 VALUE_TYPE_SIGNED_INT ValueType = 5 - VALUE_TYPE_COUNT ValueType = 6 + VALUE_TYPE_UNSIGNED_SHORT ValueType = 6 + VALUE_TYPE_COUNT ValueType = 7 ) // PerfPolicyType as declared in nvml/nvml.h @@ -979,6 +1286,29 @@ const ( PERF_POLICY_COUNT PerfPolicyType = 12 ) +// CoolerControl as declared in nvml/nvml.h +type CoolerControl int32 + +// CoolerControl enumeration from nvml/nvml.h +const ( + THERMAL_COOLER_SIGNAL_NONE CoolerControl = iota + THERMAL_COOLER_SIGNAL_TOGGLE CoolerControl = 1 + THERMAL_COOLER_SIGNAL_VARIABLE CoolerControl = 2 + THERMAL_COOLER_SIGNAL_COUNT CoolerControl = 3 +) + +// CoolerTarget as declared in nvml/nvml.h +type CoolerTarget int32 + +// CoolerTarget enumeration from nvml/nvml.h +const ( + THERMAL_COOLER_TARGET_NONE CoolerTarget = 1 + THERMAL_COOLER_TARGET_GPU CoolerTarget = 2 + THERMAL_COOLER_TARGET_MEMORY CoolerTarget = 4 + THERMAL_COOLER_TARGET_POWER_SUPPLY CoolerTarget = 8 + THERMAL_COOLER_TARGET_GPU_RELATED CoolerTarget = 14 +) + // EnableState as declared in nvml/nvml.h type EnableState int32 @@ -1026,7 +1356,8 @@ const ( TEMPERATURE_THRESHOLD_ACOUSTIC_MIN TemperatureThresholds = 4 TEMPERATURE_THRESHOLD_ACOUSTIC_CURR TemperatureThresholds = 5 TEMPERATURE_THRESHOLD_ACOUSTIC_MAX TemperatureThresholds = 6 - TEMPERATURE_THRESHOLD_COUNT TemperatureThresholds = 7 + TEMPERATURE_THRESHOLD_GPS_CURR TemperatureThresholds = 7 + TEMPERATURE_THRESHOLD_COUNT TemperatureThresholds = 8 ) // TemperatureSensors as declared in nvml/nvml.h @@ -1060,6 +1391,21 @@ const ( MEMORY_ERROR_TYPE_COUNT MemoryErrorType = 2 ) +// NvlinkVersion as declared in nvml/nvml.h +type NvlinkVersion int32 + +// NvlinkVersion enumeration from nvml/nvml.h +const ( + NVLINK_VERSION_INVALID NvlinkVersion = iota + NVLINK_VERSION_1_0 NvlinkVersion = 1 + NVLINK_VERSION_2_0 NvlinkVersion = 2 + NVLINK_VERSION_2_2 NvlinkVersion = 3 + NVLINK_VERSION_3_0 NvlinkVersion = 4 + NVLINK_VERSION_3_1 NvlinkVersion = 5 + NVLINK_VERSION_4_0 NvlinkVersion = 6 + NVLINK_VERSION_5_0 NvlinkVersion = 7 +) + // EccCounterType as declared in nvml/nvml.h type EccCounterType int32 @@ -1101,6 +1447,7 @@ type DriverModel int32 const ( DRIVER_WDDM DriverModel = iota DRIVER_WDM DriverModel = 1 + DRIVER_MCDM DriverModel = 2 ) // Pstates as declared in nvml/nvml.h @@ -1145,7 +1492,8 @@ const ( INFOROM_OEM InforomObject = iota INFOROM_ECC InforomObject = 1 INFOROM_POWER InforomObject = 2 - INFOROM_COUNT InforomObject = 3 + INFOROM_DEN InforomObject = 3 + INFOROM_COUNT InforomObject = 4 ) // Return as declared in nvml/nvml.h @@ -1223,6 +1571,17 @@ const ( RESTRICTED_API_COUNT RestrictedAPI = 2 ) +// GpuUtilizationDomainId as declared in nvml/nvml.h +type GpuUtilizationDomainId int32 + +// GpuUtilizationDomainId enumeration from nvml/nvml.h +const ( + GPU_UTILIZATION_DOMAIN_GPU GpuUtilizationDomainId = iota + GPU_UTILIZATION_DOMAIN_FB GpuUtilizationDomainId = 1 + GPU_UTILIZATION_DOMAIN_VID GpuUtilizationDomainId = 2 + GPU_UTILIZATION_DOMAIN_BUS GpuUtilizationDomainId = 3 +) + // GpuVirtualizationMode as declared in nvml/nvml.h type GpuVirtualizationMode int32 @@ -1281,7 +1640,8 @@ type VgpuDriverCapability int32 // VgpuDriverCapability enumeration from nvml/nvml.h const ( VGPU_DRIVER_CAP_HETEROGENEOUS_MULTI_VGPU VgpuDriverCapability = iota - VGPU_DRIVER_CAP_COUNT VgpuDriverCapability = 1 + VGPU_DRIVER_CAP_WARM_UPDATE VgpuDriverCapability = 1 + VGPU_DRIVER_CAP_COUNT VgpuDriverCapability = 2 ) // DeviceVgpuCapability as declared in nvml/nvml.h @@ -1297,18 +1657,23 @@ const ( DEVICE_VGPU_CAP_DEVICE_STREAMING DeviceVgpuCapability = 5 DEVICE_VGPU_CAP_MINI_QUARTER_GPU DeviceVgpuCapability = 6 DEVICE_VGPU_CAP_COMPUTE_MEDIA_ENGINE_GPU DeviceVgpuCapability = 7 - DEVICE_VGPU_CAP_COUNT DeviceVgpuCapability = 8 + DEVICE_VGPU_CAP_WARM_UPDATE DeviceVgpuCapability = 8 + DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS DeviceVgpuCapability = 9 + DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED DeviceVgpuCapability = 10 + DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED DeviceVgpuCapability = 11 + DEVICE_VGPU_CAP_COUNT DeviceVgpuCapability = 12 ) -// GpuUtilizationDomainId as declared in nvml/nvml.h -type GpuUtilizationDomainId int32 +// DeviceGpuRecoveryAction as declared in nvml/nvml.h +type DeviceGpuRecoveryAction int32 -// GpuUtilizationDomainId enumeration from nvml/nvml.h +// DeviceGpuRecoveryAction enumeration from nvml/nvml.h const ( - GPU_UTILIZATION_DOMAIN_GPU GpuUtilizationDomainId = iota - GPU_UTILIZATION_DOMAIN_FB GpuUtilizationDomainId = 1 - GPU_UTILIZATION_DOMAIN_VID GpuUtilizationDomainId = 2 - GPU_UTILIZATION_DOMAIN_BUS GpuUtilizationDomainId = 3 + GPU_RECOVERY_ACTION_NONE DeviceGpuRecoveryAction = iota + GPU_RECOVERY_ACTION_GPU_RESET DeviceGpuRecoveryAction = 1 + GPU_RECOVERY_ACTION_NODE_REBOOT DeviceGpuRecoveryAction = 2 + GPU_RECOVERY_ACTION_DRAIN_P2P DeviceGpuRecoveryAction = 3 + GPU_RECOVERY_ACTION_DRAIN_AND_RESET DeviceGpuRecoveryAction = 4 ) // FanState as declared in nvml/nvml.h @@ -1447,6 +1812,16 @@ const ( THERMAL_CONTROLLER_UNKNOWN ThermalController = -1 ) +// UUIDType as declared in nvml/nvml.h +type UUIDType int32 + +// UUIDType enumeration from nvml/nvml.h +const ( + UUID_TYPE_NONE UUIDType = iota + UUID_TYPE_ASCII UUIDType = 1 + UUID_TYPE_BINARY UUIDType = 2 +) + // GridLicenseFeatureCode as declared in nvml/nvml.h type GridLicenseFeatureCode int32 @@ -1465,74 +1840,208 @@ type GpmMetricId int32 // GpmMetricId enumeration from nvml/nvml.h const ( - GPM_METRIC_GRAPHICS_UTIL GpmMetricId = 1 - GPM_METRIC_SM_UTIL GpmMetricId = 2 - GPM_METRIC_SM_OCCUPANCY GpmMetricId = 3 - GPM_METRIC_INTEGER_UTIL GpmMetricId = 4 - GPM_METRIC_ANY_TENSOR_UTIL GpmMetricId = 5 - GPM_METRIC_DFMA_TENSOR_UTIL GpmMetricId = 6 - GPM_METRIC_HMMA_TENSOR_UTIL GpmMetricId = 7 - GPM_METRIC_IMMA_TENSOR_UTIL GpmMetricId = 9 - GPM_METRIC_DRAM_BW_UTIL GpmMetricId = 10 - GPM_METRIC_FP64_UTIL GpmMetricId = 11 - GPM_METRIC_FP32_UTIL GpmMetricId = 12 - GPM_METRIC_FP16_UTIL GpmMetricId = 13 - GPM_METRIC_PCIE_TX_PER_SEC GpmMetricId = 20 - GPM_METRIC_PCIE_RX_PER_SEC GpmMetricId = 21 - GPM_METRIC_NVDEC_0_UTIL GpmMetricId = 30 - GPM_METRIC_NVDEC_1_UTIL GpmMetricId = 31 - GPM_METRIC_NVDEC_2_UTIL GpmMetricId = 32 - GPM_METRIC_NVDEC_3_UTIL GpmMetricId = 33 - GPM_METRIC_NVDEC_4_UTIL GpmMetricId = 34 - GPM_METRIC_NVDEC_5_UTIL GpmMetricId = 35 - GPM_METRIC_NVDEC_6_UTIL GpmMetricId = 36 - GPM_METRIC_NVDEC_7_UTIL GpmMetricId = 37 - GPM_METRIC_NVJPG_0_UTIL GpmMetricId = 40 - GPM_METRIC_NVJPG_1_UTIL GpmMetricId = 41 - GPM_METRIC_NVJPG_2_UTIL GpmMetricId = 42 - GPM_METRIC_NVJPG_3_UTIL GpmMetricId = 43 - GPM_METRIC_NVJPG_4_UTIL GpmMetricId = 44 - GPM_METRIC_NVJPG_5_UTIL GpmMetricId = 45 - GPM_METRIC_NVJPG_6_UTIL GpmMetricId = 46 - GPM_METRIC_NVJPG_7_UTIL GpmMetricId = 47 - GPM_METRIC_NVOFA_0_UTIL GpmMetricId = 50 - GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC GpmMetricId = 60 - GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC GpmMetricId = 61 - GPM_METRIC_NVLINK_L0_RX_PER_SEC GpmMetricId = 62 - GPM_METRIC_NVLINK_L0_TX_PER_SEC GpmMetricId = 63 - GPM_METRIC_NVLINK_L1_RX_PER_SEC GpmMetricId = 64 - GPM_METRIC_NVLINK_L1_TX_PER_SEC GpmMetricId = 65 - GPM_METRIC_NVLINK_L2_RX_PER_SEC GpmMetricId = 66 - GPM_METRIC_NVLINK_L2_TX_PER_SEC GpmMetricId = 67 - GPM_METRIC_NVLINK_L3_RX_PER_SEC GpmMetricId = 68 - GPM_METRIC_NVLINK_L3_TX_PER_SEC GpmMetricId = 69 - GPM_METRIC_NVLINK_L4_RX_PER_SEC GpmMetricId = 70 - GPM_METRIC_NVLINK_L4_TX_PER_SEC GpmMetricId = 71 - GPM_METRIC_NVLINK_L5_RX_PER_SEC GpmMetricId = 72 - GPM_METRIC_NVLINK_L5_TX_PER_SEC GpmMetricId = 73 - GPM_METRIC_NVLINK_L6_RX_PER_SEC GpmMetricId = 74 - GPM_METRIC_NVLINK_L6_TX_PER_SEC GpmMetricId = 75 - GPM_METRIC_NVLINK_L7_RX_PER_SEC GpmMetricId = 76 - GPM_METRIC_NVLINK_L7_TX_PER_SEC GpmMetricId = 77 - GPM_METRIC_NVLINK_L8_RX_PER_SEC GpmMetricId = 78 - GPM_METRIC_NVLINK_L8_TX_PER_SEC GpmMetricId = 79 - GPM_METRIC_NVLINK_L9_RX_PER_SEC GpmMetricId = 80 - GPM_METRIC_NVLINK_L9_TX_PER_SEC GpmMetricId = 81 - GPM_METRIC_NVLINK_L10_RX_PER_SEC GpmMetricId = 82 - GPM_METRIC_NVLINK_L10_TX_PER_SEC GpmMetricId = 83 - GPM_METRIC_NVLINK_L11_RX_PER_SEC GpmMetricId = 84 - GPM_METRIC_NVLINK_L11_TX_PER_SEC GpmMetricId = 85 - GPM_METRIC_NVLINK_L12_RX_PER_SEC GpmMetricId = 86 - GPM_METRIC_NVLINK_L12_TX_PER_SEC GpmMetricId = 87 - GPM_METRIC_NVLINK_L13_RX_PER_SEC GpmMetricId = 88 - GPM_METRIC_NVLINK_L13_TX_PER_SEC GpmMetricId = 89 - GPM_METRIC_NVLINK_L14_RX_PER_SEC GpmMetricId = 90 - GPM_METRIC_NVLINK_L14_TX_PER_SEC GpmMetricId = 91 - GPM_METRIC_NVLINK_L15_RX_PER_SEC GpmMetricId = 92 - GPM_METRIC_NVLINK_L15_TX_PER_SEC GpmMetricId = 93 - GPM_METRIC_NVLINK_L16_RX_PER_SEC GpmMetricId = 94 - GPM_METRIC_NVLINK_L16_TX_PER_SEC GpmMetricId = 95 - GPM_METRIC_NVLINK_L17_RX_PER_SEC GpmMetricId = 96 - GPM_METRIC_NVLINK_L17_TX_PER_SEC GpmMetricId = 97 - GPM_METRIC_MAX GpmMetricId = 98 + GPM_METRIC_GRAPHICS_UTIL GpmMetricId = 1 + GPM_METRIC_SM_UTIL GpmMetricId = 2 + GPM_METRIC_SM_OCCUPANCY GpmMetricId = 3 + GPM_METRIC_INTEGER_UTIL GpmMetricId = 4 + GPM_METRIC_ANY_TENSOR_UTIL GpmMetricId = 5 + GPM_METRIC_DFMA_TENSOR_UTIL GpmMetricId = 6 + GPM_METRIC_HMMA_TENSOR_UTIL GpmMetricId = 7 + GPM_METRIC_IMMA_TENSOR_UTIL GpmMetricId = 9 + GPM_METRIC_DRAM_BW_UTIL GpmMetricId = 10 + GPM_METRIC_FP64_UTIL GpmMetricId = 11 + GPM_METRIC_FP32_UTIL GpmMetricId = 12 + GPM_METRIC_FP16_UTIL GpmMetricId = 13 + GPM_METRIC_PCIE_TX_PER_SEC GpmMetricId = 20 + GPM_METRIC_PCIE_RX_PER_SEC GpmMetricId = 21 + GPM_METRIC_NVDEC_0_UTIL GpmMetricId = 30 + GPM_METRIC_NVDEC_1_UTIL GpmMetricId = 31 + GPM_METRIC_NVDEC_2_UTIL GpmMetricId = 32 + GPM_METRIC_NVDEC_3_UTIL GpmMetricId = 33 + GPM_METRIC_NVDEC_4_UTIL GpmMetricId = 34 + GPM_METRIC_NVDEC_5_UTIL GpmMetricId = 35 + GPM_METRIC_NVDEC_6_UTIL GpmMetricId = 36 + GPM_METRIC_NVDEC_7_UTIL GpmMetricId = 37 + GPM_METRIC_NVJPG_0_UTIL GpmMetricId = 40 + GPM_METRIC_NVJPG_1_UTIL GpmMetricId = 41 + GPM_METRIC_NVJPG_2_UTIL GpmMetricId = 42 + GPM_METRIC_NVJPG_3_UTIL GpmMetricId = 43 + GPM_METRIC_NVJPG_4_UTIL GpmMetricId = 44 + GPM_METRIC_NVJPG_5_UTIL GpmMetricId = 45 + GPM_METRIC_NVJPG_6_UTIL GpmMetricId = 46 + GPM_METRIC_NVJPG_7_UTIL GpmMetricId = 47 + GPM_METRIC_NVOFA_0_UTIL GpmMetricId = 50 + GPM_METRIC_NVOFA_1_UTIL GpmMetricId = 51 + GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC GpmMetricId = 60 + GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC GpmMetricId = 61 + GPM_METRIC_NVLINK_L0_RX_PER_SEC GpmMetricId = 62 + GPM_METRIC_NVLINK_L0_TX_PER_SEC GpmMetricId = 63 + GPM_METRIC_NVLINK_L1_RX_PER_SEC GpmMetricId = 64 + GPM_METRIC_NVLINK_L1_TX_PER_SEC GpmMetricId = 65 + GPM_METRIC_NVLINK_L2_RX_PER_SEC GpmMetricId = 66 + GPM_METRIC_NVLINK_L2_TX_PER_SEC GpmMetricId = 67 + GPM_METRIC_NVLINK_L3_RX_PER_SEC GpmMetricId = 68 + GPM_METRIC_NVLINK_L3_TX_PER_SEC GpmMetricId = 69 + GPM_METRIC_NVLINK_L4_RX_PER_SEC GpmMetricId = 70 + GPM_METRIC_NVLINK_L4_TX_PER_SEC GpmMetricId = 71 + GPM_METRIC_NVLINK_L5_RX_PER_SEC GpmMetricId = 72 + GPM_METRIC_NVLINK_L5_TX_PER_SEC GpmMetricId = 73 + GPM_METRIC_NVLINK_L6_RX_PER_SEC GpmMetricId = 74 + GPM_METRIC_NVLINK_L6_TX_PER_SEC GpmMetricId = 75 + GPM_METRIC_NVLINK_L7_RX_PER_SEC GpmMetricId = 76 + GPM_METRIC_NVLINK_L7_TX_PER_SEC GpmMetricId = 77 + GPM_METRIC_NVLINK_L8_RX_PER_SEC GpmMetricId = 78 + GPM_METRIC_NVLINK_L8_TX_PER_SEC GpmMetricId = 79 + GPM_METRIC_NVLINK_L9_RX_PER_SEC GpmMetricId = 80 + GPM_METRIC_NVLINK_L9_TX_PER_SEC GpmMetricId = 81 + GPM_METRIC_NVLINK_L10_RX_PER_SEC GpmMetricId = 82 + GPM_METRIC_NVLINK_L10_TX_PER_SEC GpmMetricId = 83 + GPM_METRIC_NVLINK_L11_RX_PER_SEC GpmMetricId = 84 + GPM_METRIC_NVLINK_L11_TX_PER_SEC GpmMetricId = 85 + GPM_METRIC_NVLINK_L12_RX_PER_SEC GpmMetricId = 86 + GPM_METRIC_NVLINK_L12_TX_PER_SEC GpmMetricId = 87 + GPM_METRIC_NVLINK_L13_RX_PER_SEC GpmMetricId = 88 + GPM_METRIC_NVLINK_L13_TX_PER_SEC GpmMetricId = 89 + GPM_METRIC_NVLINK_L14_RX_PER_SEC GpmMetricId = 90 + GPM_METRIC_NVLINK_L14_TX_PER_SEC GpmMetricId = 91 + GPM_METRIC_NVLINK_L15_RX_PER_SEC GpmMetricId = 92 + GPM_METRIC_NVLINK_L15_TX_PER_SEC GpmMetricId = 93 + GPM_METRIC_NVLINK_L16_RX_PER_SEC GpmMetricId = 94 + GPM_METRIC_NVLINK_L16_TX_PER_SEC GpmMetricId = 95 + GPM_METRIC_NVLINK_L17_RX_PER_SEC GpmMetricId = 96 + GPM_METRIC_NVLINK_L17_TX_PER_SEC GpmMetricId = 97 + GPM_METRIC_C2C_TOTAL_TX_PER_SEC GpmMetricId = 100 + GPM_METRIC_C2C_TOTAL_RX_PER_SEC GpmMetricId = 101 + GPM_METRIC_C2C_DATA_TX_PER_SEC GpmMetricId = 102 + GPM_METRIC_C2C_DATA_RX_PER_SEC GpmMetricId = 103 + GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC GpmMetricId = 104 + GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC GpmMetricId = 105 + GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC GpmMetricId = 106 + GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC GpmMetricId = 107 + GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC GpmMetricId = 108 + GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC GpmMetricId = 109 + GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC GpmMetricId = 110 + GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC GpmMetricId = 111 + GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC GpmMetricId = 112 + GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC GpmMetricId = 113 + GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC GpmMetricId = 114 + GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC GpmMetricId = 115 + GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC GpmMetricId = 116 + GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC GpmMetricId = 117 + GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC GpmMetricId = 118 + GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC GpmMetricId = 119 + GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC GpmMetricId = 120 + GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC GpmMetricId = 121 + GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC GpmMetricId = 122 + GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC GpmMetricId = 123 + GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC GpmMetricId = 124 + GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC GpmMetricId = 125 + GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC GpmMetricId = 126 + GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC GpmMetricId = 127 + GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC GpmMetricId = 128 + GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC GpmMetricId = 129 + GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC GpmMetricId = 130 + GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC GpmMetricId = 131 + GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC GpmMetricId = 132 + GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC GpmMetricId = 133 + GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC GpmMetricId = 134 + GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC GpmMetricId = 135 + GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC GpmMetricId = 136 + GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC GpmMetricId = 137 + GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC GpmMetricId = 138 + GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC GpmMetricId = 139 + GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC GpmMetricId = 140 + GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC GpmMetricId = 141 + GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC GpmMetricId = 142 + GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC GpmMetricId = 143 + GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC GpmMetricId = 144 + GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC GpmMetricId = 145 + GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC GpmMetricId = 146 + GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC GpmMetricId = 147 + GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC GpmMetricId = 148 + GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC GpmMetricId = 149 + GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC GpmMetricId = 150 + GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC GpmMetricId = 151 + GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC GpmMetricId = 152 + GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC GpmMetricId = 153 + GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC GpmMetricId = 154 + GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC GpmMetricId = 155 + GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC GpmMetricId = 156 + GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC GpmMetricId = 157 + GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC GpmMetricId = 158 + GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC GpmMetricId = 159 + GPM_METRIC_HOSTMEM_CACHE_HIT GpmMetricId = 160 + GPM_METRIC_HOSTMEM_CACHE_MISS GpmMetricId = 161 + GPM_METRIC_PEERMEM_CACHE_HIT GpmMetricId = 162 + GPM_METRIC_PEERMEM_CACHE_MISS GpmMetricId = 163 + GPM_METRIC_DRAM_CACHE_HIT GpmMetricId = 164 + GPM_METRIC_DRAM_CACHE_MISS GpmMetricId = 165 + GPM_METRIC_NVENC_0_UTIL GpmMetricId = 166 + GPM_METRIC_NVENC_1_UTIL GpmMetricId = 167 + GPM_METRIC_NVENC_2_UTIL GpmMetricId = 168 + GPM_METRIC_NVENC_3_UTIL GpmMetricId = 169 + GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED GpmMetricId = 170 + GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE GpmMetricId = 171 + GPM_METRIC_GR0_CTXSW_REQUESTS GpmMetricId = 172 + GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ GpmMetricId = 173 + GPM_METRIC_GR0_CTXSW_ACTIVE_PCT GpmMetricId = 174 + GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED GpmMetricId = 175 + GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE GpmMetricId = 176 + GPM_METRIC_GR1_CTXSW_REQUESTS GpmMetricId = 177 + GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ GpmMetricId = 178 + GPM_METRIC_GR1_CTXSW_ACTIVE_PCT GpmMetricId = 179 + GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED GpmMetricId = 180 + GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE GpmMetricId = 181 + GPM_METRIC_GR2_CTXSW_REQUESTS GpmMetricId = 182 + GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ GpmMetricId = 183 + GPM_METRIC_GR2_CTXSW_ACTIVE_PCT GpmMetricId = 184 + GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED GpmMetricId = 185 + GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE GpmMetricId = 186 + GPM_METRIC_GR3_CTXSW_REQUESTS GpmMetricId = 187 + GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ GpmMetricId = 188 + GPM_METRIC_GR3_CTXSW_ACTIVE_PCT GpmMetricId = 189 + GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED GpmMetricId = 190 + GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE GpmMetricId = 191 + GPM_METRIC_GR4_CTXSW_REQUESTS GpmMetricId = 192 + GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ GpmMetricId = 193 + GPM_METRIC_GR4_CTXSW_ACTIVE_PCT GpmMetricId = 194 + GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED GpmMetricId = 195 + GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE GpmMetricId = 196 + GPM_METRIC_GR5_CTXSW_REQUESTS GpmMetricId = 197 + GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ GpmMetricId = 198 + GPM_METRIC_GR5_CTXSW_ACTIVE_PCT GpmMetricId = 199 + GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED GpmMetricId = 200 + GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE GpmMetricId = 201 + GPM_METRIC_GR6_CTXSW_REQUESTS GpmMetricId = 202 + GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ GpmMetricId = 203 + GPM_METRIC_GR6_CTXSW_ACTIVE_PCT GpmMetricId = 204 + GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED GpmMetricId = 205 + GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE GpmMetricId = 206 + GPM_METRIC_GR7_CTXSW_REQUESTS GpmMetricId = 207 + GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ GpmMetricId = 208 + GPM_METRIC_GR7_CTXSW_ACTIVE_PCT GpmMetricId = 209 + GPM_METRIC_MAX GpmMetricId = 210 +) + +// PowerProfileType as declared in nvml/nvml.h +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 ) 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 de0ab88c..4784cd43 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/device.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/device.go @@ -68,16 +68,6 @@ type GpuInstanceInfo struct { Placement GpuInstancePlacement } -func (g GpuInstanceInfo) convert() nvmlGpuInstanceInfo { - out := nvmlGpuInstanceInfo{ - Device: g.Device.(nvmlDevice), - Id: g.Id, - ProfileId: g.ProfileId, - Placement: g.Placement, - } - return out -} - func (g nvmlGpuInstanceInfo) convert() GpuInstanceInfo { out := GpuInstanceInfo{ Device: g.Device, @@ -97,17 +87,6 @@ type ComputeInstanceInfo struct { Placement ComputeInstancePlacement } -func (c ComputeInstanceInfo) convert() nvmlComputeInstanceInfo { - out := nvmlComputeInstanceInfo{ - Device: c.Device.(nvmlDevice), - GpuInstance: c.GpuInstance.(nvmlGpuInstance), - Id: c.Id, - ProfileId: c.ProfileId, - Placement: c.Placement, - } - return out -} - func (c nvmlComputeInstanceInfo) convert() ComputeInstanceInfo { out := ComputeInstanceInfo{ Device: c.Device, @@ -147,6 +126,13 @@ func (l *library) DeviceGetHandleByUUID(uuid string) (Device, Return) { return device, ret } +// nvml.DeviceGetHandleByUUIDV() +func (l *library) DeviceGetHandleByUUIDV(uuid *UUID) (Device, Return) { + var device nvmlDevice + ret := nvmlDeviceGetHandleByUUIDV(uuid, &device) + return device, ret +} + // nvml.DeviceGetHandleByPciBusId() func (l *library) DeviceGetHandleByPciBusId(pciBusId string) (Device, Return) { var device nvmlDevice @@ -2101,6 +2087,13 @@ func (handler GpuInstanceProfileInfoHandler) V2() (GpuInstanceProfileInfo_v2, Re return info, ret } +func (handler GpuInstanceProfileInfoHandler) V3() (GpuInstanceProfileInfo_v3, Return) { + var info GpuInstanceProfileInfo_v3 + info.Version = STRUCT_VERSION(info, 3) + ret := nvmlDeviceGetGpuInstanceProfileInfoV(handler.device, uint32(handler.profile), (*GpuInstanceProfileInfo_v2)(unsafe.Pointer(&info))) + return info, ret +} + func (l *library) DeviceGetGpuInstanceProfileInfoV(device Device, profile int) GpuInstanceProfileInfoHandler { return device.GetGpuInstanceProfileInfoV(profile) } @@ -2191,7 +2184,7 @@ func (device nvmlDevice) GetGpuInstances(info *GpuInstanceProfileInfo) ([]GpuIns if info == nil { return nil, ERROR_INVALID_ARGUMENT } - var count uint32 = info.InstanceCount + var count = info.InstanceCount gpuInstances := make([]nvmlGpuInstance, count) ret := nvmlDeviceGetGpuInstances(device, info.Id, &gpuInstances[0], &count) return convertSlice[nvmlGpuInstance, GpuInstance](gpuInstances[:count]), ret @@ -2248,6 +2241,13 @@ func (handler ComputeInstanceProfileInfoHandler) V2() (ComputeInstanceProfileInf return info, ret } +func (handler ComputeInstanceProfileInfoHandler) V3() (ComputeInstanceProfileInfo_v3, Return) { + var info ComputeInstanceProfileInfo_v3 + info.Version = STRUCT_VERSION(info, 3) + ret := nvmlGpuInstanceGetComputeInstanceProfileInfoV(handler.gpuInstance, uint32(handler.profile), uint32(handler.engProfile), (*ComputeInstanceProfileInfo_v2)(unsafe.Pointer(&info))) + return info, ret +} + func (l *library) GpuInstanceGetComputeInstanceProfileInfoV(gpuInstance GpuInstance, profile int, engProfile int) ComputeInstanceProfileInfoHandler { return gpuInstance.GetComputeInstanceProfileInfoV(profile, engProfile) } @@ -2302,7 +2302,7 @@ func (gpuInstance nvmlGpuInstance) GetComputeInstances(info *ComputeInstanceProf if info == nil { return nil, ERROR_INVALID_ARGUMENT } - var count uint32 = info.InstanceCount + var count = info.InstanceCount computeInstances := make([]nvmlComputeInstance, count) ret := nvmlGpuInstanceGetComputeInstances(gpuInstance, info.Id, &computeInstances[0], &count) return convertSlice[nvmlComputeInstance, ComputeInstance](computeInstances[:count]), ret @@ -3062,3 +3062,353 @@ func (device nvmlDevice) GetSramEccErrorStatus() (EccSramErrorStatus, Return) { ret := nvmlDeviceGetSramEccErrorStatus(device, &status) return status, ret } + +// nvml.DeviceGetClockOffsets() +func (l *library) DeviceGetClockOffsets(device Device) (ClockOffset, Return) { + return device.GetClockOffsets() +} + +func (device nvmlDevice) GetClockOffsets() (ClockOffset, Return) { + var info ClockOffset + info.Version = STRUCT_VERSION(info, 1) + ret := nvmlDeviceGetClockOffsets(device, &info) + return info, ret +} + +// nvml.DeviceSetClockOffsets() +func (l *library) DeviceSetClockOffsets(device Device, info ClockOffset) Return { + return device.SetClockOffsets(info) +} + +func (device nvmlDevice) SetClockOffsets(info ClockOffset) Return { + return nvmlDeviceSetClockOffsets(device, &info) +} + +// nvml.DeviceGetDriverModel_v2() +func (l *library) DeviceGetDriverModel_v2(device Device) (DriverModel, DriverModel, Return) { + return device.GetDriverModel_v2() +} + +func (device nvmlDevice) GetDriverModel_v2() (DriverModel, DriverModel, Return) { + var current, pending DriverModel + ret := nvmlDeviceGetDriverModel_v2(device, ¤t, &pending) + return current, pending, ret +} + +// nvml.DeviceGetCapabilities() +func (l *library) DeviceGetCapabilities(device Device) (DeviceCapabilities, Return) { + return device.GetCapabilities() +} + +func (device nvmlDevice) GetCapabilities() (DeviceCapabilities, Return) { + var caps DeviceCapabilities + caps.Version = STRUCT_VERSION(caps, 1) + ret := nvmlDeviceGetCapabilities(device, &caps) + return caps, ret +} + +// nvml.DeviceGetFanSpeedRPM() +func (l *library) DeviceGetFanSpeedRPM(device Device) (FanSpeedInfo, Return) { + return device.GetFanSpeedRPM() +} + +func (device nvmlDevice) GetFanSpeedRPM() (FanSpeedInfo, Return) { + var fanSpeed FanSpeedInfo + fanSpeed.Version = STRUCT_VERSION(fanSpeed, 1) + ret := nvmlDeviceGetFanSpeedRPM(device, &fanSpeed) + return fanSpeed, ret +} + +// nvml.DeviceGetCoolerInfo() +func (l *library) DeviceGetCoolerInfo(device Device) (CoolerInfo, Return) { + return device.GetCoolerInfo() +} + +func (device nvmlDevice) GetCoolerInfo() (CoolerInfo, Return) { + var coolerInfo CoolerInfo + coolerInfo.Version = STRUCT_VERSION(coolerInfo, 1) + ret := nvmlDeviceGetCoolerInfo(device, &coolerInfo) + return coolerInfo, ret +} + +// nvml.DeviceGetTemperatureV() +type TemperatureHandler struct { + device nvmlDevice +} + +func (handler TemperatureHandler) V1() (Temperature, Return) { + var temperature Temperature + temperature.Version = STRUCT_VERSION(temperature, 1) + ret := nvmlDeviceGetTemperatureV(handler.device, &temperature) + return temperature, ret +} + +func (l *library) DeviceGetTemperatureV(device Device) TemperatureHandler { + return device.GetTemperatureV() +} + +func (device nvmlDevice) GetTemperatureV() TemperatureHandler { + return TemperatureHandler{device} +} + +// nvml.DeviceGetMarginTemperature() +func (l *library) DeviceGetMarginTemperature(device Device) (MarginTemperature, Return) { + return device.GetMarginTemperature() +} + +func (device nvmlDevice) GetMarginTemperature() (MarginTemperature, Return) { + var marginTemp MarginTemperature + marginTemp.Version = STRUCT_VERSION(marginTemp, 1) + ret := nvmlDeviceGetMarginTemperature(device, &marginTemp) + return marginTemp, ret +} + +// nvml.DeviceGetPerformanceModes() +func (l *library) DeviceGetPerformanceModes(device Device) (DevicePerfModes, Return) { + return device.GetPerformanceModes() +} + +func (device nvmlDevice) GetPerformanceModes() (DevicePerfModes, Return) { + var perfModes DevicePerfModes + perfModes.Version = STRUCT_VERSION(perfModes, 1) + ret := nvmlDeviceGetPerformanceModes(device, &perfModes) + return perfModes, ret +} + +// nvml.DeviceGetCurrentClockFreqs() +func (l *library) DeviceGetCurrentClockFreqs(device Device) (DeviceCurrentClockFreqs, Return) { + return device.GetCurrentClockFreqs() +} + +func (device nvmlDevice) GetCurrentClockFreqs() (DeviceCurrentClockFreqs, Return) { + var currentClockFreqs DeviceCurrentClockFreqs + currentClockFreqs.Version = STRUCT_VERSION(currentClockFreqs, 1) + ret := nvmlDeviceGetCurrentClockFreqs(device, ¤tClockFreqs) + return currentClockFreqs, ret +} + +// nvml.DeviceGetDramEncryptionMode() +func (l *library) DeviceGetDramEncryptionMode(device Device) (DramEncryptionInfo, DramEncryptionInfo, Return) { + return device.GetDramEncryptionMode() +} + +func (device nvmlDevice) GetDramEncryptionMode() (DramEncryptionInfo, DramEncryptionInfo, Return) { + var current, pending DramEncryptionInfo + current.Version = STRUCT_VERSION(current, 1) + pending.Version = STRUCT_VERSION(pending, 1) + ret := nvmlDeviceGetDramEncryptionMode(device, ¤t, &pending) + return current, pending, ret +} + +// nvml.DeviceSetDramEncryptionMode() +func (l *library) DeviceSetDramEncryptionMode(device Device, dramEncryption *DramEncryptionInfo) Return { + return device.SetDramEncryptionMode(dramEncryption) +} + +func (device nvmlDevice) SetDramEncryptionMode(dramEncryption *DramEncryptionInfo) Return { + return nvmlDeviceSetDramEncryptionMode(device, dramEncryption) +} + +// nvml.DeviceGetPlatformInfo() +func (l *library) DeviceGetPlatformInfo(device Device) (PlatformInfo, Return) { + return device.GetPlatformInfo() +} + +func (device nvmlDevice) GetPlatformInfo() (PlatformInfo, Return) { + var platformInfo PlatformInfo + platformInfo.Version = STRUCT_VERSION(platformInfo, 1) + ret := nvmlDeviceGetPlatformInfo(device, &platformInfo) + return platformInfo, ret +} + +// nvml.DeviceGetNvlinkSupportedBwModes() +func (l *library) DeviceGetNvlinkSupportedBwModes(device Device) (NvlinkSupportedBwModes, Return) { + return device.GetNvlinkSupportedBwModes() +} + +func (device nvmlDevice) GetNvlinkSupportedBwModes() (NvlinkSupportedBwModes, Return) { + var supportedBwMode NvlinkSupportedBwModes + supportedBwMode.Version = STRUCT_VERSION(supportedBwMode, 1) + ret := nvmlDeviceGetNvlinkSupportedBwModes(device, &supportedBwMode) + return supportedBwMode, ret +} + +// nvml.DeviceGetNvlinkBwMode() +func (l *library) DeviceGetNvlinkBwMode(device Device) (NvlinkGetBwMode, Return) { + return device.GetNvlinkBwMode() +} + +func (device nvmlDevice) GetNvlinkBwMode() (NvlinkGetBwMode, Return) { + var getBwMode NvlinkGetBwMode + getBwMode.Version = STRUCT_VERSION(getBwMode, 1) + ret := nvmlDeviceGetNvlinkBwMode(device, &getBwMode) + return getBwMode, ret +} + +// nvml.DeviceSetNvlinkBwMode() +func (l *library) DeviceSetNvlinkBwMode(device Device, setBwMode *NvlinkSetBwMode) Return { + return device.SetNvlinkBwMode(setBwMode) +} + +func (device nvmlDevice) SetNvlinkBwMode(setBwMode *NvlinkSetBwMode) Return { + return nvmlDeviceSetNvlinkBwMode(device, setBwMode) +} + +// nvml.DeviceWorkloadPowerProfileGetProfilesInfo() +func (l *library) DeviceWorkloadPowerProfileGetProfilesInfo(device Device) (WorkloadPowerProfileProfilesInfo, Return) { + return device.WorkloadPowerProfileGetProfilesInfo() +} + +func (device nvmlDevice) WorkloadPowerProfileGetProfilesInfo() (WorkloadPowerProfileProfilesInfo, Return) { + var profilesInfo WorkloadPowerProfileProfilesInfo + profilesInfo.Version = STRUCT_VERSION(profilesInfo, 1) + ret := nvmlDeviceWorkloadPowerProfileGetProfilesInfo(device, &profilesInfo) + return profilesInfo, ret +} + +// nvml.DeviceWorkloadPowerProfileGetCurrentProfiles() +func (l *library) DeviceWorkloadPowerProfileGetCurrentProfiles(device Device) (WorkloadPowerProfileCurrentProfiles, Return) { + return device.WorkloadPowerProfileGetCurrentProfiles() +} + +func (device nvmlDevice) WorkloadPowerProfileGetCurrentProfiles() (WorkloadPowerProfileCurrentProfiles, Return) { + var currentProfiles WorkloadPowerProfileCurrentProfiles + currentProfiles.Version = STRUCT_VERSION(currentProfiles, 1) + ret := nvmlDeviceWorkloadPowerProfileGetCurrentProfiles(device, ¤tProfiles) + return currentProfiles, ret +} + +// nvml.DeviceWorkloadPowerProfileSetRequestedProfiles() +func (l *library) DeviceWorkloadPowerProfileSetRequestedProfiles(device Device, requestedProfiles *WorkloadPowerProfileRequestedProfiles) Return { + return device.WorkloadPowerProfileSetRequestedProfiles(requestedProfiles) +} + +func (device nvmlDevice) WorkloadPowerProfileSetRequestedProfiles(requestedProfiles *WorkloadPowerProfileRequestedProfiles) Return { + return nvmlDeviceWorkloadPowerProfileSetRequestedProfiles(device, requestedProfiles) +} + +// nvml.DeviceWorkloadPowerProfileClearRequestedProfiles() +func (l *library) DeviceWorkloadPowerProfileClearRequestedProfiles(device Device, requestedProfiles *WorkloadPowerProfileRequestedProfiles) Return { + return device.WorkloadPowerProfileClearRequestedProfiles(requestedProfiles) +} + +func (device nvmlDevice) WorkloadPowerProfileClearRequestedProfiles(requestedProfiles *WorkloadPowerProfileRequestedProfiles) Return { + return nvmlDeviceWorkloadPowerProfileClearRequestedProfiles(device, requestedProfiles) +} + +// nvml.DevicePowerSmoothingActivatePresetProfile() +func (l *library) DevicePowerSmoothingActivatePresetProfile(device Device, profile *PowerSmoothingProfile) Return { + return device.PowerSmoothingActivatePresetProfile(profile) +} + +func (device nvmlDevice) PowerSmoothingActivatePresetProfile(profile *PowerSmoothingProfile) Return { + return nvmlDevicePowerSmoothingActivatePresetProfile(device, profile) +} + +// nvml.DevicePowerSmoothingUpdatePresetProfileParam() +func (l *library) DevicePowerSmoothingUpdatePresetProfileParam(device Device, profile *PowerSmoothingProfile) Return { + return device.PowerSmoothingUpdatePresetProfileParam(profile) +} + +func (device nvmlDevice) PowerSmoothingUpdatePresetProfileParam(profile *PowerSmoothingProfile) Return { + return nvmlDevicePowerSmoothingUpdatePresetProfileParam(device, profile) +} + +// nvml.DevicePowerSmoothingSetState() +func (l *library) DevicePowerSmoothingSetState(device Device, state *PowerSmoothingState) Return { + return device.PowerSmoothingSetState(state) +} + +func (device nvmlDevice) PowerSmoothingSetState(state *PowerSmoothingState) Return { + return nvmlDevicePowerSmoothingSetState(device, state) +} + +// nvml.GpuInstanceGetCreatableVgpus() +func (l *library) GpuInstanceGetCreatableVgpus(gpuInstance GpuInstance) (VgpuTypeIdInfo, Return) { + return gpuInstance.GetCreatableVgpus() +} + +func (gpuInstance nvmlGpuInstance) GetCreatableVgpus() (VgpuTypeIdInfo, Return) { + var vgpuTypeIdInfo VgpuTypeIdInfo + vgpuTypeIdInfo.Version = STRUCT_VERSION(vgpuTypeIdInfo, 1) + ret := nvmlGpuInstanceGetCreatableVgpus(gpuInstance, &vgpuTypeIdInfo) + return vgpuTypeIdInfo, ret +} + +// nvml.GpuInstanceGetActiveVgpus() +func (l *library) GpuInstanceGetActiveVgpus(gpuInstance GpuInstance) (ActiveVgpuInstanceInfo, Return) { + return gpuInstance.GetActiveVgpus() +} + +func (gpuInstance nvmlGpuInstance) GetActiveVgpus() (ActiveVgpuInstanceInfo, Return) { + var activeVgpuInstanceInfo ActiveVgpuInstanceInfo + activeVgpuInstanceInfo.Version = STRUCT_VERSION(activeVgpuInstanceInfo, 1) + ret := nvmlGpuInstanceGetActiveVgpus(gpuInstance, &activeVgpuInstanceInfo) + return activeVgpuInstanceInfo, ret +} + +// nvml.GpuInstanceSetVgpuSchedulerState() +func (l *library) GpuInstanceSetVgpuSchedulerState(gpuInstance GpuInstance, scheduler *VgpuSchedulerState) Return { + return gpuInstance.SetVgpuSchedulerState(scheduler) +} + +func (gpuInstance nvmlGpuInstance) SetVgpuSchedulerState(scheduler *VgpuSchedulerState) Return { + return nvmlGpuInstanceSetVgpuSchedulerState(gpuInstance, scheduler) +} + +// nvml.GpuInstanceGetVgpuSchedulerState() +func (l *library) GpuInstanceGetVgpuSchedulerState(gpuInstance GpuInstance) (VgpuSchedulerStateInfo, Return) { + return gpuInstance.GetVgpuSchedulerState() +} + +func (gpuInstance nvmlGpuInstance) GetVgpuSchedulerState() (VgpuSchedulerStateInfo, Return) { + var schedulerStateInfo VgpuSchedulerStateInfo + schedulerStateInfo.Version = STRUCT_VERSION(schedulerStateInfo, 1) + ret := nvmlGpuInstanceGetVgpuSchedulerState(gpuInstance, &schedulerStateInfo) + return schedulerStateInfo, ret +} + +// nvml.GpuInstanceGetVgpuSchedulerLog() +func (l *library) GpuInstanceGetVgpuSchedulerLog(gpuInstance GpuInstance) (VgpuSchedulerLogInfo, Return) { + return gpuInstance.GetVgpuSchedulerLog() +} + +func (gpuInstance nvmlGpuInstance) GetVgpuSchedulerLog() (VgpuSchedulerLogInfo, Return) { + var schedulerLogInfo VgpuSchedulerLogInfo + schedulerLogInfo.Version = STRUCT_VERSION(schedulerLogInfo, 1) + ret := nvmlGpuInstanceGetVgpuSchedulerLog(gpuInstance, &schedulerLogInfo) + return schedulerLogInfo, ret +} + +// nvml.GpuInstanceGetVgpuTypeCreatablePlacements() +func (l *library) GpuInstanceGetVgpuTypeCreatablePlacements(gpuInstance GpuInstance) (VgpuCreatablePlacementInfo, Return) { + return gpuInstance.GetVgpuTypeCreatablePlacements() +} + +func (gpuInstance nvmlGpuInstance) GetVgpuTypeCreatablePlacements() (VgpuCreatablePlacementInfo, Return) { + var creatablePlacementInfo VgpuCreatablePlacementInfo + creatablePlacementInfo.Version = STRUCT_VERSION(creatablePlacementInfo, 1) + ret := nvmlGpuInstanceGetVgpuTypeCreatablePlacements(gpuInstance, &creatablePlacementInfo) + return creatablePlacementInfo, ret +} + +// nvml.GpuInstanceGetVgpuHeterogeneousMode() +func (l *library) GpuInstanceGetVgpuHeterogeneousMode(gpuInstance GpuInstance) (VgpuHeterogeneousMode, Return) { + return gpuInstance.GetVgpuHeterogeneousMode() +} + +func (gpuInstance nvmlGpuInstance) GetVgpuHeterogeneousMode() (VgpuHeterogeneousMode, Return) { + var heterogeneousMode VgpuHeterogeneousMode + heterogeneousMode.Version = STRUCT_VERSION(heterogeneousMode, 1) + ret := nvmlGpuInstanceGetVgpuHeterogeneousMode(gpuInstance, &heterogeneousMode) + return heterogeneousMode, ret +} + +// nvml.GpuInstanceSetVgpuHeterogeneousMode() +func (l *library) GpuInstanceSetVgpuHeterogeneousMode(gpuInstance GpuInstance, heterogeneousMode *VgpuHeterogeneousMode) Return { + return gpuInstance.SetVgpuHeterogeneousMode(heterogeneousMode) +} + +func (gpuInstance nvmlGpuInstance) SetVgpuHeterogeneousMode(heterogeneousMode *VgpuHeterogeneousMode) Return { + return nvmlGpuInstanceSetVgpuHeterogeneousMode(gpuInstance, heterogeneousMode) +} 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 933b4dea..b772d57f 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 @@ -23,17 +23,6 @@ type EventData struct { ComputeInstanceId uint32 } -func (e EventData) convert() nvmlEventData { - out := nvmlEventData{ - Device: e.Device.(nvmlDevice), - EventType: e.EventType, - EventData: e.EventData, - GpuInstanceId: e.GpuInstanceId, - ComputeInstanceId: e.ComputeInstanceId, - } - return out -} - func (e nvmlEventData) convert() EventData { out := EventData{ Device: e.Device, @@ -71,3 +60,23 @@ func (l *library) EventSetFree(set EventSet) Return { func (set nvmlEventSet) Free() Return { return nvmlEventSetFree(set) } + +// nvml.SystemEventSetCreate() +func (l *library) SystemEventSetCreate(request *SystemEventSetCreateRequest) Return { + return nvmlSystemEventSetCreate(request) +} + +// nvml.SystemEventSetFree() +func (l *library) SystemEventSetFree(request *SystemEventSetFreeRequest) Return { + return nvmlSystemEventSetFree(request) +} + +// nvml.SystemRegisterEvents() +func (l *library) SystemRegisterEvents(request *SystemRegisterEventRequest) Return { + return nvmlSystemRegisterEvents(request) +} + +// nvml.SystemEventSetWait() +func (l *library) SystemEventSetWait(request *SystemEventSetWaitRequest) Return { + return nvmlSystemEventSetWait(request) +} 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 5a71c0ff..563bc593 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 [98]GpmMetric + Metrics [210]GpmMetric } func (g *GpmMetricsGetType) convert() *nvmlGpmMetricsGetType { @@ -30,9 +30,8 @@ func (g *GpmMetricsGetType) convert() *nvmlGpmMetricsGetType { Sample1: g.Sample1.(nvmlGpmSample), Sample2: g.Sample2.(nvmlGpmSample), } - for i := range g.Metrics { - out.Metrics[i] = g.Metrics[i] - } + copy(out.Metrics[:], g.Metrics[:]) + return out } @@ -43,9 +42,8 @@ func (g *nvmlGpmMetricsGetType) convert() *GpmMetricsGetType { Sample1: g.Sample1, Sample2: g.Sample2, } - for i := range g.Metrics { - out.Metrics[i] = g.Metrics[i] - } + copy(out.Metrics[:], g.Metrics[:]) + return out } diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/lib.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/lib.go index bc4c3de5..5a7e6882 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/lib.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/lib.go @@ -163,6 +163,7 @@ var GetBlacklistDeviceCount = GetExcludedDeviceCount var GetBlacklistDeviceInfoByIndex = GetExcludedDeviceInfoByIndex var nvmlDeviceGetGpuInstancePossiblePlacements = nvmlDeviceGetGpuInstancePossiblePlacements_v1 var nvmlVgpuInstanceGetLicenseInfo = nvmlVgpuInstanceGetLicenseInfo_v1 +var nvmlDeviceGetDriverModel = nvmlDeviceGetDriverModel_v1 // BlacklistDeviceInfo was replaced by ExcludedDeviceInfo type BlacklistDeviceInfo = ExcludedDeviceInfo @@ -288,4 +289,8 @@ func (l *library) updateVersionedSymbols() { if err == nil { nvmlVgpuInstanceGetLicenseInfo = nvmlVgpuInstanceGetLicenseInfo_v2 } + err = l.dl.Lookup("nvmlDeviceGetDriverModel_v2") + if err == nil { + nvmlDeviceGetDriverModel = nvmlDeviceGetDriverModel_v2 + } } 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 a1164ba2..27f22fb1 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 @@ -93,6 +93,9 @@ var _ nvml.Device = &Device{} // GetC2cModeInfoVFunc: func() nvml.C2cModeInfoHandler { // panic("mock out the GetC2cModeInfoV method") // }, +// GetCapabilitiesFunc: func() (nvml.DeviceCapabilities, nvml.Return) { +// panic("mock out the GetCapabilities method") +// }, // GetClkMonStatusFunc: func() (nvml.ClkMonStatus, nvml.Return) { // panic("mock out the GetClkMonStatus method") // }, @@ -102,6 +105,9 @@ var _ nvml.Device = &Device{} // GetClockInfoFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { // panic("mock out the GetClockInfo method") // }, +// GetClockOffsetsFunc: func() (nvml.ClockOffset, nvml.Return) { +// panic("mock out the GetClockOffsets method") +// }, // GetComputeInstanceIdFunc: func() (int, nvml.Return) { // panic("mock out the GetComputeInstanceId method") // }, @@ -123,6 +129,9 @@ var _ nvml.Device = &Device{} // GetConfComputeProtectedMemoryUsageFunc: func() (nvml.Memory, nvml.Return) { // panic("mock out the GetConfComputeProtectedMemoryUsage method") // }, +// GetCoolerInfoFunc: func() (nvml.CoolerInfo, nvml.Return) { +// panic("mock out the GetCoolerInfo method") +// }, // GetCpuAffinityFunc: func(n int) ([]uint, nvml.Return) { // panic("mock out the GetCpuAffinity method") // }, @@ -141,6 +150,9 @@ var _ nvml.Device = &Device{} // GetCurrPcieLinkWidthFunc: func() (int, nvml.Return) { // panic("mock out the GetCurrPcieLinkWidth method") // }, +// GetCurrentClockFreqsFunc: func() (nvml.DeviceCurrentClockFreqs, nvml.Return) { +// panic("mock out the GetCurrentClockFreqs method") +// }, // GetCurrentClocksEventReasonsFunc: func() (uint64, nvml.Return) { // panic("mock out the GetCurrentClocksEventReasons method") // }, @@ -168,9 +180,15 @@ var _ nvml.Device = &Device{} // GetDisplayModeFunc: func() (nvml.EnableState, nvml.Return) { // panic("mock out the GetDisplayMode method") // }, +// GetDramEncryptionModeFunc: func() (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { +// panic("mock out the GetDramEncryptionMode method") +// }, // GetDriverModelFunc: func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { // panic("mock out the GetDriverModel method") // }, +// GetDriverModel_v2Func: func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { +// panic("mock out the GetDriverModel_v2 method") +// }, // GetDynamicPstatesInfoFunc: func() (nvml.GpuDynamicPstatesInfo, nvml.Return) { // panic("mock out the GetDynamicPstatesInfo method") // }, @@ -204,6 +222,9 @@ var _ nvml.Device = &Device{} // GetFanSpeedFunc: func() (uint32, nvml.Return) { // panic("mock out the GetFanSpeed method") // }, +// GetFanSpeedRPMFunc: func() (nvml.FanSpeedInfo, nvml.Return) { +// panic("mock out the GetFanSpeedRPM method") +// }, // GetFanSpeed_v2Func: func(n int) (uint32, nvml.Return) { // panic("mock out the GetFanSpeed_v2 method") // }, @@ -288,6 +309,9 @@ var _ nvml.Device = &Device{} // GetMPSComputeRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { // panic("mock out the GetMPSComputeRunningProcesses method") // }, +// GetMarginTemperatureFunc: func() (nvml.MarginTemperature, nvml.Return) { +// panic("mock out the GetMarginTemperature method") +// }, // GetMaxClockInfoFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { // panic("mock out the GetMaxClockInfo method") // }, @@ -381,6 +405,12 @@ var _ nvml.Device = &Device{} // GetNvLinkVersionFunc: func(n int) (uint32, nvml.Return) { // panic("mock out the GetNvLinkVersion method") // }, +// GetNvlinkBwModeFunc: func() (nvml.NvlinkGetBwMode, nvml.Return) { +// panic("mock out the GetNvlinkBwMode method") +// }, +// GetNvlinkSupportedBwModesFunc: func() (nvml.NvlinkSupportedBwModes, nvml.Return) { +// panic("mock out the GetNvlinkSupportedBwModes method") +// }, // GetOfaUtilizationFunc: func() (uint32, uint32, nvml.Return) { // panic("mock out the GetOfaUtilization method") // }, @@ -405,6 +435,9 @@ var _ nvml.Device = &Device{} // GetPcieThroughputFunc: func(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { // panic("mock out the GetPcieThroughput method") // }, +// GetPerformanceModesFunc: func() (nvml.DevicePerfModes, nvml.Return) { +// panic("mock out the GetPerformanceModes method") +// }, // GetPerformanceStateFunc: func() (nvml.Pstates, nvml.Return) { // panic("mock out the GetPerformanceState method") // }, @@ -414,6 +447,9 @@ var _ nvml.Device = &Device{} // GetPgpuMetadataStringFunc: func() (string, nvml.Return) { // panic("mock out the GetPgpuMetadataString method") // }, +// GetPlatformInfoFunc: func() (nvml.PlatformInfo, nvml.Return) { +// panic("mock out the GetPlatformInfo method") +// }, // GetPowerManagementDefaultLimitFunc: func() (uint32, nvml.Return) { // panic("mock out the GetPowerManagementDefaultLimit method") // }, @@ -498,6 +534,9 @@ var _ nvml.Device = &Device{} // GetTemperatureThresholdFunc: func(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { // panic("mock out the GetTemperatureThreshold method") // }, +// GetTemperatureVFunc: func() nvml.TemperatureHandler { +// panic("mock out the GetTemperatureV method") +// }, // GetThermalSettingsFunc: func(v uint32) (nvml.GpuThermalSettings, nvml.Return) { // panic("mock out the GetThermalSettings method") // }, @@ -588,6 +627,15 @@ var _ nvml.Device = &Device{} // OnSameBoardFunc: func(device nvml.Device) (int, nvml.Return) { // panic("mock out the OnSameBoard method") // }, +// PowerSmoothingActivatePresetProfileFunc: func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { +// panic("mock out the PowerSmoothingActivatePresetProfile method") +// }, +// PowerSmoothingSetStateFunc: func(powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { +// panic("mock out the PowerSmoothingSetState method") +// }, +// PowerSmoothingUpdatePresetProfileParamFunc: func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { +// panic("mock out the PowerSmoothingUpdatePresetProfileParam method") +// }, // RegisterEventsFunc: func(v uint64, eventSet nvml.EventSet) nvml.Return { // panic("mock out the RegisterEvents method") // }, @@ -618,6 +666,9 @@ var _ nvml.Device = &Device{} // SetAutoBoostedClocksEnabledFunc: func(enableState nvml.EnableState) nvml.Return { // panic("mock out the SetAutoBoostedClocksEnabled method") // }, +// SetClockOffsetsFunc: func(clockOffset nvml.ClockOffset) nvml.Return { +// panic("mock out the SetClockOffsets method") +// }, // SetComputeModeFunc: func(computeMode nvml.ComputeMode) nvml.Return { // panic("mock out the SetComputeMode method") // }, @@ -633,6 +684,9 @@ var _ nvml.Device = &Device{} // SetDefaultFanSpeed_v2Func: func(n int) nvml.Return { // panic("mock out the SetDefaultFanSpeed_v2 method") // }, +// SetDramEncryptionModeFunc: func(dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { +// panic("mock out the SetDramEncryptionMode method") +// }, // SetDriverModelFunc: func(driverModel nvml.DriverModel, v uint32) nvml.Return { // panic("mock out the SetDriverModel method") // }, @@ -669,6 +723,9 @@ var _ nvml.Device = &Device{} // SetNvLinkUtilizationControlFunc: func(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { // panic("mock out the SetNvLinkUtilizationControl method") // }, +// SetNvlinkBwModeFunc: func(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { +// panic("mock out the SetNvlinkBwMode method") +// }, // SetPersistenceModeFunc: func(enableState nvml.EnableState) nvml.Return { // panic("mock out the SetPersistenceMode method") // }, @@ -699,6 +756,18 @@ var _ nvml.Device = &Device{} // VgpuTypeGetMaxInstancesFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { // panic("mock out the VgpuTypeGetMaxInstances method") // }, +// WorkloadPowerProfileClearRequestedProfilesFunc: func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { +// panic("mock out the WorkloadPowerProfileClearRequestedProfiles method") +// }, +// WorkloadPowerProfileGetCurrentProfilesFunc: func() (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { +// panic("mock out the WorkloadPowerProfileGetCurrentProfiles method") +// }, +// WorkloadPowerProfileGetProfilesInfoFunc: func() (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { +// panic("mock out the WorkloadPowerProfileGetProfilesInfo method") +// }, +// WorkloadPowerProfileSetRequestedProfilesFunc: func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { +// panic("mock out the WorkloadPowerProfileSetRequestedProfiles method") +// }, // } // // // use mockedDevice in code that requires nvml.Device @@ -781,6 +850,9 @@ type Device struct { // GetC2cModeInfoVFunc mocks the GetC2cModeInfoV method. GetC2cModeInfoVFunc func() nvml.C2cModeInfoHandler + // GetCapabilitiesFunc mocks the GetCapabilities method. + GetCapabilitiesFunc func() (nvml.DeviceCapabilities, nvml.Return) + // GetClkMonStatusFunc mocks the GetClkMonStatus method. GetClkMonStatusFunc func() (nvml.ClkMonStatus, nvml.Return) @@ -790,6 +862,9 @@ type Device struct { // GetClockInfoFunc mocks the GetClockInfo method. GetClockInfoFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + // GetClockOffsetsFunc mocks the GetClockOffsets method. + GetClockOffsetsFunc func() (nvml.ClockOffset, nvml.Return) + // GetComputeInstanceIdFunc mocks the GetComputeInstanceId method. GetComputeInstanceIdFunc func() (int, nvml.Return) @@ -811,6 +886,9 @@ type Device struct { // GetConfComputeProtectedMemoryUsageFunc mocks the GetConfComputeProtectedMemoryUsage method. GetConfComputeProtectedMemoryUsageFunc func() (nvml.Memory, nvml.Return) + // GetCoolerInfoFunc mocks the GetCoolerInfo method. + GetCoolerInfoFunc func() (nvml.CoolerInfo, nvml.Return) + // GetCpuAffinityFunc mocks the GetCpuAffinity method. GetCpuAffinityFunc func(n int) ([]uint, nvml.Return) @@ -829,6 +907,9 @@ type Device struct { // GetCurrPcieLinkWidthFunc mocks the GetCurrPcieLinkWidth method. GetCurrPcieLinkWidthFunc func() (int, nvml.Return) + // GetCurrentClockFreqsFunc mocks the GetCurrentClockFreqs method. + GetCurrentClockFreqsFunc func() (nvml.DeviceCurrentClockFreqs, nvml.Return) + // GetCurrentClocksEventReasonsFunc mocks the GetCurrentClocksEventReasons method. GetCurrentClocksEventReasonsFunc func() (uint64, nvml.Return) @@ -856,9 +937,15 @@ type Device struct { // GetDisplayModeFunc mocks the GetDisplayMode method. GetDisplayModeFunc func() (nvml.EnableState, nvml.Return) + // GetDramEncryptionModeFunc mocks the GetDramEncryptionMode method. + GetDramEncryptionModeFunc func() (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) + // GetDriverModelFunc mocks the GetDriverModel method. GetDriverModelFunc func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) + // GetDriverModel_v2Func mocks the GetDriverModel_v2 method. + GetDriverModel_v2Func func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) + // GetDynamicPstatesInfoFunc mocks the GetDynamicPstatesInfo method. GetDynamicPstatesInfoFunc func() (nvml.GpuDynamicPstatesInfo, nvml.Return) @@ -892,6 +979,9 @@ type Device struct { // GetFanSpeedFunc mocks the GetFanSpeed method. GetFanSpeedFunc func() (uint32, nvml.Return) + // GetFanSpeedRPMFunc mocks the GetFanSpeedRPM method. + GetFanSpeedRPMFunc func() (nvml.FanSpeedInfo, nvml.Return) + // GetFanSpeed_v2Func mocks the GetFanSpeed_v2 method. GetFanSpeed_v2Func func(n int) (uint32, nvml.Return) @@ -976,6 +1066,9 @@ type Device struct { // GetMPSComputeRunningProcessesFunc mocks the GetMPSComputeRunningProcesses method. GetMPSComputeRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) + // GetMarginTemperatureFunc mocks the GetMarginTemperature method. + GetMarginTemperatureFunc func() (nvml.MarginTemperature, nvml.Return) + // GetMaxClockInfoFunc mocks the GetMaxClockInfo method. GetMaxClockInfoFunc func(clockType nvml.ClockType) (uint32, nvml.Return) @@ -1069,6 +1162,12 @@ type Device struct { // GetNvLinkVersionFunc mocks the GetNvLinkVersion method. GetNvLinkVersionFunc func(n int) (uint32, nvml.Return) + // GetNvlinkBwModeFunc mocks the GetNvlinkBwMode method. + GetNvlinkBwModeFunc func() (nvml.NvlinkGetBwMode, nvml.Return) + + // GetNvlinkSupportedBwModesFunc mocks the GetNvlinkSupportedBwModes method. + GetNvlinkSupportedBwModesFunc func() (nvml.NvlinkSupportedBwModes, nvml.Return) + // GetOfaUtilizationFunc mocks the GetOfaUtilization method. GetOfaUtilizationFunc func() (uint32, uint32, nvml.Return) @@ -1093,6 +1192,9 @@ type Device struct { // GetPcieThroughputFunc mocks the GetPcieThroughput method. GetPcieThroughputFunc func(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) + // GetPerformanceModesFunc mocks the GetPerformanceModes method. + GetPerformanceModesFunc func() (nvml.DevicePerfModes, nvml.Return) + // GetPerformanceStateFunc mocks the GetPerformanceState method. GetPerformanceStateFunc func() (nvml.Pstates, nvml.Return) @@ -1102,6 +1204,9 @@ type Device struct { // GetPgpuMetadataStringFunc mocks the GetPgpuMetadataString method. GetPgpuMetadataStringFunc func() (string, nvml.Return) + // GetPlatformInfoFunc mocks the GetPlatformInfo method. + GetPlatformInfoFunc func() (nvml.PlatformInfo, nvml.Return) + // GetPowerManagementDefaultLimitFunc mocks the GetPowerManagementDefaultLimit method. GetPowerManagementDefaultLimitFunc func() (uint32, nvml.Return) @@ -1186,6 +1291,9 @@ type Device struct { // GetTemperatureThresholdFunc mocks the GetTemperatureThreshold method. GetTemperatureThresholdFunc func(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) + // GetTemperatureVFunc mocks the GetTemperatureV method. + GetTemperatureVFunc func() nvml.TemperatureHandler + // GetThermalSettingsFunc mocks the GetThermalSettings method. GetThermalSettingsFunc func(v uint32) (nvml.GpuThermalSettings, nvml.Return) @@ -1276,6 +1384,15 @@ type Device struct { // OnSameBoardFunc mocks the OnSameBoard method. OnSameBoardFunc func(device nvml.Device) (int, nvml.Return) + // PowerSmoothingActivatePresetProfileFunc mocks the PowerSmoothingActivatePresetProfile method. + PowerSmoothingActivatePresetProfileFunc func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return + + // PowerSmoothingSetStateFunc mocks the PowerSmoothingSetState method. + PowerSmoothingSetStateFunc func(powerSmoothingState *nvml.PowerSmoothingState) nvml.Return + + // PowerSmoothingUpdatePresetProfileParamFunc mocks the PowerSmoothingUpdatePresetProfileParam method. + PowerSmoothingUpdatePresetProfileParamFunc func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return + // RegisterEventsFunc mocks the RegisterEvents method. RegisterEventsFunc func(v uint64, eventSet nvml.EventSet) nvml.Return @@ -1306,6 +1423,9 @@ type Device struct { // SetAutoBoostedClocksEnabledFunc mocks the SetAutoBoostedClocksEnabled method. SetAutoBoostedClocksEnabledFunc func(enableState nvml.EnableState) nvml.Return + // SetClockOffsetsFunc mocks the SetClockOffsets method. + SetClockOffsetsFunc func(clockOffset nvml.ClockOffset) nvml.Return + // SetComputeModeFunc mocks the SetComputeMode method. SetComputeModeFunc func(computeMode nvml.ComputeMode) nvml.Return @@ -1321,6 +1441,9 @@ type Device struct { // SetDefaultFanSpeed_v2Func mocks the SetDefaultFanSpeed_v2 method. SetDefaultFanSpeed_v2Func func(n int) nvml.Return + // SetDramEncryptionModeFunc mocks the SetDramEncryptionMode method. + SetDramEncryptionModeFunc func(dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return + // SetDriverModelFunc mocks the SetDriverModel method. SetDriverModelFunc func(driverModel nvml.DriverModel, v uint32) nvml.Return @@ -1357,6 +1480,9 @@ type Device struct { // SetNvLinkUtilizationControlFunc mocks the SetNvLinkUtilizationControl method. SetNvLinkUtilizationControlFunc func(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return + // SetNvlinkBwModeFunc mocks the SetNvlinkBwMode method. + SetNvlinkBwModeFunc func(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return + // SetPersistenceModeFunc mocks the SetPersistenceMode method. SetPersistenceModeFunc func(enableState nvml.EnableState) nvml.Return @@ -1387,6 +1513,18 @@ type Device struct { // VgpuTypeGetMaxInstancesFunc mocks the VgpuTypeGetMaxInstances method. VgpuTypeGetMaxInstancesFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) + // WorkloadPowerProfileClearRequestedProfilesFunc mocks the WorkloadPowerProfileClearRequestedProfiles method. + WorkloadPowerProfileClearRequestedProfilesFunc func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return + + // WorkloadPowerProfileGetCurrentProfilesFunc mocks the WorkloadPowerProfileGetCurrentProfiles method. + WorkloadPowerProfileGetCurrentProfilesFunc func() (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) + + // WorkloadPowerProfileGetProfilesInfoFunc mocks the WorkloadPowerProfileGetProfilesInfo method. + WorkloadPowerProfileGetProfilesInfoFunc func() (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) + + // WorkloadPowerProfileSetRequestedProfilesFunc mocks the WorkloadPowerProfileSetRequestedProfiles method. + WorkloadPowerProfileSetRequestedProfilesFunc func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return + // calls tracks calls to the methods. calls struct { // ClearAccountingPids holds details about calls to the ClearAccountingPids method. @@ -1486,6 +1624,9 @@ type Device struct { // GetC2cModeInfoV holds details about calls to the GetC2cModeInfoV method. GetC2cModeInfoV []struct { } + // GetCapabilities holds details about calls to the GetCapabilities method. + GetCapabilities []struct { + } // GetClkMonStatus holds details about calls to the GetClkMonStatus method. GetClkMonStatus []struct { } @@ -1501,6 +1642,9 @@ type Device struct { // ClockType is the clockType argument value. ClockType nvml.ClockType } + // GetClockOffsets holds details about calls to the GetClockOffsets method. + GetClockOffsets []struct { + } // GetComputeInstanceId holds details about calls to the GetComputeInstanceId method. GetComputeInstanceId []struct { } @@ -1522,6 +1666,9 @@ type Device struct { // GetConfComputeProtectedMemoryUsage holds details about calls to the GetConfComputeProtectedMemoryUsage method. GetConfComputeProtectedMemoryUsage []struct { } + // GetCoolerInfo holds details about calls to the GetCoolerInfo method. + GetCoolerInfo []struct { + } // GetCpuAffinity holds details about calls to the GetCpuAffinity method. GetCpuAffinity []struct { // N is the n argument value. @@ -1546,6 +1693,9 @@ type Device struct { // GetCurrPcieLinkWidth holds details about calls to the GetCurrPcieLinkWidth method. GetCurrPcieLinkWidth []struct { } + // GetCurrentClockFreqs holds details about calls to the GetCurrentClockFreqs method. + GetCurrentClockFreqs []struct { + } // GetCurrentClocksEventReasons holds details about calls to the GetCurrentClocksEventReasons method. GetCurrentClocksEventReasons []struct { } @@ -1579,9 +1729,15 @@ type Device struct { // GetDisplayMode holds details about calls to the GetDisplayMode method. GetDisplayMode []struct { } + // GetDramEncryptionMode holds details about calls to the GetDramEncryptionMode method. + GetDramEncryptionMode []struct { + } // GetDriverModel holds details about calls to the GetDriverModel method. GetDriverModel []struct { } + // GetDriverModel_v2 holds details about calls to the GetDriverModel_v2 method. + GetDriverModel_v2 []struct { + } // GetDynamicPstatesInfo holds details about calls to the GetDynamicPstatesInfo method. GetDynamicPstatesInfo []struct { } @@ -1619,6 +1775,9 @@ type Device struct { // GetFanSpeed holds details about calls to the GetFanSpeed method. GetFanSpeed []struct { } + // GetFanSpeedRPM holds details about calls to the GetFanSpeedRPM method. + GetFanSpeedRPM []struct { + } // GetFanSpeed_v2 holds details about calls to the GetFanSpeed_v2 method. GetFanSpeed_v2 []struct { // N is the n argument value. @@ -1721,6 +1880,9 @@ type Device struct { // GetMPSComputeRunningProcesses holds details about calls to the GetMPSComputeRunningProcesses method. GetMPSComputeRunningProcesses []struct { } + // GetMarginTemperature holds details about calls to the GetMarginTemperature method. + GetMarginTemperature []struct { + } // GetMaxClockInfo holds details about calls to the GetMaxClockInfo method. GetMaxClockInfo []struct { // ClockType is the clockType argument value. @@ -1858,6 +2020,12 @@ type Device struct { // N is the n argument value. N int } + // GetNvlinkBwMode holds details about calls to the GetNvlinkBwMode method. + GetNvlinkBwMode []struct { + } + // GetNvlinkSupportedBwModes holds details about calls to the GetNvlinkSupportedBwModes method. + GetNvlinkSupportedBwModes []struct { + } // GetOfaUtilization holds details about calls to the GetOfaUtilization method. GetOfaUtilization []struct { } @@ -1888,6 +2056,9 @@ type Device struct { // PcieUtilCounter is the pcieUtilCounter argument value. PcieUtilCounter nvml.PcieUtilCounter } + // GetPerformanceModes holds details about calls to the GetPerformanceModes method. + GetPerformanceModes []struct { + } // GetPerformanceState holds details about calls to the GetPerformanceState method. GetPerformanceState []struct { } @@ -1897,6 +2068,9 @@ type Device struct { // GetPgpuMetadataString holds details about calls to the GetPgpuMetadataString method. GetPgpuMetadataString []struct { } + // GetPlatformInfo holds details about calls to the GetPlatformInfo method. + GetPlatformInfo []struct { + } // GetPowerManagementDefaultLimit holds details about calls to the GetPowerManagementDefaultLimit method. GetPowerManagementDefaultLimit []struct { } @@ -1999,6 +2173,9 @@ type Device struct { // TemperatureThresholds is the temperatureThresholds argument value. TemperatureThresholds nvml.TemperatureThresholds } + // GetTemperatureV holds details about calls to the GetTemperatureV method. + GetTemperatureV []struct { + } // GetThermalSettings holds details about calls to the GetThermalSettings method. GetThermalSettings []struct { // V is the v argument value. @@ -2121,6 +2298,21 @@ type Device struct { // Device is the device argument value. Device nvml.Device } + // PowerSmoothingActivatePresetProfile holds details about calls to the PowerSmoothingActivatePresetProfile method. + PowerSmoothingActivatePresetProfile []struct { + // PowerSmoothingProfile is the powerSmoothingProfile argument value. + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + // PowerSmoothingSetState holds details about calls to the PowerSmoothingSetState method. + PowerSmoothingSetState []struct { + // PowerSmoothingState is the powerSmoothingState argument value. + PowerSmoothingState *nvml.PowerSmoothingState + } + // PowerSmoothingUpdatePresetProfileParam holds details about calls to the PowerSmoothingUpdatePresetProfileParam method. + PowerSmoothingUpdatePresetProfileParam []struct { + // PowerSmoothingProfile is the powerSmoothingProfile argument value. + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } // RegisterEvents holds details about calls to the RegisterEvents method. RegisterEvents []struct { // V is the v argument value. @@ -2173,6 +2365,11 @@ type Device struct { // EnableState is the enableState argument value. EnableState nvml.EnableState } + // SetClockOffsets holds details about calls to the SetClockOffsets method. + SetClockOffsets []struct { + // ClockOffset is the clockOffset argument value. + ClockOffset nvml.ClockOffset + } // SetComputeMode holds details about calls to the SetComputeMode method. SetComputeMode []struct { // ComputeMode is the computeMode argument value. @@ -2198,6 +2395,11 @@ type Device struct { // N is the n argument value. N int } + // SetDramEncryptionMode holds details about calls to the SetDramEncryptionMode method. + SetDramEncryptionMode []struct { + // DramEncryptionInfo is the dramEncryptionInfo argument value. + DramEncryptionInfo *nvml.DramEncryptionInfo + } // SetDriverModel holds details about calls to the SetDriverModel method. SetDriverModel []struct { // DriverModel is the driverModel argument value. @@ -2274,6 +2476,11 @@ type Device struct { // B is the b argument value. B bool } + // SetNvlinkBwMode holds details about calls to the SetNvlinkBwMode method. + SetNvlinkBwMode []struct { + // NvlinkSetBwMode is the nvlinkSetBwMode argument value. + NvlinkSetBwMode *nvml.NvlinkSetBwMode + } // SetPersistenceMode holds details about calls to the SetPersistenceMode method. SetPersistenceMode []struct { // EnableState is the enableState argument value. @@ -2326,234 +2533,273 @@ type Device struct { // VgpuTypeId is the vgpuTypeId argument value. VgpuTypeId nvml.VgpuTypeId } + // WorkloadPowerProfileClearRequestedProfiles holds details about calls to the WorkloadPowerProfileClearRequestedProfiles method. + WorkloadPowerProfileClearRequestedProfiles []struct { + // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + // WorkloadPowerProfileGetCurrentProfiles holds details about calls to the WorkloadPowerProfileGetCurrentProfiles method. + WorkloadPowerProfileGetCurrentProfiles []struct { + } + // WorkloadPowerProfileGetProfilesInfo holds details about calls to the WorkloadPowerProfileGetProfilesInfo method. + WorkloadPowerProfileGetProfilesInfo []struct { + } + // WorkloadPowerProfileSetRequestedProfiles holds details about calls to the WorkloadPowerProfileSetRequestedProfiles method. + WorkloadPowerProfileSetRequestedProfiles []struct { + // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } } - lockClearAccountingPids sync.RWMutex - lockClearCpuAffinity sync.RWMutex - lockClearEccErrorCounts sync.RWMutex - lockClearFieldValues sync.RWMutex - lockCreateGpuInstance sync.RWMutex - lockCreateGpuInstanceWithPlacement sync.RWMutex - lockFreezeNvLinkUtilizationCounter sync.RWMutex - lockGetAPIRestriction sync.RWMutex - lockGetAccountingBufferSize sync.RWMutex - lockGetAccountingMode sync.RWMutex - lockGetAccountingPids sync.RWMutex - lockGetAccountingStats sync.RWMutex - lockGetActiveVgpus sync.RWMutex - lockGetAdaptiveClockInfoStatus sync.RWMutex - lockGetApplicationsClock sync.RWMutex - lockGetArchitecture sync.RWMutex - lockGetAttributes sync.RWMutex - lockGetAutoBoostedClocksEnabled sync.RWMutex - lockGetBAR1MemoryInfo sync.RWMutex - lockGetBoardId sync.RWMutex - lockGetBoardPartNumber sync.RWMutex - lockGetBrand sync.RWMutex - lockGetBridgeChipInfo sync.RWMutex - lockGetBusType sync.RWMutex - lockGetC2cModeInfoV sync.RWMutex - lockGetClkMonStatus sync.RWMutex - lockGetClock sync.RWMutex - lockGetClockInfo sync.RWMutex - lockGetComputeInstanceId sync.RWMutex - lockGetComputeMode sync.RWMutex - lockGetComputeRunningProcesses sync.RWMutex - lockGetConfComputeGpuAttestationReport sync.RWMutex - lockGetConfComputeGpuCertificate sync.RWMutex - lockGetConfComputeMemSizeInfo sync.RWMutex - lockGetConfComputeProtectedMemoryUsage sync.RWMutex - lockGetCpuAffinity sync.RWMutex - lockGetCpuAffinityWithinScope sync.RWMutex - lockGetCreatableVgpus sync.RWMutex - lockGetCudaComputeCapability sync.RWMutex - lockGetCurrPcieLinkGeneration sync.RWMutex - lockGetCurrPcieLinkWidth sync.RWMutex - lockGetCurrentClocksEventReasons sync.RWMutex - lockGetCurrentClocksThrottleReasons sync.RWMutex - lockGetDecoderUtilization sync.RWMutex - lockGetDefaultApplicationsClock sync.RWMutex - lockGetDefaultEccMode sync.RWMutex - lockGetDetailedEccErrors sync.RWMutex - lockGetDeviceHandleFromMigDeviceHandle sync.RWMutex - lockGetDisplayActive sync.RWMutex - lockGetDisplayMode sync.RWMutex - lockGetDriverModel sync.RWMutex - lockGetDynamicPstatesInfo sync.RWMutex - lockGetEccMode sync.RWMutex - lockGetEncoderCapacity sync.RWMutex - lockGetEncoderSessions sync.RWMutex - lockGetEncoderStats sync.RWMutex - lockGetEncoderUtilization sync.RWMutex - lockGetEnforcedPowerLimit sync.RWMutex - lockGetFBCSessions sync.RWMutex - lockGetFBCStats sync.RWMutex - lockGetFanControlPolicy_v2 sync.RWMutex - lockGetFanSpeed sync.RWMutex - lockGetFanSpeed_v2 sync.RWMutex - lockGetFieldValues sync.RWMutex - lockGetGpcClkMinMaxVfOffset sync.RWMutex - lockGetGpcClkVfOffset sync.RWMutex - lockGetGpuFabricInfo sync.RWMutex - lockGetGpuFabricInfoV sync.RWMutex - lockGetGpuInstanceById sync.RWMutex - lockGetGpuInstanceId sync.RWMutex - lockGetGpuInstancePossiblePlacements sync.RWMutex - lockGetGpuInstanceProfileInfo sync.RWMutex - lockGetGpuInstanceProfileInfoV sync.RWMutex - lockGetGpuInstanceRemainingCapacity sync.RWMutex - lockGetGpuInstances sync.RWMutex - lockGetGpuMaxPcieLinkGeneration sync.RWMutex - lockGetGpuOperationMode sync.RWMutex - lockGetGraphicsRunningProcesses sync.RWMutex - lockGetGridLicensableFeatures sync.RWMutex - lockGetGspFirmwareMode sync.RWMutex - lockGetGspFirmwareVersion sync.RWMutex - lockGetHostVgpuMode sync.RWMutex - lockGetIndex sync.RWMutex - lockGetInforomConfigurationChecksum sync.RWMutex - lockGetInforomImageVersion sync.RWMutex - lockGetInforomVersion sync.RWMutex - lockGetIrqNum sync.RWMutex - lockGetJpgUtilization sync.RWMutex - lockGetLastBBXFlushTime sync.RWMutex - lockGetMPSComputeRunningProcesses sync.RWMutex - lockGetMaxClockInfo sync.RWMutex - lockGetMaxCustomerBoostClock sync.RWMutex - lockGetMaxMigDeviceCount sync.RWMutex - lockGetMaxPcieLinkGeneration sync.RWMutex - lockGetMaxPcieLinkWidth sync.RWMutex - lockGetMemClkMinMaxVfOffset sync.RWMutex - lockGetMemClkVfOffset sync.RWMutex - lockGetMemoryAffinity sync.RWMutex - lockGetMemoryBusWidth sync.RWMutex - lockGetMemoryErrorCounter sync.RWMutex - lockGetMemoryInfo sync.RWMutex - lockGetMemoryInfo_v2 sync.RWMutex - lockGetMigDeviceHandleByIndex sync.RWMutex - lockGetMigMode sync.RWMutex - lockGetMinMaxClockOfPState sync.RWMutex - lockGetMinMaxFanSpeed sync.RWMutex - lockGetMinorNumber sync.RWMutex - lockGetModuleId sync.RWMutex - lockGetMultiGpuBoard sync.RWMutex - lockGetName sync.RWMutex - lockGetNumFans sync.RWMutex - lockGetNumGpuCores sync.RWMutex - lockGetNumaNodeId sync.RWMutex - lockGetNvLinkCapability sync.RWMutex - lockGetNvLinkErrorCounter sync.RWMutex - lockGetNvLinkRemoteDeviceType sync.RWMutex - lockGetNvLinkRemotePciInfo sync.RWMutex - lockGetNvLinkState sync.RWMutex - lockGetNvLinkUtilizationControl sync.RWMutex - lockGetNvLinkUtilizationCounter sync.RWMutex - lockGetNvLinkVersion sync.RWMutex - lockGetOfaUtilization sync.RWMutex - lockGetP2PStatus sync.RWMutex - lockGetPciInfo sync.RWMutex - lockGetPciInfoExt sync.RWMutex - lockGetPcieLinkMaxSpeed sync.RWMutex - lockGetPcieReplayCounter sync.RWMutex - lockGetPcieSpeed sync.RWMutex - lockGetPcieThroughput sync.RWMutex - lockGetPerformanceState sync.RWMutex - lockGetPersistenceMode sync.RWMutex - lockGetPgpuMetadataString sync.RWMutex - lockGetPowerManagementDefaultLimit sync.RWMutex - lockGetPowerManagementLimit sync.RWMutex - lockGetPowerManagementLimitConstraints sync.RWMutex - lockGetPowerManagementMode sync.RWMutex - lockGetPowerSource sync.RWMutex - lockGetPowerState sync.RWMutex - lockGetPowerUsage sync.RWMutex - lockGetProcessUtilization sync.RWMutex - lockGetProcessesUtilizationInfo sync.RWMutex - lockGetRemappedRows sync.RWMutex - lockGetRetiredPages sync.RWMutex - lockGetRetiredPagesPendingStatus sync.RWMutex - lockGetRetiredPages_v2 sync.RWMutex - lockGetRowRemapperHistogram sync.RWMutex - lockGetRunningProcessDetailList sync.RWMutex - lockGetSamples sync.RWMutex - lockGetSerial sync.RWMutex - lockGetSramEccErrorStatus sync.RWMutex - lockGetSupportedClocksEventReasons sync.RWMutex - lockGetSupportedClocksThrottleReasons sync.RWMutex - lockGetSupportedEventTypes sync.RWMutex - lockGetSupportedGraphicsClocks sync.RWMutex - lockGetSupportedMemoryClocks sync.RWMutex - lockGetSupportedPerformanceStates sync.RWMutex - lockGetSupportedVgpus sync.RWMutex - lockGetTargetFanSpeed sync.RWMutex - lockGetTemperature sync.RWMutex - lockGetTemperatureThreshold sync.RWMutex - lockGetThermalSettings sync.RWMutex - lockGetTopologyCommonAncestor sync.RWMutex - lockGetTopologyNearestGpus sync.RWMutex - lockGetTotalEccErrors sync.RWMutex - lockGetTotalEnergyConsumption sync.RWMutex - lockGetUUID sync.RWMutex - lockGetUtilizationRates sync.RWMutex - lockGetVbiosVersion sync.RWMutex - lockGetVgpuCapabilities sync.RWMutex - lockGetVgpuHeterogeneousMode sync.RWMutex - lockGetVgpuInstancesUtilizationInfo sync.RWMutex - lockGetVgpuMetadata sync.RWMutex - lockGetVgpuProcessUtilization sync.RWMutex - lockGetVgpuProcessesUtilizationInfo sync.RWMutex - lockGetVgpuSchedulerCapabilities sync.RWMutex - lockGetVgpuSchedulerLog sync.RWMutex - lockGetVgpuSchedulerState sync.RWMutex - lockGetVgpuTypeCreatablePlacements sync.RWMutex - lockGetVgpuTypeSupportedPlacements sync.RWMutex - lockGetVgpuUtilization sync.RWMutex - lockGetViolationStatus sync.RWMutex - lockGetVirtualizationMode sync.RWMutex - lockGpmMigSampleGet sync.RWMutex - lockGpmQueryDeviceSupport sync.RWMutex - lockGpmQueryDeviceSupportV sync.RWMutex - lockGpmQueryIfStreamingEnabled sync.RWMutex - lockGpmSampleGet sync.RWMutex - lockGpmSetStreamingEnabled sync.RWMutex - lockIsMigDeviceHandle sync.RWMutex - lockOnSameBoard sync.RWMutex - lockRegisterEvents sync.RWMutex - lockResetApplicationsClocks sync.RWMutex - lockResetGpuLockedClocks sync.RWMutex - lockResetMemoryLockedClocks sync.RWMutex - lockResetNvLinkErrorCounters sync.RWMutex - lockResetNvLinkUtilizationCounter sync.RWMutex - lockSetAPIRestriction sync.RWMutex - lockSetAccountingMode sync.RWMutex - lockSetApplicationsClocks sync.RWMutex - lockSetAutoBoostedClocksEnabled sync.RWMutex - lockSetComputeMode sync.RWMutex - lockSetConfComputeUnprotectedMemSize sync.RWMutex - lockSetCpuAffinity sync.RWMutex - lockSetDefaultAutoBoostedClocksEnabled sync.RWMutex - lockSetDefaultFanSpeed_v2 sync.RWMutex - lockSetDriverModel sync.RWMutex - lockSetEccMode sync.RWMutex - lockSetFanControlPolicy sync.RWMutex - lockSetFanSpeed_v2 sync.RWMutex - lockSetGpcClkVfOffset sync.RWMutex - lockSetGpuLockedClocks sync.RWMutex - lockSetGpuOperationMode sync.RWMutex - lockSetMemClkVfOffset sync.RWMutex - lockSetMemoryLockedClocks sync.RWMutex - lockSetMigMode sync.RWMutex - lockSetNvLinkDeviceLowPowerThreshold sync.RWMutex - lockSetNvLinkUtilizationControl sync.RWMutex - lockSetPersistenceMode sync.RWMutex - lockSetPowerManagementLimit sync.RWMutex - lockSetPowerManagementLimit_v2 sync.RWMutex - lockSetTemperatureThreshold sync.RWMutex - lockSetVgpuCapabilities sync.RWMutex - lockSetVgpuHeterogeneousMode sync.RWMutex - lockSetVgpuSchedulerState sync.RWMutex - lockSetVirtualizationMode sync.RWMutex - lockValidateInforom sync.RWMutex - lockVgpuTypeGetMaxInstances sync.RWMutex + lockClearAccountingPids sync.RWMutex + lockClearCpuAffinity sync.RWMutex + lockClearEccErrorCounts sync.RWMutex + lockClearFieldValues sync.RWMutex + lockCreateGpuInstance sync.RWMutex + lockCreateGpuInstanceWithPlacement sync.RWMutex + lockFreezeNvLinkUtilizationCounter sync.RWMutex + lockGetAPIRestriction sync.RWMutex + lockGetAccountingBufferSize sync.RWMutex + lockGetAccountingMode sync.RWMutex + lockGetAccountingPids sync.RWMutex + lockGetAccountingStats sync.RWMutex + lockGetActiveVgpus sync.RWMutex + lockGetAdaptiveClockInfoStatus sync.RWMutex + lockGetApplicationsClock sync.RWMutex + lockGetArchitecture sync.RWMutex + lockGetAttributes sync.RWMutex + lockGetAutoBoostedClocksEnabled sync.RWMutex + lockGetBAR1MemoryInfo sync.RWMutex + lockGetBoardId sync.RWMutex + lockGetBoardPartNumber sync.RWMutex + lockGetBrand sync.RWMutex + lockGetBridgeChipInfo sync.RWMutex + lockGetBusType sync.RWMutex + lockGetC2cModeInfoV sync.RWMutex + lockGetCapabilities sync.RWMutex + lockGetClkMonStatus sync.RWMutex + lockGetClock sync.RWMutex + lockGetClockInfo sync.RWMutex + lockGetClockOffsets sync.RWMutex + lockGetComputeInstanceId sync.RWMutex + lockGetComputeMode sync.RWMutex + lockGetComputeRunningProcesses sync.RWMutex + lockGetConfComputeGpuAttestationReport sync.RWMutex + lockGetConfComputeGpuCertificate sync.RWMutex + lockGetConfComputeMemSizeInfo sync.RWMutex + lockGetConfComputeProtectedMemoryUsage sync.RWMutex + lockGetCoolerInfo sync.RWMutex + lockGetCpuAffinity sync.RWMutex + lockGetCpuAffinityWithinScope sync.RWMutex + lockGetCreatableVgpus sync.RWMutex + lockGetCudaComputeCapability sync.RWMutex + lockGetCurrPcieLinkGeneration sync.RWMutex + lockGetCurrPcieLinkWidth sync.RWMutex + lockGetCurrentClockFreqs sync.RWMutex + lockGetCurrentClocksEventReasons sync.RWMutex + lockGetCurrentClocksThrottleReasons sync.RWMutex + lockGetDecoderUtilization sync.RWMutex + lockGetDefaultApplicationsClock sync.RWMutex + lockGetDefaultEccMode sync.RWMutex + lockGetDetailedEccErrors sync.RWMutex + lockGetDeviceHandleFromMigDeviceHandle sync.RWMutex + lockGetDisplayActive sync.RWMutex + lockGetDisplayMode sync.RWMutex + lockGetDramEncryptionMode sync.RWMutex + lockGetDriverModel sync.RWMutex + lockGetDriverModel_v2 sync.RWMutex + lockGetDynamicPstatesInfo sync.RWMutex + lockGetEccMode sync.RWMutex + lockGetEncoderCapacity sync.RWMutex + lockGetEncoderSessions sync.RWMutex + lockGetEncoderStats sync.RWMutex + lockGetEncoderUtilization sync.RWMutex + lockGetEnforcedPowerLimit sync.RWMutex + lockGetFBCSessions sync.RWMutex + lockGetFBCStats sync.RWMutex + lockGetFanControlPolicy_v2 sync.RWMutex + lockGetFanSpeed sync.RWMutex + lockGetFanSpeedRPM sync.RWMutex + lockGetFanSpeed_v2 sync.RWMutex + lockGetFieldValues sync.RWMutex + lockGetGpcClkMinMaxVfOffset sync.RWMutex + lockGetGpcClkVfOffset sync.RWMutex + lockGetGpuFabricInfo sync.RWMutex + lockGetGpuFabricInfoV sync.RWMutex + lockGetGpuInstanceById sync.RWMutex + lockGetGpuInstanceId sync.RWMutex + lockGetGpuInstancePossiblePlacements sync.RWMutex + lockGetGpuInstanceProfileInfo sync.RWMutex + lockGetGpuInstanceProfileInfoV sync.RWMutex + lockGetGpuInstanceRemainingCapacity sync.RWMutex + lockGetGpuInstances sync.RWMutex + lockGetGpuMaxPcieLinkGeneration sync.RWMutex + lockGetGpuOperationMode sync.RWMutex + lockGetGraphicsRunningProcesses sync.RWMutex + lockGetGridLicensableFeatures sync.RWMutex + lockGetGspFirmwareMode sync.RWMutex + lockGetGspFirmwareVersion sync.RWMutex + lockGetHostVgpuMode sync.RWMutex + lockGetIndex sync.RWMutex + lockGetInforomConfigurationChecksum sync.RWMutex + lockGetInforomImageVersion sync.RWMutex + lockGetInforomVersion sync.RWMutex + lockGetIrqNum sync.RWMutex + lockGetJpgUtilization sync.RWMutex + lockGetLastBBXFlushTime sync.RWMutex + lockGetMPSComputeRunningProcesses sync.RWMutex + lockGetMarginTemperature sync.RWMutex + lockGetMaxClockInfo sync.RWMutex + lockGetMaxCustomerBoostClock sync.RWMutex + lockGetMaxMigDeviceCount sync.RWMutex + lockGetMaxPcieLinkGeneration sync.RWMutex + lockGetMaxPcieLinkWidth sync.RWMutex + lockGetMemClkMinMaxVfOffset sync.RWMutex + lockGetMemClkVfOffset sync.RWMutex + lockGetMemoryAffinity sync.RWMutex + lockGetMemoryBusWidth sync.RWMutex + lockGetMemoryErrorCounter sync.RWMutex + lockGetMemoryInfo sync.RWMutex + lockGetMemoryInfo_v2 sync.RWMutex + lockGetMigDeviceHandleByIndex sync.RWMutex + lockGetMigMode sync.RWMutex + lockGetMinMaxClockOfPState sync.RWMutex + lockGetMinMaxFanSpeed sync.RWMutex + lockGetMinorNumber sync.RWMutex + lockGetModuleId sync.RWMutex + lockGetMultiGpuBoard sync.RWMutex + lockGetName sync.RWMutex + lockGetNumFans sync.RWMutex + lockGetNumGpuCores sync.RWMutex + lockGetNumaNodeId sync.RWMutex + lockGetNvLinkCapability sync.RWMutex + lockGetNvLinkErrorCounter sync.RWMutex + lockGetNvLinkRemoteDeviceType sync.RWMutex + lockGetNvLinkRemotePciInfo sync.RWMutex + lockGetNvLinkState sync.RWMutex + lockGetNvLinkUtilizationControl sync.RWMutex + lockGetNvLinkUtilizationCounter sync.RWMutex + lockGetNvLinkVersion sync.RWMutex + lockGetNvlinkBwMode sync.RWMutex + lockGetNvlinkSupportedBwModes sync.RWMutex + lockGetOfaUtilization sync.RWMutex + lockGetP2PStatus sync.RWMutex + lockGetPciInfo sync.RWMutex + lockGetPciInfoExt sync.RWMutex + lockGetPcieLinkMaxSpeed sync.RWMutex + lockGetPcieReplayCounter sync.RWMutex + lockGetPcieSpeed sync.RWMutex + lockGetPcieThroughput sync.RWMutex + lockGetPerformanceModes sync.RWMutex + lockGetPerformanceState sync.RWMutex + lockGetPersistenceMode sync.RWMutex + lockGetPgpuMetadataString sync.RWMutex + lockGetPlatformInfo sync.RWMutex + lockGetPowerManagementDefaultLimit sync.RWMutex + lockGetPowerManagementLimit sync.RWMutex + lockGetPowerManagementLimitConstraints sync.RWMutex + lockGetPowerManagementMode sync.RWMutex + lockGetPowerSource sync.RWMutex + lockGetPowerState sync.RWMutex + lockGetPowerUsage sync.RWMutex + lockGetProcessUtilization sync.RWMutex + lockGetProcessesUtilizationInfo sync.RWMutex + lockGetRemappedRows sync.RWMutex + lockGetRetiredPages sync.RWMutex + lockGetRetiredPagesPendingStatus sync.RWMutex + lockGetRetiredPages_v2 sync.RWMutex + lockGetRowRemapperHistogram sync.RWMutex + lockGetRunningProcessDetailList sync.RWMutex + lockGetSamples sync.RWMutex + lockGetSerial sync.RWMutex + lockGetSramEccErrorStatus sync.RWMutex + lockGetSupportedClocksEventReasons sync.RWMutex + lockGetSupportedClocksThrottleReasons sync.RWMutex + lockGetSupportedEventTypes sync.RWMutex + lockGetSupportedGraphicsClocks sync.RWMutex + lockGetSupportedMemoryClocks sync.RWMutex + lockGetSupportedPerformanceStates sync.RWMutex + lockGetSupportedVgpus sync.RWMutex + lockGetTargetFanSpeed sync.RWMutex + lockGetTemperature sync.RWMutex + lockGetTemperatureThreshold sync.RWMutex + lockGetTemperatureV sync.RWMutex + lockGetThermalSettings sync.RWMutex + lockGetTopologyCommonAncestor sync.RWMutex + lockGetTopologyNearestGpus sync.RWMutex + lockGetTotalEccErrors sync.RWMutex + lockGetTotalEnergyConsumption sync.RWMutex + lockGetUUID sync.RWMutex + lockGetUtilizationRates sync.RWMutex + lockGetVbiosVersion sync.RWMutex + lockGetVgpuCapabilities sync.RWMutex + lockGetVgpuHeterogeneousMode sync.RWMutex + lockGetVgpuInstancesUtilizationInfo sync.RWMutex + lockGetVgpuMetadata sync.RWMutex + lockGetVgpuProcessUtilization sync.RWMutex + lockGetVgpuProcessesUtilizationInfo sync.RWMutex + lockGetVgpuSchedulerCapabilities sync.RWMutex + lockGetVgpuSchedulerLog sync.RWMutex + lockGetVgpuSchedulerState sync.RWMutex + lockGetVgpuTypeCreatablePlacements sync.RWMutex + lockGetVgpuTypeSupportedPlacements sync.RWMutex + lockGetVgpuUtilization sync.RWMutex + lockGetViolationStatus sync.RWMutex + lockGetVirtualizationMode sync.RWMutex + lockGpmMigSampleGet sync.RWMutex + lockGpmQueryDeviceSupport sync.RWMutex + lockGpmQueryDeviceSupportV sync.RWMutex + lockGpmQueryIfStreamingEnabled sync.RWMutex + lockGpmSampleGet sync.RWMutex + lockGpmSetStreamingEnabled sync.RWMutex + lockIsMigDeviceHandle sync.RWMutex + lockOnSameBoard sync.RWMutex + lockPowerSmoothingActivatePresetProfile sync.RWMutex + lockPowerSmoothingSetState sync.RWMutex + lockPowerSmoothingUpdatePresetProfileParam sync.RWMutex + lockRegisterEvents sync.RWMutex + lockResetApplicationsClocks sync.RWMutex + lockResetGpuLockedClocks sync.RWMutex + lockResetMemoryLockedClocks sync.RWMutex + lockResetNvLinkErrorCounters sync.RWMutex + lockResetNvLinkUtilizationCounter sync.RWMutex + lockSetAPIRestriction sync.RWMutex + lockSetAccountingMode sync.RWMutex + lockSetApplicationsClocks sync.RWMutex + lockSetAutoBoostedClocksEnabled sync.RWMutex + lockSetClockOffsets sync.RWMutex + lockSetComputeMode sync.RWMutex + lockSetConfComputeUnprotectedMemSize sync.RWMutex + lockSetCpuAffinity sync.RWMutex + lockSetDefaultAutoBoostedClocksEnabled sync.RWMutex + lockSetDefaultFanSpeed_v2 sync.RWMutex + lockSetDramEncryptionMode sync.RWMutex + lockSetDriverModel sync.RWMutex + lockSetEccMode sync.RWMutex + lockSetFanControlPolicy sync.RWMutex + lockSetFanSpeed_v2 sync.RWMutex + lockSetGpcClkVfOffset sync.RWMutex + lockSetGpuLockedClocks sync.RWMutex + lockSetGpuOperationMode sync.RWMutex + lockSetMemClkVfOffset sync.RWMutex + lockSetMemoryLockedClocks sync.RWMutex + lockSetMigMode sync.RWMutex + lockSetNvLinkDeviceLowPowerThreshold sync.RWMutex + lockSetNvLinkUtilizationControl sync.RWMutex + lockSetNvlinkBwMode sync.RWMutex + lockSetPersistenceMode sync.RWMutex + lockSetPowerManagementLimit sync.RWMutex + lockSetPowerManagementLimit_v2 sync.RWMutex + lockSetTemperatureThreshold sync.RWMutex + lockSetVgpuCapabilities sync.RWMutex + lockSetVgpuHeterogeneousMode sync.RWMutex + lockSetVgpuSchedulerState sync.RWMutex + lockSetVirtualizationMode sync.RWMutex + lockValidateInforom sync.RWMutex + lockVgpuTypeGetMaxInstances sync.RWMutex + lockWorkloadPowerProfileClearRequestedProfiles sync.RWMutex + lockWorkloadPowerProfileGetCurrentProfiles sync.RWMutex + lockWorkloadPowerProfileGetProfilesInfo sync.RWMutex + lockWorkloadPowerProfileSetRequestedProfiles sync.RWMutex } // ClearAccountingPids calls ClearAccountingPidsFunc. @@ -3283,6 +3529,33 @@ func (mock *Device) GetC2cModeInfoVCalls() []struct { return calls } +// GetCapabilities calls GetCapabilitiesFunc. +func (mock *Device) GetCapabilities() (nvml.DeviceCapabilities, nvml.Return) { + if mock.GetCapabilitiesFunc == nil { + panic("Device.GetCapabilitiesFunc: method is nil but Device.GetCapabilities was just called") + } + callInfo := struct { + }{} + mock.lockGetCapabilities.Lock() + mock.calls.GetCapabilities = append(mock.calls.GetCapabilities, callInfo) + mock.lockGetCapabilities.Unlock() + return mock.GetCapabilitiesFunc() +} + +// GetCapabilitiesCalls gets all the calls that were made to GetCapabilities. +// Check the length with: +// +// len(mockedDevice.GetCapabilitiesCalls()) +func (mock *Device) GetCapabilitiesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCapabilities.RLock() + calls = mock.calls.GetCapabilities + mock.lockGetCapabilities.RUnlock() + return calls +} + // GetClkMonStatus calls GetClkMonStatusFunc. func (mock *Device) GetClkMonStatus() (nvml.ClkMonStatus, nvml.Return) { if mock.GetClkMonStatusFunc == nil { @@ -3378,6 +3651,33 @@ func (mock *Device) GetClockInfoCalls() []struct { return calls } +// GetClockOffsets calls GetClockOffsetsFunc. +func (mock *Device) GetClockOffsets() (nvml.ClockOffset, nvml.Return) { + if mock.GetClockOffsetsFunc == nil { + panic("Device.GetClockOffsetsFunc: method is nil but Device.GetClockOffsets was just called") + } + callInfo := struct { + }{} + mock.lockGetClockOffsets.Lock() + mock.calls.GetClockOffsets = append(mock.calls.GetClockOffsets, callInfo) + mock.lockGetClockOffsets.Unlock() + return mock.GetClockOffsetsFunc() +} + +// GetClockOffsetsCalls gets all the calls that were made to GetClockOffsets. +// Check the length with: +// +// len(mockedDevice.GetClockOffsetsCalls()) +func (mock *Device) GetClockOffsetsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetClockOffsets.RLock() + calls = mock.calls.GetClockOffsets + mock.lockGetClockOffsets.RUnlock() + return calls +} + // GetComputeInstanceId calls GetComputeInstanceIdFunc. func (mock *Device) GetComputeInstanceId() (int, nvml.Return) { if mock.GetComputeInstanceIdFunc == nil { @@ -3567,6 +3867,33 @@ func (mock *Device) GetConfComputeProtectedMemoryUsageCalls() []struct { return calls } +// GetCoolerInfo calls GetCoolerInfoFunc. +func (mock *Device) GetCoolerInfo() (nvml.CoolerInfo, nvml.Return) { + if mock.GetCoolerInfoFunc == nil { + panic("Device.GetCoolerInfoFunc: method is nil but Device.GetCoolerInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetCoolerInfo.Lock() + mock.calls.GetCoolerInfo = append(mock.calls.GetCoolerInfo, callInfo) + mock.lockGetCoolerInfo.Unlock() + return mock.GetCoolerInfoFunc() +} + +// GetCoolerInfoCalls gets all the calls that were made to GetCoolerInfo. +// Check the length with: +// +// len(mockedDevice.GetCoolerInfoCalls()) +func (mock *Device) GetCoolerInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCoolerInfo.RLock() + calls = mock.calls.GetCoolerInfo + mock.lockGetCoolerInfo.RUnlock() + return calls +} + // GetCpuAffinity calls GetCpuAffinityFunc. func (mock *Device) GetCpuAffinity(n int) ([]uint, nvml.Return) { if mock.GetCpuAffinityFunc == nil { @@ -3743,6 +4070,33 @@ func (mock *Device) GetCurrPcieLinkWidthCalls() []struct { return calls } +// GetCurrentClockFreqs calls GetCurrentClockFreqsFunc. +func (mock *Device) GetCurrentClockFreqs() (nvml.DeviceCurrentClockFreqs, nvml.Return) { + if mock.GetCurrentClockFreqsFunc == nil { + panic("Device.GetCurrentClockFreqsFunc: method is nil but Device.GetCurrentClockFreqs was just called") + } + callInfo := struct { + }{} + mock.lockGetCurrentClockFreqs.Lock() + mock.calls.GetCurrentClockFreqs = append(mock.calls.GetCurrentClockFreqs, callInfo) + mock.lockGetCurrentClockFreqs.Unlock() + return mock.GetCurrentClockFreqsFunc() +} + +// GetCurrentClockFreqsCalls gets all the calls that were made to GetCurrentClockFreqs. +// Check the length with: +// +// len(mockedDevice.GetCurrentClockFreqsCalls()) +func (mock *Device) GetCurrentClockFreqsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCurrentClockFreqs.RLock() + calls = mock.calls.GetCurrentClockFreqs + mock.lockGetCurrentClockFreqs.RUnlock() + return calls +} + // GetCurrentClocksEventReasons calls GetCurrentClocksEventReasonsFunc. func (mock *Device) GetCurrentClocksEventReasons() (uint64, nvml.Return) { if mock.GetCurrentClocksEventReasonsFunc == nil { @@ -4000,6 +4354,33 @@ func (mock *Device) GetDisplayModeCalls() []struct { return calls } +// GetDramEncryptionMode calls GetDramEncryptionModeFunc. +func (mock *Device) GetDramEncryptionMode() (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { + if mock.GetDramEncryptionModeFunc == nil { + panic("Device.GetDramEncryptionModeFunc: method is nil but Device.GetDramEncryptionMode was just called") + } + callInfo := struct { + }{} + mock.lockGetDramEncryptionMode.Lock() + mock.calls.GetDramEncryptionMode = append(mock.calls.GetDramEncryptionMode, callInfo) + mock.lockGetDramEncryptionMode.Unlock() + return mock.GetDramEncryptionModeFunc() +} + +// GetDramEncryptionModeCalls gets all the calls that were made to GetDramEncryptionMode. +// Check the length with: +// +// len(mockedDevice.GetDramEncryptionModeCalls()) +func (mock *Device) GetDramEncryptionModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDramEncryptionMode.RLock() + calls = mock.calls.GetDramEncryptionMode + mock.lockGetDramEncryptionMode.RUnlock() + return calls +} + // GetDriverModel calls GetDriverModelFunc. func (mock *Device) GetDriverModel() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { if mock.GetDriverModelFunc == nil { @@ -4027,6 +4408,33 @@ func (mock *Device) GetDriverModelCalls() []struct { return calls } +// GetDriverModel_v2 calls GetDriverModel_v2Func. +func (mock *Device) GetDriverModel_v2() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { + if mock.GetDriverModel_v2Func == nil { + panic("Device.GetDriverModel_v2Func: method is nil but Device.GetDriverModel_v2 was just called") + } + callInfo := struct { + }{} + mock.lockGetDriverModel_v2.Lock() + mock.calls.GetDriverModel_v2 = append(mock.calls.GetDriverModel_v2, callInfo) + mock.lockGetDriverModel_v2.Unlock() + return mock.GetDriverModel_v2Func() +} + +// GetDriverModel_v2Calls gets all the calls that were made to GetDriverModel_v2. +// Check the length with: +// +// len(mockedDevice.GetDriverModel_v2Calls()) +func (mock *Device) GetDriverModel_v2Calls() []struct { +} { + var calls []struct { + } + mock.lockGetDriverModel_v2.RLock() + calls = mock.calls.GetDriverModel_v2 + mock.lockGetDriverModel_v2.RUnlock() + return calls +} + // GetDynamicPstatesInfo calls GetDynamicPstatesInfoFunc. func (mock *Device) GetDynamicPstatesInfo() (nvml.GpuDynamicPstatesInfo, nvml.Return) { if mock.GetDynamicPstatesInfoFunc == nil { @@ -4334,6 +4742,33 @@ func (mock *Device) GetFanSpeedCalls() []struct { return calls } +// GetFanSpeedRPM calls GetFanSpeedRPMFunc. +func (mock *Device) GetFanSpeedRPM() (nvml.FanSpeedInfo, nvml.Return) { + if mock.GetFanSpeedRPMFunc == nil { + panic("Device.GetFanSpeedRPMFunc: method is nil but Device.GetFanSpeedRPM was just called") + } + callInfo := struct { + }{} + mock.lockGetFanSpeedRPM.Lock() + mock.calls.GetFanSpeedRPM = append(mock.calls.GetFanSpeedRPM, callInfo) + mock.lockGetFanSpeedRPM.Unlock() + return mock.GetFanSpeedRPMFunc() +} + +// GetFanSpeedRPMCalls gets all the calls that were made to GetFanSpeedRPM. +// Check the length with: +// +// len(mockedDevice.GetFanSpeedRPMCalls()) +func (mock *Device) GetFanSpeedRPMCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFanSpeedRPM.RLock() + calls = mock.calls.GetFanSpeedRPM + mock.lockGetFanSpeedRPM.RUnlock() + return calls +} + // GetFanSpeed_v2 calls GetFanSpeed_v2Func. func (mock *Device) GetFanSpeed_v2(n int) (uint32, nvml.Return) { if mock.GetFanSpeed_v2Func == nil { @@ -5135,6 +5570,33 @@ func (mock *Device) GetMPSComputeRunningProcessesCalls() []struct { return calls } +// GetMarginTemperature calls GetMarginTemperatureFunc. +func (mock *Device) GetMarginTemperature() (nvml.MarginTemperature, nvml.Return) { + if mock.GetMarginTemperatureFunc == nil { + panic("Device.GetMarginTemperatureFunc: method is nil but Device.GetMarginTemperature was just called") + } + callInfo := struct { + }{} + mock.lockGetMarginTemperature.Lock() + mock.calls.GetMarginTemperature = append(mock.calls.GetMarginTemperature, callInfo) + mock.lockGetMarginTemperature.Unlock() + return mock.GetMarginTemperatureFunc() +} + +// GetMarginTemperatureCalls gets all the calls that were made to GetMarginTemperature. +// Check the length with: +// +// len(mockedDevice.GetMarginTemperatureCalls()) +func (mock *Device) GetMarginTemperatureCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMarginTemperature.RLock() + calls = mock.calls.GetMarginTemperature + mock.lockGetMarginTemperature.RUnlock() + return calls +} + // GetMaxClockInfo calls GetMaxClockInfoFunc. func (mock *Device) GetMaxClockInfo(clockType nvml.ClockType) (uint32, nvml.Return) { if mock.GetMaxClockInfoFunc == nil { @@ -6074,6 +6536,60 @@ func (mock *Device) GetNvLinkVersionCalls() []struct { return calls } +// GetNvlinkBwMode calls GetNvlinkBwModeFunc. +func (mock *Device) GetNvlinkBwMode() (nvml.NvlinkGetBwMode, nvml.Return) { + if mock.GetNvlinkBwModeFunc == nil { + panic("Device.GetNvlinkBwModeFunc: method is nil but Device.GetNvlinkBwMode was just called") + } + callInfo := struct { + }{} + mock.lockGetNvlinkBwMode.Lock() + mock.calls.GetNvlinkBwMode = append(mock.calls.GetNvlinkBwMode, callInfo) + mock.lockGetNvlinkBwMode.Unlock() + return mock.GetNvlinkBwModeFunc() +} + +// GetNvlinkBwModeCalls gets all the calls that were made to GetNvlinkBwMode. +// Check the length with: +// +// len(mockedDevice.GetNvlinkBwModeCalls()) +func (mock *Device) GetNvlinkBwModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetNvlinkBwMode.RLock() + calls = mock.calls.GetNvlinkBwMode + mock.lockGetNvlinkBwMode.RUnlock() + return calls +} + +// GetNvlinkSupportedBwModes calls GetNvlinkSupportedBwModesFunc. +func (mock *Device) GetNvlinkSupportedBwModes() (nvml.NvlinkSupportedBwModes, nvml.Return) { + if mock.GetNvlinkSupportedBwModesFunc == nil { + panic("Device.GetNvlinkSupportedBwModesFunc: method is nil but Device.GetNvlinkSupportedBwModes was just called") + } + callInfo := struct { + }{} + mock.lockGetNvlinkSupportedBwModes.Lock() + mock.calls.GetNvlinkSupportedBwModes = append(mock.calls.GetNvlinkSupportedBwModes, callInfo) + mock.lockGetNvlinkSupportedBwModes.Unlock() + return mock.GetNvlinkSupportedBwModesFunc() +} + +// GetNvlinkSupportedBwModesCalls gets all the calls that were made to GetNvlinkSupportedBwModes. +// Check the length with: +// +// len(mockedDevice.GetNvlinkSupportedBwModesCalls()) +func (mock *Device) GetNvlinkSupportedBwModesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetNvlinkSupportedBwModes.RLock() + calls = mock.calls.GetNvlinkSupportedBwModes + mock.lockGetNvlinkSupportedBwModes.RUnlock() + return calls +} + // GetOfaUtilization calls GetOfaUtilizationFunc. func (mock *Device) GetOfaUtilization() (uint32, uint32, nvml.Return) { if mock.GetOfaUtilizationFunc == nil { @@ -6304,6 +6820,33 @@ func (mock *Device) GetPcieThroughputCalls() []struct { return calls } +// GetPerformanceModes calls GetPerformanceModesFunc. +func (mock *Device) GetPerformanceModes() (nvml.DevicePerfModes, nvml.Return) { + if mock.GetPerformanceModesFunc == nil { + panic("Device.GetPerformanceModesFunc: method is nil but Device.GetPerformanceModes was just called") + } + callInfo := struct { + }{} + mock.lockGetPerformanceModes.Lock() + mock.calls.GetPerformanceModes = append(mock.calls.GetPerformanceModes, callInfo) + mock.lockGetPerformanceModes.Unlock() + return mock.GetPerformanceModesFunc() +} + +// GetPerformanceModesCalls gets all the calls that were made to GetPerformanceModes. +// Check the length with: +// +// len(mockedDevice.GetPerformanceModesCalls()) +func (mock *Device) GetPerformanceModesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPerformanceModes.RLock() + calls = mock.calls.GetPerformanceModes + mock.lockGetPerformanceModes.RUnlock() + return calls +} + // GetPerformanceState calls GetPerformanceStateFunc. func (mock *Device) GetPerformanceState() (nvml.Pstates, nvml.Return) { if mock.GetPerformanceStateFunc == nil { @@ -6385,6 +6928,33 @@ func (mock *Device) GetPgpuMetadataStringCalls() []struct { return calls } +// GetPlatformInfo calls GetPlatformInfoFunc. +func (mock *Device) GetPlatformInfo() (nvml.PlatformInfo, nvml.Return) { + if mock.GetPlatformInfoFunc == nil { + panic("Device.GetPlatformInfoFunc: method is nil but Device.GetPlatformInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetPlatformInfo.Lock() + mock.calls.GetPlatformInfo = append(mock.calls.GetPlatformInfo, callInfo) + mock.lockGetPlatformInfo.Unlock() + return mock.GetPlatformInfoFunc() +} + +// GetPlatformInfoCalls gets all the calls that were made to GetPlatformInfo. +// Check the length with: +// +// len(mockedDevice.GetPlatformInfoCalls()) +func (mock *Device) GetPlatformInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPlatformInfo.RLock() + calls = mock.calls.GetPlatformInfo + mock.lockGetPlatformInfo.RUnlock() + return calls +} + // GetPowerManagementDefaultLimit calls GetPowerManagementDefaultLimitFunc. func (mock *Device) GetPowerManagementDefaultLimit() (uint32, nvml.Return) { if mock.GetPowerManagementDefaultLimitFunc == nil { @@ -7185,6 +7755,33 @@ func (mock *Device) GetTemperatureThresholdCalls() []struct { return calls } +// GetTemperatureV calls GetTemperatureVFunc. +func (mock *Device) GetTemperatureV() nvml.TemperatureHandler { + if mock.GetTemperatureVFunc == nil { + panic("Device.GetTemperatureVFunc: method is nil but Device.GetTemperatureV was just called") + } + callInfo := struct { + }{} + mock.lockGetTemperatureV.Lock() + mock.calls.GetTemperatureV = append(mock.calls.GetTemperatureV, callInfo) + mock.lockGetTemperatureV.Unlock() + return mock.GetTemperatureVFunc() +} + +// GetTemperatureVCalls gets all the calls that were made to GetTemperatureV. +// Check the length with: +// +// len(mockedDevice.GetTemperatureVCalls()) +func (mock *Device) GetTemperatureVCalls() []struct { +} { + var calls []struct { + } + mock.lockGetTemperatureV.RLock() + calls = mock.calls.GetTemperatureV + mock.lockGetTemperatureV.RUnlock() + return calls +} + // GetThermalSettings calls GetThermalSettingsFunc. func (mock *Device) GetThermalSettings(v uint32) (nvml.GpuThermalSettings, nvml.Return) { if mock.GetThermalSettingsFunc == nil { @@ -8073,6 +8670,102 @@ func (mock *Device) OnSameBoardCalls() []struct { return calls } +// PowerSmoothingActivatePresetProfile calls PowerSmoothingActivatePresetProfileFunc. +func (mock *Device) PowerSmoothingActivatePresetProfile(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { + if mock.PowerSmoothingActivatePresetProfileFunc == nil { + panic("Device.PowerSmoothingActivatePresetProfileFunc: method is nil but Device.PowerSmoothingActivatePresetProfile was just called") + } + callInfo := struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile + }{ + PowerSmoothingProfile: powerSmoothingProfile, + } + mock.lockPowerSmoothingActivatePresetProfile.Lock() + mock.calls.PowerSmoothingActivatePresetProfile = append(mock.calls.PowerSmoothingActivatePresetProfile, callInfo) + mock.lockPowerSmoothingActivatePresetProfile.Unlock() + return mock.PowerSmoothingActivatePresetProfileFunc(powerSmoothingProfile) +} + +// PowerSmoothingActivatePresetProfileCalls gets all the calls that were made to PowerSmoothingActivatePresetProfile. +// Check the length with: +// +// len(mockedDevice.PowerSmoothingActivatePresetProfileCalls()) +func (mock *Device) PowerSmoothingActivatePresetProfileCalls() []struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile +} { + var calls []struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + mock.lockPowerSmoothingActivatePresetProfile.RLock() + calls = mock.calls.PowerSmoothingActivatePresetProfile + mock.lockPowerSmoothingActivatePresetProfile.RUnlock() + return calls +} + +// PowerSmoothingSetState calls PowerSmoothingSetStateFunc. +func (mock *Device) PowerSmoothingSetState(powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { + if mock.PowerSmoothingSetStateFunc == nil { + panic("Device.PowerSmoothingSetStateFunc: method is nil but Device.PowerSmoothingSetState was just called") + } + callInfo := struct { + PowerSmoothingState *nvml.PowerSmoothingState + }{ + PowerSmoothingState: powerSmoothingState, + } + mock.lockPowerSmoothingSetState.Lock() + mock.calls.PowerSmoothingSetState = append(mock.calls.PowerSmoothingSetState, callInfo) + mock.lockPowerSmoothingSetState.Unlock() + return mock.PowerSmoothingSetStateFunc(powerSmoothingState) +} + +// PowerSmoothingSetStateCalls gets all the calls that were made to PowerSmoothingSetState. +// Check the length with: +// +// len(mockedDevice.PowerSmoothingSetStateCalls()) +func (mock *Device) PowerSmoothingSetStateCalls() []struct { + PowerSmoothingState *nvml.PowerSmoothingState +} { + var calls []struct { + PowerSmoothingState *nvml.PowerSmoothingState + } + mock.lockPowerSmoothingSetState.RLock() + calls = mock.calls.PowerSmoothingSetState + mock.lockPowerSmoothingSetState.RUnlock() + return calls +} + +// PowerSmoothingUpdatePresetProfileParam calls PowerSmoothingUpdatePresetProfileParamFunc. +func (mock *Device) PowerSmoothingUpdatePresetProfileParam(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { + if mock.PowerSmoothingUpdatePresetProfileParamFunc == nil { + panic("Device.PowerSmoothingUpdatePresetProfileParamFunc: method is nil but Device.PowerSmoothingUpdatePresetProfileParam was just called") + } + callInfo := struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile + }{ + PowerSmoothingProfile: powerSmoothingProfile, + } + mock.lockPowerSmoothingUpdatePresetProfileParam.Lock() + mock.calls.PowerSmoothingUpdatePresetProfileParam = append(mock.calls.PowerSmoothingUpdatePresetProfileParam, callInfo) + mock.lockPowerSmoothingUpdatePresetProfileParam.Unlock() + return mock.PowerSmoothingUpdatePresetProfileParamFunc(powerSmoothingProfile) +} + +// PowerSmoothingUpdatePresetProfileParamCalls gets all the calls that were made to PowerSmoothingUpdatePresetProfileParam. +// Check the length with: +// +// len(mockedDevice.PowerSmoothingUpdatePresetProfileParamCalls()) +func (mock *Device) PowerSmoothingUpdatePresetProfileParamCalls() []struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile +} { + var calls []struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + mock.lockPowerSmoothingUpdatePresetProfileParam.RLock() + calls = mock.calls.PowerSmoothingUpdatePresetProfileParam + mock.lockPowerSmoothingUpdatePresetProfileParam.RUnlock() + return calls +} + // RegisterEvents calls RegisterEventsFunc. func (mock *Device) RegisterEvents(v uint64, eventSet nvml.EventSet) nvml.Return { if mock.RegisterEventsFunc == nil { @@ -8394,6 +9087,38 @@ func (mock *Device) SetAutoBoostedClocksEnabledCalls() []struct { return calls } +// SetClockOffsets calls SetClockOffsetsFunc. +func (mock *Device) SetClockOffsets(clockOffset nvml.ClockOffset) nvml.Return { + if mock.SetClockOffsetsFunc == nil { + panic("Device.SetClockOffsetsFunc: method is nil but Device.SetClockOffsets was just called") + } + callInfo := struct { + ClockOffset nvml.ClockOffset + }{ + ClockOffset: clockOffset, + } + mock.lockSetClockOffsets.Lock() + mock.calls.SetClockOffsets = append(mock.calls.SetClockOffsets, callInfo) + mock.lockSetClockOffsets.Unlock() + return mock.SetClockOffsetsFunc(clockOffset) +} + +// SetClockOffsetsCalls gets all the calls that were made to SetClockOffsets. +// Check the length with: +// +// len(mockedDevice.SetClockOffsetsCalls()) +func (mock *Device) SetClockOffsetsCalls() []struct { + ClockOffset nvml.ClockOffset +} { + var calls []struct { + ClockOffset nvml.ClockOffset + } + mock.lockSetClockOffsets.RLock() + calls = mock.calls.SetClockOffsets + mock.lockSetClockOffsets.RUnlock() + return calls +} + // SetComputeMode calls SetComputeModeFunc. func (mock *Device) SetComputeMode(computeMode nvml.ComputeMode) nvml.Return { if mock.SetComputeModeFunc == nil { @@ -8553,6 +9278,38 @@ func (mock *Device) SetDefaultFanSpeed_v2Calls() []struct { return calls } +// SetDramEncryptionMode calls SetDramEncryptionModeFunc. +func (mock *Device) SetDramEncryptionMode(dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { + if mock.SetDramEncryptionModeFunc == nil { + panic("Device.SetDramEncryptionModeFunc: method is nil but Device.SetDramEncryptionMode was just called") + } + callInfo := struct { + DramEncryptionInfo *nvml.DramEncryptionInfo + }{ + DramEncryptionInfo: dramEncryptionInfo, + } + mock.lockSetDramEncryptionMode.Lock() + mock.calls.SetDramEncryptionMode = append(mock.calls.SetDramEncryptionMode, callInfo) + mock.lockSetDramEncryptionMode.Unlock() + return mock.SetDramEncryptionModeFunc(dramEncryptionInfo) +} + +// SetDramEncryptionModeCalls gets all the calls that were made to SetDramEncryptionMode. +// Check the length with: +// +// len(mockedDevice.SetDramEncryptionModeCalls()) +func (mock *Device) SetDramEncryptionModeCalls() []struct { + DramEncryptionInfo *nvml.DramEncryptionInfo +} { + var calls []struct { + DramEncryptionInfo *nvml.DramEncryptionInfo + } + mock.lockSetDramEncryptionMode.RLock() + calls = mock.calls.SetDramEncryptionMode + mock.lockSetDramEncryptionMode.RUnlock() + return calls +} + // SetDriverModel calls SetDriverModelFunc. func (mock *Device) SetDriverModel(driverModel nvml.DriverModel, v uint32) nvml.Return { if mock.SetDriverModelFunc == nil { @@ -8969,6 +9726,38 @@ func (mock *Device) SetNvLinkUtilizationControlCalls() []struct { return calls } +// SetNvlinkBwMode calls SetNvlinkBwModeFunc. +func (mock *Device) SetNvlinkBwMode(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { + if mock.SetNvlinkBwModeFunc == nil { + panic("Device.SetNvlinkBwModeFunc: method is nil but Device.SetNvlinkBwMode was just called") + } + callInfo := struct { + NvlinkSetBwMode *nvml.NvlinkSetBwMode + }{ + NvlinkSetBwMode: nvlinkSetBwMode, + } + mock.lockSetNvlinkBwMode.Lock() + mock.calls.SetNvlinkBwMode = append(mock.calls.SetNvlinkBwMode, callInfo) + mock.lockSetNvlinkBwMode.Unlock() + return mock.SetNvlinkBwModeFunc(nvlinkSetBwMode) +} + +// SetNvlinkBwModeCalls gets all the calls that were made to SetNvlinkBwMode. +// Check the length with: +// +// len(mockedDevice.SetNvlinkBwModeCalls()) +func (mock *Device) SetNvlinkBwModeCalls() []struct { + NvlinkSetBwMode *nvml.NvlinkSetBwMode +} { + var calls []struct { + NvlinkSetBwMode *nvml.NvlinkSetBwMode + } + mock.lockSetNvlinkBwMode.RLock() + calls = mock.calls.SetNvlinkBwMode + mock.lockSetNvlinkBwMode.RUnlock() + return calls +} + // SetPersistenceMode calls SetPersistenceModeFunc. func (mock *Device) SetPersistenceMode(enableState nvml.EnableState) nvml.Return { if mock.SetPersistenceModeFunc == nil { @@ -9291,3 +10080,121 @@ func (mock *Device) VgpuTypeGetMaxInstancesCalls() []struct { mock.lockVgpuTypeGetMaxInstances.RUnlock() return calls } + +// WorkloadPowerProfileClearRequestedProfiles calls WorkloadPowerProfileClearRequestedProfilesFunc. +func (mock *Device) WorkloadPowerProfileClearRequestedProfiles(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { + if mock.WorkloadPowerProfileClearRequestedProfilesFunc == nil { + panic("Device.WorkloadPowerProfileClearRequestedProfilesFunc: method is nil but Device.WorkloadPowerProfileClearRequestedProfiles was just called") + } + callInfo := struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + }{ + WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, + } + mock.lockWorkloadPowerProfileClearRequestedProfiles.Lock() + mock.calls.WorkloadPowerProfileClearRequestedProfiles = append(mock.calls.WorkloadPowerProfileClearRequestedProfiles, callInfo) + mock.lockWorkloadPowerProfileClearRequestedProfiles.Unlock() + return mock.WorkloadPowerProfileClearRequestedProfilesFunc(workloadPowerProfileRequestedProfiles) +} + +// WorkloadPowerProfileClearRequestedProfilesCalls gets all the calls that were made to WorkloadPowerProfileClearRequestedProfiles. +// Check the length with: +// +// len(mockedDevice.WorkloadPowerProfileClearRequestedProfilesCalls()) +func (mock *Device) WorkloadPowerProfileClearRequestedProfilesCalls() []struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles +} { + var calls []struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + mock.lockWorkloadPowerProfileClearRequestedProfiles.RLock() + calls = mock.calls.WorkloadPowerProfileClearRequestedProfiles + mock.lockWorkloadPowerProfileClearRequestedProfiles.RUnlock() + return calls +} + +// WorkloadPowerProfileGetCurrentProfiles calls WorkloadPowerProfileGetCurrentProfilesFunc. +func (mock *Device) WorkloadPowerProfileGetCurrentProfiles() (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { + if mock.WorkloadPowerProfileGetCurrentProfilesFunc == nil { + panic("Device.WorkloadPowerProfileGetCurrentProfilesFunc: method is nil but Device.WorkloadPowerProfileGetCurrentProfiles was just called") + } + callInfo := struct { + }{} + mock.lockWorkloadPowerProfileGetCurrentProfiles.Lock() + mock.calls.WorkloadPowerProfileGetCurrentProfiles = append(mock.calls.WorkloadPowerProfileGetCurrentProfiles, callInfo) + mock.lockWorkloadPowerProfileGetCurrentProfiles.Unlock() + return mock.WorkloadPowerProfileGetCurrentProfilesFunc() +} + +// WorkloadPowerProfileGetCurrentProfilesCalls gets all the calls that were made to WorkloadPowerProfileGetCurrentProfiles. +// Check the length with: +// +// len(mockedDevice.WorkloadPowerProfileGetCurrentProfilesCalls()) +func (mock *Device) WorkloadPowerProfileGetCurrentProfilesCalls() []struct { +} { + var calls []struct { + } + mock.lockWorkloadPowerProfileGetCurrentProfiles.RLock() + calls = mock.calls.WorkloadPowerProfileGetCurrentProfiles + mock.lockWorkloadPowerProfileGetCurrentProfiles.RUnlock() + return calls +} + +// WorkloadPowerProfileGetProfilesInfo calls WorkloadPowerProfileGetProfilesInfoFunc. +func (mock *Device) WorkloadPowerProfileGetProfilesInfo() (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { + if mock.WorkloadPowerProfileGetProfilesInfoFunc == nil { + panic("Device.WorkloadPowerProfileGetProfilesInfoFunc: method is nil but Device.WorkloadPowerProfileGetProfilesInfo was just called") + } + callInfo := struct { + }{} + mock.lockWorkloadPowerProfileGetProfilesInfo.Lock() + mock.calls.WorkloadPowerProfileGetProfilesInfo = append(mock.calls.WorkloadPowerProfileGetProfilesInfo, callInfo) + mock.lockWorkloadPowerProfileGetProfilesInfo.Unlock() + return mock.WorkloadPowerProfileGetProfilesInfoFunc() +} + +// WorkloadPowerProfileGetProfilesInfoCalls gets all the calls that were made to WorkloadPowerProfileGetProfilesInfo. +// Check the length with: +// +// len(mockedDevice.WorkloadPowerProfileGetProfilesInfoCalls()) +func (mock *Device) WorkloadPowerProfileGetProfilesInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockWorkloadPowerProfileGetProfilesInfo.RLock() + calls = mock.calls.WorkloadPowerProfileGetProfilesInfo + mock.lockWorkloadPowerProfileGetProfilesInfo.RUnlock() + return calls +} + +// WorkloadPowerProfileSetRequestedProfiles calls WorkloadPowerProfileSetRequestedProfilesFunc. +func (mock *Device) WorkloadPowerProfileSetRequestedProfiles(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { + if mock.WorkloadPowerProfileSetRequestedProfilesFunc == nil { + panic("Device.WorkloadPowerProfileSetRequestedProfilesFunc: method is nil but Device.WorkloadPowerProfileSetRequestedProfiles was just called") + } + callInfo := struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + }{ + WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, + } + mock.lockWorkloadPowerProfileSetRequestedProfiles.Lock() + mock.calls.WorkloadPowerProfileSetRequestedProfiles = append(mock.calls.WorkloadPowerProfileSetRequestedProfiles, callInfo) + mock.lockWorkloadPowerProfileSetRequestedProfiles.Unlock() + return mock.WorkloadPowerProfileSetRequestedProfilesFunc(workloadPowerProfileRequestedProfiles) +} + +// WorkloadPowerProfileSetRequestedProfilesCalls gets all the calls that were made to WorkloadPowerProfileSetRequestedProfiles. +// Check the length with: +// +// len(mockedDevice.WorkloadPowerProfileSetRequestedProfilesCalls()) +func (mock *Device) WorkloadPowerProfileSetRequestedProfilesCalls() []struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles +} { + var calls []struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + mock.lockWorkloadPowerProfileSetRequestedProfiles.RLock() + calls = mock.calls.WorkloadPowerProfileSetRequestedProfiles + mock.lockWorkloadPowerProfileSetRequestedProfiles.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go index 63ba6831..d05bc348 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go @@ -27,6 +27,9 @@ var _ nvml.GpuInstance = &GpuInstance{} // DestroyFunc: func() nvml.Return { // panic("mock out the Destroy method") // }, +// GetActiveVgpusFunc: func() (nvml.ActiveVgpuInstanceInfo, nvml.Return) { +// panic("mock out the GetActiveVgpus method") +// }, // GetComputeInstanceByIdFunc: func(n int) (nvml.ComputeInstance, nvml.Return) { // panic("mock out the GetComputeInstanceById method") // }, @@ -45,9 +48,30 @@ var _ nvml.GpuInstance = &GpuInstance{} // GetComputeInstancesFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { // panic("mock out the GetComputeInstances method") // }, +// GetCreatableVgpusFunc: func() (nvml.VgpuTypeIdInfo, nvml.Return) { +// panic("mock out the GetCreatableVgpus method") +// }, // GetInfoFunc: func() (nvml.GpuInstanceInfo, nvml.Return) { // panic("mock out the GetInfo method") // }, +// GetVgpuHeterogeneousModeFunc: func() (nvml.VgpuHeterogeneousMode, nvml.Return) { +// panic("mock out the GetVgpuHeterogeneousMode method") +// }, +// GetVgpuSchedulerLogFunc: func() (nvml.VgpuSchedulerLogInfo, nvml.Return) { +// panic("mock out the GetVgpuSchedulerLog method") +// }, +// GetVgpuSchedulerStateFunc: func() (nvml.VgpuSchedulerStateInfo, nvml.Return) { +// panic("mock out the GetVgpuSchedulerState method") +// }, +// GetVgpuTypeCreatablePlacementsFunc: func() (nvml.VgpuCreatablePlacementInfo, nvml.Return) { +// panic("mock out the GetVgpuTypeCreatablePlacements method") +// }, +// SetVgpuHeterogeneousModeFunc: func(vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { +// panic("mock out the SetVgpuHeterogeneousMode method") +// }, +// SetVgpuSchedulerStateFunc: func(vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { +// panic("mock out the SetVgpuSchedulerState method") +// }, // } // // // use mockedGpuInstance in code that requires nvml.GpuInstance @@ -64,6 +88,9 @@ type GpuInstance struct { // DestroyFunc mocks the Destroy method. DestroyFunc func() nvml.Return + // GetActiveVgpusFunc mocks the GetActiveVgpus method. + GetActiveVgpusFunc func() (nvml.ActiveVgpuInstanceInfo, nvml.Return) + // GetComputeInstanceByIdFunc mocks the GetComputeInstanceById method. GetComputeInstanceByIdFunc func(n int) (nvml.ComputeInstance, nvml.Return) @@ -82,9 +109,30 @@ type GpuInstance struct { // GetComputeInstancesFunc mocks the GetComputeInstances method. GetComputeInstancesFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) + // GetCreatableVgpusFunc mocks the GetCreatableVgpus method. + GetCreatableVgpusFunc func() (nvml.VgpuTypeIdInfo, nvml.Return) + // GetInfoFunc mocks the GetInfo method. GetInfoFunc func() (nvml.GpuInstanceInfo, nvml.Return) + // GetVgpuHeterogeneousModeFunc mocks the GetVgpuHeterogeneousMode method. + GetVgpuHeterogeneousModeFunc func() (nvml.VgpuHeterogeneousMode, nvml.Return) + + // GetVgpuSchedulerLogFunc mocks the GetVgpuSchedulerLog method. + GetVgpuSchedulerLogFunc func() (nvml.VgpuSchedulerLogInfo, nvml.Return) + + // GetVgpuSchedulerStateFunc mocks the GetVgpuSchedulerState method. + GetVgpuSchedulerStateFunc func() (nvml.VgpuSchedulerStateInfo, nvml.Return) + + // GetVgpuTypeCreatablePlacementsFunc mocks the GetVgpuTypeCreatablePlacements method. + GetVgpuTypeCreatablePlacementsFunc func() (nvml.VgpuCreatablePlacementInfo, nvml.Return) + + // SetVgpuHeterogeneousModeFunc mocks the SetVgpuHeterogeneousMode method. + SetVgpuHeterogeneousModeFunc func(vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return + + // SetVgpuSchedulerStateFunc mocks the SetVgpuSchedulerState method. + SetVgpuSchedulerStateFunc func(vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return + // calls tracks calls to the methods. calls struct { // CreateComputeInstance holds details about calls to the CreateComputeInstance method. @@ -102,6 +150,9 @@ type GpuInstance struct { // Destroy holds details about calls to the Destroy method. Destroy []struct { } + // GetActiveVgpus holds details about calls to the GetActiveVgpus method. + GetActiveVgpus []struct { + } // GetComputeInstanceById holds details about calls to the GetComputeInstanceById method. GetComputeInstanceById []struct { // N is the n argument value. @@ -136,20 +187,53 @@ type GpuInstance struct { // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo } + // GetCreatableVgpus holds details about calls to the GetCreatableVgpus method. + GetCreatableVgpus []struct { + } // GetInfo holds details about calls to the GetInfo method. GetInfo []struct { } + // GetVgpuHeterogeneousMode holds details about calls to the GetVgpuHeterogeneousMode method. + GetVgpuHeterogeneousMode []struct { + } + // GetVgpuSchedulerLog holds details about calls to the GetVgpuSchedulerLog method. + GetVgpuSchedulerLog []struct { + } + // GetVgpuSchedulerState holds details about calls to the GetVgpuSchedulerState method. + GetVgpuSchedulerState []struct { + } + // GetVgpuTypeCreatablePlacements holds details about calls to the GetVgpuTypeCreatablePlacements method. + GetVgpuTypeCreatablePlacements []struct { + } + // SetVgpuHeterogeneousMode holds details about calls to the SetVgpuHeterogeneousMode method. + SetVgpuHeterogeneousMode []struct { + // VgpuHeterogeneousMode is the vgpuHeterogeneousMode argument value. + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + } + // SetVgpuSchedulerState holds details about calls to the SetVgpuSchedulerState method. + SetVgpuSchedulerState []struct { + // VgpuSchedulerState is the vgpuSchedulerState argument value. + VgpuSchedulerState *nvml.VgpuSchedulerState + } } lockCreateComputeInstance sync.RWMutex lockCreateComputeInstanceWithPlacement sync.RWMutex lockDestroy sync.RWMutex + lockGetActiveVgpus sync.RWMutex lockGetComputeInstanceById sync.RWMutex lockGetComputeInstancePossiblePlacements sync.RWMutex lockGetComputeInstanceProfileInfo sync.RWMutex lockGetComputeInstanceProfileInfoV sync.RWMutex lockGetComputeInstanceRemainingCapacity sync.RWMutex lockGetComputeInstances sync.RWMutex + lockGetCreatableVgpus sync.RWMutex lockGetInfo sync.RWMutex + lockGetVgpuHeterogeneousMode sync.RWMutex + lockGetVgpuSchedulerLog sync.RWMutex + lockGetVgpuSchedulerState sync.RWMutex + lockGetVgpuTypeCreatablePlacements sync.RWMutex + lockSetVgpuHeterogeneousMode sync.RWMutex + lockSetVgpuSchedulerState sync.RWMutex } // CreateComputeInstance calls CreateComputeInstanceFunc. @@ -247,6 +331,33 @@ func (mock *GpuInstance) DestroyCalls() []struct { return calls } +// GetActiveVgpus calls GetActiveVgpusFunc. +func (mock *GpuInstance) GetActiveVgpus() (nvml.ActiveVgpuInstanceInfo, nvml.Return) { + if mock.GetActiveVgpusFunc == nil { + panic("GpuInstance.GetActiveVgpusFunc: method is nil but GpuInstance.GetActiveVgpus was just called") + } + callInfo := struct { + }{} + mock.lockGetActiveVgpus.Lock() + mock.calls.GetActiveVgpus = append(mock.calls.GetActiveVgpus, callInfo) + mock.lockGetActiveVgpus.Unlock() + return mock.GetActiveVgpusFunc() +} + +// GetActiveVgpusCalls gets all the calls that were made to GetActiveVgpus. +// Check the length with: +// +// len(mockedGpuInstance.GetActiveVgpusCalls()) +func (mock *GpuInstance) GetActiveVgpusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetActiveVgpus.RLock() + calls = mock.calls.GetActiveVgpus + mock.lockGetActiveVgpus.RUnlock() + return calls +} + // GetComputeInstanceById calls GetComputeInstanceByIdFunc. func (mock *GpuInstance) GetComputeInstanceById(n int) (nvml.ComputeInstance, nvml.Return) { if mock.GetComputeInstanceByIdFunc == nil { @@ -447,6 +558,33 @@ func (mock *GpuInstance) GetComputeInstancesCalls() []struct { return calls } +// GetCreatableVgpus calls GetCreatableVgpusFunc. +func (mock *GpuInstance) GetCreatableVgpus() (nvml.VgpuTypeIdInfo, nvml.Return) { + if mock.GetCreatableVgpusFunc == nil { + panic("GpuInstance.GetCreatableVgpusFunc: method is nil but GpuInstance.GetCreatableVgpus was just called") + } + callInfo := struct { + }{} + mock.lockGetCreatableVgpus.Lock() + mock.calls.GetCreatableVgpus = append(mock.calls.GetCreatableVgpus, callInfo) + mock.lockGetCreatableVgpus.Unlock() + return mock.GetCreatableVgpusFunc() +} + +// GetCreatableVgpusCalls gets all the calls that were made to GetCreatableVgpus. +// Check the length with: +// +// len(mockedGpuInstance.GetCreatableVgpusCalls()) +func (mock *GpuInstance) GetCreatableVgpusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCreatableVgpus.RLock() + calls = mock.calls.GetCreatableVgpus + mock.lockGetCreatableVgpus.RUnlock() + return calls +} + // GetInfo calls GetInfoFunc. func (mock *GpuInstance) GetInfo() (nvml.GpuInstanceInfo, nvml.Return) { if mock.GetInfoFunc == nil { @@ -473,3 +611,175 @@ func (mock *GpuInstance) GetInfoCalls() []struct { mock.lockGetInfo.RUnlock() return calls } + +// GetVgpuHeterogeneousMode calls GetVgpuHeterogeneousModeFunc. +func (mock *GpuInstance) GetVgpuHeterogeneousMode() (nvml.VgpuHeterogeneousMode, nvml.Return) { + if mock.GetVgpuHeterogeneousModeFunc == nil { + panic("GpuInstance.GetVgpuHeterogeneousModeFunc: method is nil but GpuInstance.GetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuHeterogeneousMode.Lock() + mock.calls.GetVgpuHeterogeneousMode = append(mock.calls.GetVgpuHeterogeneousMode, callInfo) + mock.lockGetVgpuHeterogeneousMode.Unlock() + return mock.GetVgpuHeterogeneousModeFunc() +} + +// GetVgpuHeterogeneousModeCalls gets all the calls that were made to GetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedGpuInstance.GetVgpuHeterogeneousModeCalls()) +func (mock *GpuInstance) GetVgpuHeterogeneousModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuHeterogeneousMode.RLock() + calls = mock.calls.GetVgpuHeterogeneousMode + mock.lockGetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// GetVgpuSchedulerLog calls GetVgpuSchedulerLogFunc. +func (mock *GpuInstance) GetVgpuSchedulerLog() (nvml.VgpuSchedulerLogInfo, nvml.Return) { + if mock.GetVgpuSchedulerLogFunc == nil { + panic("GpuInstance.GetVgpuSchedulerLogFunc: method is nil but GpuInstance.GetVgpuSchedulerLog was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuSchedulerLog.Lock() + mock.calls.GetVgpuSchedulerLog = append(mock.calls.GetVgpuSchedulerLog, callInfo) + mock.lockGetVgpuSchedulerLog.Unlock() + return mock.GetVgpuSchedulerLogFunc() +} + +// GetVgpuSchedulerLogCalls gets all the calls that were made to GetVgpuSchedulerLog. +// Check the length with: +// +// len(mockedGpuInstance.GetVgpuSchedulerLogCalls()) +func (mock *GpuInstance) GetVgpuSchedulerLogCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuSchedulerLog.RLock() + calls = mock.calls.GetVgpuSchedulerLog + mock.lockGetVgpuSchedulerLog.RUnlock() + return calls +} + +// GetVgpuSchedulerState calls GetVgpuSchedulerStateFunc. +func (mock *GpuInstance) GetVgpuSchedulerState() (nvml.VgpuSchedulerStateInfo, nvml.Return) { + if mock.GetVgpuSchedulerStateFunc == nil { + panic("GpuInstance.GetVgpuSchedulerStateFunc: method is nil but GpuInstance.GetVgpuSchedulerState was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuSchedulerState.Lock() + mock.calls.GetVgpuSchedulerState = append(mock.calls.GetVgpuSchedulerState, callInfo) + mock.lockGetVgpuSchedulerState.Unlock() + return mock.GetVgpuSchedulerStateFunc() +} + +// GetVgpuSchedulerStateCalls gets all the calls that were made to GetVgpuSchedulerState. +// Check the length with: +// +// len(mockedGpuInstance.GetVgpuSchedulerStateCalls()) +func (mock *GpuInstance) GetVgpuSchedulerStateCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuSchedulerState.RLock() + calls = mock.calls.GetVgpuSchedulerState + mock.lockGetVgpuSchedulerState.RUnlock() + return calls +} + +// GetVgpuTypeCreatablePlacements calls GetVgpuTypeCreatablePlacementsFunc. +func (mock *GpuInstance) GetVgpuTypeCreatablePlacements() (nvml.VgpuCreatablePlacementInfo, nvml.Return) { + if mock.GetVgpuTypeCreatablePlacementsFunc == nil { + panic("GpuInstance.GetVgpuTypeCreatablePlacementsFunc: method is nil but GpuInstance.GetVgpuTypeCreatablePlacements was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuTypeCreatablePlacements.Lock() + mock.calls.GetVgpuTypeCreatablePlacements = append(mock.calls.GetVgpuTypeCreatablePlacements, callInfo) + mock.lockGetVgpuTypeCreatablePlacements.Unlock() + return mock.GetVgpuTypeCreatablePlacementsFunc() +} + +// GetVgpuTypeCreatablePlacementsCalls gets all the calls that were made to GetVgpuTypeCreatablePlacements. +// Check the length with: +// +// len(mockedGpuInstance.GetVgpuTypeCreatablePlacementsCalls()) +func (mock *GpuInstance) GetVgpuTypeCreatablePlacementsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuTypeCreatablePlacements.RLock() + calls = mock.calls.GetVgpuTypeCreatablePlacements + mock.lockGetVgpuTypeCreatablePlacements.RUnlock() + return calls +} + +// SetVgpuHeterogeneousMode calls SetVgpuHeterogeneousModeFunc. +func (mock *GpuInstance) SetVgpuHeterogeneousMode(vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { + if mock.SetVgpuHeterogeneousModeFunc == nil { + panic("GpuInstance.SetVgpuHeterogeneousModeFunc: method is nil but GpuInstance.SetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + }{ + VgpuHeterogeneousMode: vgpuHeterogeneousMode, + } + mock.lockSetVgpuHeterogeneousMode.Lock() + mock.calls.SetVgpuHeterogeneousMode = append(mock.calls.SetVgpuHeterogeneousMode, callInfo) + mock.lockSetVgpuHeterogeneousMode.Unlock() + return mock.SetVgpuHeterogeneousModeFunc(vgpuHeterogeneousMode) +} + +// SetVgpuHeterogeneousModeCalls gets all the calls that were made to SetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedGpuInstance.SetVgpuHeterogeneousModeCalls()) +func (mock *GpuInstance) SetVgpuHeterogeneousModeCalls() []struct { + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode +} { + var calls []struct { + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + } + mock.lockSetVgpuHeterogeneousMode.RLock() + calls = mock.calls.SetVgpuHeterogeneousMode + mock.lockSetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// SetVgpuSchedulerState calls SetVgpuSchedulerStateFunc. +func (mock *GpuInstance) SetVgpuSchedulerState(vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { + if mock.SetVgpuSchedulerStateFunc == nil { + panic("GpuInstance.SetVgpuSchedulerStateFunc: method is nil but GpuInstance.SetVgpuSchedulerState was just called") + } + callInfo := struct { + VgpuSchedulerState *nvml.VgpuSchedulerState + }{ + VgpuSchedulerState: vgpuSchedulerState, + } + mock.lockSetVgpuSchedulerState.Lock() + mock.calls.SetVgpuSchedulerState = append(mock.calls.SetVgpuSchedulerState, callInfo) + mock.lockSetVgpuSchedulerState.Unlock() + return mock.SetVgpuSchedulerStateFunc(vgpuSchedulerState) +} + +// SetVgpuSchedulerStateCalls gets all the calls that were made to SetVgpuSchedulerState. +// Check the length with: +// +// len(mockedGpuInstance.SetVgpuSchedulerStateCalls()) +func (mock *GpuInstance) SetVgpuSchedulerStateCalls() []struct { + VgpuSchedulerState *nvml.VgpuSchedulerState +} { + var calls []struct { + VgpuSchedulerState *nvml.VgpuSchedulerState + } + mock.lockSetVgpuSchedulerState.RLock() + calls = mock.calls.SetVgpuSchedulerState + mock.lockSetVgpuSchedulerState.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 c39a16ea..ecaaf6c5 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 @@ -102,6 +102,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetC2cModeInfoVFunc: func(device nvml.Device) nvml.C2cModeInfoHandler { // panic("mock out the DeviceGetC2cModeInfoV method") // }, +// DeviceGetCapabilitiesFunc: func(device nvml.Device) (nvml.DeviceCapabilities, nvml.Return) { +// panic("mock out the DeviceGetCapabilities method") +// }, // DeviceGetClkMonStatusFunc: func(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) { // panic("mock out the DeviceGetClkMonStatus method") // }, @@ -111,6 +114,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetClockInfoFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { // panic("mock out the DeviceGetClockInfo method") // }, +// DeviceGetClockOffsetsFunc: func(device nvml.Device) (nvml.ClockOffset, nvml.Return) { +// panic("mock out the DeviceGetClockOffsets method") +// }, // DeviceGetComputeInstanceIdFunc: func(device nvml.Device) (int, nvml.Return) { // panic("mock out the DeviceGetComputeInstanceId method") // }, @@ -132,6 +138,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetConfComputeProtectedMemoryUsageFunc: func(device nvml.Device) (nvml.Memory, nvml.Return) { // panic("mock out the DeviceGetConfComputeProtectedMemoryUsage method") // }, +// DeviceGetCoolerInfoFunc: func(device nvml.Device) (nvml.CoolerInfo, nvml.Return) { +// panic("mock out the DeviceGetCoolerInfo method") +// }, // DeviceGetCountFunc: func() (int, nvml.Return) { // panic("mock out the DeviceGetCount method") // }, @@ -153,6 +162,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetCurrPcieLinkWidthFunc: func(device nvml.Device) (int, nvml.Return) { // panic("mock out the DeviceGetCurrPcieLinkWidth method") // }, +// DeviceGetCurrentClockFreqsFunc: func(device nvml.Device) (nvml.DeviceCurrentClockFreqs, nvml.Return) { +// panic("mock out the DeviceGetCurrentClockFreqs method") +// }, // DeviceGetCurrentClocksEventReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { // panic("mock out the DeviceGetCurrentClocksEventReasons method") // }, @@ -180,9 +192,15 @@ var _ nvml.Interface = &Interface{} // DeviceGetDisplayModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { // panic("mock out the DeviceGetDisplayMode method") // }, +// DeviceGetDramEncryptionModeFunc: func(device nvml.Device) (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { +// panic("mock out the DeviceGetDramEncryptionMode method") +// }, // DeviceGetDriverModelFunc: func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { // panic("mock out the DeviceGetDriverModel method") // }, +// DeviceGetDriverModel_v2Func: func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { +// panic("mock out the DeviceGetDriverModel_v2 method") +// }, // DeviceGetDynamicPstatesInfoFunc: func(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) { // panic("mock out the DeviceGetDynamicPstatesInfo method") // }, @@ -216,6 +234,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetFanSpeedFunc: func(device nvml.Device) (uint32, nvml.Return) { // panic("mock out the DeviceGetFanSpeed method") // }, +// DeviceGetFanSpeedRPMFunc: func(device nvml.Device) (nvml.FanSpeedInfo, nvml.Return) { +// panic("mock out the DeviceGetFanSpeedRPM method") +// }, // DeviceGetFanSpeed_v2Func: func(device nvml.Device, n int) (uint32, nvml.Return) { // panic("mock out the DeviceGetFanSpeed_v2 method") // }, @@ -285,6 +306,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetHandleByUUIDFunc: func(s string) (nvml.Device, nvml.Return) { // panic("mock out the DeviceGetHandleByUUID method") // }, +// DeviceGetHandleByUUIDVFunc: func(uUID *nvml.UUID) (nvml.Device, nvml.Return) { +// panic("mock out the DeviceGetHandleByUUIDV method") +// }, // DeviceGetHostVgpuModeFunc: func(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) { // panic("mock out the DeviceGetHostVgpuMode method") // }, @@ -312,6 +336,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetMPSComputeRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { // panic("mock out the DeviceGetMPSComputeRunningProcesses method") // }, +// DeviceGetMarginTemperatureFunc: func(device nvml.Device) (nvml.MarginTemperature, nvml.Return) { +// panic("mock out the DeviceGetMarginTemperature method") +// }, // DeviceGetMaxClockInfoFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { // panic("mock out the DeviceGetMaxClockInfo method") // }, @@ -405,6 +432,12 @@ var _ nvml.Interface = &Interface{} // DeviceGetNvLinkVersionFunc: func(device nvml.Device, n int) (uint32, nvml.Return) { // panic("mock out the DeviceGetNvLinkVersion method") // }, +// DeviceGetNvlinkBwModeFunc: func(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) { +// panic("mock out the DeviceGetNvlinkBwMode method") +// }, +// DeviceGetNvlinkSupportedBwModesFunc: func(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) { +// panic("mock out the DeviceGetNvlinkSupportedBwModes method") +// }, // DeviceGetOfaUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { // panic("mock out the DeviceGetOfaUtilization method") // }, @@ -429,6 +462,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetPcieThroughputFunc: func(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { // panic("mock out the DeviceGetPcieThroughput method") // }, +// DeviceGetPerformanceModesFunc: func(device nvml.Device) (nvml.DevicePerfModes, nvml.Return) { +// panic("mock out the DeviceGetPerformanceModes method") +// }, // DeviceGetPerformanceStateFunc: func(device nvml.Device) (nvml.Pstates, nvml.Return) { // panic("mock out the DeviceGetPerformanceState method") // }, @@ -438,6 +474,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetPgpuMetadataStringFunc: func(device nvml.Device) (string, nvml.Return) { // panic("mock out the DeviceGetPgpuMetadataString method") // }, +// DeviceGetPlatformInfoFunc: func(device nvml.Device) (nvml.PlatformInfo, nvml.Return) { +// panic("mock out the DeviceGetPlatformInfo method") +// }, // DeviceGetPowerManagementDefaultLimitFunc: func(device nvml.Device) (uint32, nvml.Return) { // panic("mock out the DeviceGetPowerManagementDefaultLimit method") // }, @@ -522,6 +561,9 @@ var _ nvml.Interface = &Interface{} // DeviceGetTemperatureThresholdFunc: func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { // panic("mock out the DeviceGetTemperatureThreshold method") // }, +// DeviceGetTemperatureVFunc: func(device nvml.Device) nvml.TemperatureHandler { +// panic("mock out the DeviceGetTemperatureV method") +// }, // DeviceGetThermalSettingsFunc: func(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) { // panic("mock out the DeviceGetThermalSettings method") // }, @@ -597,6 +639,15 @@ var _ nvml.Interface = &Interface{} // DeviceOnSameBoardFunc: func(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) { // panic("mock out the DeviceOnSameBoard method") // }, +// DevicePowerSmoothingActivatePresetProfileFunc: func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { +// panic("mock out the DevicePowerSmoothingActivatePresetProfile method") +// }, +// DevicePowerSmoothingSetStateFunc: func(device nvml.Device, powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { +// panic("mock out the DevicePowerSmoothingSetState method") +// }, +// DevicePowerSmoothingUpdatePresetProfileParamFunc: func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { +// panic("mock out the DevicePowerSmoothingUpdatePresetProfileParam method") +// }, // DeviceQueryDrainStateFunc: func(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) { // panic("mock out the DeviceQueryDrainState method") // }, @@ -636,6 +687,9 @@ var _ nvml.Interface = &Interface{} // DeviceSetAutoBoostedClocksEnabledFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { // panic("mock out the DeviceSetAutoBoostedClocksEnabled method") // }, +// DeviceSetClockOffsetsFunc: func(device nvml.Device, clockOffset nvml.ClockOffset) nvml.Return { +// panic("mock out the DeviceSetClockOffsets method") +// }, // DeviceSetComputeModeFunc: func(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return { // panic("mock out the DeviceSetComputeMode method") // }, @@ -651,6 +705,9 @@ var _ nvml.Interface = &Interface{} // DeviceSetDefaultFanSpeed_v2Func: func(device nvml.Device, n int) nvml.Return { // panic("mock out the DeviceSetDefaultFanSpeed_v2 method") // }, +// DeviceSetDramEncryptionModeFunc: func(device nvml.Device, dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { +// panic("mock out the DeviceSetDramEncryptionMode method") +// }, // DeviceSetDriverModelFunc: func(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return { // panic("mock out the DeviceSetDriverModel method") // }, @@ -687,6 +744,9 @@ var _ nvml.Interface = &Interface{} // DeviceSetNvLinkUtilizationControlFunc: func(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { // panic("mock out the DeviceSetNvLinkUtilizationControl method") // }, +// DeviceSetNvlinkBwModeFunc: func(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { +// panic("mock out the DeviceSetNvlinkBwMode method") +// }, // DeviceSetPersistenceModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { // panic("mock out the DeviceSetPersistenceMode method") // }, @@ -714,6 +774,18 @@ var _ nvml.Interface = &Interface{} // DeviceValidateInforomFunc: func(device nvml.Device) nvml.Return { // panic("mock out the DeviceValidateInforom method") // }, +// DeviceWorkloadPowerProfileClearRequestedProfilesFunc: func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { +// panic("mock out the DeviceWorkloadPowerProfileClearRequestedProfiles method") +// }, +// DeviceWorkloadPowerProfileGetCurrentProfilesFunc: func(device nvml.Device) (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { +// panic("mock out the DeviceWorkloadPowerProfileGetCurrentProfiles method") +// }, +// DeviceWorkloadPowerProfileGetProfilesInfoFunc: func(device nvml.Device) (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { +// panic("mock out the DeviceWorkloadPowerProfileGetProfilesInfo method") +// }, +// DeviceWorkloadPowerProfileSetRequestedProfilesFunc: func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { +// panic("mock out the DeviceWorkloadPowerProfileSetRequestedProfiles method") +// }, // ErrorStringFunc: func(returnMoqParam nvml.Return) string { // panic("mock out the ErrorString method") // }, @@ -783,6 +855,9 @@ var _ nvml.Interface = &Interface{} // GpuInstanceDestroyFunc: func(gpuInstance nvml.GpuInstance) nvml.Return { // panic("mock out the GpuInstanceDestroy method") // }, +// GpuInstanceGetActiveVgpusFunc: func(gpuInstance nvml.GpuInstance) (nvml.ActiveVgpuInstanceInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetActiveVgpus method") +// }, // GpuInstanceGetComputeInstanceByIdFunc: func(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) { // panic("mock out the GpuInstanceGetComputeInstanceById method") // }, @@ -801,9 +876,30 @@ var _ nvml.Interface = &Interface{} // GpuInstanceGetComputeInstancesFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { // panic("mock out the GpuInstanceGetComputeInstances method") // }, +// GpuInstanceGetCreatableVgpusFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuTypeIdInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetCreatableVgpus method") +// }, // GpuInstanceGetInfoFunc: func(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) { // panic("mock out the GpuInstanceGetInfo method") // }, +// GpuInstanceGetVgpuHeterogeneousModeFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuHeterogeneousMode, nvml.Return) { +// panic("mock out the GpuInstanceGetVgpuHeterogeneousMode method") +// }, +// GpuInstanceGetVgpuSchedulerLogFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerLogInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetVgpuSchedulerLog method") +// }, +// GpuInstanceGetVgpuSchedulerStateFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerStateInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetVgpuSchedulerState method") +// }, +// GpuInstanceGetVgpuTypeCreatablePlacementsFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuCreatablePlacementInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetVgpuTypeCreatablePlacements method") +// }, +// GpuInstanceSetVgpuHeterogeneousModeFunc: func(gpuInstance nvml.GpuInstance, vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { +// panic("mock out the GpuInstanceSetVgpuHeterogeneousMode method") +// }, +// GpuInstanceSetVgpuSchedulerStateFunc: func(gpuInstance nvml.GpuInstance, vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { +// panic("mock out the GpuInstanceSetVgpuSchedulerState method") +// }, // InitFunc: func() nvml.Return { // panic("mock out the Init method") // }, @@ -816,21 +912,39 @@ var _ nvml.Interface = &Interface{} // ShutdownFunc: func() nvml.Return { // panic("mock out the Shutdown method") // }, +// SystemEventSetCreateFunc: func(systemEventSetCreateRequest *nvml.SystemEventSetCreateRequest) nvml.Return { +// panic("mock out the SystemEventSetCreate method") +// }, +// SystemEventSetFreeFunc: func(systemEventSetFreeRequest *nvml.SystemEventSetFreeRequest) nvml.Return { +// panic("mock out the SystemEventSetFree method") +// }, +// SystemEventSetWaitFunc: func(systemEventSetWaitRequest *nvml.SystemEventSetWaitRequest) nvml.Return { +// panic("mock out the SystemEventSetWait method") +// }, // SystemGetConfComputeCapabilitiesFunc: func() (nvml.ConfComputeSystemCaps, nvml.Return) { // panic("mock out the SystemGetConfComputeCapabilities method") // }, +// SystemGetConfComputeGpusReadyStateFunc: func() (uint32, nvml.Return) { +// panic("mock out the SystemGetConfComputeGpusReadyState method") +// }, // SystemGetConfComputeKeyRotationThresholdInfoFunc: func() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) { // panic("mock out the SystemGetConfComputeKeyRotationThresholdInfo method") // }, // SystemGetConfComputeSettingsFunc: func() (nvml.SystemConfComputeSettings, nvml.Return) { // panic("mock out the SystemGetConfComputeSettings method") // }, +// SystemGetConfComputeStateFunc: func() (nvml.ConfComputeSystemState, nvml.Return) { +// panic("mock out the SystemGetConfComputeState method") +// }, // SystemGetCudaDriverVersionFunc: func() (int, nvml.Return) { // panic("mock out the SystemGetCudaDriverVersion method") // }, // SystemGetCudaDriverVersion_v2Func: func() (int, nvml.Return) { // panic("mock out the SystemGetCudaDriverVersion_v2 method") // }, +// SystemGetDriverBranchFunc: func() (nvml.SystemDriverBranchInfo, nvml.Return) { +// panic("mock out the SystemGetDriverBranch method") +// }, // SystemGetDriverVersionFunc: func() (string, nvml.Return) { // panic("mock out the SystemGetDriverVersion method") // }, @@ -840,15 +954,27 @@ var _ nvml.Interface = &Interface{} // SystemGetNVMLVersionFunc: func() (string, nvml.Return) { // panic("mock out the SystemGetNVMLVersion method") // }, +// SystemGetNvlinkBwModeFunc: func() (uint32, nvml.Return) { +// panic("mock out the SystemGetNvlinkBwMode method") +// }, // SystemGetProcessNameFunc: func(n int) (string, nvml.Return) { // panic("mock out the SystemGetProcessName method") // }, // SystemGetTopologyGpuSetFunc: func(n int) ([]nvml.Device, nvml.Return) { // panic("mock out the SystemGetTopologyGpuSet method") // }, +// SystemRegisterEventsFunc: func(systemRegisterEventRequest *nvml.SystemRegisterEventRequest) nvml.Return { +// panic("mock out the SystemRegisterEvents method") +// }, +// SystemSetConfComputeGpusReadyStateFunc: func(v uint32) nvml.Return { +// panic("mock out the SystemSetConfComputeGpusReadyState method") +// }, // SystemSetConfComputeKeyRotationThresholdInfoFunc: func(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return { // panic("mock out the SystemSetConfComputeKeyRotationThresholdInfo method") // }, +// SystemSetNvlinkBwModeFunc: func(v uint32) nvml.Return { +// panic("mock out the SystemSetNvlinkBwMode method") +// }, // UnitGetCountFunc: func() (int, nvml.Return) { // panic("mock out the UnitGetCount method") // }, @@ -930,6 +1056,9 @@ var _ nvml.Interface = &Interface{} // VgpuInstanceGetMetadataFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) { // panic("mock out the VgpuInstanceGetMetadata method") // }, +// VgpuInstanceGetRuntimeStateSizeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuRuntimeState, nvml.Return) { +// panic("mock out the VgpuInstanceGetRuntimeStateSize method") +// }, // VgpuInstanceGetTypeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) { // panic("mock out the VgpuInstanceGetType method") // }, @@ -945,6 +1074,9 @@ var _ nvml.Interface = &Interface{} // VgpuInstanceSetEncoderCapacityFunc: func(vgpuInstance nvml.VgpuInstance, n int) nvml.Return { // panic("mock out the VgpuInstanceSetEncoderCapacity method") // }, +// VgpuTypeGetBAR1InfoFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuTypeBar1Info, nvml.Return) { +// panic("mock out the VgpuTypeGetBAR1Info method") +// }, // VgpuTypeGetCapabilitiesFunc: func(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { // panic("mock out the VgpuTypeGetCapabilities method") // }, @@ -969,6 +1101,9 @@ var _ nvml.Interface = &Interface{} // VgpuTypeGetMaxInstancesFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { // panic("mock out the VgpuTypeGetMaxInstances method") // }, +// VgpuTypeGetMaxInstancesPerGpuInstanceFunc: func(vgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance) nvml.Return { +// panic("mock out the VgpuTypeGetMaxInstancesPerGpuInstance method") +// }, // VgpuTypeGetMaxInstancesPerVmFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { // panic("mock out the VgpuTypeGetMaxInstancesPerVm method") // }, @@ -1072,6 +1207,9 @@ type Interface struct { // DeviceGetC2cModeInfoVFunc mocks the DeviceGetC2cModeInfoV method. DeviceGetC2cModeInfoVFunc func(device nvml.Device) nvml.C2cModeInfoHandler + // DeviceGetCapabilitiesFunc mocks the DeviceGetCapabilities method. + DeviceGetCapabilitiesFunc func(device nvml.Device) (nvml.DeviceCapabilities, nvml.Return) + // DeviceGetClkMonStatusFunc mocks the DeviceGetClkMonStatus method. DeviceGetClkMonStatusFunc func(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) @@ -1081,6 +1219,9 @@ type Interface struct { // DeviceGetClockInfoFunc mocks the DeviceGetClockInfo method. DeviceGetClockInfoFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + // DeviceGetClockOffsetsFunc mocks the DeviceGetClockOffsets method. + DeviceGetClockOffsetsFunc func(device nvml.Device) (nvml.ClockOffset, nvml.Return) + // DeviceGetComputeInstanceIdFunc mocks the DeviceGetComputeInstanceId method. DeviceGetComputeInstanceIdFunc func(device nvml.Device) (int, nvml.Return) @@ -1102,6 +1243,9 @@ type Interface struct { // DeviceGetConfComputeProtectedMemoryUsageFunc mocks the DeviceGetConfComputeProtectedMemoryUsage method. DeviceGetConfComputeProtectedMemoryUsageFunc func(device nvml.Device) (nvml.Memory, nvml.Return) + // DeviceGetCoolerInfoFunc mocks the DeviceGetCoolerInfo method. + DeviceGetCoolerInfoFunc func(device nvml.Device) (nvml.CoolerInfo, nvml.Return) + // DeviceGetCountFunc mocks the DeviceGetCount method. DeviceGetCountFunc func() (int, nvml.Return) @@ -1123,6 +1267,9 @@ type Interface struct { // DeviceGetCurrPcieLinkWidthFunc mocks the DeviceGetCurrPcieLinkWidth method. DeviceGetCurrPcieLinkWidthFunc func(device nvml.Device) (int, nvml.Return) + // DeviceGetCurrentClockFreqsFunc mocks the DeviceGetCurrentClockFreqs method. + DeviceGetCurrentClockFreqsFunc func(device nvml.Device) (nvml.DeviceCurrentClockFreqs, nvml.Return) + // DeviceGetCurrentClocksEventReasonsFunc mocks the DeviceGetCurrentClocksEventReasons method. DeviceGetCurrentClocksEventReasonsFunc func(device nvml.Device) (uint64, nvml.Return) @@ -1150,9 +1297,15 @@ type Interface struct { // DeviceGetDisplayModeFunc mocks the DeviceGetDisplayMode method. DeviceGetDisplayModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + // DeviceGetDramEncryptionModeFunc mocks the DeviceGetDramEncryptionMode method. + DeviceGetDramEncryptionModeFunc func(device nvml.Device) (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) + // DeviceGetDriverModelFunc mocks the DeviceGetDriverModel method. DeviceGetDriverModelFunc func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) + // DeviceGetDriverModel_v2Func mocks the DeviceGetDriverModel_v2 method. + DeviceGetDriverModel_v2Func func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) + // DeviceGetDynamicPstatesInfoFunc mocks the DeviceGetDynamicPstatesInfo method. DeviceGetDynamicPstatesInfoFunc func(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) @@ -1186,6 +1339,9 @@ type Interface struct { // DeviceGetFanSpeedFunc mocks the DeviceGetFanSpeed method. DeviceGetFanSpeedFunc func(device nvml.Device) (uint32, nvml.Return) + // DeviceGetFanSpeedRPMFunc mocks the DeviceGetFanSpeedRPM method. + DeviceGetFanSpeedRPMFunc func(device nvml.Device) (nvml.FanSpeedInfo, nvml.Return) + // DeviceGetFanSpeed_v2Func mocks the DeviceGetFanSpeed_v2 method. DeviceGetFanSpeed_v2Func func(device nvml.Device, n int) (uint32, nvml.Return) @@ -1255,6 +1411,9 @@ type Interface struct { // DeviceGetHandleByUUIDFunc mocks the DeviceGetHandleByUUID method. DeviceGetHandleByUUIDFunc func(s string) (nvml.Device, nvml.Return) + // DeviceGetHandleByUUIDVFunc mocks the DeviceGetHandleByUUIDV method. + DeviceGetHandleByUUIDVFunc func(uUID *nvml.UUID) (nvml.Device, nvml.Return) + // DeviceGetHostVgpuModeFunc mocks the DeviceGetHostVgpuMode method. DeviceGetHostVgpuModeFunc func(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) @@ -1282,6 +1441,9 @@ type Interface struct { // DeviceGetMPSComputeRunningProcessesFunc mocks the DeviceGetMPSComputeRunningProcesses method. DeviceGetMPSComputeRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) + // DeviceGetMarginTemperatureFunc mocks the DeviceGetMarginTemperature method. + DeviceGetMarginTemperatureFunc func(device nvml.Device) (nvml.MarginTemperature, nvml.Return) + // DeviceGetMaxClockInfoFunc mocks the DeviceGetMaxClockInfo method. DeviceGetMaxClockInfoFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) @@ -1375,6 +1537,12 @@ type Interface struct { // DeviceGetNvLinkVersionFunc mocks the DeviceGetNvLinkVersion method. DeviceGetNvLinkVersionFunc func(device nvml.Device, n int) (uint32, nvml.Return) + // DeviceGetNvlinkBwModeFunc mocks the DeviceGetNvlinkBwMode method. + DeviceGetNvlinkBwModeFunc func(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) + + // DeviceGetNvlinkSupportedBwModesFunc mocks the DeviceGetNvlinkSupportedBwModes method. + DeviceGetNvlinkSupportedBwModesFunc func(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) + // DeviceGetOfaUtilizationFunc mocks the DeviceGetOfaUtilization method. DeviceGetOfaUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) @@ -1399,6 +1567,9 @@ type Interface struct { // DeviceGetPcieThroughputFunc mocks the DeviceGetPcieThroughput method. DeviceGetPcieThroughputFunc func(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) + // DeviceGetPerformanceModesFunc mocks the DeviceGetPerformanceModes method. + DeviceGetPerformanceModesFunc func(device nvml.Device) (nvml.DevicePerfModes, nvml.Return) + // DeviceGetPerformanceStateFunc mocks the DeviceGetPerformanceState method. DeviceGetPerformanceStateFunc func(device nvml.Device) (nvml.Pstates, nvml.Return) @@ -1408,6 +1579,9 @@ type Interface struct { // DeviceGetPgpuMetadataStringFunc mocks the DeviceGetPgpuMetadataString method. DeviceGetPgpuMetadataStringFunc func(device nvml.Device) (string, nvml.Return) + // DeviceGetPlatformInfoFunc mocks the DeviceGetPlatformInfo method. + DeviceGetPlatformInfoFunc func(device nvml.Device) (nvml.PlatformInfo, nvml.Return) + // DeviceGetPowerManagementDefaultLimitFunc mocks the DeviceGetPowerManagementDefaultLimit method. DeviceGetPowerManagementDefaultLimitFunc func(device nvml.Device) (uint32, nvml.Return) @@ -1492,6 +1666,9 @@ type Interface struct { // DeviceGetTemperatureThresholdFunc mocks the DeviceGetTemperatureThreshold method. DeviceGetTemperatureThresholdFunc func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) + // DeviceGetTemperatureVFunc mocks the DeviceGetTemperatureV method. + DeviceGetTemperatureVFunc func(device nvml.Device) nvml.TemperatureHandler + // DeviceGetThermalSettingsFunc mocks the DeviceGetThermalSettings method. DeviceGetThermalSettingsFunc func(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) @@ -1567,6 +1744,15 @@ type Interface struct { // DeviceOnSameBoardFunc mocks the DeviceOnSameBoard method. DeviceOnSameBoardFunc func(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) + // DevicePowerSmoothingActivatePresetProfileFunc mocks the DevicePowerSmoothingActivatePresetProfile method. + DevicePowerSmoothingActivatePresetProfileFunc func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return + + // DevicePowerSmoothingSetStateFunc mocks the DevicePowerSmoothingSetState method. + DevicePowerSmoothingSetStateFunc func(device nvml.Device, powerSmoothingState *nvml.PowerSmoothingState) nvml.Return + + // DevicePowerSmoothingUpdatePresetProfileParamFunc mocks the DevicePowerSmoothingUpdatePresetProfileParam method. + DevicePowerSmoothingUpdatePresetProfileParamFunc func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return + // DeviceQueryDrainStateFunc mocks the DeviceQueryDrainState method. DeviceQueryDrainStateFunc func(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) @@ -1606,6 +1792,9 @@ type Interface struct { // DeviceSetAutoBoostedClocksEnabledFunc mocks the DeviceSetAutoBoostedClocksEnabled method. DeviceSetAutoBoostedClocksEnabledFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return + // DeviceSetClockOffsetsFunc mocks the DeviceSetClockOffsets method. + DeviceSetClockOffsetsFunc func(device nvml.Device, clockOffset nvml.ClockOffset) nvml.Return + // DeviceSetComputeModeFunc mocks the DeviceSetComputeMode method. DeviceSetComputeModeFunc func(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return @@ -1621,6 +1810,9 @@ type Interface struct { // DeviceSetDefaultFanSpeed_v2Func mocks the DeviceSetDefaultFanSpeed_v2 method. DeviceSetDefaultFanSpeed_v2Func func(device nvml.Device, n int) nvml.Return + // DeviceSetDramEncryptionModeFunc mocks the DeviceSetDramEncryptionMode method. + DeviceSetDramEncryptionModeFunc func(device nvml.Device, dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return + // DeviceSetDriverModelFunc mocks the DeviceSetDriverModel method. DeviceSetDriverModelFunc func(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return @@ -1657,6 +1849,9 @@ type Interface struct { // DeviceSetNvLinkUtilizationControlFunc mocks the DeviceSetNvLinkUtilizationControl method. DeviceSetNvLinkUtilizationControlFunc func(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return + // DeviceSetNvlinkBwModeFunc mocks the DeviceSetNvlinkBwMode method. + DeviceSetNvlinkBwModeFunc func(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return + // DeviceSetPersistenceModeFunc mocks the DeviceSetPersistenceMode method. DeviceSetPersistenceModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return @@ -1684,6 +1879,18 @@ type Interface struct { // DeviceValidateInforomFunc mocks the DeviceValidateInforom method. DeviceValidateInforomFunc func(device nvml.Device) nvml.Return + // DeviceWorkloadPowerProfileClearRequestedProfilesFunc mocks the DeviceWorkloadPowerProfileClearRequestedProfiles method. + DeviceWorkloadPowerProfileClearRequestedProfilesFunc func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return + + // DeviceWorkloadPowerProfileGetCurrentProfilesFunc mocks the DeviceWorkloadPowerProfileGetCurrentProfiles method. + DeviceWorkloadPowerProfileGetCurrentProfilesFunc func(device nvml.Device) (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) + + // DeviceWorkloadPowerProfileGetProfilesInfoFunc mocks the DeviceWorkloadPowerProfileGetProfilesInfo method. + DeviceWorkloadPowerProfileGetProfilesInfoFunc func(device nvml.Device) (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) + + // DeviceWorkloadPowerProfileSetRequestedProfilesFunc mocks the DeviceWorkloadPowerProfileSetRequestedProfiles method. + DeviceWorkloadPowerProfileSetRequestedProfilesFunc func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return + // ErrorStringFunc mocks the ErrorString method. ErrorStringFunc func(returnMoqParam nvml.Return) string @@ -1753,6 +1960,9 @@ type Interface struct { // GpuInstanceDestroyFunc mocks the GpuInstanceDestroy method. GpuInstanceDestroyFunc func(gpuInstance nvml.GpuInstance) nvml.Return + // GpuInstanceGetActiveVgpusFunc mocks the GpuInstanceGetActiveVgpus method. + GpuInstanceGetActiveVgpusFunc func(gpuInstance nvml.GpuInstance) (nvml.ActiveVgpuInstanceInfo, nvml.Return) + // GpuInstanceGetComputeInstanceByIdFunc mocks the GpuInstanceGetComputeInstanceById method. GpuInstanceGetComputeInstanceByIdFunc func(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) @@ -1771,9 +1981,30 @@ type Interface struct { // GpuInstanceGetComputeInstancesFunc mocks the GpuInstanceGetComputeInstances method. GpuInstanceGetComputeInstancesFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) + // GpuInstanceGetCreatableVgpusFunc mocks the GpuInstanceGetCreatableVgpus method. + GpuInstanceGetCreatableVgpusFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuTypeIdInfo, nvml.Return) + // GpuInstanceGetInfoFunc mocks the GpuInstanceGetInfo method. GpuInstanceGetInfoFunc func(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) + // GpuInstanceGetVgpuHeterogeneousModeFunc mocks the GpuInstanceGetVgpuHeterogeneousMode method. + GpuInstanceGetVgpuHeterogeneousModeFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuHeterogeneousMode, nvml.Return) + + // GpuInstanceGetVgpuSchedulerLogFunc mocks the GpuInstanceGetVgpuSchedulerLog method. + GpuInstanceGetVgpuSchedulerLogFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerLogInfo, nvml.Return) + + // GpuInstanceGetVgpuSchedulerStateFunc mocks the GpuInstanceGetVgpuSchedulerState method. + GpuInstanceGetVgpuSchedulerStateFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerStateInfo, nvml.Return) + + // GpuInstanceGetVgpuTypeCreatablePlacementsFunc mocks the GpuInstanceGetVgpuTypeCreatablePlacements method. + GpuInstanceGetVgpuTypeCreatablePlacementsFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuCreatablePlacementInfo, nvml.Return) + + // GpuInstanceSetVgpuHeterogeneousModeFunc mocks the GpuInstanceSetVgpuHeterogeneousMode method. + GpuInstanceSetVgpuHeterogeneousModeFunc func(gpuInstance nvml.GpuInstance, vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return + + // GpuInstanceSetVgpuSchedulerStateFunc mocks the GpuInstanceSetVgpuSchedulerState method. + GpuInstanceSetVgpuSchedulerStateFunc func(gpuInstance nvml.GpuInstance, vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return + // InitFunc mocks the Init method. InitFunc func() nvml.Return @@ -1786,21 +2017,39 @@ type Interface struct { // ShutdownFunc mocks the Shutdown method. ShutdownFunc func() nvml.Return + // SystemEventSetCreateFunc mocks the SystemEventSetCreate method. + SystemEventSetCreateFunc func(systemEventSetCreateRequest *nvml.SystemEventSetCreateRequest) nvml.Return + + // SystemEventSetFreeFunc mocks the SystemEventSetFree method. + SystemEventSetFreeFunc func(systemEventSetFreeRequest *nvml.SystemEventSetFreeRequest) nvml.Return + + // SystemEventSetWaitFunc mocks the SystemEventSetWait method. + SystemEventSetWaitFunc func(systemEventSetWaitRequest *nvml.SystemEventSetWaitRequest) nvml.Return + // SystemGetConfComputeCapabilitiesFunc mocks the SystemGetConfComputeCapabilities method. SystemGetConfComputeCapabilitiesFunc func() (nvml.ConfComputeSystemCaps, nvml.Return) + // SystemGetConfComputeGpusReadyStateFunc mocks the SystemGetConfComputeGpusReadyState method. + SystemGetConfComputeGpusReadyStateFunc func() (uint32, nvml.Return) + // SystemGetConfComputeKeyRotationThresholdInfoFunc mocks the SystemGetConfComputeKeyRotationThresholdInfo method. SystemGetConfComputeKeyRotationThresholdInfoFunc func() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) // SystemGetConfComputeSettingsFunc mocks the SystemGetConfComputeSettings method. SystemGetConfComputeSettingsFunc func() (nvml.SystemConfComputeSettings, nvml.Return) + // SystemGetConfComputeStateFunc mocks the SystemGetConfComputeState method. + SystemGetConfComputeStateFunc func() (nvml.ConfComputeSystemState, nvml.Return) + // SystemGetCudaDriverVersionFunc mocks the SystemGetCudaDriverVersion method. SystemGetCudaDriverVersionFunc func() (int, nvml.Return) // SystemGetCudaDriverVersion_v2Func mocks the SystemGetCudaDriverVersion_v2 method. SystemGetCudaDriverVersion_v2Func func() (int, nvml.Return) + // SystemGetDriverBranchFunc mocks the SystemGetDriverBranch method. + SystemGetDriverBranchFunc func() (nvml.SystemDriverBranchInfo, nvml.Return) + // SystemGetDriverVersionFunc mocks the SystemGetDriverVersion method. SystemGetDriverVersionFunc func() (string, nvml.Return) @@ -1810,15 +2059,27 @@ type Interface struct { // SystemGetNVMLVersionFunc mocks the SystemGetNVMLVersion method. SystemGetNVMLVersionFunc func() (string, nvml.Return) + // SystemGetNvlinkBwModeFunc mocks the SystemGetNvlinkBwMode method. + SystemGetNvlinkBwModeFunc func() (uint32, nvml.Return) + // SystemGetProcessNameFunc mocks the SystemGetProcessName method. SystemGetProcessNameFunc func(n int) (string, nvml.Return) // SystemGetTopologyGpuSetFunc mocks the SystemGetTopologyGpuSet method. SystemGetTopologyGpuSetFunc func(n int) ([]nvml.Device, nvml.Return) + // SystemRegisterEventsFunc mocks the SystemRegisterEvents method. + SystemRegisterEventsFunc func(systemRegisterEventRequest *nvml.SystemRegisterEventRequest) nvml.Return + + // SystemSetConfComputeGpusReadyStateFunc mocks the SystemSetConfComputeGpusReadyState method. + SystemSetConfComputeGpusReadyStateFunc func(v uint32) nvml.Return + // SystemSetConfComputeKeyRotationThresholdInfoFunc mocks the SystemSetConfComputeKeyRotationThresholdInfo method. SystemSetConfComputeKeyRotationThresholdInfoFunc func(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return + // SystemSetNvlinkBwModeFunc mocks the SystemSetNvlinkBwMode method. + SystemSetNvlinkBwModeFunc func(v uint32) nvml.Return + // UnitGetCountFunc mocks the UnitGetCount method. UnitGetCountFunc func() (int, nvml.Return) @@ -1900,6 +2161,9 @@ type Interface struct { // VgpuInstanceGetMetadataFunc mocks the VgpuInstanceGetMetadata method. VgpuInstanceGetMetadataFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) + // VgpuInstanceGetRuntimeStateSizeFunc mocks the VgpuInstanceGetRuntimeStateSize method. + VgpuInstanceGetRuntimeStateSizeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuRuntimeState, nvml.Return) + // VgpuInstanceGetTypeFunc mocks the VgpuInstanceGetType method. VgpuInstanceGetTypeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) @@ -1915,6 +2179,9 @@ type Interface struct { // VgpuInstanceSetEncoderCapacityFunc mocks the VgpuInstanceSetEncoderCapacity method. VgpuInstanceSetEncoderCapacityFunc func(vgpuInstance nvml.VgpuInstance, n int) nvml.Return + // VgpuTypeGetBAR1InfoFunc mocks the VgpuTypeGetBAR1Info method. + VgpuTypeGetBAR1InfoFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuTypeBar1Info, nvml.Return) + // VgpuTypeGetCapabilitiesFunc mocks the VgpuTypeGetCapabilities method. VgpuTypeGetCapabilitiesFunc func(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) @@ -1939,6 +2206,9 @@ type Interface struct { // VgpuTypeGetMaxInstancesFunc mocks the VgpuTypeGetMaxInstances method. VgpuTypeGetMaxInstancesFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) + // VgpuTypeGetMaxInstancesPerGpuInstanceFunc mocks the VgpuTypeGetMaxInstancesPerGpuInstance method. + VgpuTypeGetMaxInstancesPerGpuInstanceFunc func(vgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance) nvml.Return + // VgpuTypeGetMaxInstancesPerVmFunc mocks the VgpuTypeGetMaxInstancesPerVm method. VgpuTypeGetMaxInstancesPerVmFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) @@ -2113,6 +2383,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetCapabilities holds details about calls to the DeviceGetCapabilities method. + DeviceGetCapabilities []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetClkMonStatus holds details about calls to the DeviceGetClkMonStatus method. DeviceGetClkMonStatus []struct { // Device is the device argument value. @@ -2134,6 +2409,11 @@ type Interface struct { // ClockType is the clockType argument value. ClockType nvml.ClockType } + // DeviceGetClockOffsets holds details about calls to the DeviceGetClockOffsets method. + DeviceGetClockOffsets []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetComputeInstanceId holds details about calls to the DeviceGetComputeInstanceId method. DeviceGetComputeInstanceId []struct { // Device is the device argument value. @@ -2169,6 +2449,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetCoolerInfo holds details about calls to the DeviceGetCoolerInfo method. + DeviceGetCoolerInfo []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetCount holds details about calls to the DeviceGetCount method. DeviceGetCount []struct { } @@ -2208,6 +2493,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetCurrentClockFreqs holds details about calls to the DeviceGetCurrentClockFreqs method. + DeviceGetCurrentClockFreqs []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetCurrentClocksEventReasons holds details about calls to the DeviceGetCurrentClocksEventReasons method. DeviceGetCurrentClocksEventReasons []struct { // Device is the device argument value. @@ -2259,11 +2549,21 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetDramEncryptionMode holds details about calls to the DeviceGetDramEncryptionMode method. + DeviceGetDramEncryptionMode []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetDriverModel holds details about calls to the DeviceGetDriverModel method. DeviceGetDriverModel []struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetDriverModel_v2 holds details about calls to the DeviceGetDriverModel_v2 method. + DeviceGetDriverModel_v2 []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetDynamicPstatesInfo holds details about calls to the DeviceGetDynamicPstatesInfo method. DeviceGetDynamicPstatesInfo []struct { // Device is the device argument value. @@ -2323,6 +2623,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetFanSpeedRPM holds details about calls to the DeviceGetFanSpeedRPM method. + DeviceGetFanSpeedRPM []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetFanSpeed_v2 holds details about calls to the DeviceGetFanSpeed_v2 method. DeviceGetFanSpeed_v2 []struct { // Device is the device argument value. @@ -2454,6 +2759,11 @@ type Interface struct { // S is the s argument value. S string } + // DeviceGetHandleByUUIDV holds details about calls to the DeviceGetHandleByUUIDV method. + DeviceGetHandleByUUIDV []struct { + // UUID is the uUID argument value. + UUID *nvml.UUID + } // DeviceGetHostVgpuMode holds details about calls to the DeviceGetHostVgpuMode method. DeviceGetHostVgpuMode []struct { // Device is the device argument value. @@ -2501,6 +2811,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetMarginTemperature holds details about calls to the DeviceGetMarginTemperature method. + DeviceGetMarginTemperature []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetMaxClockInfo holds details about calls to the DeviceGetMaxClockInfo method. DeviceGetMaxClockInfo []struct { // Device is the device argument value. @@ -2700,6 +3015,16 @@ type Interface struct { // N is the n argument value. N int } + // DeviceGetNvlinkBwMode holds details about calls to the DeviceGetNvlinkBwMode method. + DeviceGetNvlinkBwMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetNvlinkSupportedBwModes holds details about calls to the DeviceGetNvlinkSupportedBwModes method. + DeviceGetNvlinkSupportedBwModes []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetOfaUtilization holds details about calls to the DeviceGetOfaUtilization method. DeviceGetOfaUtilization []struct { // Device is the device argument value. @@ -2746,6 +3071,11 @@ type Interface struct { // PcieUtilCounter is the pcieUtilCounter argument value. PcieUtilCounter nvml.PcieUtilCounter } + // DeviceGetPerformanceModes holds details about calls to the DeviceGetPerformanceModes method. + DeviceGetPerformanceModes []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetPerformanceState holds details about calls to the DeviceGetPerformanceState method. DeviceGetPerformanceState []struct { // Device is the device argument value. @@ -2761,6 +3091,11 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceGetPlatformInfo holds details about calls to the DeviceGetPlatformInfo method. + DeviceGetPlatformInfo []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetPowerManagementDefaultLimit holds details about calls to the DeviceGetPowerManagementDefaultLimit method. DeviceGetPowerManagementDefaultLimit []struct { // Device is the device argument value. @@ -2919,6 +3254,11 @@ type Interface struct { // TemperatureThresholds is the temperatureThresholds argument value. TemperatureThresholds nvml.TemperatureThresholds } + // DeviceGetTemperatureV holds details about calls to the DeviceGetTemperatureV method. + DeviceGetTemperatureV []struct { + // Device is the device argument value. + Device nvml.Device + } // DeviceGetThermalSettings holds details about calls to the DeviceGetThermalSettings method. DeviceGetThermalSettings []struct { // Device is the device argument value. @@ -3070,6 +3410,27 @@ type Interface struct { // Device2 is the device2 argument value. Device2 nvml.Device } + // DevicePowerSmoothingActivatePresetProfile holds details about calls to the DevicePowerSmoothingActivatePresetProfile method. + DevicePowerSmoothingActivatePresetProfile []struct { + // Device is the device argument value. + Device nvml.Device + // PowerSmoothingProfile is the powerSmoothingProfile argument value. + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + // DevicePowerSmoothingSetState holds details about calls to the DevicePowerSmoothingSetState method. + DevicePowerSmoothingSetState []struct { + // Device is the device argument value. + Device nvml.Device + // PowerSmoothingState is the powerSmoothingState argument value. + PowerSmoothingState *nvml.PowerSmoothingState + } + // DevicePowerSmoothingUpdatePresetProfileParam holds details about calls to the DevicePowerSmoothingUpdatePresetProfileParam method. + DevicePowerSmoothingUpdatePresetProfileParam []struct { + // Device is the device argument value. + Device nvml.Device + // PowerSmoothingProfile is the powerSmoothingProfile argument value. + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } // DeviceQueryDrainState holds details about calls to the DeviceQueryDrainState method. DeviceQueryDrainState []struct { // PciInfo is the pciInfo argument value. @@ -3161,6 +3522,13 @@ type Interface struct { // EnableState is the enableState argument value. EnableState nvml.EnableState } + // DeviceSetClockOffsets holds details about calls to the DeviceSetClockOffsets method. + DeviceSetClockOffsets []struct { + // Device is the device argument value. + Device nvml.Device + // ClockOffset is the clockOffset argument value. + ClockOffset nvml.ClockOffset + } // DeviceSetComputeMode holds details about calls to the DeviceSetComputeMode method. DeviceSetComputeMode []struct { // Device is the device argument value. @@ -3196,6 +3564,13 @@ type Interface struct { // N is the n argument value. N int } + // DeviceSetDramEncryptionMode holds details about calls to the DeviceSetDramEncryptionMode method. + DeviceSetDramEncryptionMode []struct { + // Device is the device argument value. + Device nvml.Device + // DramEncryptionInfo is the dramEncryptionInfo argument value. + DramEncryptionInfo *nvml.DramEncryptionInfo + } // DeviceSetDriverModel holds details about calls to the DeviceSetDriverModel method. DeviceSetDriverModel []struct { // Device is the device argument value. @@ -3296,6 +3671,13 @@ type Interface struct { // B is the b argument value. B bool } + // DeviceSetNvlinkBwMode holds details about calls to the DeviceSetNvlinkBwMode method. + DeviceSetNvlinkBwMode []struct { + // Device is the device argument value. + Device nvml.Device + // NvlinkSetBwMode is the nvlinkSetBwMode argument value. + NvlinkSetBwMode *nvml.NvlinkSetBwMode + } // DeviceSetPersistenceMode holds details about calls to the DeviceSetPersistenceMode method. DeviceSetPersistenceMode []struct { // Device is the device argument value. @@ -3361,6 +3743,30 @@ type Interface struct { // Device is the device argument value. Device nvml.Device } + // DeviceWorkloadPowerProfileClearRequestedProfiles holds details about calls to the DeviceWorkloadPowerProfileClearRequestedProfiles method. + DeviceWorkloadPowerProfileClearRequestedProfiles []struct { + // Device is the device argument value. + Device nvml.Device + // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + // DeviceWorkloadPowerProfileGetCurrentProfiles holds details about calls to the DeviceWorkloadPowerProfileGetCurrentProfiles method. + DeviceWorkloadPowerProfileGetCurrentProfiles []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceWorkloadPowerProfileGetProfilesInfo holds details about calls to the DeviceWorkloadPowerProfileGetProfilesInfo method. + DeviceWorkloadPowerProfileGetProfilesInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceWorkloadPowerProfileSetRequestedProfiles holds details about calls to the DeviceWorkloadPowerProfileSetRequestedProfiles method. + DeviceWorkloadPowerProfileSetRequestedProfiles []struct { + // Device is the device argument value. + Device nvml.Device + // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } // ErrorString holds details about calls to the ErrorString method. ErrorString []struct { // ReturnMoqParam is the returnMoqParam argument value. @@ -3484,6 +3890,11 @@ type Interface struct { // GpuInstance is the gpuInstance argument value. GpuInstance nvml.GpuInstance } + // GpuInstanceGetActiveVgpus holds details about calls to the GpuInstanceGetActiveVgpus method. + GpuInstanceGetActiveVgpus []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } // GpuInstanceGetComputeInstanceById holds details about calls to the GpuInstanceGetComputeInstanceById method. GpuInstanceGetComputeInstanceById []struct { // GpuInstance is the gpuInstance argument value. @@ -3530,11 +3941,50 @@ type Interface struct { // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo } + // GpuInstanceGetCreatableVgpus holds details about calls to the GpuInstanceGetCreatableVgpus method. + GpuInstanceGetCreatableVgpus []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } // GpuInstanceGetInfo holds details about calls to the GpuInstanceGetInfo method. GpuInstanceGetInfo []struct { // GpuInstance is the gpuInstance argument value. GpuInstance nvml.GpuInstance } + // GpuInstanceGetVgpuHeterogeneousMode holds details about calls to the GpuInstanceGetVgpuHeterogeneousMode method. + GpuInstanceGetVgpuHeterogeneousMode []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceGetVgpuSchedulerLog holds details about calls to the GpuInstanceGetVgpuSchedulerLog method. + GpuInstanceGetVgpuSchedulerLog []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceGetVgpuSchedulerState holds details about calls to the GpuInstanceGetVgpuSchedulerState method. + GpuInstanceGetVgpuSchedulerState []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceGetVgpuTypeCreatablePlacements holds details about calls to the GpuInstanceGetVgpuTypeCreatablePlacements method. + GpuInstanceGetVgpuTypeCreatablePlacements []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceSetVgpuHeterogeneousMode holds details about calls to the GpuInstanceSetVgpuHeterogeneousMode method. + GpuInstanceSetVgpuHeterogeneousMode []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // VgpuHeterogeneousMode is the vgpuHeterogeneousMode argument value. + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + } + // GpuInstanceSetVgpuSchedulerState holds details about calls to the GpuInstanceSetVgpuSchedulerState method. + GpuInstanceSetVgpuSchedulerState []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // VgpuSchedulerState is the vgpuSchedulerState argument value. + VgpuSchedulerState *nvml.VgpuSchedulerState + } // Init holds details about calls to the Init method. Init []struct { } @@ -3551,21 +4001,45 @@ type Interface struct { // Shutdown holds details about calls to the Shutdown method. Shutdown []struct { } + // SystemEventSetCreate holds details about calls to the SystemEventSetCreate method. + SystemEventSetCreate []struct { + // SystemEventSetCreateRequest is the systemEventSetCreateRequest argument value. + SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest + } + // SystemEventSetFree holds details about calls to the SystemEventSetFree method. + SystemEventSetFree []struct { + // SystemEventSetFreeRequest is the systemEventSetFreeRequest argument value. + SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest + } + // SystemEventSetWait holds details about calls to the SystemEventSetWait method. + SystemEventSetWait []struct { + // SystemEventSetWaitRequest is the systemEventSetWaitRequest argument value. + SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest + } // SystemGetConfComputeCapabilities holds details about calls to the SystemGetConfComputeCapabilities method. SystemGetConfComputeCapabilities []struct { } + // SystemGetConfComputeGpusReadyState holds details about calls to the SystemGetConfComputeGpusReadyState method. + SystemGetConfComputeGpusReadyState []struct { + } // SystemGetConfComputeKeyRotationThresholdInfo holds details about calls to the SystemGetConfComputeKeyRotationThresholdInfo method. SystemGetConfComputeKeyRotationThresholdInfo []struct { } // SystemGetConfComputeSettings holds details about calls to the SystemGetConfComputeSettings method. SystemGetConfComputeSettings []struct { } + // SystemGetConfComputeState holds details about calls to the SystemGetConfComputeState method. + SystemGetConfComputeState []struct { + } // SystemGetCudaDriverVersion holds details about calls to the SystemGetCudaDriverVersion method. SystemGetCudaDriverVersion []struct { } // SystemGetCudaDriverVersion_v2 holds details about calls to the SystemGetCudaDriverVersion_v2 method. SystemGetCudaDriverVersion_v2 []struct { } + // SystemGetDriverBranch holds details about calls to the SystemGetDriverBranch method. + SystemGetDriverBranch []struct { + } // SystemGetDriverVersion holds details about calls to the SystemGetDriverVersion method. SystemGetDriverVersion []struct { } @@ -3575,6 +4049,9 @@ type Interface struct { // SystemGetNVMLVersion holds details about calls to the SystemGetNVMLVersion method. SystemGetNVMLVersion []struct { } + // SystemGetNvlinkBwMode holds details about calls to the SystemGetNvlinkBwMode method. + SystemGetNvlinkBwMode []struct { + } // SystemGetProcessName holds details about calls to the SystemGetProcessName method. SystemGetProcessName []struct { // N is the n argument value. @@ -3585,11 +4062,26 @@ type Interface struct { // N is the n argument value. N int } + // SystemRegisterEvents holds details about calls to the SystemRegisterEvents method. + SystemRegisterEvents []struct { + // SystemRegisterEventRequest is the systemRegisterEventRequest argument value. + SystemRegisterEventRequest *nvml.SystemRegisterEventRequest + } + // SystemSetConfComputeGpusReadyState holds details about calls to the SystemSetConfComputeGpusReadyState method. + SystemSetConfComputeGpusReadyState []struct { + // V is the v argument value. + V uint32 + } // SystemSetConfComputeKeyRotationThresholdInfo holds details about calls to the SystemSetConfComputeKeyRotationThresholdInfo method. SystemSetConfComputeKeyRotationThresholdInfo []struct { // ConfComputeSetKeyRotationThresholdInfo is the confComputeSetKeyRotationThresholdInfo argument value. ConfComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo } + // SystemSetNvlinkBwMode holds details about calls to the SystemSetNvlinkBwMode method. + SystemSetNvlinkBwMode []struct { + // V is the v argument value. + V uint32 + } // UnitGetCount holds details about calls to the UnitGetCount method. UnitGetCount []struct { } @@ -3729,6 +4221,11 @@ type Interface struct { // VgpuInstance is the vgpuInstance argument value. VgpuInstance nvml.VgpuInstance } + // VgpuInstanceGetRuntimeStateSize holds details about calls to the VgpuInstanceGetRuntimeStateSize method. + VgpuInstanceGetRuntimeStateSize []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } // VgpuInstanceGetType holds details about calls to the VgpuInstanceGetType method. VgpuInstanceGetType []struct { // VgpuInstance is the vgpuInstance argument value. @@ -3756,6 +4253,11 @@ type Interface struct { // N is the n argument value. N int } + // VgpuTypeGetBAR1Info holds details about calls to the VgpuTypeGetBAR1Info method. + VgpuTypeGetBAR1Info []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } // VgpuTypeGetCapabilities holds details about calls to the VgpuTypeGetCapabilities method. VgpuTypeGetCapabilities []struct { // VgpuTypeId is the vgpuTypeId argument value. @@ -3800,6 +4302,11 @@ type Interface struct { // VgpuTypeId is the vgpuTypeId argument value. VgpuTypeId nvml.VgpuTypeId } + // VgpuTypeGetMaxInstancesPerGpuInstance holds details about calls to the VgpuTypeGetMaxInstancesPerGpuInstance method. + VgpuTypeGetMaxInstancesPerGpuInstance []struct { + // VgpuTypeMaxInstance is the vgpuTypeMaxInstance argument value. + VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance + } // VgpuTypeGetMaxInstancesPerVm holds details about calls to the VgpuTypeGetMaxInstancesPerVm method. VgpuTypeGetMaxInstancesPerVm []struct { // VgpuTypeId is the vgpuTypeId argument value. @@ -3823,327 +4330,372 @@ 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 - lockDeviceGetActiveVgpus sync.RWMutex - lockDeviceGetAdaptiveClockInfoStatus sync.RWMutex - lockDeviceGetApplicationsClock sync.RWMutex - lockDeviceGetArchitecture sync.RWMutex - lockDeviceGetAttributes sync.RWMutex - lockDeviceGetAutoBoostedClocksEnabled sync.RWMutex - lockDeviceGetBAR1MemoryInfo sync.RWMutex - lockDeviceGetBoardId sync.RWMutex - lockDeviceGetBoardPartNumber sync.RWMutex - lockDeviceGetBrand sync.RWMutex - lockDeviceGetBridgeChipInfo sync.RWMutex - lockDeviceGetBusType sync.RWMutex - lockDeviceGetC2cModeInfoV sync.RWMutex - lockDeviceGetClkMonStatus sync.RWMutex - lockDeviceGetClock sync.RWMutex - lockDeviceGetClockInfo sync.RWMutex - lockDeviceGetComputeInstanceId sync.RWMutex - lockDeviceGetComputeMode sync.RWMutex - lockDeviceGetComputeRunningProcesses sync.RWMutex - lockDeviceGetConfComputeGpuAttestationReport sync.RWMutex - lockDeviceGetConfComputeGpuCertificate sync.RWMutex - lockDeviceGetConfComputeMemSizeInfo sync.RWMutex - lockDeviceGetConfComputeProtectedMemoryUsage sync.RWMutex - lockDeviceGetCount sync.RWMutex - lockDeviceGetCpuAffinity sync.RWMutex - lockDeviceGetCpuAffinityWithinScope sync.RWMutex - lockDeviceGetCreatableVgpus sync.RWMutex - lockDeviceGetCudaComputeCapability sync.RWMutex - lockDeviceGetCurrPcieLinkGeneration sync.RWMutex - lockDeviceGetCurrPcieLinkWidth 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 - lockDeviceGetDriverModel 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 - 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 - 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 - lockDeviceGetHostVgpuMode 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 - 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 - lockDeviceGetNvLinkRemoteDeviceType sync.RWMutex - lockDeviceGetNvLinkRemotePciInfo sync.RWMutex - lockDeviceGetNvLinkState sync.RWMutex - lockDeviceGetNvLinkUtilizationControl sync.RWMutex - lockDeviceGetNvLinkUtilizationCounter sync.RWMutex - lockDeviceGetNvLinkVersion 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 - lockDeviceGetPerformanceState sync.RWMutex - lockDeviceGetPersistenceMode sync.RWMutex - lockDeviceGetPgpuMetadataString sync.RWMutex - lockDeviceGetPowerManagementDefaultLimit sync.RWMutex - lockDeviceGetPowerManagementLimit sync.RWMutex - lockDeviceGetPowerManagementLimitConstraints sync.RWMutex - lockDeviceGetPowerManagementMode sync.RWMutex - lockDeviceGetPowerSource sync.RWMutex - lockDeviceGetPowerState sync.RWMutex - lockDeviceGetPowerUsage sync.RWMutex - lockDeviceGetProcessUtilization sync.RWMutex - lockDeviceGetProcessesUtilizationInfo sync.RWMutex - lockDeviceGetRemappedRows 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 - 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 - lockDeviceGetThermalSettings sync.RWMutex - lockDeviceGetTopologyCommonAncestor sync.RWMutex - lockDeviceGetTopologyNearestGpus sync.RWMutex - lockDeviceGetTotalEccErrors sync.RWMutex - lockDeviceGetTotalEnergyConsumption sync.RWMutex - lockDeviceGetUUID 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 - lockDeviceGetVgpuSchedulerState 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 - lockDeviceQueryDrainState 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 - lockDeviceSetComputeMode sync.RWMutex - lockDeviceSetConfComputeUnprotectedMemSize sync.RWMutex - lockDeviceSetCpuAffinity sync.RWMutex - lockDeviceSetDefaultAutoBoostedClocksEnabled sync.RWMutex - lockDeviceSetDefaultFanSpeed_v2 sync.RWMutex - lockDeviceSetDriverModel sync.RWMutex - lockDeviceSetEccMode sync.RWMutex - lockDeviceSetFanControlPolicy sync.RWMutex - lockDeviceSetFanSpeed_v2 sync.RWMutex - lockDeviceSetGpcClkVfOffset sync.RWMutex - lockDeviceSetGpuLockedClocks sync.RWMutex - lockDeviceSetGpuOperationMode sync.RWMutex - lockDeviceSetMemClkVfOffset sync.RWMutex - lockDeviceSetMemoryLockedClocks sync.RWMutex - lockDeviceSetMigMode sync.RWMutex - lockDeviceSetNvLinkDeviceLowPowerThreshold sync.RWMutex - lockDeviceSetNvLinkUtilizationControl sync.RWMutex - lockDeviceSetPersistenceMode sync.RWMutex - lockDeviceSetPowerManagementLimit sync.RWMutex - lockDeviceSetPowerManagementLimit_v2 sync.RWMutex - lockDeviceSetTemperatureThreshold sync.RWMutex - lockDeviceSetVgpuCapabilities sync.RWMutex - lockDeviceSetVgpuHeterogeneousMode sync.RWMutex - lockDeviceSetVgpuSchedulerState sync.RWMutex - lockDeviceSetVirtualizationMode sync.RWMutex - lockDeviceValidateInforom 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 - lockGpuInstanceGetComputeInstanceById sync.RWMutex - lockGpuInstanceGetComputeInstancePossiblePlacements sync.RWMutex - lockGpuInstanceGetComputeInstanceProfileInfo sync.RWMutex - lockGpuInstanceGetComputeInstanceProfileInfoV sync.RWMutex - lockGpuInstanceGetComputeInstanceRemainingCapacity sync.RWMutex - lockGpuInstanceGetComputeInstances sync.RWMutex - lockGpuInstanceGetInfo sync.RWMutex - lockInit sync.RWMutex - lockInitWithFlags sync.RWMutex - lockSetVgpuVersion sync.RWMutex - lockShutdown sync.RWMutex - lockSystemGetConfComputeCapabilities sync.RWMutex - lockSystemGetConfComputeKeyRotationThresholdInfo sync.RWMutex - lockSystemGetConfComputeSettings sync.RWMutex - lockSystemGetCudaDriverVersion sync.RWMutex - lockSystemGetCudaDriverVersion_v2 sync.RWMutex - lockSystemGetDriverVersion sync.RWMutex - lockSystemGetHicVersion sync.RWMutex - lockSystemGetNVMLVersion sync.RWMutex - lockSystemGetProcessName sync.RWMutex - lockSystemGetTopologyGpuSet sync.RWMutex - lockSystemSetConfComputeKeyRotationThresholdInfo 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 - lockVgpuInstanceGetType sync.RWMutex - lockVgpuInstanceGetUUID sync.RWMutex - lockVgpuInstanceGetVmDriverVersion sync.RWMutex - lockVgpuInstanceGetVmID sync.RWMutex - lockVgpuInstanceSetEncoderCapacity 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 - 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 + lockDeviceGetActiveVgpus sync.RWMutex + lockDeviceGetAdaptiveClockInfoStatus sync.RWMutex + lockDeviceGetApplicationsClock sync.RWMutex + lockDeviceGetArchitecture sync.RWMutex + lockDeviceGetAttributes sync.RWMutex + lockDeviceGetAutoBoostedClocksEnabled sync.RWMutex + lockDeviceGetBAR1MemoryInfo 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 + 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 + 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 + 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 + 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 + lockDeviceGetPowerSource sync.RWMutex + lockDeviceGetPowerState sync.RWMutex + lockDeviceGetPowerUsage sync.RWMutex + lockDeviceGetProcessUtilization sync.RWMutex + lockDeviceGetProcessesUtilizationInfo sync.RWMutex + lockDeviceGetRemappedRows 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 + 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 + 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 + lockDeviceGetVgpuSchedulerState 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 + 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 + 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 + lockDeviceSetTemperatureThreshold sync.RWMutex + lockDeviceSetVgpuCapabilities sync.RWMutex + lockDeviceSetVgpuHeterogeneousMode sync.RWMutex + lockDeviceSetVgpuSchedulerState sync.RWMutex + lockDeviceSetVirtualizationMode sync.RWMutex + lockDeviceValidateInforom sync.RWMutex + lockDeviceWorkloadPowerProfileClearRequestedProfiles sync.RWMutex + lockDeviceWorkloadPowerProfileGetCurrentProfiles sync.RWMutex + lockDeviceWorkloadPowerProfileGetProfilesInfo sync.RWMutex + lockDeviceWorkloadPowerProfileSetRequestedProfiles 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 + lockGpuInstanceGetVgpuSchedulerState sync.RWMutex + lockGpuInstanceGetVgpuTypeCreatablePlacements sync.RWMutex + lockGpuInstanceSetVgpuHeterogeneousMode sync.RWMutex + lockGpuInstanceSetVgpuSchedulerState sync.RWMutex + lockInit sync.RWMutex + lockInitWithFlags sync.RWMutex + lockSetVgpuVersion sync.RWMutex + lockShutdown sync.RWMutex + lockSystemEventSetCreate sync.RWMutex + lockSystemEventSetFree sync.RWMutex + lockSystemEventSetWait 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 } // ComputeInstanceDestroy calls ComputeInstanceDestroyFunc. @@ -5081,6 +5633,38 @@ func (mock *Interface) DeviceGetC2cModeInfoVCalls() []struct { return calls } +// DeviceGetCapabilities calls DeviceGetCapabilitiesFunc. +func (mock *Interface) DeviceGetCapabilities(device nvml.Device) (nvml.DeviceCapabilities, nvml.Return) { + if mock.DeviceGetCapabilitiesFunc == nil { + panic("Interface.DeviceGetCapabilitiesFunc: method is nil but Interface.DeviceGetCapabilities was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCapabilities.Lock() + mock.calls.DeviceGetCapabilities = append(mock.calls.DeviceGetCapabilities, callInfo) + mock.lockDeviceGetCapabilities.Unlock() + return mock.DeviceGetCapabilitiesFunc(device) +} + +// DeviceGetCapabilitiesCalls gets all the calls that were made to DeviceGetCapabilities. +// Check the length with: +// +// len(mockedInterface.DeviceGetCapabilitiesCalls()) +func (mock *Interface) DeviceGetCapabilitiesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCapabilities.RLock() + calls = mock.calls.DeviceGetCapabilities + mock.lockDeviceGetCapabilities.RUnlock() + return calls +} + // DeviceGetClkMonStatus calls DeviceGetClkMonStatusFunc. func (mock *Interface) DeviceGetClkMonStatus(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) { if mock.DeviceGetClkMonStatusFunc == nil { @@ -5189,6 +5773,38 @@ func (mock *Interface) DeviceGetClockInfoCalls() []struct { return calls } +// DeviceGetClockOffsets calls DeviceGetClockOffsetsFunc. +func (mock *Interface) DeviceGetClockOffsets(device nvml.Device) (nvml.ClockOffset, nvml.Return) { + if mock.DeviceGetClockOffsetsFunc == nil { + panic("Interface.DeviceGetClockOffsetsFunc: method is nil but Interface.DeviceGetClockOffsets was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetClockOffsets.Lock() + mock.calls.DeviceGetClockOffsets = append(mock.calls.DeviceGetClockOffsets, callInfo) + mock.lockDeviceGetClockOffsets.Unlock() + return mock.DeviceGetClockOffsetsFunc(device) +} + +// DeviceGetClockOffsetsCalls gets all the calls that were made to DeviceGetClockOffsets. +// Check the length with: +// +// len(mockedInterface.DeviceGetClockOffsetsCalls()) +func (mock *Interface) DeviceGetClockOffsetsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetClockOffsets.RLock() + calls = mock.calls.DeviceGetClockOffsets + mock.lockDeviceGetClockOffsets.RUnlock() + return calls +} + // DeviceGetComputeInstanceId calls DeviceGetComputeInstanceIdFunc. func (mock *Interface) DeviceGetComputeInstanceId(device nvml.Device) (int, nvml.Return) { if mock.DeviceGetComputeInstanceIdFunc == nil { @@ -5413,6 +6029,38 @@ func (mock *Interface) DeviceGetConfComputeProtectedMemoryUsageCalls() []struct return calls } +// DeviceGetCoolerInfo calls DeviceGetCoolerInfoFunc. +func (mock *Interface) DeviceGetCoolerInfo(device nvml.Device) (nvml.CoolerInfo, nvml.Return) { + if mock.DeviceGetCoolerInfoFunc == nil { + panic("Interface.DeviceGetCoolerInfoFunc: method is nil but Interface.DeviceGetCoolerInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCoolerInfo.Lock() + mock.calls.DeviceGetCoolerInfo = append(mock.calls.DeviceGetCoolerInfo, callInfo) + mock.lockDeviceGetCoolerInfo.Unlock() + return mock.DeviceGetCoolerInfoFunc(device) +} + +// DeviceGetCoolerInfoCalls gets all the calls that were made to DeviceGetCoolerInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetCoolerInfoCalls()) +func (mock *Interface) DeviceGetCoolerInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCoolerInfo.RLock() + calls = mock.calls.DeviceGetCoolerInfo + mock.lockDeviceGetCoolerInfo.RUnlock() + return calls +} + // DeviceGetCount calls DeviceGetCountFunc. func (mock *Interface) DeviceGetCount() (int, nvml.Return) { if mock.DeviceGetCountFunc == nil { @@ -5644,6 +6292,38 @@ func (mock *Interface) DeviceGetCurrPcieLinkWidthCalls() []struct { return calls } +// DeviceGetCurrentClockFreqs calls DeviceGetCurrentClockFreqsFunc. +func (mock *Interface) DeviceGetCurrentClockFreqs(device nvml.Device) (nvml.DeviceCurrentClockFreqs, nvml.Return) { + if mock.DeviceGetCurrentClockFreqsFunc == nil { + panic("Interface.DeviceGetCurrentClockFreqsFunc: method is nil but Interface.DeviceGetCurrentClockFreqs was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCurrentClockFreqs.Lock() + mock.calls.DeviceGetCurrentClockFreqs = append(mock.calls.DeviceGetCurrentClockFreqs, callInfo) + mock.lockDeviceGetCurrentClockFreqs.Unlock() + return mock.DeviceGetCurrentClockFreqsFunc(device) +} + +// DeviceGetCurrentClockFreqsCalls gets all the calls that were made to DeviceGetCurrentClockFreqs. +// Check the length with: +// +// len(mockedInterface.DeviceGetCurrentClockFreqsCalls()) +func (mock *Interface) DeviceGetCurrentClockFreqsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCurrentClockFreqs.RLock() + calls = mock.calls.DeviceGetCurrentClockFreqs + mock.lockDeviceGetCurrentClockFreqs.RUnlock() + return calls +} + // DeviceGetCurrentClocksEventReasons calls DeviceGetCurrentClocksEventReasonsFunc. func (mock *Interface) DeviceGetCurrentClocksEventReasons(device nvml.Device) (uint64, nvml.Return) { if mock.DeviceGetCurrentClocksEventReasonsFunc == nil { @@ -5944,6 +6624,38 @@ func (mock *Interface) DeviceGetDisplayModeCalls() []struct { return calls } +// DeviceGetDramEncryptionMode calls DeviceGetDramEncryptionModeFunc. +func (mock *Interface) DeviceGetDramEncryptionMode(device nvml.Device) (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { + if mock.DeviceGetDramEncryptionModeFunc == nil { + panic("Interface.DeviceGetDramEncryptionModeFunc: method is nil but Interface.DeviceGetDramEncryptionMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDramEncryptionMode.Lock() + mock.calls.DeviceGetDramEncryptionMode = append(mock.calls.DeviceGetDramEncryptionMode, callInfo) + mock.lockDeviceGetDramEncryptionMode.Unlock() + return mock.DeviceGetDramEncryptionModeFunc(device) +} + +// DeviceGetDramEncryptionModeCalls gets all the calls that were made to DeviceGetDramEncryptionMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetDramEncryptionModeCalls()) +func (mock *Interface) DeviceGetDramEncryptionModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDramEncryptionMode.RLock() + calls = mock.calls.DeviceGetDramEncryptionMode + mock.lockDeviceGetDramEncryptionMode.RUnlock() + return calls +} + // DeviceGetDriverModel calls DeviceGetDriverModelFunc. func (mock *Interface) DeviceGetDriverModel(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { if mock.DeviceGetDriverModelFunc == nil { @@ -5976,6 +6688,38 @@ func (mock *Interface) DeviceGetDriverModelCalls() []struct { return calls } +// DeviceGetDriverModel_v2 calls DeviceGetDriverModel_v2Func. +func (mock *Interface) DeviceGetDriverModel_v2(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { + if mock.DeviceGetDriverModel_v2Func == nil { + panic("Interface.DeviceGetDriverModel_v2Func: method is nil but Interface.DeviceGetDriverModel_v2 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDriverModel_v2.Lock() + mock.calls.DeviceGetDriverModel_v2 = append(mock.calls.DeviceGetDriverModel_v2, callInfo) + mock.lockDeviceGetDriverModel_v2.Unlock() + return mock.DeviceGetDriverModel_v2Func(device) +} + +// DeviceGetDriverModel_v2Calls gets all the calls that were made to DeviceGetDriverModel_v2. +// Check the length with: +// +// len(mockedInterface.DeviceGetDriverModel_v2Calls()) +func (mock *Interface) DeviceGetDriverModel_v2Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDriverModel_v2.RLock() + calls = mock.calls.DeviceGetDriverModel_v2 + mock.lockDeviceGetDriverModel_v2.RUnlock() + return calls +} + // DeviceGetDynamicPstatesInfo calls DeviceGetDynamicPstatesInfoFunc. func (mock *Interface) DeviceGetDynamicPstatesInfo(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) { if mock.DeviceGetDynamicPstatesInfoFunc == nil { @@ -6336,6 +7080,38 @@ func (mock *Interface) DeviceGetFanSpeedCalls() []struct { return calls } +// DeviceGetFanSpeedRPM calls DeviceGetFanSpeedRPMFunc. +func (mock *Interface) DeviceGetFanSpeedRPM(device nvml.Device) (nvml.FanSpeedInfo, nvml.Return) { + if mock.DeviceGetFanSpeedRPMFunc == nil { + panic("Interface.DeviceGetFanSpeedRPMFunc: method is nil but Interface.DeviceGetFanSpeedRPM was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetFanSpeedRPM.Lock() + mock.calls.DeviceGetFanSpeedRPM = append(mock.calls.DeviceGetFanSpeedRPM, callInfo) + mock.lockDeviceGetFanSpeedRPM.Unlock() + return mock.DeviceGetFanSpeedRPMFunc(device) +} + +// DeviceGetFanSpeedRPMCalls gets all the calls that were made to DeviceGetFanSpeedRPM. +// Check the length with: +// +// len(mockedInterface.DeviceGetFanSpeedRPMCalls()) +func (mock *Interface) DeviceGetFanSpeedRPMCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetFanSpeedRPM.RLock() + calls = mock.calls.DeviceGetFanSpeedRPM + mock.lockDeviceGetFanSpeedRPM.RUnlock() + return calls +} + // DeviceGetFanSpeed_v2 calls DeviceGetFanSpeed_v2Func. func (mock *Interface) DeviceGetFanSpeed_v2(device nvml.Device, n int) (uint32, nvml.Return) { if mock.DeviceGetFanSpeed_v2Func == nil { @@ -7104,6 +7880,38 @@ func (mock *Interface) DeviceGetHandleByUUIDCalls() []struct { return calls } +// DeviceGetHandleByUUIDV calls DeviceGetHandleByUUIDVFunc. +func (mock *Interface) DeviceGetHandleByUUIDV(uUID *nvml.UUID) (nvml.Device, nvml.Return) { + if mock.DeviceGetHandleByUUIDVFunc == nil { + panic("Interface.DeviceGetHandleByUUIDVFunc: method is nil but Interface.DeviceGetHandleByUUIDV was just called") + } + callInfo := struct { + UUID *nvml.UUID + }{ + UUID: uUID, + } + mock.lockDeviceGetHandleByUUIDV.Lock() + mock.calls.DeviceGetHandleByUUIDV = append(mock.calls.DeviceGetHandleByUUIDV, callInfo) + mock.lockDeviceGetHandleByUUIDV.Unlock() + return mock.DeviceGetHandleByUUIDVFunc(uUID) +} + +// DeviceGetHandleByUUIDVCalls gets all the calls that were made to DeviceGetHandleByUUIDV. +// Check the length with: +// +// len(mockedInterface.DeviceGetHandleByUUIDVCalls()) +func (mock *Interface) DeviceGetHandleByUUIDVCalls() []struct { + UUID *nvml.UUID +} { + var calls []struct { + UUID *nvml.UUID + } + mock.lockDeviceGetHandleByUUIDV.RLock() + calls = mock.calls.DeviceGetHandleByUUIDV + mock.lockDeviceGetHandleByUUIDV.RUnlock() + return calls +} + // DeviceGetHostVgpuMode calls DeviceGetHostVgpuModeFunc. func (mock *Interface) DeviceGetHostVgpuMode(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) { if mock.DeviceGetHostVgpuModeFunc == nil { @@ -7396,6 +8204,38 @@ func (mock *Interface) DeviceGetMPSComputeRunningProcessesCalls() []struct { return calls } +// DeviceGetMarginTemperature calls DeviceGetMarginTemperatureFunc. +func (mock *Interface) DeviceGetMarginTemperature(device nvml.Device) (nvml.MarginTemperature, nvml.Return) { + if mock.DeviceGetMarginTemperatureFunc == nil { + panic("Interface.DeviceGetMarginTemperatureFunc: method is nil but Interface.DeviceGetMarginTemperature was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMarginTemperature.Lock() + mock.calls.DeviceGetMarginTemperature = append(mock.calls.DeviceGetMarginTemperature, callInfo) + mock.lockDeviceGetMarginTemperature.Unlock() + return mock.DeviceGetMarginTemperatureFunc(device) +} + +// DeviceGetMarginTemperatureCalls gets all the calls that were made to DeviceGetMarginTemperature. +// Check the length with: +// +// len(mockedInterface.DeviceGetMarginTemperatureCalls()) +func (mock *Interface) DeviceGetMarginTemperatureCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMarginTemperature.RLock() + calls = mock.calls.DeviceGetMarginTemperature + mock.lockDeviceGetMarginTemperature.RUnlock() + return calls +} + // DeviceGetMaxClockInfo calls DeviceGetMaxClockInfoFunc. func (mock *Interface) DeviceGetMaxClockInfo(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { if mock.DeviceGetMaxClockInfoFunc == nil { @@ -8476,6 +9316,70 @@ func (mock *Interface) DeviceGetNvLinkVersionCalls() []struct { return calls } +// DeviceGetNvlinkBwMode calls DeviceGetNvlinkBwModeFunc. +func (mock *Interface) DeviceGetNvlinkBwMode(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) { + if mock.DeviceGetNvlinkBwModeFunc == nil { + panic("Interface.DeviceGetNvlinkBwModeFunc: method is nil but Interface.DeviceGetNvlinkBwMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNvlinkBwMode.Lock() + mock.calls.DeviceGetNvlinkBwMode = append(mock.calls.DeviceGetNvlinkBwMode, callInfo) + mock.lockDeviceGetNvlinkBwMode.Unlock() + return mock.DeviceGetNvlinkBwModeFunc(device) +} + +// DeviceGetNvlinkBwModeCalls gets all the calls that were made to DeviceGetNvlinkBwMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvlinkBwModeCalls()) +func (mock *Interface) DeviceGetNvlinkBwModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNvlinkBwMode.RLock() + calls = mock.calls.DeviceGetNvlinkBwMode + mock.lockDeviceGetNvlinkBwMode.RUnlock() + return calls +} + +// DeviceGetNvlinkSupportedBwModes calls DeviceGetNvlinkSupportedBwModesFunc. +func (mock *Interface) DeviceGetNvlinkSupportedBwModes(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) { + if mock.DeviceGetNvlinkSupportedBwModesFunc == nil { + panic("Interface.DeviceGetNvlinkSupportedBwModesFunc: method is nil but Interface.DeviceGetNvlinkSupportedBwModes was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNvlinkSupportedBwModes.Lock() + mock.calls.DeviceGetNvlinkSupportedBwModes = append(mock.calls.DeviceGetNvlinkSupportedBwModes, callInfo) + mock.lockDeviceGetNvlinkSupportedBwModes.Unlock() + return mock.DeviceGetNvlinkSupportedBwModesFunc(device) +} + +// DeviceGetNvlinkSupportedBwModesCalls gets all the calls that were made to DeviceGetNvlinkSupportedBwModes. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvlinkSupportedBwModesCalls()) +func (mock *Interface) DeviceGetNvlinkSupportedBwModesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNvlinkSupportedBwModes.RLock() + calls = mock.calls.DeviceGetNvlinkSupportedBwModes + mock.lockDeviceGetNvlinkSupportedBwModes.RUnlock() + return calls +} + // DeviceGetOfaUtilization calls DeviceGetOfaUtilizationFunc. func (mock *Interface) DeviceGetOfaUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { if mock.DeviceGetOfaUtilizationFunc == nil { @@ -8744,6 +9648,38 @@ func (mock *Interface) DeviceGetPcieThroughputCalls() []struct { return calls } +// DeviceGetPerformanceModes calls DeviceGetPerformanceModesFunc. +func (mock *Interface) DeviceGetPerformanceModes(device nvml.Device) (nvml.DevicePerfModes, nvml.Return) { + if mock.DeviceGetPerformanceModesFunc == nil { + panic("Interface.DeviceGetPerformanceModesFunc: method is nil but Interface.DeviceGetPerformanceModes was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPerformanceModes.Lock() + mock.calls.DeviceGetPerformanceModes = append(mock.calls.DeviceGetPerformanceModes, callInfo) + mock.lockDeviceGetPerformanceModes.Unlock() + return mock.DeviceGetPerformanceModesFunc(device) +} + +// DeviceGetPerformanceModesCalls gets all the calls that were made to DeviceGetPerformanceModes. +// Check the length with: +// +// len(mockedInterface.DeviceGetPerformanceModesCalls()) +func (mock *Interface) DeviceGetPerformanceModesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPerformanceModes.RLock() + calls = mock.calls.DeviceGetPerformanceModes + mock.lockDeviceGetPerformanceModes.RUnlock() + return calls +} + // DeviceGetPerformanceState calls DeviceGetPerformanceStateFunc. func (mock *Interface) DeviceGetPerformanceState(device nvml.Device) (nvml.Pstates, nvml.Return) { if mock.DeviceGetPerformanceStateFunc == nil { @@ -8840,6 +9776,38 @@ func (mock *Interface) DeviceGetPgpuMetadataStringCalls() []struct { return calls } +// DeviceGetPlatformInfo calls DeviceGetPlatformInfoFunc. +func (mock *Interface) DeviceGetPlatformInfo(device nvml.Device) (nvml.PlatformInfo, nvml.Return) { + if mock.DeviceGetPlatformInfoFunc == nil { + panic("Interface.DeviceGetPlatformInfoFunc: method is nil but Interface.DeviceGetPlatformInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPlatformInfo.Lock() + mock.calls.DeviceGetPlatformInfo = append(mock.calls.DeviceGetPlatformInfo, callInfo) + mock.lockDeviceGetPlatformInfo.Unlock() + return mock.DeviceGetPlatformInfoFunc(device) +} + +// DeviceGetPlatformInfoCalls gets all the calls that were made to DeviceGetPlatformInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetPlatformInfoCalls()) +func (mock *Interface) DeviceGetPlatformInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPlatformInfo.RLock() + calls = mock.calls.DeviceGetPlatformInfo + mock.lockDeviceGetPlatformInfo.RUnlock() + return calls +} + // DeviceGetPowerManagementDefaultLimit calls DeviceGetPowerManagementDefaultLimitFunc. func (mock *Interface) DeviceGetPowerManagementDefaultLimit(device nvml.Device) (uint32, nvml.Return) { if mock.DeviceGetPowerManagementDefaultLimitFunc == nil { @@ -9772,6 +10740,38 @@ func (mock *Interface) DeviceGetTemperatureThresholdCalls() []struct { return calls } +// DeviceGetTemperatureV calls DeviceGetTemperatureVFunc. +func (mock *Interface) DeviceGetTemperatureV(device nvml.Device) nvml.TemperatureHandler { + if mock.DeviceGetTemperatureVFunc == nil { + panic("Interface.DeviceGetTemperatureVFunc: method is nil but Interface.DeviceGetTemperatureV was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetTemperatureV.Lock() + mock.calls.DeviceGetTemperatureV = append(mock.calls.DeviceGetTemperatureV, callInfo) + mock.lockDeviceGetTemperatureV.Unlock() + return mock.DeviceGetTemperatureVFunc(device) +} + +// DeviceGetTemperatureVCalls gets all the calls that were made to DeviceGetTemperatureV. +// Check the length with: +// +// len(mockedInterface.DeviceGetTemperatureVCalls()) +func (mock *Interface) DeviceGetTemperatureVCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetTemperatureV.RLock() + calls = mock.calls.DeviceGetTemperatureV + mock.lockDeviceGetTemperatureV.RUnlock() + return calls +} + // DeviceGetThermalSettings calls DeviceGetThermalSettingsFunc. func (mock *Interface) DeviceGetThermalSettings(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) { if mock.DeviceGetThermalSettingsFunc == nil { @@ -10624,6 +11624,114 @@ func (mock *Interface) DeviceOnSameBoardCalls() []struct { return calls } +// DevicePowerSmoothingActivatePresetProfile calls DevicePowerSmoothingActivatePresetProfileFunc. +func (mock *Interface) DevicePowerSmoothingActivatePresetProfile(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { + if mock.DevicePowerSmoothingActivatePresetProfileFunc == nil { + panic("Interface.DevicePowerSmoothingActivatePresetProfileFunc: method is nil but Interface.DevicePowerSmoothingActivatePresetProfile was just called") + } + callInfo := struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile + }{ + Device: device, + PowerSmoothingProfile: powerSmoothingProfile, + } + mock.lockDevicePowerSmoothingActivatePresetProfile.Lock() + mock.calls.DevicePowerSmoothingActivatePresetProfile = append(mock.calls.DevicePowerSmoothingActivatePresetProfile, callInfo) + mock.lockDevicePowerSmoothingActivatePresetProfile.Unlock() + return mock.DevicePowerSmoothingActivatePresetProfileFunc(device, powerSmoothingProfile) +} + +// DevicePowerSmoothingActivatePresetProfileCalls gets all the calls that were made to DevicePowerSmoothingActivatePresetProfile. +// Check the length with: +// +// len(mockedInterface.DevicePowerSmoothingActivatePresetProfileCalls()) +func (mock *Interface) DevicePowerSmoothingActivatePresetProfileCalls() []struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile +} { + var calls []struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + mock.lockDevicePowerSmoothingActivatePresetProfile.RLock() + calls = mock.calls.DevicePowerSmoothingActivatePresetProfile + mock.lockDevicePowerSmoothingActivatePresetProfile.RUnlock() + return calls +} + +// DevicePowerSmoothingSetState calls DevicePowerSmoothingSetStateFunc. +func (mock *Interface) DevicePowerSmoothingSetState(device nvml.Device, powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { + if mock.DevicePowerSmoothingSetStateFunc == nil { + panic("Interface.DevicePowerSmoothingSetStateFunc: method is nil but Interface.DevicePowerSmoothingSetState was just called") + } + callInfo := struct { + Device nvml.Device + PowerSmoothingState *nvml.PowerSmoothingState + }{ + Device: device, + PowerSmoothingState: powerSmoothingState, + } + mock.lockDevicePowerSmoothingSetState.Lock() + mock.calls.DevicePowerSmoothingSetState = append(mock.calls.DevicePowerSmoothingSetState, callInfo) + mock.lockDevicePowerSmoothingSetState.Unlock() + return mock.DevicePowerSmoothingSetStateFunc(device, powerSmoothingState) +} + +// DevicePowerSmoothingSetStateCalls gets all the calls that were made to DevicePowerSmoothingSetState. +// Check the length with: +// +// len(mockedInterface.DevicePowerSmoothingSetStateCalls()) +func (mock *Interface) DevicePowerSmoothingSetStateCalls() []struct { + Device nvml.Device + PowerSmoothingState *nvml.PowerSmoothingState +} { + var calls []struct { + Device nvml.Device + PowerSmoothingState *nvml.PowerSmoothingState + } + mock.lockDevicePowerSmoothingSetState.RLock() + calls = mock.calls.DevicePowerSmoothingSetState + mock.lockDevicePowerSmoothingSetState.RUnlock() + return calls +} + +// DevicePowerSmoothingUpdatePresetProfileParam calls DevicePowerSmoothingUpdatePresetProfileParamFunc. +func (mock *Interface) DevicePowerSmoothingUpdatePresetProfileParam(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { + if mock.DevicePowerSmoothingUpdatePresetProfileParamFunc == nil { + panic("Interface.DevicePowerSmoothingUpdatePresetProfileParamFunc: method is nil but Interface.DevicePowerSmoothingUpdatePresetProfileParam was just called") + } + callInfo := struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile + }{ + Device: device, + PowerSmoothingProfile: powerSmoothingProfile, + } + mock.lockDevicePowerSmoothingUpdatePresetProfileParam.Lock() + mock.calls.DevicePowerSmoothingUpdatePresetProfileParam = append(mock.calls.DevicePowerSmoothingUpdatePresetProfileParam, callInfo) + mock.lockDevicePowerSmoothingUpdatePresetProfileParam.Unlock() + return mock.DevicePowerSmoothingUpdatePresetProfileParamFunc(device, powerSmoothingProfile) +} + +// DevicePowerSmoothingUpdatePresetProfileParamCalls gets all the calls that were made to DevicePowerSmoothingUpdatePresetProfileParam. +// Check the length with: +// +// len(mockedInterface.DevicePowerSmoothingUpdatePresetProfileParamCalls()) +func (mock *Interface) DevicePowerSmoothingUpdatePresetProfileParamCalls() []struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile +} { + var calls []struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + mock.lockDevicePowerSmoothingUpdatePresetProfileParam.RLock() + calls = mock.calls.DevicePowerSmoothingUpdatePresetProfileParam + mock.lockDevicePowerSmoothingUpdatePresetProfileParam.RUnlock() + return calls +} + // DeviceQueryDrainState calls DeviceQueryDrainStateFunc. func (mock *Interface) DeviceQueryDrainState(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) { if mock.DeviceQueryDrainStateFunc == nil { @@ -11092,6 +12200,42 @@ func (mock *Interface) DeviceSetAutoBoostedClocksEnabledCalls() []struct { return calls } +// DeviceSetClockOffsets calls DeviceSetClockOffsetsFunc. +func (mock *Interface) DeviceSetClockOffsets(device nvml.Device, clockOffset nvml.ClockOffset) nvml.Return { + if mock.DeviceSetClockOffsetsFunc == nil { + panic("Interface.DeviceSetClockOffsetsFunc: method is nil but Interface.DeviceSetClockOffsets was just called") + } + callInfo := struct { + Device nvml.Device + ClockOffset nvml.ClockOffset + }{ + Device: device, + ClockOffset: clockOffset, + } + mock.lockDeviceSetClockOffsets.Lock() + mock.calls.DeviceSetClockOffsets = append(mock.calls.DeviceSetClockOffsets, callInfo) + mock.lockDeviceSetClockOffsets.Unlock() + return mock.DeviceSetClockOffsetsFunc(device, clockOffset) +} + +// DeviceSetClockOffsetsCalls gets all the calls that were made to DeviceSetClockOffsets. +// Check the length with: +// +// len(mockedInterface.DeviceSetClockOffsetsCalls()) +func (mock *Interface) DeviceSetClockOffsetsCalls() []struct { + Device nvml.Device + ClockOffset nvml.ClockOffset +} { + var calls []struct { + Device nvml.Device + ClockOffset nvml.ClockOffset + } + mock.lockDeviceSetClockOffsets.RLock() + calls = mock.calls.DeviceSetClockOffsets + mock.lockDeviceSetClockOffsets.RUnlock() + return calls +} + // DeviceSetComputeMode calls DeviceSetComputeModeFunc. func (mock *Interface) DeviceSetComputeMode(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return { if mock.DeviceSetComputeModeFunc == nil { @@ -11272,6 +12416,42 @@ func (mock *Interface) DeviceSetDefaultFanSpeed_v2Calls() []struct { return calls } +// DeviceSetDramEncryptionMode calls DeviceSetDramEncryptionModeFunc. +func (mock *Interface) DeviceSetDramEncryptionMode(device nvml.Device, dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { + if mock.DeviceSetDramEncryptionModeFunc == nil { + panic("Interface.DeviceSetDramEncryptionModeFunc: method is nil but Interface.DeviceSetDramEncryptionMode was just called") + } + callInfo := struct { + Device nvml.Device + DramEncryptionInfo *nvml.DramEncryptionInfo + }{ + Device: device, + DramEncryptionInfo: dramEncryptionInfo, + } + mock.lockDeviceSetDramEncryptionMode.Lock() + mock.calls.DeviceSetDramEncryptionMode = append(mock.calls.DeviceSetDramEncryptionMode, callInfo) + mock.lockDeviceSetDramEncryptionMode.Unlock() + return mock.DeviceSetDramEncryptionModeFunc(device, dramEncryptionInfo) +} + +// DeviceSetDramEncryptionModeCalls gets all the calls that were made to DeviceSetDramEncryptionMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetDramEncryptionModeCalls()) +func (mock *Interface) DeviceSetDramEncryptionModeCalls() []struct { + Device nvml.Device + DramEncryptionInfo *nvml.DramEncryptionInfo +} { + var calls []struct { + Device nvml.Device + DramEncryptionInfo *nvml.DramEncryptionInfo + } + mock.lockDeviceSetDramEncryptionMode.RLock() + calls = mock.calls.DeviceSetDramEncryptionMode + mock.lockDeviceSetDramEncryptionMode.RUnlock() + return calls +} + // DeviceSetDriverModel calls DeviceSetDriverModelFunc. func (mock *Interface) DeviceSetDriverModel(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return { if mock.DeviceSetDriverModelFunc == nil { @@ -11736,6 +12916,42 @@ func (mock *Interface) DeviceSetNvLinkUtilizationControlCalls() []struct { return calls } +// DeviceSetNvlinkBwMode calls DeviceSetNvlinkBwModeFunc. +func (mock *Interface) DeviceSetNvlinkBwMode(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { + if mock.DeviceSetNvlinkBwModeFunc == nil { + panic("Interface.DeviceSetNvlinkBwModeFunc: method is nil but Interface.DeviceSetNvlinkBwMode was just called") + } + callInfo := struct { + Device nvml.Device + NvlinkSetBwMode *nvml.NvlinkSetBwMode + }{ + Device: device, + NvlinkSetBwMode: nvlinkSetBwMode, + } + mock.lockDeviceSetNvlinkBwMode.Lock() + mock.calls.DeviceSetNvlinkBwMode = append(mock.calls.DeviceSetNvlinkBwMode, callInfo) + mock.lockDeviceSetNvlinkBwMode.Unlock() + return mock.DeviceSetNvlinkBwModeFunc(device, nvlinkSetBwMode) +} + +// DeviceSetNvlinkBwModeCalls gets all the calls that were made to DeviceSetNvlinkBwMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetNvlinkBwModeCalls()) +func (mock *Interface) DeviceSetNvlinkBwModeCalls() []struct { + Device nvml.Device + NvlinkSetBwMode *nvml.NvlinkSetBwMode +} { + var calls []struct { + Device nvml.Device + NvlinkSetBwMode *nvml.NvlinkSetBwMode + } + mock.lockDeviceSetNvlinkBwMode.RLock() + calls = mock.calls.DeviceSetNvlinkBwMode + mock.lockDeviceSetNvlinkBwMode.RUnlock() + return calls +} + // DeviceSetPersistenceMode calls DeviceSetPersistenceModeFunc. func (mock *Interface) DeviceSetPersistenceMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { if mock.DeviceSetPersistenceModeFunc == nil { @@ -12064,6 +13280,142 @@ func (mock *Interface) DeviceValidateInforomCalls() []struct { return calls } +// DeviceWorkloadPowerProfileClearRequestedProfiles calls DeviceWorkloadPowerProfileClearRequestedProfilesFunc. +func (mock *Interface) DeviceWorkloadPowerProfileClearRequestedProfiles(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { + if mock.DeviceWorkloadPowerProfileClearRequestedProfilesFunc == nil { + panic("Interface.DeviceWorkloadPowerProfileClearRequestedProfilesFunc: method is nil but Interface.DeviceWorkloadPowerProfileClearRequestedProfiles was just called") + } + callInfo := struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + }{ + Device: device, + WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, + } + mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.Lock() + mock.calls.DeviceWorkloadPowerProfileClearRequestedProfiles = append(mock.calls.DeviceWorkloadPowerProfileClearRequestedProfiles, callInfo) + mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.Unlock() + return mock.DeviceWorkloadPowerProfileClearRequestedProfilesFunc(device, workloadPowerProfileRequestedProfiles) +} + +// DeviceWorkloadPowerProfileClearRequestedProfilesCalls gets all the calls that were made to DeviceWorkloadPowerProfileClearRequestedProfiles. +// Check the length with: +// +// len(mockedInterface.DeviceWorkloadPowerProfileClearRequestedProfilesCalls()) +func (mock *Interface) DeviceWorkloadPowerProfileClearRequestedProfilesCalls() []struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles +} { + var calls []struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.RLock() + calls = mock.calls.DeviceWorkloadPowerProfileClearRequestedProfiles + mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.RUnlock() + return calls +} + +// DeviceWorkloadPowerProfileGetCurrentProfiles calls DeviceWorkloadPowerProfileGetCurrentProfilesFunc. +func (mock *Interface) DeviceWorkloadPowerProfileGetCurrentProfiles(device nvml.Device) (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { + if mock.DeviceWorkloadPowerProfileGetCurrentProfilesFunc == nil { + panic("Interface.DeviceWorkloadPowerProfileGetCurrentProfilesFunc: method is nil but Interface.DeviceWorkloadPowerProfileGetCurrentProfiles was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.Lock() + mock.calls.DeviceWorkloadPowerProfileGetCurrentProfiles = append(mock.calls.DeviceWorkloadPowerProfileGetCurrentProfiles, callInfo) + mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.Unlock() + return mock.DeviceWorkloadPowerProfileGetCurrentProfilesFunc(device) +} + +// DeviceWorkloadPowerProfileGetCurrentProfilesCalls gets all the calls that were made to DeviceWorkloadPowerProfileGetCurrentProfiles. +// Check the length with: +// +// len(mockedInterface.DeviceWorkloadPowerProfileGetCurrentProfilesCalls()) +func (mock *Interface) DeviceWorkloadPowerProfileGetCurrentProfilesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.RLock() + calls = mock.calls.DeviceWorkloadPowerProfileGetCurrentProfiles + mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.RUnlock() + return calls +} + +// DeviceWorkloadPowerProfileGetProfilesInfo calls DeviceWorkloadPowerProfileGetProfilesInfoFunc. +func (mock *Interface) DeviceWorkloadPowerProfileGetProfilesInfo(device nvml.Device) (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { + if mock.DeviceWorkloadPowerProfileGetProfilesInfoFunc == nil { + panic("Interface.DeviceWorkloadPowerProfileGetProfilesInfoFunc: method is nil but Interface.DeviceWorkloadPowerProfileGetProfilesInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.Lock() + mock.calls.DeviceWorkloadPowerProfileGetProfilesInfo = append(mock.calls.DeviceWorkloadPowerProfileGetProfilesInfo, callInfo) + mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.Unlock() + return mock.DeviceWorkloadPowerProfileGetProfilesInfoFunc(device) +} + +// DeviceWorkloadPowerProfileGetProfilesInfoCalls gets all the calls that were made to DeviceWorkloadPowerProfileGetProfilesInfo. +// Check the length with: +// +// len(mockedInterface.DeviceWorkloadPowerProfileGetProfilesInfoCalls()) +func (mock *Interface) DeviceWorkloadPowerProfileGetProfilesInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.RLock() + calls = mock.calls.DeviceWorkloadPowerProfileGetProfilesInfo + mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.RUnlock() + return calls +} + +// DeviceWorkloadPowerProfileSetRequestedProfiles calls DeviceWorkloadPowerProfileSetRequestedProfilesFunc. +func (mock *Interface) DeviceWorkloadPowerProfileSetRequestedProfiles(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { + if mock.DeviceWorkloadPowerProfileSetRequestedProfilesFunc == nil { + panic("Interface.DeviceWorkloadPowerProfileSetRequestedProfilesFunc: method is nil but Interface.DeviceWorkloadPowerProfileSetRequestedProfiles was just called") + } + callInfo := struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + }{ + Device: device, + WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, + } + mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.Lock() + mock.calls.DeviceWorkloadPowerProfileSetRequestedProfiles = append(mock.calls.DeviceWorkloadPowerProfileSetRequestedProfiles, callInfo) + mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.Unlock() + return mock.DeviceWorkloadPowerProfileSetRequestedProfilesFunc(device, workloadPowerProfileRequestedProfiles) +} + +// DeviceWorkloadPowerProfileSetRequestedProfilesCalls gets all the calls that were made to DeviceWorkloadPowerProfileSetRequestedProfiles. +// Check the length with: +// +// len(mockedInterface.DeviceWorkloadPowerProfileSetRequestedProfilesCalls()) +func (mock *Interface) DeviceWorkloadPowerProfileSetRequestedProfilesCalls() []struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles +} { + var calls []struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.RLock() + calls = mock.calls.DeviceWorkloadPowerProfileSetRequestedProfiles + mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.RUnlock() + return calls +} + // ErrorString calls ErrorStringFunc. func (mock *Interface) ErrorString(returnMoqParam nvml.Return) string { if mock.ErrorStringFunc == nil { @@ -12811,6 +14163,38 @@ func (mock *Interface) GpuInstanceDestroyCalls() []struct { return calls } +// GpuInstanceGetActiveVgpus calls GpuInstanceGetActiveVgpusFunc. +func (mock *Interface) GpuInstanceGetActiveVgpus(gpuInstance nvml.GpuInstance) (nvml.ActiveVgpuInstanceInfo, nvml.Return) { + if mock.GpuInstanceGetActiveVgpusFunc == nil { + panic("Interface.GpuInstanceGetActiveVgpusFunc: method is nil but Interface.GpuInstanceGetActiveVgpus was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetActiveVgpus.Lock() + mock.calls.GpuInstanceGetActiveVgpus = append(mock.calls.GpuInstanceGetActiveVgpus, callInfo) + mock.lockGpuInstanceGetActiveVgpus.Unlock() + return mock.GpuInstanceGetActiveVgpusFunc(gpuInstance) +} + +// GpuInstanceGetActiveVgpusCalls gets all the calls that were made to GpuInstanceGetActiveVgpus. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetActiveVgpusCalls()) +func (mock *Interface) GpuInstanceGetActiveVgpusCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetActiveVgpus.RLock() + calls = mock.calls.GpuInstanceGetActiveVgpus + mock.lockGpuInstanceGetActiveVgpus.RUnlock() + return calls +} + // GpuInstanceGetComputeInstanceById calls GpuInstanceGetComputeInstanceByIdFunc. func (mock *Interface) GpuInstanceGetComputeInstanceById(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) { if mock.GpuInstanceGetComputeInstanceByIdFunc == nil { @@ -13035,6 +14419,38 @@ func (mock *Interface) GpuInstanceGetComputeInstancesCalls() []struct { return calls } +// GpuInstanceGetCreatableVgpus calls GpuInstanceGetCreatableVgpusFunc. +func (mock *Interface) GpuInstanceGetCreatableVgpus(gpuInstance nvml.GpuInstance) (nvml.VgpuTypeIdInfo, nvml.Return) { + if mock.GpuInstanceGetCreatableVgpusFunc == nil { + panic("Interface.GpuInstanceGetCreatableVgpusFunc: method is nil but Interface.GpuInstanceGetCreatableVgpus was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetCreatableVgpus.Lock() + mock.calls.GpuInstanceGetCreatableVgpus = append(mock.calls.GpuInstanceGetCreatableVgpus, callInfo) + mock.lockGpuInstanceGetCreatableVgpus.Unlock() + return mock.GpuInstanceGetCreatableVgpusFunc(gpuInstance) +} + +// GpuInstanceGetCreatableVgpusCalls gets all the calls that were made to GpuInstanceGetCreatableVgpus. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetCreatableVgpusCalls()) +func (mock *Interface) GpuInstanceGetCreatableVgpusCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetCreatableVgpus.RLock() + calls = mock.calls.GpuInstanceGetCreatableVgpus + mock.lockGpuInstanceGetCreatableVgpus.RUnlock() + return calls +} + // GpuInstanceGetInfo calls GpuInstanceGetInfoFunc. func (mock *Interface) GpuInstanceGetInfo(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) { if mock.GpuInstanceGetInfoFunc == nil { @@ -13067,6 +14483,206 @@ func (mock *Interface) GpuInstanceGetInfoCalls() []struct { return calls } +// GpuInstanceGetVgpuHeterogeneousMode calls GpuInstanceGetVgpuHeterogeneousModeFunc. +func (mock *Interface) GpuInstanceGetVgpuHeterogeneousMode(gpuInstance nvml.GpuInstance) (nvml.VgpuHeterogeneousMode, nvml.Return) { + if mock.GpuInstanceGetVgpuHeterogeneousModeFunc == nil { + panic("Interface.GpuInstanceGetVgpuHeterogeneousModeFunc: method is nil but Interface.GpuInstanceGetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetVgpuHeterogeneousMode.Lock() + mock.calls.GpuInstanceGetVgpuHeterogeneousMode = append(mock.calls.GpuInstanceGetVgpuHeterogeneousMode, callInfo) + mock.lockGpuInstanceGetVgpuHeterogeneousMode.Unlock() + return mock.GpuInstanceGetVgpuHeterogeneousModeFunc(gpuInstance) +} + +// GpuInstanceGetVgpuHeterogeneousModeCalls gets all the calls that were made to GpuInstanceGetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetVgpuHeterogeneousModeCalls()) +func (mock *Interface) GpuInstanceGetVgpuHeterogeneousModeCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetVgpuHeterogeneousMode.RLock() + calls = mock.calls.GpuInstanceGetVgpuHeterogeneousMode + mock.lockGpuInstanceGetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// GpuInstanceGetVgpuSchedulerLog calls GpuInstanceGetVgpuSchedulerLogFunc. +func (mock *Interface) GpuInstanceGetVgpuSchedulerLog(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerLogInfo, nvml.Return) { + if mock.GpuInstanceGetVgpuSchedulerLogFunc == nil { + panic("Interface.GpuInstanceGetVgpuSchedulerLogFunc: method is nil but Interface.GpuInstanceGetVgpuSchedulerLog was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetVgpuSchedulerLog.Lock() + mock.calls.GpuInstanceGetVgpuSchedulerLog = append(mock.calls.GpuInstanceGetVgpuSchedulerLog, callInfo) + mock.lockGpuInstanceGetVgpuSchedulerLog.Unlock() + return mock.GpuInstanceGetVgpuSchedulerLogFunc(gpuInstance) +} + +// GpuInstanceGetVgpuSchedulerLogCalls gets all the calls that were made to GpuInstanceGetVgpuSchedulerLog. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetVgpuSchedulerLogCalls()) +func (mock *Interface) GpuInstanceGetVgpuSchedulerLogCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetVgpuSchedulerLog.RLock() + calls = mock.calls.GpuInstanceGetVgpuSchedulerLog + mock.lockGpuInstanceGetVgpuSchedulerLog.RUnlock() + return calls +} + +// GpuInstanceGetVgpuSchedulerState calls GpuInstanceGetVgpuSchedulerStateFunc. +func (mock *Interface) GpuInstanceGetVgpuSchedulerState(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerStateInfo, nvml.Return) { + if mock.GpuInstanceGetVgpuSchedulerStateFunc == nil { + panic("Interface.GpuInstanceGetVgpuSchedulerStateFunc: method is nil but Interface.GpuInstanceGetVgpuSchedulerState was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetVgpuSchedulerState.Lock() + mock.calls.GpuInstanceGetVgpuSchedulerState = append(mock.calls.GpuInstanceGetVgpuSchedulerState, callInfo) + mock.lockGpuInstanceGetVgpuSchedulerState.Unlock() + return mock.GpuInstanceGetVgpuSchedulerStateFunc(gpuInstance) +} + +// GpuInstanceGetVgpuSchedulerStateCalls gets all the calls that were made to GpuInstanceGetVgpuSchedulerState. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetVgpuSchedulerStateCalls()) +func (mock *Interface) GpuInstanceGetVgpuSchedulerStateCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetVgpuSchedulerState.RLock() + calls = mock.calls.GpuInstanceGetVgpuSchedulerState + mock.lockGpuInstanceGetVgpuSchedulerState.RUnlock() + return calls +} + +// GpuInstanceGetVgpuTypeCreatablePlacements calls GpuInstanceGetVgpuTypeCreatablePlacementsFunc. +func (mock *Interface) GpuInstanceGetVgpuTypeCreatablePlacements(gpuInstance nvml.GpuInstance) (nvml.VgpuCreatablePlacementInfo, nvml.Return) { + if mock.GpuInstanceGetVgpuTypeCreatablePlacementsFunc == nil { + panic("Interface.GpuInstanceGetVgpuTypeCreatablePlacementsFunc: method is nil but Interface.GpuInstanceGetVgpuTypeCreatablePlacements was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.Lock() + mock.calls.GpuInstanceGetVgpuTypeCreatablePlacements = append(mock.calls.GpuInstanceGetVgpuTypeCreatablePlacements, callInfo) + mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.Unlock() + return mock.GpuInstanceGetVgpuTypeCreatablePlacementsFunc(gpuInstance) +} + +// GpuInstanceGetVgpuTypeCreatablePlacementsCalls gets all the calls that were made to GpuInstanceGetVgpuTypeCreatablePlacements. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetVgpuTypeCreatablePlacementsCalls()) +func (mock *Interface) GpuInstanceGetVgpuTypeCreatablePlacementsCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.RLock() + calls = mock.calls.GpuInstanceGetVgpuTypeCreatablePlacements + mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.RUnlock() + return calls +} + +// GpuInstanceSetVgpuHeterogeneousMode calls GpuInstanceSetVgpuHeterogeneousModeFunc. +func (mock *Interface) GpuInstanceSetVgpuHeterogeneousMode(gpuInstance nvml.GpuInstance, vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { + if mock.GpuInstanceSetVgpuHeterogeneousModeFunc == nil { + panic("Interface.GpuInstanceSetVgpuHeterogeneousModeFunc: method is nil but Interface.GpuInstanceSetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + }{ + GpuInstance: gpuInstance, + VgpuHeterogeneousMode: vgpuHeterogeneousMode, + } + mock.lockGpuInstanceSetVgpuHeterogeneousMode.Lock() + mock.calls.GpuInstanceSetVgpuHeterogeneousMode = append(mock.calls.GpuInstanceSetVgpuHeterogeneousMode, callInfo) + mock.lockGpuInstanceSetVgpuHeterogeneousMode.Unlock() + return mock.GpuInstanceSetVgpuHeterogeneousModeFunc(gpuInstance, vgpuHeterogeneousMode) +} + +// GpuInstanceSetVgpuHeterogeneousModeCalls gets all the calls that were made to GpuInstanceSetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedInterface.GpuInstanceSetVgpuHeterogeneousModeCalls()) +func (mock *Interface) GpuInstanceSetVgpuHeterogeneousModeCalls() []struct { + GpuInstance nvml.GpuInstance + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode +} { + var calls []struct { + GpuInstance nvml.GpuInstance + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + } + mock.lockGpuInstanceSetVgpuHeterogeneousMode.RLock() + calls = mock.calls.GpuInstanceSetVgpuHeterogeneousMode + mock.lockGpuInstanceSetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// GpuInstanceSetVgpuSchedulerState calls GpuInstanceSetVgpuSchedulerStateFunc. +func (mock *Interface) GpuInstanceSetVgpuSchedulerState(gpuInstance nvml.GpuInstance, vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { + if mock.GpuInstanceSetVgpuSchedulerStateFunc == nil { + panic("Interface.GpuInstanceSetVgpuSchedulerStateFunc: method is nil but Interface.GpuInstanceSetVgpuSchedulerState was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + VgpuSchedulerState *nvml.VgpuSchedulerState + }{ + GpuInstance: gpuInstance, + VgpuSchedulerState: vgpuSchedulerState, + } + mock.lockGpuInstanceSetVgpuSchedulerState.Lock() + mock.calls.GpuInstanceSetVgpuSchedulerState = append(mock.calls.GpuInstanceSetVgpuSchedulerState, callInfo) + mock.lockGpuInstanceSetVgpuSchedulerState.Unlock() + return mock.GpuInstanceSetVgpuSchedulerStateFunc(gpuInstance, vgpuSchedulerState) +} + +// GpuInstanceSetVgpuSchedulerStateCalls gets all the calls that were made to GpuInstanceSetVgpuSchedulerState. +// Check the length with: +// +// len(mockedInterface.GpuInstanceSetVgpuSchedulerStateCalls()) +func (mock *Interface) GpuInstanceSetVgpuSchedulerStateCalls() []struct { + GpuInstance nvml.GpuInstance + VgpuSchedulerState *nvml.VgpuSchedulerState +} { + var calls []struct { + GpuInstance nvml.GpuInstance + VgpuSchedulerState *nvml.VgpuSchedulerState + } + mock.lockGpuInstanceSetVgpuSchedulerState.RLock() + calls = mock.calls.GpuInstanceSetVgpuSchedulerState + mock.lockGpuInstanceSetVgpuSchedulerState.RUnlock() + return calls +} + // Init calls InitFunc. func (mock *Interface) Init() nvml.Return { if mock.InitFunc == nil { @@ -13185,6 +14801,102 @@ func (mock *Interface) ShutdownCalls() []struct { return calls } +// SystemEventSetCreate calls SystemEventSetCreateFunc. +func (mock *Interface) SystemEventSetCreate(systemEventSetCreateRequest *nvml.SystemEventSetCreateRequest) nvml.Return { + if mock.SystemEventSetCreateFunc == nil { + panic("Interface.SystemEventSetCreateFunc: method is nil but Interface.SystemEventSetCreate was just called") + } + callInfo := struct { + SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest + }{ + SystemEventSetCreateRequest: systemEventSetCreateRequest, + } + mock.lockSystemEventSetCreate.Lock() + mock.calls.SystemEventSetCreate = append(mock.calls.SystemEventSetCreate, callInfo) + mock.lockSystemEventSetCreate.Unlock() + return mock.SystemEventSetCreateFunc(systemEventSetCreateRequest) +} + +// SystemEventSetCreateCalls gets all the calls that were made to SystemEventSetCreate. +// Check the length with: +// +// len(mockedInterface.SystemEventSetCreateCalls()) +func (mock *Interface) SystemEventSetCreateCalls() []struct { + SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest +} { + var calls []struct { + SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest + } + mock.lockSystemEventSetCreate.RLock() + calls = mock.calls.SystemEventSetCreate + mock.lockSystemEventSetCreate.RUnlock() + return calls +} + +// SystemEventSetFree calls SystemEventSetFreeFunc. +func (mock *Interface) SystemEventSetFree(systemEventSetFreeRequest *nvml.SystemEventSetFreeRequest) nvml.Return { + if mock.SystemEventSetFreeFunc == nil { + panic("Interface.SystemEventSetFreeFunc: method is nil but Interface.SystemEventSetFree was just called") + } + callInfo := struct { + SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest + }{ + SystemEventSetFreeRequest: systemEventSetFreeRequest, + } + mock.lockSystemEventSetFree.Lock() + mock.calls.SystemEventSetFree = append(mock.calls.SystemEventSetFree, callInfo) + mock.lockSystemEventSetFree.Unlock() + return mock.SystemEventSetFreeFunc(systemEventSetFreeRequest) +} + +// SystemEventSetFreeCalls gets all the calls that were made to SystemEventSetFree. +// Check the length with: +// +// len(mockedInterface.SystemEventSetFreeCalls()) +func (mock *Interface) SystemEventSetFreeCalls() []struct { + SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest +} { + var calls []struct { + SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest + } + mock.lockSystemEventSetFree.RLock() + calls = mock.calls.SystemEventSetFree + mock.lockSystemEventSetFree.RUnlock() + return calls +} + +// SystemEventSetWait calls SystemEventSetWaitFunc. +func (mock *Interface) SystemEventSetWait(systemEventSetWaitRequest *nvml.SystemEventSetWaitRequest) nvml.Return { + if mock.SystemEventSetWaitFunc == nil { + panic("Interface.SystemEventSetWaitFunc: method is nil but Interface.SystemEventSetWait was just called") + } + callInfo := struct { + SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest + }{ + SystemEventSetWaitRequest: systemEventSetWaitRequest, + } + mock.lockSystemEventSetWait.Lock() + mock.calls.SystemEventSetWait = append(mock.calls.SystemEventSetWait, callInfo) + mock.lockSystemEventSetWait.Unlock() + return mock.SystemEventSetWaitFunc(systemEventSetWaitRequest) +} + +// SystemEventSetWaitCalls gets all the calls that were made to SystemEventSetWait. +// Check the length with: +// +// len(mockedInterface.SystemEventSetWaitCalls()) +func (mock *Interface) SystemEventSetWaitCalls() []struct { + SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest +} { + var calls []struct { + SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest + } + mock.lockSystemEventSetWait.RLock() + calls = mock.calls.SystemEventSetWait + mock.lockSystemEventSetWait.RUnlock() + return calls +} + // SystemGetConfComputeCapabilities calls SystemGetConfComputeCapabilitiesFunc. func (mock *Interface) SystemGetConfComputeCapabilities() (nvml.ConfComputeSystemCaps, nvml.Return) { if mock.SystemGetConfComputeCapabilitiesFunc == nil { @@ -13212,6 +14924,33 @@ func (mock *Interface) SystemGetConfComputeCapabilitiesCalls() []struct { return calls } +// SystemGetConfComputeGpusReadyState calls SystemGetConfComputeGpusReadyStateFunc. +func (mock *Interface) SystemGetConfComputeGpusReadyState() (uint32, nvml.Return) { + if mock.SystemGetConfComputeGpusReadyStateFunc == nil { + panic("Interface.SystemGetConfComputeGpusReadyStateFunc: method is nil but Interface.SystemGetConfComputeGpusReadyState was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetConfComputeGpusReadyState.Lock() + mock.calls.SystemGetConfComputeGpusReadyState = append(mock.calls.SystemGetConfComputeGpusReadyState, callInfo) + mock.lockSystemGetConfComputeGpusReadyState.Unlock() + return mock.SystemGetConfComputeGpusReadyStateFunc() +} + +// SystemGetConfComputeGpusReadyStateCalls gets all the calls that were made to SystemGetConfComputeGpusReadyState. +// Check the length with: +// +// len(mockedInterface.SystemGetConfComputeGpusReadyStateCalls()) +func (mock *Interface) SystemGetConfComputeGpusReadyStateCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetConfComputeGpusReadyState.RLock() + calls = mock.calls.SystemGetConfComputeGpusReadyState + mock.lockSystemGetConfComputeGpusReadyState.RUnlock() + return calls +} + // SystemGetConfComputeKeyRotationThresholdInfo calls SystemGetConfComputeKeyRotationThresholdInfoFunc. func (mock *Interface) SystemGetConfComputeKeyRotationThresholdInfo() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) { if mock.SystemGetConfComputeKeyRotationThresholdInfoFunc == nil { @@ -13266,6 +15005,33 @@ func (mock *Interface) SystemGetConfComputeSettingsCalls() []struct { return calls } +// SystemGetConfComputeState calls SystemGetConfComputeStateFunc. +func (mock *Interface) SystemGetConfComputeState() (nvml.ConfComputeSystemState, nvml.Return) { + if mock.SystemGetConfComputeStateFunc == nil { + panic("Interface.SystemGetConfComputeStateFunc: method is nil but Interface.SystemGetConfComputeState was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetConfComputeState.Lock() + mock.calls.SystemGetConfComputeState = append(mock.calls.SystemGetConfComputeState, callInfo) + mock.lockSystemGetConfComputeState.Unlock() + return mock.SystemGetConfComputeStateFunc() +} + +// SystemGetConfComputeStateCalls gets all the calls that were made to SystemGetConfComputeState. +// Check the length with: +// +// len(mockedInterface.SystemGetConfComputeStateCalls()) +func (mock *Interface) SystemGetConfComputeStateCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetConfComputeState.RLock() + calls = mock.calls.SystemGetConfComputeState + mock.lockSystemGetConfComputeState.RUnlock() + return calls +} + // SystemGetCudaDriverVersion calls SystemGetCudaDriverVersionFunc. func (mock *Interface) SystemGetCudaDriverVersion() (int, nvml.Return) { if mock.SystemGetCudaDriverVersionFunc == nil { @@ -13320,6 +15086,33 @@ func (mock *Interface) SystemGetCudaDriverVersion_v2Calls() []struct { return calls } +// SystemGetDriverBranch calls SystemGetDriverBranchFunc. +func (mock *Interface) SystemGetDriverBranch() (nvml.SystemDriverBranchInfo, nvml.Return) { + if mock.SystemGetDriverBranchFunc == nil { + panic("Interface.SystemGetDriverBranchFunc: method is nil but Interface.SystemGetDriverBranch was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetDriverBranch.Lock() + mock.calls.SystemGetDriverBranch = append(mock.calls.SystemGetDriverBranch, callInfo) + mock.lockSystemGetDriverBranch.Unlock() + return mock.SystemGetDriverBranchFunc() +} + +// SystemGetDriverBranchCalls gets all the calls that were made to SystemGetDriverBranch. +// Check the length with: +// +// len(mockedInterface.SystemGetDriverBranchCalls()) +func (mock *Interface) SystemGetDriverBranchCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetDriverBranch.RLock() + calls = mock.calls.SystemGetDriverBranch + mock.lockSystemGetDriverBranch.RUnlock() + return calls +} + // SystemGetDriverVersion calls SystemGetDriverVersionFunc. func (mock *Interface) SystemGetDriverVersion() (string, nvml.Return) { if mock.SystemGetDriverVersionFunc == nil { @@ -13401,6 +15194,33 @@ func (mock *Interface) SystemGetNVMLVersionCalls() []struct { return calls } +// SystemGetNvlinkBwMode calls SystemGetNvlinkBwModeFunc. +func (mock *Interface) SystemGetNvlinkBwMode() (uint32, nvml.Return) { + if mock.SystemGetNvlinkBwModeFunc == nil { + panic("Interface.SystemGetNvlinkBwModeFunc: method is nil but Interface.SystemGetNvlinkBwMode was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetNvlinkBwMode.Lock() + mock.calls.SystemGetNvlinkBwMode = append(mock.calls.SystemGetNvlinkBwMode, callInfo) + mock.lockSystemGetNvlinkBwMode.Unlock() + return mock.SystemGetNvlinkBwModeFunc() +} + +// SystemGetNvlinkBwModeCalls gets all the calls that were made to SystemGetNvlinkBwMode. +// Check the length with: +// +// len(mockedInterface.SystemGetNvlinkBwModeCalls()) +func (mock *Interface) SystemGetNvlinkBwModeCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetNvlinkBwMode.RLock() + calls = mock.calls.SystemGetNvlinkBwMode + mock.lockSystemGetNvlinkBwMode.RUnlock() + return calls +} + // SystemGetProcessName calls SystemGetProcessNameFunc. func (mock *Interface) SystemGetProcessName(n int) (string, nvml.Return) { if mock.SystemGetProcessNameFunc == nil { @@ -13465,6 +15285,70 @@ func (mock *Interface) SystemGetTopologyGpuSetCalls() []struct { return calls } +// SystemRegisterEvents calls SystemRegisterEventsFunc. +func (mock *Interface) SystemRegisterEvents(systemRegisterEventRequest *nvml.SystemRegisterEventRequest) nvml.Return { + if mock.SystemRegisterEventsFunc == nil { + panic("Interface.SystemRegisterEventsFunc: method is nil but Interface.SystemRegisterEvents was just called") + } + callInfo := struct { + SystemRegisterEventRequest *nvml.SystemRegisterEventRequest + }{ + SystemRegisterEventRequest: systemRegisterEventRequest, + } + mock.lockSystemRegisterEvents.Lock() + mock.calls.SystemRegisterEvents = append(mock.calls.SystemRegisterEvents, callInfo) + mock.lockSystemRegisterEvents.Unlock() + return mock.SystemRegisterEventsFunc(systemRegisterEventRequest) +} + +// SystemRegisterEventsCalls gets all the calls that were made to SystemRegisterEvents. +// Check the length with: +// +// len(mockedInterface.SystemRegisterEventsCalls()) +func (mock *Interface) SystemRegisterEventsCalls() []struct { + SystemRegisterEventRequest *nvml.SystemRegisterEventRequest +} { + var calls []struct { + SystemRegisterEventRequest *nvml.SystemRegisterEventRequest + } + mock.lockSystemRegisterEvents.RLock() + calls = mock.calls.SystemRegisterEvents + mock.lockSystemRegisterEvents.RUnlock() + return calls +} + +// SystemSetConfComputeGpusReadyState calls SystemSetConfComputeGpusReadyStateFunc. +func (mock *Interface) SystemSetConfComputeGpusReadyState(v uint32) nvml.Return { + if mock.SystemSetConfComputeGpusReadyStateFunc == nil { + panic("Interface.SystemSetConfComputeGpusReadyStateFunc: method is nil but Interface.SystemSetConfComputeGpusReadyState was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockSystemSetConfComputeGpusReadyState.Lock() + mock.calls.SystemSetConfComputeGpusReadyState = append(mock.calls.SystemSetConfComputeGpusReadyState, callInfo) + mock.lockSystemSetConfComputeGpusReadyState.Unlock() + return mock.SystemSetConfComputeGpusReadyStateFunc(v) +} + +// SystemSetConfComputeGpusReadyStateCalls gets all the calls that were made to SystemSetConfComputeGpusReadyState. +// Check the length with: +// +// len(mockedInterface.SystemSetConfComputeGpusReadyStateCalls()) +func (mock *Interface) SystemSetConfComputeGpusReadyStateCalls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockSystemSetConfComputeGpusReadyState.RLock() + calls = mock.calls.SystemSetConfComputeGpusReadyState + mock.lockSystemSetConfComputeGpusReadyState.RUnlock() + return calls +} + // SystemSetConfComputeKeyRotationThresholdInfo calls SystemSetConfComputeKeyRotationThresholdInfoFunc. func (mock *Interface) SystemSetConfComputeKeyRotationThresholdInfo(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return { if mock.SystemSetConfComputeKeyRotationThresholdInfoFunc == nil { @@ -13497,6 +15381,38 @@ func (mock *Interface) SystemSetConfComputeKeyRotationThresholdInfoCalls() []str return calls } +// SystemSetNvlinkBwMode calls SystemSetNvlinkBwModeFunc. +func (mock *Interface) SystemSetNvlinkBwMode(v uint32) nvml.Return { + if mock.SystemSetNvlinkBwModeFunc == nil { + panic("Interface.SystemSetNvlinkBwModeFunc: method is nil but Interface.SystemSetNvlinkBwMode was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockSystemSetNvlinkBwMode.Lock() + mock.calls.SystemSetNvlinkBwMode = append(mock.calls.SystemSetNvlinkBwMode, callInfo) + mock.lockSystemSetNvlinkBwMode.Unlock() + return mock.SystemSetNvlinkBwModeFunc(v) +} + +// SystemSetNvlinkBwModeCalls gets all the calls that were made to SystemSetNvlinkBwMode. +// Check the length with: +// +// len(mockedInterface.SystemSetNvlinkBwModeCalls()) +func (mock *Interface) SystemSetNvlinkBwModeCalls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockSystemSetNvlinkBwMode.RLock() + calls = mock.calls.SystemSetNvlinkBwMode + mock.lockSystemSetNvlinkBwMode.RUnlock() + return calls +} + // UnitGetCount calls UnitGetCountFunc. func (mock *Interface) UnitGetCount() (int, nvml.Return) { if mock.UnitGetCountFunc == nil { @@ -14368,6 +16284,38 @@ func (mock *Interface) VgpuInstanceGetMetadataCalls() []struct { return calls } +// VgpuInstanceGetRuntimeStateSize calls VgpuInstanceGetRuntimeStateSizeFunc. +func (mock *Interface) VgpuInstanceGetRuntimeStateSize(vgpuInstance nvml.VgpuInstance) (nvml.VgpuRuntimeState, nvml.Return) { + if mock.VgpuInstanceGetRuntimeStateSizeFunc == nil { + panic("Interface.VgpuInstanceGetRuntimeStateSizeFunc: method is nil but Interface.VgpuInstanceGetRuntimeStateSize was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetRuntimeStateSize.Lock() + mock.calls.VgpuInstanceGetRuntimeStateSize = append(mock.calls.VgpuInstanceGetRuntimeStateSize, callInfo) + mock.lockVgpuInstanceGetRuntimeStateSize.Unlock() + return mock.VgpuInstanceGetRuntimeStateSizeFunc(vgpuInstance) +} + +// VgpuInstanceGetRuntimeStateSizeCalls gets all the calls that were made to VgpuInstanceGetRuntimeStateSize. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetRuntimeStateSizeCalls()) +func (mock *Interface) VgpuInstanceGetRuntimeStateSizeCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetRuntimeStateSize.RLock() + calls = mock.calls.VgpuInstanceGetRuntimeStateSize + mock.lockVgpuInstanceGetRuntimeStateSize.RUnlock() + return calls +} + // VgpuInstanceGetType calls VgpuInstanceGetTypeFunc. func (mock *Interface) VgpuInstanceGetType(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) { if mock.VgpuInstanceGetTypeFunc == nil { @@ -14532,6 +16480,38 @@ func (mock *Interface) VgpuInstanceSetEncoderCapacityCalls() []struct { return calls } +// VgpuTypeGetBAR1Info calls VgpuTypeGetBAR1InfoFunc. +func (mock *Interface) VgpuTypeGetBAR1Info(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuTypeBar1Info, nvml.Return) { + if mock.VgpuTypeGetBAR1InfoFunc == nil { + panic("Interface.VgpuTypeGetBAR1InfoFunc: method is nil but Interface.VgpuTypeGetBAR1Info was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetBAR1Info.Lock() + mock.calls.VgpuTypeGetBAR1Info = append(mock.calls.VgpuTypeGetBAR1Info, callInfo) + mock.lockVgpuTypeGetBAR1Info.Unlock() + return mock.VgpuTypeGetBAR1InfoFunc(vgpuTypeId) +} + +// VgpuTypeGetBAR1InfoCalls gets all the calls that were made to VgpuTypeGetBAR1Info. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetBAR1InfoCalls()) +func (mock *Interface) VgpuTypeGetBAR1InfoCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetBAR1Info.RLock() + calls = mock.calls.VgpuTypeGetBAR1Info + mock.lockVgpuTypeGetBAR1Info.RUnlock() + return calls +} + // VgpuTypeGetCapabilities calls VgpuTypeGetCapabilitiesFunc. func (mock *Interface) VgpuTypeGetCapabilities(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { if mock.VgpuTypeGetCapabilitiesFunc == nil { @@ -14796,6 +16776,38 @@ func (mock *Interface) VgpuTypeGetMaxInstancesCalls() []struct { return calls } +// VgpuTypeGetMaxInstancesPerGpuInstance calls VgpuTypeGetMaxInstancesPerGpuInstanceFunc. +func (mock *Interface) VgpuTypeGetMaxInstancesPerGpuInstance(vgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance) nvml.Return { + if mock.VgpuTypeGetMaxInstancesPerGpuInstanceFunc == nil { + panic("Interface.VgpuTypeGetMaxInstancesPerGpuInstanceFunc: method is nil but Interface.VgpuTypeGetMaxInstancesPerGpuInstance was just called") + } + callInfo := struct { + VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance + }{ + VgpuTypeMaxInstance: vgpuTypeMaxInstance, + } + mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.Lock() + mock.calls.VgpuTypeGetMaxInstancesPerGpuInstance = append(mock.calls.VgpuTypeGetMaxInstancesPerGpuInstance, callInfo) + mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.Unlock() + return mock.VgpuTypeGetMaxInstancesPerGpuInstanceFunc(vgpuTypeMaxInstance) +} + +// VgpuTypeGetMaxInstancesPerGpuInstanceCalls gets all the calls that were made to VgpuTypeGetMaxInstancesPerGpuInstance. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetMaxInstancesPerGpuInstanceCalls()) +func (mock *Interface) VgpuTypeGetMaxInstancesPerGpuInstanceCalls() []struct { + VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance +} { + var calls []struct { + VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance + } + mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.RLock() + calls = mock.calls.VgpuTypeGetMaxInstancesPerGpuInstance + mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.RUnlock() + return calls +} + // VgpuTypeGetMaxInstancesPerVm calls VgpuTypeGetMaxInstancesPerVmFunc. func (mock *Interface) VgpuTypeGetMaxInstancesPerVm(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { if mock.VgpuTypeGetMaxInstancesPerVmFunc == nil { diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go index e0af0138..828f4233 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go @@ -72,6 +72,9 @@ var _ nvml.VgpuInstance = &VgpuInstance{} // GetMetadataFunc: func() (nvml.VgpuMetadata, nvml.Return) { // panic("mock out the GetMetadata method") // }, +// GetRuntimeStateSizeFunc: func() (nvml.VgpuRuntimeState, nvml.Return) { +// panic("mock out the GetRuntimeStateSize method") +// }, // GetTypeFunc: func() (nvml.VgpuTypeId, nvml.Return) { // panic("mock out the GetType method") // }, @@ -148,6 +151,9 @@ type VgpuInstance struct { // GetMetadataFunc mocks the GetMetadata method. GetMetadataFunc func() (nvml.VgpuMetadata, nvml.Return) + // GetRuntimeStateSizeFunc mocks the GetRuntimeStateSize method. + GetRuntimeStateSizeFunc func() (nvml.VgpuRuntimeState, nvml.Return) + // GetTypeFunc mocks the GetType method. GetTypeFunc func() (nvml.VgpuTypeId, nvml.Return) @@ -221,6 +227,9 @@ type VgpuInstance struct { // GetMetadata holds details about calls to the GetMetadata method. GetMetadata []struct { } + // GetRuntimeStateSize holds details about calls to the GetRuntimeStateSize method. + GetRuntimeStateSize []struct { + } // GetType holds details about calls to the GetType method. GetType []struct { } @@ -257,6 +266,7 @@ type VgpuInstance struct { lockGetLicenseStatus sync.RWMutex lockGetMdevUUID sync.RWMutex lockGetMetadata sync.RWMutex + lockGetRuntimeStateSize sync.RWMutex lockGetType sync.RWMutex lockGetUUID sync.RWMutex lockGetVmDriverVersion sync.RWMutex @@ -755,6 +765,33 @@ func (mock *VgpuInstance) GetMetadataCalls() []struct { return calls } +// GetRuntimeStateSize calls GetRuntimeStateSizeFunc. +func (mock *VgpuInstance) GetRuntimeStateSize() (nvml.VgpuRuntimeState, nvml.Return) { + if mock.GetRuntimeStateSizeFunc == nil { + panic("VgpuInstance.GetRuntimeStateSizeFunc: method is nil but VgpuInstance.GetRuntimeStateSize was just called") + } + callInfo := struct { + }{} + mock.lockGetRuntimeStateSize.Lock() + mock.calls.GetRuntimeStateSize = append(mock.calls.GetRuntimeStateSize, callInfo) + mock.lockGetRuntimeStateSize.Unlock() + return mock.GetRuntimeStateSizeFunc() +} + +// GetRuntimeStateSizeCalls gets all the calls that were made to GetRuntimeStateSize. +// Check the length with: +// +// len(mockedVgpuInstance.GetRuntimeStateSizeCalls()) +func (mock *VgpuInstance) GetRuntimeStateSizeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetRuntimeStateSize.RLock() + calls = mock.calls.GetRuntimeStateSize + mock.lockGetRuntimeStateSize.RUnlock() + return calls +} + // GetType calls GetTypeFunc. func (mock *VgpuInstance) GetType() (nvml.VgpuTypeId, nvml.Return) { if mock.GetTypeFunc == 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 00246e85..467d7468 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 @@ -18,6 +18,9 @@ var _ nvml.VgpuTypeId = &VgpuTypeId{} // // // make and configure a mocked nvml.VgpuTypeId // mockedVgpuTypeId := &VgpuTypeId{ +// GetBAR1InfoFunc: func() (nvml.VgpuTypeBar1Info, nvml.Return) { +// panic("mock out the GetBAR1Info method") +// }, // GetCapabilitiesFunc: func(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { // panic("mock out the GetCapabilities method") // }, @@ -67,6 +70,9 @@ var _ nvml.VgpuTypeId = &VgpuTypeId{} // // } type VgpuTypeId struct { + // GetBAR1InfoFunc mocks the GetBAR1Info method. + GetBAR1InfoFunc func() (nvml.VgpuTypeBar1Info, nvml.Return) + // GetCapabilitiesFunc mocks the GetCapabilities method. GetCapabilitiesFunc func(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) @@ -111,6 +117,9 @@ type VgpuTypeId struct { // calls tracks calls to the methods. calls struct { + // GetBAR1Info holds details about calls to the GetBAR1Info method. + GetBAR1Info []struct { + } // GetCapabilities holds details about calls to the GetCapabilities method. GetCapabilities []struct { // VgpuCapability is the vgpuCapability argument value. @@ -164,6 +173,7 @@ type VgpuTypeId struct { Device nvml.Device } } + lockGetBAR1Info sync.RWMutex lockGetCapabilities sync.RWMutex lockGetClass sync.RWMutex lockGetCreatablePlacements sync.RWMutex @@ -180,6 +190,33 @@ type VgpuTypeId struct { lockGetSupportedPlacements sync.RWMutex } +// GetBAR1Info calls GetBAR1InfoFunc. +func (mock *VgpuTypeId) GetBAR1Info() (nvml.VgpuTypeBar1Info, nvml.Return) { + if mock.GetBAR1InfoFunc == nil { + panic("VgpuTypeId.GetBAR1InfoFunc: method is nil but VgpuTypeId.GetBAR1Info was just called") + } + callInfo := struct { + }{} + mock.lockGetBAR1Info.Lock() + mock.calls.GetBAR1Info = append(mock.calls.GetBAR1Info, callInfo) + mock.lockGetBAR1Info.Unlock() + return mock.GetBAR1InfoFunc() +} + +// GetBAR1InfoCalls gets all the calls that were made to GetBAR1Info. +// Check the length with: +// +// len(mockedVgpuTypeId.GetBAR1InfoCalls()) +func (mock *VgpuTypeId) GetBAR1InfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetBAR1Info.RLock() + calls = mock.calls.GetBAR1Info + mock.lockGetBAR1Info.RUnlock() + return calls +} + // GetCapabilities calls GetCapabilitiesFunc. func (mock *VgpuTypeId) GetCapabilities(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { if mock.GetCapabilitiesFunc == 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 6ba290c5..95d67d6d 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.go @@ -121,6 +121,15 @@ func nvmlSystemGetTopologyGpuSet(CpuNumber uint32, Count *uint32, DeviceArray *n return __v } +// nvmlSystemGetDriverBranch function as declared in nvml/nvml.h +func nvmlSystemGetDriverBranch(BranchInfo *SystemDriverBranchInfo, Length uint32) Return { + cBranchInfo, _ := (*C.nvmlSystemDriverBranchInfo_t)(unsafe.Pointer(BranchInfo)), cgoAllocsUnknown + cLength, _ := (C.uint)(Length), cgoAllocsUnknown + __ret := C.nvmlSystemGetDriverBranch(cBranchInfo, cLength) + __v := (Return)(__ret) + return __v +} + // nvmlUnitGetCount function as declared in nvml/nvml.h func nvmlUnitGetCount(UnitCount *uint32) Return { cUnitCount, _ := (*C.uint)(unsafe.Pointer(UnitCount)), cgoAllocsUnknown @@ -238,6 +247,15 @@ func nvmlDeviceGetHandleByUUID(Uuid string, nvmlDevice *nvmlDevice) Return { return __v } +// nvmlDeviceGetHandleByUUIDV function as declared in nvml/nvml.h +func nvmlDeviceGetHandleByUUIDV(Uuid *UUID, nvmlDevice *nvmlDevice) Return { + cUuid, _ := (*C.nvmlUUID_t)(unsafe.Pointer(Uuid)), cgoAllocsUnknown + cnvmlDevice, _ := (*C.nvmlDevice_t)(unsafe.Pointer(nvmlDevice)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetHandleByUUIDV(cUuid, cnvmlDevice) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetHandleByPciBusId_v2 function as declared in nvml/nvml.h func nvmlDeviceGetHandleByPciBusId_v2(PciBusId string, nvmlDevice *nvmlDevice) Return { cPciBusId, _ := unpackPCharString(PciBusId) @@ -698,6 +716,15 @@ func nvmlDeviceGetFanSpeed_v2(nvmlDevice nvmlDevice, Fan uint32, Speed *uint32) return __v } +// nvmlDeviceGetFanSpeedRPM function as declared in nvml/nvml.h +func nvmlDeviceGetFanSpeedRPM(nvmlDevice nvmlDevice, FanSpeed *FanSpeedInfo) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cFanSpeed, _ := (*C.nvmlFanSpeedInfo_t)(unsafe.Pointer(FanSpeed)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetFanSpeedRPM(cnvmlDevice, cFanSpeed) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetTargetFanSpeed function as declared in nvml/nvml.h func nvmlDeviceGetTargetFanSpeed(nvmlDevice nvmlDevice, Fan uint32, TargetSpeed *uint32) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -747,6 +774,24 @@ func nvmlDeviceGetTemperature(nvmlDevice nvmlDevice, SensorType TemperatureSenso return __v } +// nvmlDeviceGetCoolerInfo function as declared in nvml/nvml.h +func nvmlDeviceGetCoolerInfo(nvmlDevice nvmlDevice, CoolerInfo *CoolerInfo) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cCoolerInfo, _ := (*C.nvmlCoolerInfo_t)(unsafe.Pointer(CoolerInfo)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetCoolerInfo(cnvmlDevice, cCoolerInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceGetTemperatureV function as declared in nvml/nvml.h +func nvmlDeviceGetTemperatureV(nvmlDevice nvmlDevice, Temperature *Temperature) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cTemperature, _ := (*C.nvmlTemperature_t)(unsafe.Pointer(Temperature)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetTemperatureV(cnvmlDevice, cTemperature) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetTemperatureThreshold function as declared in nvml/nvml.h func nvmlDeviceGetTemperatureThreshold(nvmlDevice nvmlDevice, ThresholdType TemperatureThresholds, Temp *uint32) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -757,6 +802,15 @@ func nvmlDeviceGetTemperatureThreshold(nvmlDevice nvmlDevice, ThresholdType Temp return __v } +// nvmlDeviceGetMarginTemperature function as declared in nvml/nvml.h +func nvmlDeviceGetMarginTemperature(nvmlDevice nvmlDevice, MarginTempInfo *MarginTemperature) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cMarginTempInfo, _ := (*C.nvmlMarginTemperature_t)(unsafe.Pointer(MarginTempInfo)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetMarginTemperature(cnvmlDevice, cMarginTempInfo) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetThermalSettings function as declared in nvml/nvml.h func nvmlDeviceGetThermalSettings(nvmlDevice nvmlDevice, SensorIndex uint32, PThermalSettings *GpuThermalSettings) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -881,6 +935,42 @@ func nvmlDeviceGetMemClkMinMaxVfOffset(nvmlDevice nvmlDevice, MinOffset *int32, return __v } +// nvmlDeviceGetClockOffsets function as declared in nvml/nvml.h +func nvmlDeviceGetClockOffsets(nvmlDevice nvmlDevice, Info *ClockOffset) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cInfo, _ := (*C.nvmlClockOffset_t)(unsafe.Pointer(Info)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetClockOffsets(cnvmlDevice, cInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceSetClockOffsets function as declared in nvml/nvml.h +func nvmlDeviceSetClockOffsets(nvmlDevice nvmlDevice, Info *ClockOffset) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cInfo, _ := (*C.nvmlClockOffset_t)(unsafe.Pointer(Info)), cgoAllocsUnknown + __ret := C.nvmlDeviceSetClockOffsets(cnvmlDevice, cInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceGetPerformanceModes function as declared in nvml/nvml.h +func nvmlDeviceGetPerformanceModes(nvmlDevice nvmlDevice, PerfModes *DevicePerfModes) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cPerfModes, _ := (*C.nvmlDevicePerfModes_t)(unsafe.Pointer(PerfModes)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetPerformanceModes(cnvmlDevice, cPerfModes) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceGetCurrentClockFreqs function as declared in nvml/nvml.h +func nvmlDeviceGetCurrentClockFreqs(nvmlDevice nvmlDevice, CurrentClockFreqs *DeviceCurrentClockFreqs) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cCurrentClockFreqs, _ := (*C.nvmlDeviceCurrentClockFreqs_t)(unsafe.Pointer(CurrentClockFreqs)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetCurrentClockFreqs(cnvmlDevice, cCurrentClockFreqs) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetPowerManagementMode function as declared in nvml/nvml.h func nvmlDeviceGetPowerManagementMode(nvmlDevice nvmlDevice, Mode *EnableState) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -992,6 +1082,25 @@ func nvmlDeviceGetCudaComputeCapability(nvmlDevice nvmlDevice, Major *int32, Min return __v } +// nvmlDeviceGetDramEncryptionMode function as declared in nvml/nvml.h +func nvmlDeviceGetDramEncryptionMode(nvmlDevice nvmlDevice, Current *DramEncryptionInfo, Pending *DramEncryptionInfo) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cCurrent, _ := (*C.nvmlDramEncryptionInfo_t)(unsafe.Pointer(Current)), cgoAllocsUnknown + cPending, _ := (*C.nvmlDramEncryptionInfo_t)(unsafe.Pointer(Pending)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetDramEncryptionMode(cnvmlDevice, cCurrent, cPending) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceSetDramEncryptionMode function as declared in nvml/nvml.h +func nvmlDeviceSetDramEncryptionMode(nvmlDevice nvmlDevice, DramEncryption *DramEncryptionInfo) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cDramEncryption, _ := (*C.nvmlDramEncryptionInfo_t)(unsafe.Pointer(DramEncryption)), cgoAllocsUnknown + __ret := C.nvmlDeviceSetDramEncryptionMode(cnvmlDevice, cDramEncryption) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetEccMode function as declared in nvml/nvml.h func nvmlDeviceGetEccMode(nvmlDevice nvmlDevice, Current *EnableState, Pending *EnableState) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -1162,12 +1271,12 @@ func nvmlDeviceGetFBCSessions(nvmlDevice nvmlDevice, SessionCount *uint32, Sessi return __v } -// nvmlDeviceGetDriverModel function as declared in nvml/nvml.h -func nvmlDeviceGetDriverModel(nvmlDevice nvmlDevice, Current *DriverModel, Pending *DriverModel) Return { +// nvmlDeviceGetDriverModel_v2 function as declared in nvml/nvml.h +func nvmlDeviceGetDriverModel_v2(nvmlDevice nvmlDevice, Current *DriverModel, Pending *DriverModel) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown cCurrent, _ := (*C.nvmlDriverModel_t)(unsafe.Pointer(Current)), cgoAllocsUnknown cPending, _ := (*C.nvmlDriverModel_t)(unsafe.Pointer(Pending)), cgoAllocsUnknown - __ret := C.nvmlDeviceGetDriverModel(cnvmlDevice, cCurrent, cPending) + __ret := C.nvmlDeviceGetDriverModel_v2(cnvmlDevice, cCurrent, cPending) __v := (Return)(__ret) return __v } @@ -1440,6 +1549,31 @@ func nvmlSystemGetConfComputeKeyRotationThresholdInfo(PKeyRotationThrInfo *ConfC return __v } +// nvmlDeviceSetConfComputeUnprotectedMemSize function as declared in nvml/nvml.h +func nvmlDeviceSetConfComputeUnprotectedMemSize(nvmlDevice nvmlDevice, SizeKiB uint64) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cSizeKiB, _ := (C.ulonglong)(SizeKiB), cgoAllocsUnknown + __ret := C.nvmlDeviceSetConfComputeUnprotectedMemSize(cnvmlDevice, cSizeKiB) + __v := (Return)(__ret) + return __v +} + +// nvmlSystemSetConfComputeGpusReadyState function as declared in nvml/nvml.h +func nvmlSystemSetConfComputeGpusReadyState(IsAcceptingWork uint32) Return { + cIsAcceptingWork, _ := (C.uint)(IsAcceptingWork), cgoAllocsUnknown + __ret := C.nvmlSystemSetConfComputeGpusReadyState(cIsAcceptingWork) + __v := (Return)(__ret) + return __v +} + +// nvmlSystemSetConfComputeKeyRotationThresholdInfo function as declared in nvml/nvml.h +func nvmlSystemSetConfComputeKeyRotationThresholdInfo(PKeyRotationThrInfo *ConfComputeSetKeyRotationThresholdInfo) Return { + cPKeyRotationThrInfo, _ := (*C.nvmlConfComputeSetKeyRotationThresholdInfo_t)(unsafe.Pointer(PKeyRotationThrInfo)), cgoAllocsUnknown + __ret := C.nvmlSystemSetConfComputeKeyRotationThresholdInfo(cPKeyRotationThrInfo) + __v := (Return)(__ret) + return __v +} + // nvmlSystemGetConfComputeSettings function as declared in nvml/nvml.h func nvmlSystemGetConfComputeSettings(Settings *SystemConfComputeSettings) Return { cSettings, _ := (*C.nvmlSystemConfComputeSettings_t)(unsafe.Pointer(Settings)), cgoAllocsUnknown @@ -1467,6 +1601,15 @@ func nvmlDeviceGetGspFirmwareMode(nvmlDevice nvmlDevice, IsEnabled *uint32, Defa return __v } +// nvmlDeviceGetSramEccErrorStatus function as declared in nvml/nvml.h +func nvmlDeviceGetSramEccErrorStatus(nvmlDevice nvmlDevice, Status *EccSramErrorStatus) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cStatus, _ := (*C.nvmlEccSramErrorStatus_t)(unsafe.Pointer(Status)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetSramEccErrorStatus(cnvmlDevice, cStatus) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetAccountingMode function as declared in nvml/nvml.h func nvmlDeviceGetAccountingMode(nvmlDevice nvmlDevice, Mode *EnableState) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -1596,6 +1739,15 @@ func nvmlDeviceGetProcessesUtilizationInfo(nvmlDevice nvmlDevice, ProcesesUtilIn return __v } +// nvmlDeviceGetPlatformInfo function as declared in nvml/nvml.h +func nvmlDeviceGetPlatformInfo(nvmlDevice nvmlDevice, PlatformInfo *PlatformInfo) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cPlatformInfo, _ := (*C.nvmlPlatformInfo_t)(unsafe.Pointer(PlatformInfo)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetPlatformInfo(cnvmlDevice, cPlatformInfo) + __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 @@ -1809,31 +1961,6 @@ func nvmlDeviceSetMemClkVfOffset(nvmlDevice nvmlDevice, Offset int32) Return { return __v } -// nvmlDeviceSetConfComputeUnprotectedMemSize function as declared in nvml/nvml.h -func nvmlDeviceSetConfComputeUnprotectedMemSize(nvmlDevice nvmlDevice, SizeKiB uint64) Return { - cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown - cSizeKiB, _ := (C.ulonglong)(SizeKiB), cgoAllocsUnknown - __ret := C.nvmlDeviceSetConfComputeUnprotectedMemSize(cnvmlDevice, cSizeKiB) - __v := (Return)(__ret) - return __v -} - -// nvmlSystemSetConfComputeGpusReadyState function as declared in nvml/nvml.h -func nvmlSystemSetConfComputeGpusReadyState(IsAcceptingWork uint32) Return { - cIsAcceptingWork, _ := (C.uint)(IsAcceptingWork), cgoAllocsUnknown - __ret := C.nvmlSystemSetConfComputeGpusReadyState(cIsAcceptingWork) - __v := (Return)(__ret) - return __v -} - -// nvmlSystemSetConfComputeKeyRotationThresholdInfo function as declared in nvml/nvml.h -func nvmlSystemSetConfComputeKeyRotationThresholdInfo(PKeyRotationThrInfo *ConfComputeSetKeyRotationThresholdInfo) Return { - cPKeyRotationThrInfo, _ := (*C.nvmlConfComputeSetKeyRotationThresholdInfo_t)(unsafe.Pointer(PKeyRotationThrInfo)), cgoAllocsUnknown - __ret := C.nvmlSystemSetConfComputeKeyRotationThresholdInfo(cPKeyRotationThrInfo) - __v := (Return)(__ret) - return __v -} - // nvmlDeviceSetAccountingMode function as declared in nvml/nvml.h func nvmlDeviceSetAccountingMode(nvmlDevice nvmlDevice, Mode EnableState) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -1851,6 +1978,15 @@ func nvmlDeviceClearAccountingPids(nvmlDevice nvmlDevice) Return { return __v } +// nvmlDeviceSetPowerManagementLimit_v2 function as declared in nvml/nvml.h +func nvmlDeviceSetPowerManagementLimit_v2(nvmlDevice nvmlDevice, PowerValue *PowerValue_v2) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cPowerValue, _ := (*C.nvmlPowerValue_v2_t)(unsafe.Pointer(PowerValue)), cgoAllocsUnknown + __ret := C.nvmlDeviceSetPowerManagementLimit_v2(cnvmlDevice, cPowerValue) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetNvLinkState function as declared in nvml/nvml.h func nvmlDeviceGetNvLinkState(nvmlDevice nvmlDevice, Link uint32, IsActive *EnableState) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -1978,6 +2114,58 @@ func nvmlDeviceGetNvLinkRemoteDeviceType(nvmlDevice nvmlDevice, Link uint32, PNv return __v } +// nvmlDeviceSetNvLinkDeviceLowPowerThreshold function as declared in nvml/nvml.h +func nvmlDeviceSetNvLinkDeviceLowPowerThreshold(nvmlDevice nvmlDevice, Info *NvLinkPowerThres) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cInfo, _ := (*C.nvmlNvLinkPowerThres_t)(unsafe.Pointer(Info)), cgoAllocsUnknown + __ret := C.nvmlDeviceSetNvLinkDeviceLowPowerThreshold(cnvmlDevice, cInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlSystemSetNvlinkBwMode function as declared in nvml/nvml.h +func nvmlSystemSetNvlinkBwMode(NvlinkBwMode uint32) Return { + cNvlinkBwMode, _ := (C.uint)(NvlinkBwMode), cgoAllocsUnknown + __ret := C.nvmlSystemSetNvlinkBwMode(cNvlinkBwMode) + __v := (Return)(__ret) + return __v +} + +// nvmlSystemGetNvlinkBwMode function as declared in nvml/nvml.h +func nvmlSystemGetNvlinkBwMode(NvlinkBwMode *uint32) Return { + cNvlinkBwMode, _ := (*C.uint)(unsafe.Pointer(NvlinkBwMode)), cgoAllocsUnknown + __ret := C.nvmlSystemGetNvlinkBwMode(cNvlinkBwMode) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceGetNvlinkSupportedBwModes function as declared in nvml/nvml.h +func nvmlDeviceGetNvlinkSupportedBwModes(nvmlDevice nvmlDevice, SupportedBwMode *NvlinkSupportedBwModes) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cSupportedBwMode, _ := (*C.nvmlNvlinkSupportedBwModes_t)(unsafe.Pointer(SupportedBwMode)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetNvlinkSupportedBwModes(cnvmlDevice, cSupportedBwMode) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceGetNvlinkBwMode function as declared in nvml/nvml.h +func nvmlDeviceGetNvlinkBwMode(nvmlDevice nvmlDevice, GetBwMode *NvlinkGetBwMode) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cGetBwMode, _ := (*C.nvmlNvlinkGetBwMode_t)(unsafe.Pointer(GetBwMode)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetNvlinkBwMode(cnvmlDevice, cGetBwMode) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceSetNvlinkBwMode function as declared in nvml/nvml.h +func nvmlDeviceSetNvlinkBwMode(nvmlDevice nvmlDevice, SetBwMode *NvlinkSetBwMode) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cSetBwMode, _ := (*C.nvmlNvlinkSetBwMode_t)(unsafe.Pointer(SetBwMode)), cgoAllocsUnknown + __ret := C.nvmlDeviceSetNvlinkBwMode(cnvmlDevice, cSetBwMode) + __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 @@ -2023,6 +2211,38 @@ func nvmlEventSetFree(Set nvmlEventSet) Return { return __v } +// nvmlSystemEventSetCreate function as declared in nvml/nvml.h +func nvmlSystemEventSetCreate(Request *SystemEventSetCreateRequest) Return { + cRequest, _ := (*C.nvmlSystemEventSetCreateRequest_t)(unsafe.Pointer(Request)), cgoAllocsUnknown + __ret := C.nvmlSystemEventSetCreate(cRequest) + __v := (Return)(__ret) + return __v +} + +// nvmlSystemEventSetFree function as declared in nvml/nvml.h +func nvmlSystemEventSetFree(Request *SystemEventSetFreeRequest) Return { + cRequest, _ := (*C.nvmlSystemEventSetFreeRequest_t)(unsafe.Pointer(Request)), cgoAllocsUnknown + __ret := C.nvmlSystemEventSetFree(cRequest) + __v := (Return)(__ret) + return __v +} + +// nvmlSystemRegisterEvents function as declared in nvml/nvml.h +func nvmlSystemRegisterEvents(Request *SystemRegisterEventRequest) Return { + cRequest, _ := (*C.nvmlSystemRegisterEventRequest_t)(unsafe.Pointer(Request)), cgoAllocsUnknown + __ret := C.nvmlSystemRegisterEvents(cRequest) + __v := (Return)(__ret) + return __v +} + +// nvmlSystemEventSetWait function as declared in nvml/nvml.h +func nvmlSystemEventSetWait(Request *SystemEventSetWaitRequest) Return { + cRequest, _ := (*C.nvmlSystemEventSetWaitRequest_t)(unsafe.Pointer(Request)), cgoAllocsUnknown + __ret := C.nvmlSystemEventSetWait(cRequest) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceModifyDrainState function as declared in nvml/nvml.h func nvmlDeviceModifyDrainState(PciInfo *PciInfo, NewState EnableState) Return { cPciInfo, _ := (*C.nvmlPciInfo_t)(unsafe.Pointer(PciInfo)), cgoAllocsUnknown @@ -2171,6 +2391,15 @@ func nvmlVgpuTypeGetFbReservation(nvmlVgpuTypeId nvmlVgpuTypeId, FbReservation * return __v } +// nvmlVgpuInstanceGetRuntimeStateSize function as declared in nvml/nvml.h +func nvmlVgpuInstanceGetRuntimeStateSize(nvmlVgpuInstance nvmlVgpuInstance, PState *VgpuRuntimeState) Return { + cnvmlVgpuInstance, _ := (C.nvmlVgpuInstance_t)(nvmlVgpuInstance), cgoAllocsUnknown + cPState, _ := (*C.nvmlVgpuRuntimeState_t)(unsafe.Pointer(PState)), cgoAllocsUnknown + __ret := C.nvmlVgpuInstanceGetRuntimeStateSize(cnvmlVgpuInstance, cPState) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceSetVgpuCapabilities function as declared in nvml/nvml.h func nvmlDeviceSetVgpuCapabilities(nvmlDevice nvmlDevice, Capability DeviceVgpuCapability, State EnableState) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -2335,6 +2564,15 @@ func nvmlVgpuTypeGetMaxInstancesPerVm(nvmlVgpuTypeId nvmlVgpuTypeId, VgpuInstanc return __v } +// nvmlVgpuTypeGetBAR1Info function as declared in nvml/nvml.h +func nvmlVgpuTypeGetBAR1Info(nvmlVgpuTypeId nvmlVgpuTypeId, Bar1Info *VgpuTypeBar1Info) Return { + cnvmlVgpuTypeId, _ := (C.nvmlVgpuTypeId_t)(nvmlVgpuTypeId), cgoAllocsUnknown + cBar1Info, _ := (*C.nvmlVgpuTypeBar1Info_t)(unsafe.Pointer(Bar1Info)), cgoAllocsUnknown + __ret := C.nvmlVgpuTypeGetBAR1Info(cnvmlVgpuTypeId, cBar1Info) + __v := (Return)(__ret) + return __v +} + // nvmlDeviceGetActiveVgpus function as declared in nvml/nvml.h func nvmlDeviceGetActiveVgpus(nvmlDevice nvmlDevice, VgpuCount *uint32, VgpuInstances *nvmlVgpuInstance) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown @@ -2518,6 +2756,86 @@ func nvmlVgpuInstanceGetMdevUUID(nvmlVgpuInstance nvmlVgpuInstance, MdevUuid *by return __v } +// nvmlGpuInstanceGetCreatableVgpus function as declared in nvml/nvml.h +func nvmlGpuInstanceGetCreatableVgpus(nvmlGpuInstance nvmlGpuInstance, PVgpus *VgpuTypeIdInfo) Return { + cnvmlGpuInstance, _ := *(*C.nvmlGpuInstance_t)(unsafe.Pointer(&nvmlGpuInstance)), cgoAllocsUnknown + cPVgpus, _ := (*C.nvmlVgpuTypeIdInfo_t)(unsafe.Pointer(PVgpus)), cgoAllocsUnknown + __ret := C.nvmlGpuInstanceGetCreatableVgpus(cnvmlGpuInstance, cPVgpus) + __v := (Return)(__ret) + return __v +} + +// nvmlVgpuTypeGetMaxInstancesPerGpuInstance function as declared in nvml/nvml.h +func nvmlVgpuTypeGetMaxInstancesPerGpuInstance(PMaxInstance *VgpuTypeMaxInstance) Return { + cPMaxInstance, _ := (*C.nvmlVgpuTypeMaxInstance_t)(unsafe.Pointer(PMaxInstance)), cgoAllocsUnknown + __ret := C.nvmlVgpuTypeGetMaxInstancesPerGpuInstance(cPMaxInstance) + __v := (Return)(__ret) + return __v +} + +// nvmlGpuInstanceGetActiveVgpus function as declared in nvml/nvml.h +func nvmlGpuInstanceGetActiveVgpus(nvmlGpuInstance nvmlGpuInstance, PVgpuInstanceInfo *ActiveVgpuInstanceInfo) Return { + cnvmlGpuInstance, _ := *(*C.nvmlGpuInstance_t)(unsafe.Pointer(&nvmlGpuInstance)), cgoAllocsUnknown + cPVgpuInstanceInfo, _ := (*C.nvmlActiveVgpuInstanceInfo_t)(unsafe.Pointer(PVgpuInstanceInfo)), cgoAllocsUnknown + __ret := C.nvmlGpuInstanceGetActiveVgpus(cnvmlGpuInstance, cPVgpuInstanceInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlGpuInstanceSetVgpuSchedulerState function as declared in nvml/nvml.h +func nvmlGpuInstanceSetVgpuSchedulerState(nvmlGpuInstance nvmlGpuInstance, PScheduler *VgpuSchedulerState) Return { + cnvmlGpuInstance, _ := *(*C.nvmlGpuInstance_t)(unsafe.Pointer(&nvmlGpuInstance)), cgoAllocsUnknown + cPScheduler, _ := (*C.nvmlVgpuSchedulerState_t)(unsafe.Pointer(PScheduler)), cgoAllocsUnknown + __ret := C.nvmlGpuInstanceSetVgpuSchedulerState(cnvmlGpuInstance, cPScheduler) + __v := (Return)(__ret) + return __v +} + +// nvmlGpuInstanceGetVgpuSchedulerState function as declared in nvml/nvml.h +func nvmlGpuInstanceGetVgpuSchedulerState(nvmlGpuInstance nvmlGpuInstance, PSchedulerStateInfo *VgpuSchedulerStateInfo) Return { + cnvmlGpuInstance, _ := *(*C.nvmlGpuInstance_t)(unsafe.Pointer(&nvmlGpuInstance)), cgoAllocsUnknown + cPSchedulerStateInfo, _ := (*C.nvmlVgpuSchedulerStateInfo_t)(unsafe.Pointer(PSchedulerStateInfo)), cgoAllocsUnknown + __ret := C.nvmlGpuInstanceGetVgpuSchedulerState(cnvmlGpuInstance, cPSchedulerStateInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlGpuInstanceGetVgpuSchedulerLog function as declared in nvml/nvml.h +func nvmlGpuInstanceGetVgpuSchedulerLog(nvmlGpuInstance nvmlGpuInstance, PSchedulerLogInfo *VgpuSchedulerLogInfo) Return { + cnvmlGpuInstance, _ := *(*C.nvmlGpuInstance_t)(unsafe.Pointer(&nvmlGpuInstance)), cgoAllocsUnknown + cPSchedulerLogInfo, _ := (*C.nvmlVgpuSchedulerLogInfo_t)(unsafe.Pointer(PSchedulerLogInfo)), cgoAllocsUnknown + __ret := C.nvmlGpuInstanceGetVgpuSchedulerLog(cnvmlGpuInstance, cPSchedulerLogInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlGpuInstanceGetVgpuTypeCreatablePlacements function as declared in nvml/nvml.h +func nvmlGpuInstanceGetVgpuTypeCreatablePlacements(nvmlGpuInstance nvmlGpuInstance, PCreatablePlacementInfo *VgpuCreatablePlacementInfo) Return { + cnvmlGpuInstance, _ := *(*C.nvmlGpuInstance_t)(unsafe.Pointer(&nvmlGpuInstance)), cgoAllocsUnknown + cPCreatablePlacementInfo, _ := (*C.nvmlVgpuCreatablePlacementInfo_t)(unsafe.Pointer(PCreatablePlacementInfo)), cgoAllocsUnknown + __ret := C.nvmlGpuInstanceGetVgpuTypeCreatablePlacements(cnvmlGpuInstance, cPCreatablePlacementInfo) + __v := (Return)(__ret) + return __v +} + +// nvmlGpuInstanceGetVgpuHeterogeneousMode function as declared in nvml/nvml.h +func nvmlGpuInstanceGetVgpuHeterogeneousMode(nvmlGpuInstance nvmlGpuInstance, PHeterogeneousMode *VgpuHeterogeneousMode) Return { + cnvmlGpuInstance, _ := *(*C.nvmlGpuInstance_t)(unsafe.Pointer(&nvmlGpuInstance)), cgoAllocsUnknown + cPHeterogeneousMode, _ := (*C.nvmlVgpuHeterogeneousMode_t)(unsafe.Pointer(PHeterogeneousMode)), cgoAllocsUnknown + __ret := C.nvmlGpuInstanceGetVgpuHeterogeneousMode(cnvmlGpuInstance, cPHeterogeneousMode) + __v := (Return)(__ret) + return __v +} + +// nvmlGpuInstanceSetVgpuHeterogeneousMode function as declared in nvml/nvml.h +func nvmlGpuInstanceSetVgpuHeterogeneousMode(nvmlGpuInstance nvmlGpuInstance, PHeterogeneousMode *VgpuHeterogeneousMode) Return { + cnvmlGpuInstance, _ := *(*C.nvmlGpuInstance_t)(unsafe.Pointer(&nvmlGpuInstance)), cgoAllocsUnknown + cPHeterogeneousMode, _ := (*C.nvmlVgpuHeterogeneousMode_t)(unsafe.Pointer(PHeterogeneousMode)), cgoAllocsUnknown + __ret := C.nvmlGpuInstanceSetVgpuHeterogeneousMode(cnvmlGpuInstance, cPHeterogeneousMode) + __v := (Return)(__ret) + return __v +} + // nvmlVgpuInstanceGetMetadata function as declared in nvml/nvml.h func nvmlVgpuInstanceGetMetadata(nvmlVgpuInstance nvmlVgpuInstance, nvmlVgpuMetadata *nvmlVgpuMetadata, BufferSize *uint32) Return { cnvmlVgpuInstance, _ := (C.nvmlVgpuInstance_t)(nvmlVgpuInstance), cgoAllocsUnknown @@ -3062,45 +3380,74 @@ func nvmlGpmSetStreamingEnabled(nvmlDevice nvmlDevice, State uint32) Return { return __v } -// nvmlDeviceSetNvLinkDeviceLowPowerThreshold function as declared in nvml/nvml.h -func nvmlDeviceSetNvLinkDeviceLowPowerThreshold(nvmlDevice nvmlDevice, Info *NvLinkPowerThres) Return { +// nvmlDeviceGetCapabilities function as declared in nvml/nvml.h +func nvmlDeviceGetCapabilities(nvmlDevice nvmlDevice, Caps *DeviceCapabilities) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown - cInfo, _ := (*C.nvmlNvLinkPowerThres_t)(unsafe.Pointer(Info)), cgoAllocsUnknown - __ret := C.nvmlDeviceSetNvLinkDeviceLowPowerThreshold(cnvmlDevice, cInfo) + cCaps, _ := (*C.nvmlDeviceCapabilities_t)(unsafe.Pointer(Caps)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetCapabilities(cnvmlDevice, cCaps) __v := (Return)(__ret) return __v } -// nvmlSystemSetNvlinkBwMode function as declared in nvml/nvml.h -func nvmlSystemSetNvlinkBwMode(NvlinkBwMode uint32) Return { - cNvlinkBwMode, _ := (C.uint)(NvlinkBwMode), cgoAllocsUnknown - __ret := C.nvmlSystemSetNvlinkBwMode(cNvlinkBwMode) - __v := (Return)(__ret) - return __v -} - -// nvmlSystemGetNvlinkBwMode function as declared in nvml/nvml.h -func nvmlSystemGetNvlinkBwMode(NvlinkBwMode *uint32) Return { - cNvlinkBwMode, _ := (*C.uint)(unsafe.Pointer(NvlinkBwMode)), cgoAllocsUnknown - __ret := C.nvmlSystemGetNvlinkBwMode(cNvlinkBwMode) - __v := (Return)(__ret) - return __v -} - -// nvmlDeviceSetPowerManagementLimit_v2 function as declared in nvml/nvml.h -func nvmlDeviceSetPowerManagementLimit_v2(nvmlDevice nvmlDevice, PowerValue *PowerValue_v2) Return { +// nvmlDeviceWorkloadPowerProfileGetProfilesInfo function as declared in nvml/nvml.h +func nvmlDeviceWorkloadPowerProfileGetProfilesInfo(nvmlDevice nvmlDevice, ProfilesInfo *WorkloadPowerProfileProfilesInfo) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown - cPowerValue, _ := (*C.nvmlPowerValue_v2_t)(unsafe.Pointer(PowerValue)), cgoAllocsUnknown - __ret := C.nvmlDeviceSetPowerManagementLimit_v2(cnvmlDevice, cPowerValue) + cProfilesInfo, _ := (*C.nvmlWorkloadPowerProfileProfilesInfo_t)(unsafe.Pointer(ProfilesInfo)), cgoAllocsUnknown + __ret := C.nvmlDeviceWorkloadPowerProfileGetProfilesInfo(cnvmlDevice, cProfilesInfo) __v := (Return)(__ret) return __v } -// nvmlDeviceGetSramEccErrorStatus function as declared in nvml/nvml.h -func nvmlDeviceGetSramEccErrorStatus(nvmlDevice nvmlDevice, Status *EccSramErrorStatus) Return { +// nvmlDeviceWorkloadPowerProfileGetCurrentProfiles function as declared in nvml/nvml.h +func nvmlDeviceWorkloadPowerProfileGetCurrentProfiles(nvmlDevice nvmlDevice, CurrentProfiles *WorkloadPowerProfileCurrentProfiles) Return { cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown - cStatus, _ := (*C.nvmlEccSramErrorStatus_t)(unsafe.Pointer(Status)), cgoAllocsUnknown - __ret := C.nvmlDeviceGetSramEccErrorStatus(cnvmlDevice, cStatus) + cCurrentProfiles, _ := (*C.nvmlWorkloadPowerProfileCurrentProfiles_t)(unsafe.Pointer(CurrentProfiles)), cgoAllocsUnknown + __ret := C.nvmlDeviceWorkloadPowerProfileGetCurrentProfiles(cnvmlDevice, cCurrentProfiles) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceWorkloadPowerProfileSetRequestedProfiles function as declared in nvml/nvml.h +func nvmlDeviceWorkloadPowerProfileSetRequestedProfiles(nvmlDevice nvmlDevice, RequestedProfiles *WorkloadPowerProfileRequestedProfiles) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cRequestedProfiles, _ := (*C.nvmlWorkloadPowerProfileRequestedProfiles_t)(unsafe.Pointer(RequestedProfiles)), cgoAllocsUnknown + __ret := C.nvmlDeviceWorkloadPowerProfileSetRequestedProfiles(cnvmlDevice, cRequestedProfiles) + __v := (Return)(__ret) + return __v +} + +// nvmlDeviceWorkloadPowerProfileClearRequestedProfiles function as declared in nvml/nvml.h +func nvmlDeviceWorkloadPowerProfileClearRequestedProfiles(nvmlDevice nvmlDevice, RequestedProfiles *WorkloadPowerProfileRequestedProfiles) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cRequestedProfiles, _ := (*C.nvmlWorkloadPowerProfileRequestedProfiles_t)(unsafe.Pointer(RequestedProfiles)), cgoAllocsUnknown + __ret := C.nvmlDeviceWorkloadPowerProfileClearRequestedProfiles(cnvmlDevice, cRequestedProfiles) + __v := (Return)(__ret) + return __v +} + +// nvmlDevicePowerSmoothingActivatePresetProfile function as declared in nvml/nvml.h +func nvmlDevicePowerSmoothingActivatePresetProfile(nvmlDevice nvmlDevice, Profile *PowerSmoothingProfile) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cProfile, _ := (*C.nvmlPowerSmoothingProfile_t)(unsafe.Pointer(Profile)), cgoAllocsUnknown + __ret := C.nvmlDevicePowerSmoothingActivatePresetProfile(cnvmlDevice, cProfile) + __v := (Return)(__ret) + return __v +} + +// nvmlDevicePowerSmoothingUpdatePresetProfileParam function as declared in nvml/nvml.h +func nvmlDevicePowerSmoothingUpdatePresetProfileParam(nvmlDevice nvmlDevice, Profile *PowerSmoothingProfile) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cProfile, _ := (*C.nvmlPowerSmoothingProfile_t)(unsafe.Pointer(Profile)), cgoAllocsUnknown + __ret := C.nvmlDevicePowerSmoothingUpdatePresetProfileParam(cnvmlDevice, cProfile) + __v := (Return)(__ret) + return __v +} + +// nvmlDevicePowerSmoothingSetState function as declared in nvml/nvml.h +func nvmlDevicePowerSmoothingSetState(nvmlDevice nvmlDevice, State *PowerSmoothingState) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cState, _ := (*C.nvmlPowerSmoothingState_t)(unsafe.Pointer(State)), cgoAllocsUnknown + __ret := C.nvmlDevicePowerSmoothingSetState(cnvmlDevice, cState) __v := (Return)(__ret) return __v } @@ -3308,3 +3655,13 @@ func nvmlVgpuInstanceGetLicenseInfo_v1(nvmlVgpuInstance nvmlVgpuInstance, Licens __v := (Return)(__ret) return __v } + +// nvmlDeviceGetDriverModel_v1 function as declared in nvml/nvml.h +func nvmlDeviceGetDriverModel_v1(nvmlDevice nvmlDevice, Current *DriverModel, Pending *DriverModel) Return { + cnvmlDevice, _ := *(*C.nvmlDevice_t)(unsafe.Pointer(&nvmlDevice)), cgoAllocsUnknown + cCurrent, _ := (*C.nvmlDriverModel_t)(unsafe.Pointer(Current)), cgoAllocsUnknown + cPending, _ := (*C.nvmlDriverModel_t)(unsafe.Pointer(Pending)), cgoAllocsUnknown + __ret := C.nvmlDeviceGetDriverModel(cnvmlDevice, cCurrent, cPending) + __v := (Return)(__ret) + return __v +} 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 1e4eb12d..28a65475 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.h @@ -1,7 +1,7 @@ -/*** NVML VERSION: 12.4.127 ***/ -/*** From https://api.anaconda.org/download/nvidia/cuda-nvml-dev/12.4.127/linux-64/cuda-nvml-dev-12.4.127-0.tar.bz2 ***/ +/*** NVML VERSION: 12.9.40 ***/ +/*** From https://gitlab.com/nvidia/headers/cuda-individual/nvml_dev/-/raw/v12.9.40/nvml.h ***/ /* - * Copyright 1993-2023 NVIDIA Corporation. All rights reserved. + * Copyright 1993-2025 NVIDIA Corporation. All rights reserved. * * NOTICE TO USER: * @@ -94,6 +94,8 @@ extern "C" { #define DECLDIR #endif + #define NVML_MCDM_SUPPORT + /** * NVML API versioning support */ @@ -124,6 +126,7 @@ extern "C" { #define nvmlGetBlacklistDeviceInfoByIndex nvmlGetExcludedDeviceInfoByIndex #define nvmlDeviceGetGpuInstancePossiblePlacements nvmlDeviceGetGpuInstancePossiblePlacements_v2 #define nvmlVgpuInstanceGetLicenseInfo nvmlVgpuInstanceGetLicenseInfo_v2 + #define nvmlDeviceGetDriverModel nvmlDeviceGetDriverModel_v2 #endif // #ifndef NVML_NO_UNVERSIONED_FUNC_DEFS #define NVML_STRUCT_VERSION(data, ver) (unsigned int)(sizeof(nvml ## data ## _v ## ver ## _t) | \ @@ -148,6 +151,11 @@ typedef struct struct nvmlDevice_st* handle; } nvmlDevice_t; +typedef struct +{ + struct nvmlGpuInstance_st* handle; +} nvmlGpuInstance_t; + /** * Buffer size guaranteed to be large enough for pci bus id */ @@ -587,12 +595,12 @@ typedef enum nvmlValueType_enum NVML_VALUE_TYPE_UNSIGNED_LONG_LONG = 3, NVML_VALUE_TYPE_SIGNED_LONG_LONG = 4, NVML_VALUE_TYPE_SIGNED_INT = 5, + NVML_VALUE_TYPE_UNSIGNED_SHORT = 6, // Keep this last NVML_VALUE_TYPE_COUNT }nvmlValueType_t; - /** * Union to represent different types of Value */ @@ -604,6 +612,7 @@ typedef union nvmlValue_st unsigned long ulVal; //!< If the value is unsigned long unsigned long long ullVal; //!< If the value is unsigned long long signed long long sllVal; //!< If the value is signed long long + unsigned short usVal; //!< If the value is unsigned short }nvmlValue_t; /** @@ -645,6 +654,9 @@ typedef struct nvmlViolationTime_st #define NVML_MAX_THERMAL_SENSORS_PER_GPU 3 +/** + * Represents the thermal sensor targets + */ typedef enum { NVML_THERMAL_TARGET_NONE = 0, @@ -660,6 +672,9 @@ typedef enum NVML_THERMAL_TARGET_UNKNOWN = -1, } nvmlThermalTarget_t; +/** + * Represents the thermal sensor controllers + */ typedef enum { NVML_THERMAL_CONTROLLER_NONE = 0, @@ -691,6 +706,9 @@ typedef struct { nvmlThermalTarget_t target; } nvmlGpuThermalSettingsSensor_t; +/** + * Struct to hold the thermal sensor settings + */ typedef struct { unsigned int count; @@ -698,6 +716,84 @@ typedef struct } nvmlGpuThermalSettings_t; +/** + * Cooler control type + */ +typedef enum nvmlCoolerControl_enum +{ + NVML_THERMAL_COOLER_SIGNAL_NONE = 0, //!< This cooler has no control signal. + NVML_THERMAL_COOLER_SIGNAL_TOGGLE = 1, //!< This cooler can only be toggled either ON or OFF (eg a switch). + NVML_THERMAL_COOLER_SIGNAL_VARIABLE = 2, //!< This cooler's level can be adjusted from some minimum to some maximum (eg a knob). + + // Keep this last + NVML_THERMAL_COOLER_SIGNAL_COUNT +} nvmlCoolerControl_t; + +/** + * Cooler's target + */ +typedef enum nvmlCoolerTarget_enum +{ + NVML_THERMAL_COOLER_TARGET_NONE = 1 << 0, //!< This cooler cools nothing. + NVML_THERMAL_COOLER_TARGET_GPU = 1 << 1, //!< This cooler can cool the GPU. + NVML_THERMAL_COOLER_TARGET_MEMORY = 1 << 2, //!< This cooler can cool the memory. + NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY = 1 << 3, //!< This cooler can cool the power supply. + NVML_THERMAL_COOLER_TARGET_GPU_RELATED = (NVML_THERMAL_COOLER_TARGET_GPU | NVML_THERMAL_COOLER_TARGET_MEMORY | NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY) //!< This cooler cools all of the components related to its target gpu. GPU_RELATED = GPU | MEMORY | POWER_SUPPLY +} nvmlCoolerTarget_t; + +typedef struct +{ + unsigned int version; //!< the API version number + unsigned int index; //!< the cooler index + nvmlCoolerControl_t signalType; //!< OUT: the cooler's control signal characteristics + nvmlCoolerTarget_t target; //!< OUT: the target that cooler cools +} nvmlCoolerInfo_v1_t; +typedef nvmlCoolerInfo_v1_t nvmlCoolerInfo_t; + +#define nvmlCoolerInfo_v1 NVML_STRUCT_VERSION(CoolerInfo, 1) + +/** + * UUID length in ASCII format + */ +#define NVML_DEVICE_UUID_ASCII_LEN 41 + +/** + * UUID length in binary format + */ +#define NVML_DEVICE_UUID_BINARY_LEN 16 + +/** + * Enum to represent different UUID types + */ +typedef enum +{ + NVML_UUID_TYPE_NONE = 0, //!< Undefined type + NVML_UUID_TYPE_ASCII = 1, //!< ASCII format type + NVML_UUID_TYPE_BINARY = 2, //!< Binary format type +} nvmlUUIDType_t; + +/** + * Union to represent different UUID values + */ +typedef union +{ + char str[NVML_DEVICE_UUID_ASCII_LEN]; //!< ASCII format value + unsigned char bytes[NVML_DEVICE_UUID_BINARY_LEN]; //!< Binary format value +} nvmlUUIDValue_t; + +/** + * Struct to represent NVML UUID information + */ +typedef struct +{ + unsigned int version; //!< API version number + unsigned int type; //!< One of \p nvmlUUIDType_t + nvmlUUIDValue_t value; //!< One of \p nvmlUUIDValue_t, to be set based on the UUID format +} nvmlUUID_v1_t; +typedef nvmlUUID_v1_t nvmlUUID_t; + +#define nvmlUUID_v1 NVML_STRUCT_VERSION(UUID, 1) + /** @} */ /***************************************************************************************************/ @@ -720,6 +816,18 @@ typedef enum nvmlEnableState_enum //! Generic flag used to force some behavior. See description of particular functions for details. #define nvmlFlagForce 0x01 +/** + * DRAM Encryption Info + */ +typedef struct +{ + unsigned int version; //!< IN - the API version number + nvmlEnableState_t encryptionState; //!< IN/OUT - DRAM Encryption state +} nvmlDramEncryptionInfo_v1_t; +typedef nvmlDramEncryptionInfo_v1_t nvmlDramEncryptionInfo_t; + +#define nvmlDramEncryptionInfo_v1 NVML_STRUCT_VERSION(DramEncryptionInfo, 1) + /** * * The Brand of the GPU * */ @@ -767,6 +875,8 @@ typedef enum nvmlTemperatureThresholds_enum // 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; @@ -782,6 +892,19 @@ typedef enum nvmlTemperatureSensors_enum NVML_TEMPERATURE_COUNT } nvmlTemperatureSensors_t; +/** + * Margin temperature values + */ +typedef struct +{ + unsigned int version; //!< The version number of this struct + int marginTemperature; //!< The margin temperature value +} nvmlMarginTemperature_v1_t; + +typedef nvmlMarginTemperature_v1_t nvmlMarginTemperature_t; + +#define nvmlMarginTemperature_v1 NVML_STRUCT_VERSION(MarginTemperature, 1) + /** * Compute mode. * @@ -803,7 +926,7 @@ typedef enum nvmlComputeMode_enum /** * Max Clock Monitors available */ -#define MAX_CLK_DOMAINS 32 +#define MAX_CLK_DOMAINS 32 /** * Clock Monitor error types @@ -881,12 +1004,26 @@ typedef enum nvmlMemoryErrorType_enum */ NVML_MEMORY_ERROR_TYPE_UNCORRECTED = 1, - // Keep this last NVML_MEMORY_ERROR_TYPE_COUNT //!< Count of memory error types } nvmlMemoryErrorType_t; +/** + * Represents Nvlink Version + */ +typedef enum nvmlNvlinkVersion_enum +{ + NVML_NVLINK_VERSION_INVALID = 0, + NVML_NVLINK_VERSION_1_0 = 1, + NVML_NVLINK_VERSION_2_0 = 2, + NVML_NVLINK_VERSION_2_2 = 3, + NVML_NVLINK_VERSION_3_0 = 4, + NVML_NVLINK_VERSION_3_1 = 5, + NVML_NVLINK_VERSION_4_0 = 6, + NVML_NVLINK_VERSION_5_0 = 7, +}nvmlNvlinkVersion_t; + /** * ECC counter types. * @@ -943,8 +1080,9 @@ typedef enum nvmlClockId_enum typedef enum nvmlDriverModel_enum { - NVML_DRIVER_WDDM = 0, //!< WDDM driver model -- GPU treated as a display device - NVML_DRIVER_WDM = 1 //!< WDM (TCC) model (recommended) -- GPU treated as a generic device + NVML_DRIVER_WDDM = 0, //!< WDDM driver model -- GPU treated as a display device + NVML_DRIVER_WDM = 1, //!< WDM (TCC) model (deprecated) -- GPU treated as a generic compute device + NVML_DRIVER_MCDM = 2 //!< MCDM driver model -- GPU treated as a Microsoft compute device } nvmlDriverModel_t; #define NVML_MAX_GPU_PERF_PSTATES 16 @@ -973,6 +1111,62 @@ typedef enum nvmlPStates_enum NVML_PSTATE_UNKNOWN = 32 //!< Unknown performance state } nvmlPstates_t; +/** + * Clock offset info. + */ +typedef struct +{ + unsigned int version; //!< The version number of this struct + nvmlClockType_t type; + nvmlPstates_t pstate; + int clockOffsetMHz; + int minClockOffsetMHz; + int maxClockOffsetMHz; +} nvmlClockOffset_v1_t; + +typedef nvmlClockOffset_v1_t nvmlClockOffset_t; + +#define nvmlClockOffset_v1 NVML_STRUCT_VERSION(ClockOffset, 1) + +/** + * Fan speed info. + */ +typedef struct +{ + unsigned int version; //!< the API version number + unsigned int fan; //!< the fan index + unsigned int speed; //!< OUT: the fan speed in RPM +} nvmlFanSpeedInfo_v1_t; +typedef nvmlFanSpeedInfo_v1_t nvmlFanSpeedInfo_t; + +#define nvmlFanSpeedInfo_v1 NVML_STRUCT_VERSION(FanSpeedInfo, 1) + +#define NVML_PERF_MODES_BUFFER_SIZE 2048 + +/** + * Device performance modes string + */ +typedef struct +{ + unsigned int version; //!< the API version number + char str[NVML_PERF_MODES_BUFFER_SIZE]; //!< OUT: the performance modes string. +} nvmlDevicePerfModes_v1_t; +typedef nvmlDevicePerfModes_v1_t nvmlDevicePerfModes_t; + +#define nvmlDevicePerfModes_v1 NVML_STRUCT_VERSION(DevicePerfModes, 1) + +/** + * Device current clocks string + */ +typedef struct +{ + unsigned int version; //!< the API version number + char str[NVML_PERF_MODES_BUFFER_SIZE]; //!< OUT: the current clock frequency string. +} nvmlDeviceCurrentClockFreqs_v1_t; +typedef nvmlDeviceCurrentClockFreqs_v1_t nvmlDeviceCurrentClockFreqs_t; + +#define nvmlDeviceCurrentClockFreqs_v1 NVML_STRUCT_VERSION(DeviceCurrentClockFreqs, 1) + /** * GPU Operation Mode * @@ -999,7 +1193,7 @@ typedef enum nvmlInforomObject_enum NVML_INFOROM_OEM = 0, //!< An object defined by OEM NVML_INFOROM_ECC = 1, //!< The ECC object determining the level of ECC support NVML_INFOROM_POWER = 2, //!< The power management object - + NVML_INFOROM_DEN = 3, //!< DRAM Encryption object // Keep this last NVML_INFOROM_COUNT //!< This counts the number of infoROM objects the driver knows about } nvmlInforomObject_t; @@ -1086,10 +1280,244 @@ typedef enum nvmlRestrictedAPI_enum NVML_RESTRICTED_API_COUNT } nvmlRestrictedAPI_t; +/** + * Structure to store utilization value and process Id + */ +typedef struct nvmlProcessUtilizationSample_st +{ + unsigned int pid; //!< PID of process + unsigned long long timeStamp; //!< CPU Timestamp in microseconds + unsigned int smUtil; //!< SM (3D/Compute) Util Value + unsigned int memUtil; //!< Frame Buffer Memory Util Value + unsigned int encUtil; //!< Encoder Util Value + unsigned int decUtil; //!< Decoder Util Value +} nvmlProcessUtilizationSample_t; + +/** + * Structure to store utilization value and process Id -- version 1 + */ +typedef struct +{ + unsigned long long timeStamp; //!< CPU Timestamp in microseconds + unsigned int pid; //!< PID of process + unsigned int smUtil; //!< SM (3D/Compute) Util Value + unsigned int memUtil; //!< Frame Buffer Memory Util Value + unsigned int encUtil; //!< Encoder Util Value + unsigned int decUtil; //!< Decoder Util Value + unsigned int jpgUtil; //!< Jpeg Util Value + unsigned int ofaUtil; //!< Ofa Util Value +} nvmlProcessUtilizationInfo_v1_t; + +/** + * Structure to store utilization and process ID for each running process -- version 1 + */ +typedef struct +{ + unsigned int version; //!< The version number of this struct + unsigned int processSamplesCount; //!< Caller-supplied array size, and returns number of processes running + unsigned long long lastSeenTimeStamp; //!< Return only samples with timestamp greater than lastSeenTimeStamp + nvmlProcessUtilizationInfo_v1_t *procUtilArray; //!< The array (allocated by caller) of the utilization of GPU SM, framebuffer, video encoder, video decoder, JPEG, and OFA +} nvmlProcessesUtilizationInfo_v1_t; +typedef nvmlProcessesUtilizationInfo_v1_t nvmlProcessesUtilizationInfo_t; +#define nvmlProcessesUtilizationInfo_v1 NVML_STRUCT_VERSION(ProcessesUtilizationInfo, 1) + +/** + * Structure to store SRAM uncorrectable error counters + */ +typedef struct +{ + unsigned int version; //!< the API version number + unsigned long long aggregateUncParity; //!< aggregate uncorrectable parity error count + unsigned long long aggregateUncSecDed; //!< aggregate uncorrectable SEC-DED error count + unsigned long long aggregateCor; //!< aggregate correctable error count + unsigned long long volatileUncParity; //!< volatile uncorrectable parity error count + unsigned long long volatileUncSecDed; //!< volatile uncorrectable SEC-DED error count + unsigned long long volatileCor; //!< volatile correctable error count + unsigned long long aggregateUncBucketL2; //!< aggregate uncorrectable error count for L2 cache bucket + unsigned long long aggregateUncBucketSm; //!< aggregate uncorrectable error count for SM bucket + unsigned long long aggregateUncBucketPcie; //!< aggregate uncorrectable error count for PCIE bucket + unsigned long long aggregateUncBucketMcu; //!< aggregate uncorrectable error count for Microcontroller bucket + unsigned long long aggregateUncBucketOther; //!< aggregate uncorrectable error count for Other bucket + unsigned int bThresholdExceeded; //!< if the error threshold of field diag is exceeded +} nvmlEccSramErrorStatus_v1_t; + +typedef nvmlEccSramErrorStatus_v1_t nvmlEccSramErrorStatus_t; +#define nvmlEccSramErrorStatus_v1 NVML_STRUCT_VERSION(EccSramErrorStatus, 1) + +/** + * Structure to store platform information + * + * @deprecated The nvmlPlatformInfo_v1_t will be deprecated in the subsequent releases. + * Use nvmlPlatformInfo_v2_t + */ +typedef struct +{ + unsigned int version; //!< the API version number + unsigned char ibGuid[16]; //!< Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero) + unsigned char rackGuid[16]; //!< GUID of the rack containing this GPU (for Blackwell rackGuid is 13 bytes so indices 13-15 are zero) + unsigned char chassisPhysicalSlotNumber; //!< The slot number in the rack containing this GPU (includes switches) + unsigned char computeSlotIndex; //!< The index within the compute slots in the rack containing this GPU (does not include switches) + unsigned char nodeIndex; //!< Index of the node within the slot containing this GPU + unsigned char peerType; //!< Platform indicated NVLink-peer type (e.g. switch present or not) + unsigned char moduleId; //!< ID of this GPU within the node +} nvmlPlatformInfo_v1_t; +#define nvmlPlatformInfo_v1 NVML_STRUCT_VERSION(PlatformInfo, 1) + +/** + * Structure to store platform information (v2) + */ +typedef struct +{ + unsigned int version; //!< the API version number + unsigned char ibGuid[16]; //!< Infiniband GUID reported by platform (for Blackwell, ibGuid is 8 bytes so indices 8-15 are zero) + unsigned char chassisSerialNumber[16]; //!< Serial number of the chassis containing this GPU (for Blackwell it is 13 bytes so indices 13-15 are zero) + unsigned char slotNumber; //!< The slot number in the chassis containing this GPU (includes switches) + unsigned char trayIndex; //!< The tray index within the compute slots in the chassis containing this GPU (does not include switches) + unsigned char hostId; //!< Index of the node within the slot containing this GPU + unsigned char peerType; //!< Platform indicated NVLink-peer type (e.g. switch present or not) + unsigned char moduleId; //!< ID of this GPU within the node +} nvmlPlatformInfo_v2_t; + +typedef nvmlPlatformInfo_v2_t nvmlPlatformInfo_t; +#define nvmlPlatformInfo_v2 NVML_STRUCT_VERSION(PlatformInfo, 2) + +/** + * GSP firmware + */ +#define NVML_GSP_FIRMWARE_VERSION_BUF_SIZE 0x40 + +/** + * Simplified chip architecture + */ +#define NVML_DEVICE_ARCH_KEPLER 2 // Devices based on the NVIDIA Kepler architecture +#define NVML_DEVICE_ARCH_MAXWELL 3 // Devices based on the NVIDIA Maxwell architecture +#define NVML_DEVICE_ARCH_PASCAL 4 // Devices based on the NVIDIA Pascal architecture +#define NVML_DEVICE_ARCH_VOLTA 5 // Devices based on the NVIDIA Volta architecture +#define NVML_DEVICE_ARCH_TURING 6 // Devices based on the NVIDIA Turing architecture +#define NVML_DEVICE_ARCH_AMPERE 7 // Devices based on the NVIDIA Ampere architecture +#define NVML_DEVICE_ARCH_ADA 8 // Devices based on the NVIDIA Ada architecture +#define NVML_DEVICE_ARCH_HOPPER 9 // Devices based on the NVIDIA Hopper architecture + +#define NVML_DEVICE_ARCH_BLACKWELL 10 // Devices based on the NVIDIA Blackwell architecture + +#define NVML_DEVICE_ARCH_T23X 11 // Devices based on NVIDIA Orin architecture + +#define NVML_DEVICE_ARCH_UNKNOWN 0xffffffff // Anything else, presumably something newer + +typedef unsigned int nvmlDeviceArchitecture_t; + +/** + * PCI bus types + */ +#define NVML_BUS_TYPE_UNKNOWN 0 +#define NVML_BUS_TYPE_PCI 1 +#define NVML_BUS_TYPE_PCIE 2 +#define NVML_BUS_TYPE_FPCI 3 +#define NVML_BUS_TYPE_AGP 4 + +typedef unsigned int nvmlBusType_t; + +/** + * Device Power Modes + */ + +/** + * Device Fan control policy + */ +#define NVML_FAN_POLICY_TEMPERATURE_CONTINOUS_SW 0 +#define NVML_FAN_POLICY_MANUAL 1 + +typedef unsigned int nvmlFanControlPolicy_t; + +/** + * Device Power Source + */ +#define NVML_POWER_SOURCE_AC 0x00000000 +#define NVML_POWER_SOURCE_BATTERY 0x00000001 +#define NVML_POWER_SOURCE_UNDERSIZED 0x00000002 + +typedef unsigned int nvmlPowerSource_t; + +/** + * Device PCIE link Max Speed + */ +#define NVML_PCIE_LINK_MAX_SPEED_INVALID 0x00000000 +#define NVML_PCIE_LINK_MAX_SPEED_2500MBPS 0x00000001 +#define NVML_PCIE_LINK_MAX_SPEED_5000MBPS 0x00000002 +#define NVML_PCIE_LINK_MAX_SPEED_8000MBPS 0x00000003 +#define NVML_PCIE_LINK_MAX_SPEED_16000MBPS 0x00000004 +#define NVML_PCIE_LINK_MAX_SPEED_32000MBPS 0x00000005 +#define NVML_PCIE_LINK_MAX_SPEED_64000MBPS 0x00000006 + +/** + * Adaptive clocking status + */ +#define NVML_ADAPTIVE_CLOCKING_INFO_STATUS_DISABLED 0x00000000 +#define NVML_ADAPTIVE_CLOCKING_INFO_STATUS_ENABLED 0x00000001 + +#define NVML_MAX_GPU_UTILIZATIONS 8 + +/** + * Represents the GPU utilization domains + */ +typedef enum nvmlGpuUtilizationDomainId_t +{ + NVML_GPU_UTILIZATION_DOMAIN_GPU = 0, //!< Graphics engine domain + NVML_GPU_UTILIZATION_DOMAIN_FB = 1, //!< Frame buffer domain + NVML_GPU_UTILIZATION_DOMAIN_VID = 2, //!< Video engine domain + NVML_GPU_UTILIZATION_DOMAIN_BUS = 3, //!< Bus interface domain +} nvmlGpuUtilizationDomainId_t; + +typedef struct { + unsigned int bIsPresent; + unsigned int percentage; + unsigned int incThreshold; + unsigned int decThreshold; +} nvmlGpuDynamicPstatesInfoUtilization_t; + +typedef struct nvmlGpuDynamicPstatesInfo_st +{ + unsigned int flags; //!< Reserved for future use + nvmlGpuDynamicPstatesInfoUtilization_t utilization[NVML_MAX_GPU_UTILIZATIONS]; +} nvmlGpuDynamicPstatesInfo_t; + +/* + * PCIe outbound/inbound atomic operations capability + */ +#define NVML_PCIE_ATOMICS_CAP_FETCHADD32 0x01 +#define NVML_PCIE_ATOMICS_CAP_FETCHADD64 0x02 +#define NVML_PCIE_ATOMICS_CAP_SWAP32 0x04 +#define NVML_PCIE_ATOMICS_CAP_SWAP64 0x08 +#define NVML_PCIE_ATOMICS_CAP_CAS32 0x10 +#define NVML_PCIE_ATOMICS_CAP_CAS64 0x20 +#define NVML_PCIE_ATOMICS_CAP_CAS128 0x40 +#define NVML_PCIE_ATOMICS_OPS_MAX 7 + +/** + * Device Scope - This is useful to retrieve the telemetry at GPU and module (e.g. GPU + CPU) level + */ +#define NVML_POWER_SCOPE_GPU 0U //!< Targets only GPU +#define NVML_POWER_SCOPE_MODULE 1U //!< Targets the whole module +#define NVML_POWER_SCOPE_MEMORY 2U //!< Targets the GPU Memory + +typedef unsigned char nvmlPowerScopeType_t; + +/** + * Contains the power management limit + */ +typedef struct +{ + unsigned int version; //!< Structure format version (must be 1) + nvmlPowerScopeType_t powerScope; //!< [in] Device type: GPU or Total Module + unsigned int powerValueMw; //!< [out] Power value to retrieve or set in milliwatts +} nvmlPowerValue_v2_t; + +#define nvmlPowerValue_v2 NVML_STRUCT_VERSION(PowerValue, 2) + /** @} */ /***************************************************************************************************/ -/** @addtogroup virtualGPU +/** @addtogroup virtualGPU vGPU Enums, Constants, Structs * @{ */ /***************************************************************************************************/ @@ -1176,6 +1604,7 @@ typedef enum nvmlVgpuCapability_enum typedef enum nvmlVgpuDriverCapability_enum { NVML_VGPU_DRIVER_CAP_HETEROGENEOUS_MULTI_VGPU = 0, //!< Supports mixing of different vGPU profiles within one guest VM + NVML_VGPU_DRIVER_CAP_WARM_UPDATE = 1, //!< Supports FSR and warm update of vGPU host driver without terminating the running guest VM // Keep this last NVML_VGPU_DRIVER_CAP_COUNT } nvmlVgpuDriverCapability_t; @@ -1185,14 +1614,18 @@ typedef enum nvmlVgpuDriverCapability_enum */ typedef enum nvmlDeviceVgpuCapability_enum { - NVML_DEVICE_VGPU_CAP_FRACTIONAL_MULTI_VGPU = 0, //!< Query if the fractional vGPU profiles on this GPU can be used in multi-vGPU configurations - NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_PROFILES = 1, //!< Query if the GPU support concurrent execution of timesliced vGPU profiles of differing types - NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_SIZES = 2, //!< Query if the GPU support concurrent execution of timesliced vGPU profiles of differing framebuffer sizes + NVML_DEVICE_VGPU_CAP_FRACTIONAL_MULTI_VGPU = 0, //!< Query whether the fractional vGPU profiles on this GPU can be used in multi-vGPU configurations + NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_PROFILES = 1, //!< Query whether the GPU support concurrent execution of timesliced vGPU profiles of differing types + NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_SIZES = 2, //!< Query whether the GPU support concurrent execution of timesliced vGPU profiles of differing framebuffer sizes NVML_DEVICE_VGPU_CAP_READ_DEVICE_BUFFER_BW = 3, //!< Query the GPU's read_device_buffer expected bandwidth capacity in megabytes per second NVML_DEVICE_VGPU_CAP_WRITE_DEVICE_BUFFER_BW = 4, //!< Query the GPU's write_device_buffer expected bandwidth capacity in megabytes per second - NVML_DEVICE_VGPU_CAP_DEVICE_STREAMING = 5, //!< Query if vGPU profiles on the GPU supports migration data streaming + NVML_DEVICE_VGPU_CAP_DEVICE_STREAMING = 5, //!< Query whether the vGPU profiles on the GPU supports migration data streaming NVML_DEVICE_VGPU_CAP_MINI_QUARTER_GPU = 6, //!< Set/Get support for mini-quarter vGPU profiles NVML_DEVICE_VGPU_CAP_COMPUTE_MEDIA_ENGINE_GPU = 7, //!< Set/Get support for compute media engine vGPU profiles + NVML_DEVICE_VGPU_CAP_WARM_UPDATE = 8, //!< Query whether the GPU supports FSR and warm update + NVML_DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS = 9, //!< Query whether the GPU supports reporting of placements of timesliced vGPU profiles with identical framebuffer sizes + NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED = 10, //!< Query whether the GPU supports timesliced vGPU on MIG + NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = 11, //!< Set/Get MIG timesliced mode reporting, without impacting the underlying functionality // Keep this last NVML_DEVICE_VGPU_CAP_COUNT } nvmlDeviceVgpuCapability_t; @@ -1235,6 +1668,12 @@ typedef enum nvmlDeviceVgpuCapability_enum #define NVML_VGPU_PGPU_VIRTUALIZATION_CAP_MIGRATION_NO 0x0 #define NVML_VGPU_PGPU_VIRTUALIZATION_CAP_MIGRATION_YES 0x1 +/** + * Macros to indicate the vGPU mode of the GPU. + */ +#define NVML_VGPU_PGPU_HETEROGENEOUS_MODE 0 +#define NVML_VGPU_PGPU_HOMOGENEOUS_MODE 1 + /** @} */ /***************************************************************************************************/ @@ -1279,9 +1718,33 @@ typedef struct unsigned int count; //!< Count of placement IDs fetched unsigned int *placementIds; //!< Placement IDs for the vGPU type } nvmlVgpuPlacementList_v1_t; -typedef nvmlVgpuPlacementList_v1_t nvmlVgpuPlacementList_t; #define nvmlVgpuPlacementList_v1 NVML_STRUCT_VERSION(VgpuPlacementList, 1) +/** + * Structure to store the list of vGPU placements -- version 2 + */ +typedef struct +{ + unsigned int version; //!< IN: The version number of this struct + unsigned int placementSize; //!< OUT: The number of slots occupied by the vGPU type + unsigned int count; //!< IN/OUT: Count of the placement IDs + unsigned int *placementIds; //!< IN/OUT: Placement IDs for the vGPU type + unsigned int mode; //!< IN: The vGPU mode. Either NVML_VGPU_PGPU_HETEROGENEOUS_MODE or NVML_VGPU_PGPU_HOMOGENEOUS_MODE +} nvmlVgpuPlacementList_v2_t; +typedef nvmlVgpuPlacementList_v2_t nvmlVgpuPlacementList_t; +#define nvmlVgpuPlacementList_v2 NVML_STRUCT_VERSION(VgpuPlacementList, 2) + +/** + * Structure to store BAR1 size information of vGPU type -- Version 1 + */ +typedef struct +{ + unsigned int version; //!< The version number of this struct + unsigned long long bar1Size; //!< BAR1 size in megabytes +} nvmlVgpuTypeBar1Info_v1_t; +typedef nvmlVgpuTypeBar1Info_v1_t nvmlVgpuTypeBar1Info_t; +#define nvmlVgpuTypeBar1Info_v1 NVML_STRUCT_VERSION(VgpuTypeBar1Info, 1) + /** * Structure to store Utilization Value and vgpuInstance */ @@ -1369,6 +1832,17 @@ typedef struct typedef nvmlVgpuProcessesUtilizationInfo_v1_t nvmlVgpuProcessesUtilizationInfo_t; #define nvmlVgpuProcessesUtilizationInfo_v1 NVML_STRUCT_VERSION(VgpuProcessesUtilizationInfo, 1) +/** + * Structure to store the information of vGPU runtime state -- version 1 + */ +typedef struct +{ + unsigned int version; //!< IN: The version number of this struct + unsigned long long size; //!< OUT: The runtime state size of the vGPU instance +} nvmlVgpuRuntimeState_v1_t; +typedef nvmlVgpuRuntimeState_v1_t nvmlVgpuRuntimeState_t; +#define nvmlVgpuRuntimeState_v1 NVML_STRUCT_VERSION(VgpuRuntimeState, 1) + /** * vGPU scheduler policies */ @@ -1385,6 +1859,11 @@ typedef nvmlVgpuProcessesUtilizationInfo_v1_t nvmlVgpuProcessesUtilizationInfo_t #define NVML_VGPU_SCHEDULER_ARR_DISABLE 1 #define NVML_VGPU_SCHEDULER_ARR_ENABLE 2 +/** + * vGPU scheduler engine types + */ +#define NVML_VGPU_SCHEDULER_ENGINE_TYPE_GRAPHICS 1 + typedef struct { unsigned int avgFactor; unsigned int timeslice; @@ -1517,47 +1996,6 @@ typedef struct nvmlVgpuLicenseInfo_st unsigned int currentState; //!< Current license state } nvmlVgpuLicenseInfo_t; -/** - * Structure to store utilization value and process Id - */ -typedef struct nvmlProcessUtilizationSample_st -{ - unsigned int pid; //!< PID of process - unsigned long long timeStamp; //!< CPU Timestamp in microseconds - unsigned int smUtil; //!< SM (3D/Compute) Util Value - unsigned int memUtil; //!< Frame Buffer Memory Util Value - unsigned int encUtil; //!< Encoder Util Value - unsigned int decUtil; //!< Decoder Util Value -} nvmlProcessUtilizationSample_t; - -/** - * Structure to store utilization value and process Id -- version 1 - */ -typedef struct -{ - unsigned long long timeStamp; //!< CPU Timestamp in microseconds - unsigned int pid; //!< PID of process - unsigned int smUtil; //!< SM (3D/Compute) Util Value - unsigned int memUtil; //!< Frame Buffer Memory Util Value - unsigned int encUtil; //!< Encoder Util Value - unsigned int decUtil; //!< Decoder Util Value - unsigned int jpgUtil; //!< Jpeg Util Value - unsigned int ofaUtil; //!< Ofa Util Value -} nvmlProcessUtilizationInfo_v1_t; - -/** - * Structure to store utilization and process ID for each running process -- version 1 - */ -typedef struct -{ - unsigned int version; //!< The version number of this struct - unsigned int processSamplesCount; //!< Caller-supplied array size, and returns number of processes running - unsigned long long lastSeenTimeStamp; //!< Return only samples with timestamp greater than lastSeenTimeStamp - nvmlProcessUtilizationInfo_v1_t *procUtilArray; //!< The array (allocated by caller) of the utilization of GPU SM, framebuffer, video encoder, video decoder, JPEG, and OFA -} nvmlProcessesUtilizationInfo_v1_t; -typedef nvmlProcessesUtilizationInfo_v1_t nvmlProcessesUtilizationInfo_t; -#define nvmlProcessesUtilizationInfo_v1 NVML_STRUCT_VERSION(ProcessesUtilizationInfo, 1) - /** * Structure to store license expiry date and time values */ @@ -1596,119 +2034,109 @@ typedef struct nvmlGridLicensableFeatures_st } nvmlGridLicensableFeatures_t; /** - * Structure to store SRAM uncorrectable error counters + * Enum describing the GPU Recovery Action + */ +typedef enum nvmlDeviceGpuRecoveryAction_s { + NVML_GPU_RECOVERY_ACTION_NONE = 0, + NVML_GPU_RECOVERY_ACTION_GPU_RESET = 1, + NVML_GPU_RECOVERY_ACTION_NODE_REBOOT = 2, + NVML_GPU_RECOVERY_ACTION_DRAIN_P2P = 3, + NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET = 4, +} nvmlDeviceGpuRecoveryAction_t; + +/** + * Structure to store the vGPU type IDs -- version 1 */ typedef struct { - unsigned int version; //!< the API version number - unsigned long long aggregateUncParity; //!< aggregate uncorrectable parity error count - unsigned long long aggregateUncSecDed; //!< aggregate uncorrectable SEC-DED error count - unsigned long long aggregateCor; //!< aggregate correctable error count - unsigned long long volatileUncParity; //!< volatile uncorrectable parity error count - unsigned long long volatileUncSecDed; //!< volatile uncorrectable SEC-DED error count - unsigned long long volatileCor; //!< volatile correctable error count - unsigned long long aggregateUncBucketL2; //!< aggregate uncorrectable error count for L2 cache bucket - unsigned long long aggregateUncBucketSm; //!< aggregate uncorrectable error count for SM bucket - unsigned long long aggregateUncBucketPcie; //!< aggregate uncorrectable error count for PCIE bucket - unsigned long long aggregateUncBucketMcu; //!< aggregate uncorrectable error count for Microcontroller bucket - unsigned long long aggregateUncBucketOther; //!< aggregate uncorrectable error count for Other bucket - unsigned int bThresholdExceeded; //!< if the error threshold of field diag is exceeded -} nvmlEccSramErrorStatus_v1_t; - -typedef nvmlEccSramErrorStatus_v1_t nvmlEccSramErrorStatus_t; -#define nvmlEccSramErrorStatus_v1 NVML_STRUCT_VERSION(EccSramErrorStatus, 1) + unsigned int version; //!< IN: The version number of this struct + unsigned int vgpuCount; //!< IN/OUT: Number of vGPU types + nvmlVgpuTypeId_t *vgpuTypeIds; //!< OUT: List of vGPU type IDs +} nvmlVgpuTypeIdInfo_v1_t; +typedef nvmlVgpuTypeIdInfo_v1_t nvmlVgpuTypeIdInfo_t; +#define nvmlVgpuTypeIdInfo_v1 NVML_STRUCT_VERSION(VgpuTypeIdInfo, 1) /** - * GSP firmware + * Structure to store the maximum number of possible vGPU type IDs -- version 1 */ -#define NVML_GSP_FIRMWARE_VERSION_BUF_SIZE 0x40 - -/** - * Simplified chip architecture - */ -#define NVML_DEVICE_ARCH_KEPLER 2 // Devices based on the NVIDIA Kepler architecture -#define NVML_DEVICE_ARCH_MAXWELL 3 // Devices based on the NVIDIA Maxwell architecture -#define NVML_DEVICE_ARCH_PASCAL 4 // Devices based on the NVIDIA Pascal architecture -#define NVML_DEVICE_ARCH_VOLTA 5 // Devices based on the NVIDIA Volta architecture -#define NVML_DEVICE_ARCH_TURING 6 // Devices based on the NVIDIA Turing architecture -#define NVML_DEVICE_ARCH_AMPERE 7 // Devices based on the NVIDIA Ampere architecture -#define NVML_DEVICE_ARCH_ADA 8 // Devices based on the NVIDIA Ada architecture -#define NVML_DEVICE_ARCH_HOPPER 9 // Devices based on the NVIDIA Hopper architecture - -#define NVML_DEVICE_ARCH_UNKNOWN 0xffffffff // Anything else, presumably something newer - -typedef unsigned int nvmlDeviceArchitecture_t; - -/** - * PCI bus types - */ -#define NVML_BUS_TYPE_UNKNOWN 0 -#define NVML_BUS_TYPE_PCI 1 -#define NVML_BUS_TYPE_PCIE 2 -#define NVML_BUS_TYPE_FPCI 3 -#define NVML_BUS_TYPE_AGP 4 - -typedef unsigned int nvmlBusType_t; - -/** - * Device Power Modes - */ - -/** - * Device Fan control policy - */ -#define NVML_FAN_POLICY_TEMPERATURE_CONTINOUS_SW 0 -#define NVML_FAN_POLICY_MANUAL 1 - -typedef unsigned int nvmlFanControlPolicy_t; - -/** - * Device Power Source - */ -#define NVML_POWER_SOURCE_AC 0x00000000 -#define NVML_POWER_SOURCE_BATTERY 0x00000001 -#define NVML_POWER_SOURCE_UNDERSIZED 0x00000002 - -typedef unsigned int nvmlPowerSource_t; - -/* - * Device PCIE link Max Speed - */ -#define NVML_PCIE_LINK_MAX_SPEED_INVALID 0x00000000 -#define NVML_PCIE_LINK_MAX_SPEED_2500MBPS 0x00000001 -#define NVML_PCIE_LINK_MAX_SPEED_5000MBPS 0x00000002 -#define NVML_PCIE_LINK_MAX_SPEED_8000MBPS 0x00000003 -#define NVML_PCIE_LINK_MAX_SPEED_16000MBPS 0x00000004 -#define NVML_PCIE_LINK_MAX_SPEED_32000MBPS 0x00000005 -#define NVML_PCIE_LINK_MAX_SPEED_64000MBPS 0x00000006 - -/* - * Adaptive clocking status - */ -#define NVML_ADAPTIVE_CLOCKING_INFO_STATUS_DISABLED 0x00000000 -#define NVML_ADAPTIVE_CLOCKING_INFO_STATUS_ENABLED 0x00000001 - -#define NVML_MAX_GPU_UTILIZATIONS 8 -typedef enum nvmlGpuUtilizationDomainId_t +typedef struct { - NVML_GPU_UTILIZATION_DOMAIN_GPU = 0, //!< Graphics engine domain - NVML_GPU_UTILIZATION_DOMAIN_FB = 1, //!< Frame buffer domain - NVML_GPU_UTILIZATION_DOMAIN_VID = 2, //!< Video engine domain - NVML_GPU_UTILIZATION_DOMAIN_BUS = 3, //!< Bus interface domain -} nvmlGpuUtilizationDomainId_t; + unsigned int version; //!< IN: The version number of this struct + nvmlVgpuTypeId_t vgpuTypeId; //!< IN: Handle to vGPU type + unsigned int maxInstancePerGI; //!< OUT: Maximum number of vGPU instances per GPU instance +} nvmlVgpuTypeMaxInstance_v1_t; +typedef nvmlVgpuTypeMaxInstance_v1_t nvmlVgpuTypeMaxInstance_t; +#define nvmlVgpuTypeMaxInstance_v1 NVML_STRUCT_VERSION(VgpuTypeMaxInstance, 1) -typedef struct { - unsigned int bIsPresent; - unsigned int percentage; - unsigned int incThreshold; - unsigned int decThreshold; -} nvmlGpuDynamicPstatesInfoUtilization_t; - -typedef struct nvmlGpuDynamicPstatesInfo_st +/** + * Structure to store active vGPU instance information -- Version 1 + */ +typedef struct { - unsigned int flags; //!< Reserved for future use - nvmlGpuDynamicPstatesInfoUtilization_t utilization[NVML_MAX_GPU_UTILIZATIONS]; -} nvmlGpuDynamicPstatesInfo_t; + unsigned int version; //!< IN: The version number of this struct + unsigned int vgpuCount; //!< IN/OUT: Count of the active vGPU instances + nvmlVgpuInstance_t *vgpuInstances; //!< IN/OUT: list of active vGPU instances +} nvmlActiveVgpuInstanceInfo_v1_t; +typedef nvmlActiveVgpuInstanceInfo_v1_t nvmlActiveVgpuInstanceInfo_t; +#define nvmlActiveVgpuInstanceInfo_v1 NVML_STRUCT_VERSION(ActiveVgpuInstanceInfo, 1) + +/** + * Structure to set vGPU scheduler state information -- version 1 + */ +typedef struct +{ + unsigned int version; //!< IN: The version number of this struct + unsigned int engineId; //!< IN: One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*. + unsigned int schedulerPolicy; //!< IN: Scheduler policy + unsigned int enableARRMode; //!< IN: Adaptive Round Robin scheduler + nvmlVgpuSchedulerSetParams_t schedulerParams; //!< IN: vGPU Scheduler Parameters +} nvmlVgpuSchedulerState_v1_t; +typedef nvmlVgpuSchedulerState_v1_t nvmlVgpuSchedulerState_t; +#define nvmlVgpuSchedulerState_v1 NVML_STRUCT_VERSION(VgpuSchedulerState, 1) + +/** + * Structure to store vGPU scheduler state information -- Version 1 + */ +typedef struct +{ + unsigned int version; //!< IN: The version number of this struct + unsigned int engineId; //!< IN: Engine whose software scheduler state info is fetched. One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*. + unsigned int schedulerPolicy; //!< OUT: Scheduler policy + unsigned int arrMode; //!< OUT: Adaptive Round Robin scheduler mode. One of the NVML_VGPU_SCHEDULER_ARR_*. + nvmlVgpuSchedulerParams_t schedulerParams; //!< OUT: vGPU Scheduler Parameters +} nvmlVgpuSchedulerStateInfo_v1_t; +typedef nvmlVgpuSchedulerStateInfo_v1_t nvmlVgpuSchedulerStateInfo_t; +#define nvmlVgpuSchedulerStateInfo_v1 NVML_STRUCT_VERSION(VgpuSchedulerStateInfo, 1) + +/** + * Structure to store vGPU scheduler log information -- Version 1 + */ +typedef struct +{ + unsigned int version; //!< IN: The version number of this struct + unsigned int engineId; //!< IN: Engine whose software runlist log entries are fetched. One of One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*. + unsigned int schedulerPolicy; //!< OUT: Scheduler policy + unsigned int arrMode; //!< OUT: Adaptive Round Robin scheduler mode. One of the NVML_VGPU_SCHEDULER_ARR_*. + nvmlVgpuSchedulerParams_t schedulerParams; //!< OUT: vGPU Scheduler Parameters + unsigned int entriesCount; //!< OUT: Count of log entries fetched + nvmlVgpuSchedulerLogEntry_t logEntries[NVML_SCHEDULER_SW_MAX_LOG_ENTRIES]; //!< OUT: Structure to store the state and logs of a software runlist +} nvmlVgpuSchedulerLogInfo_v1_t; +typedef nvmlVgpuSchedulerLogInfo_v1_t nvmlVgpuSchedulerLogInfo_t; +#define nvmlVgpuSchedulerLogInfo_v1 NVML_STRUCT_VERSION(VgpuSchedulerLogInfo, 1) + +/** + * Structure to store creatable vGPU placement information -- version 1 + */ +typedef struct +{ + unsigned int version; //!< IN: The version number of this struct + nvmlVgpuTypeId_t vgpuTypeId; //!< IN: Handle to vGPU type + unsigned int count; //!< IN/OUT: Count of the placement IDs + unsigned int *placementIds; //!< IN/OUT: Placement IDs for the vGPU type + unsigned int placementSize; //!< OUT: The number of slots occupied by the vGPU type +} nvmlVgpuCreatablePlacementInfo_v1_t; +typedef nvmlVgpuCreatablePlacementInfo_v1_t nvmlVgpuCreatablePlacementInfo_t; +#define nvmlVgpuCreatablePlacementInfo_v1 NVML_STRUCT_VERSION(VgpuCreatablePlacementInfo, 1) /** @} */ /** @} */ @@ -1760,7 +2188,11 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_RETIRED_DBE 30 //!< Number of retired pages because of double bit errors #define NVML_FI_DEV_RETIRED_PENDING 31 //!< If any pages are pending retirement. 1=yes. 0=no. -/* NvLink Flit Error Counters */ +/** + * NVLink Flit Error Counters + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L0 32 //!< NVLink flow control CRC Error Counter for Lane 0 #define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L1 33 //!< NVLink flow control CRC Error Counter for Lane 1 #define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L2 34 //!< NVLink flow control CRC Error Counter for Lane 2 @@ -1769,7 +2201,11 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L5 37 //!< NVLink flow control CRC Error Counter for Lane 5 #define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_TOTAL 38 //!< NVLink flow control CRC Error Counter total for all Lanes -/* NvLink CRC Data Error Counters */ +/** + * NVLink CRC Data Error Counters + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L0 39 //!< NVLink data CRC Error Counter for Lane 0 #define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L1 40 //!< NVLink data CRC Error Counter for Lane 1 #define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L2 41 //!< NVLink data CRC Error Counter for Lane 2 @@ -1778,7 +2214,11 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L5 44 //!< NVLink data CRC Error Counter for Lane 5 #define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_TOTAL 45 //!< NvLink data CRC Error Counter total for all Lanes -/* NvLink Replay Error Counters */ +/** + * NVLink Replay Error Counters + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L0 46 //!< NVLink Replay Error Counter for Lane 0 #define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L1 47 //!< NVLink Replay Error Counter for Lane 1 #define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L2 48 //!< NVLink Replay Error Counter for Lane 2 @@ -1787,7 +2227,11 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L5 51 //!< NVLink Replay Error Counter for Lane 5 #define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_TOTAL 52 //!< NVLink Replay Error Counter total for all Lanes -/* NvLink Recovery Error Counters */ +/** + * NVLink Recovery Error Counters + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L0 53 //!< NVLink Recovery Error Counter for Lane 0 #define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L1 54 //!< NVLink Recovery Error Counter for Lane 1 #define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L2 55 //!< NVLink Recovery Error Counter for Lane 2 @@ -1838,7 +2282,11 @@ typedef struct nvmlGpuDynamicPstatesInfo_st /* Energy Counter */ #define NVML_FI_DEV_TOTAL_ENERGY_CONSUMPTION 83 //!< Total energy consumption for the GPU in mJ since the driver was last reloaded -/* NVLink Speed */ +/** + * NVLink Speed + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_SPEED_MBPS_L0 84 //!< NVLink Speed in MBps for Link 0 #define NVML_FI_DEV_NVLINK_SPEED_MBPS_L1 85 //!< NVLink Speed in MBps for Link 1 #define NVML_FI_DEV_NVLINK_SPEED_MBPS_L2 86 //!< NVLink Speed in MBps for Link 2 @@ -1855,7 +2303,11 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_PCIE_REPLAY_COUNTER 94 //!< PCIe replay counter #define NVML_FI_DEV_PCIE_REPLAY_ROLLOVER_COUNTER 95 //!< PCIe replay rollover counter -/* NvLink Flit Error Counters */ +/** + * NVLink Flit Error Counters + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L6 96 //!< NVLink flow control CRC Error Counter for Lane 6 #define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L7 97 //!< NVLink flow control CRC Error Counter for Lane 7 #define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L8 98 //!< NVLink flow control CRC Error Counter for Lane 8 @@ -1863,7 +2315,11 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L10 100 //!< NVLink flow control CRC Error Counter for Lane 10 #define NVML_FI_DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L11 101 //!< NVLink flow control CRC Error Counter for Lane 11 -/* NvLink CRC Data Error Counters */ +/** + * NVLink CRC Data Error Counters + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L6 102 //!< NVLink data CRC Error Counter for Lane 6 #define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L7 103 //!< NVLink data CRC Error Counter for Lane 7 #define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L8 104 //!< NVLink data CRC Error Counter for Lane 8 @@ -1871,7 +2327,11 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L10 106 //!< NVLink data CRC Error Counter for Lane 10 #define NVML_FI_DEV_NVLINK_CRC_DATA_ERROR_COUNT_L11 107 //!< NVLink data CRC Error Counter for Lane 11 -/* NvLink Replay Error Counters */ +/** + * NVLink Replay Error Counters + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L6 108 //!< NVLink Replay Error Counter for Lane 6 #define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L7 109 //!< NVLink Replay Error Counter for Lane 7 #define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L8 110 //!< NVLink Replay Error Counter for Lane 8 @@ -1879,7 +2339,11 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L10 112 //!< NVLink Replay Error Counter for Lane 10 #define NVML_FI_DEV_NVLINK_REPLAY_ERROR_COUNT_L11 113 //!< NVLink Replay Error Counter for Lane 11 -/* NvLink Recovery Error Counters */ +/** + * NVLink Recovery Error Counters + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L6 114 //!< NVLink Recovery Error Counter for Lane 6 #define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L7 115 //!< NVLink Recovery Error Counter for Lane 7 #define NVML_FI_DEV_NVLINK_RECOVERY_ERROR_COUNT_L8 116 //!< NVLink Recovery Error Counter for Lane 8 @@ -1911,7 +2375,11 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L10 130 //!< NVLink Bandwidth Counter for Counter Set 1, Lane 10 #define NVML_FI_DEV_NVLINK_BANDWIDTH_C1_L11 131 //!< NVLink Bandwidth Counter for Counter Set 1, Lane 11 -/* NVLink Speed */ +/** + * NVLink Speed + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_SPEED_MBPS_L6 132 //!< NVLink Speed in MBps for Link 6 #define NVML_FI_DEV_NVLINK_SPEED_MBPS_L7 133 //!< NVLink Speed in MBps for Link 7 #define NVML_FI_DEV_NVLINK_SPEED_MBPS_L8 134 //!< NVLink Speed in MBps for Link 8 @@ -1968,15 +2436,45 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_L11 159 //!< NVLink data ECC Error Counter for Link 11 #define NVML_FI_DEV_NVLINK_ECC_DATA_ERROR_COUNT_TOTAL 160 //!< NVLink data ECC Error Counter total for all Links +/** + * NVLink Error Replay + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_ERROR_DL_REPLAY 161 //!< NVLink Replay Error Counter + //!< This is unsupported for Blackwell+. + //!< Please use NVML_FI_DEV_NVLINK_COUNT_LINK_RECOVERY_* +/** + * NVLink Recovery Error Counter + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_ERROR_DL_RECOVERY 162 //!< NVLink Recovery Error Counter + //!< This is unsupported for Blackwell+ + //!< Please use NVML_FI_DEV_NVLINK_COUNT_LINK_RECOVERY_* + +/** + * NVLink Recovery Error CRC Counter + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ #define NVML_FI_DEV_NVLINK_ERROR_DL_CRC 163 //!< NVLink CRC Error Counter + //!< This is unsupported for Blackwell+ + //!< Please use NVML_FI_DEV_NVLINK_COUNT_LINK_RECOVERY_* + +/** + * NVLink Speed, State and Version field id 164, 165, and 166 + * + * 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_VERSION 166 //!< NVLink Version #define NVML_FI_DEV_NVLINK_GET_POWER_STATE 167 //!< NVLink Power state. 0=HIGH_SPEED 1=LOW_SPEED -#define NVML_FI_DEV_NVLINK_GET_POWER_THRESHOLD 168 //!< NVLink length of idle period (in units of 100us) before transitioning links to sleep state +#define NVML_FI_DEV_NVLINK_GET_POWER_THRESHOLD 168 //!< NVLink length of idle period (units can be found from + //!< NVML_FI_DEV_NVLINK_GET_POWER_THRESHOLD_UNITS) before + //!< transitioning links to sleep state #define NVML_FI_DEV_PCIE_L0_TO_RECOVERY_COUNTER 169 //!< Device PEX error recovery counter @@ -1984,19 +2482,19 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_C2C_LINK_GET_STATUS 171 //!< C2C Link Status 0=INACTIVE 1=ACTIVE #define NVML_FI_DEV_C2C_LINK_GET_MAX_BW 172 //!< C2C Link Speed in MBps for active links -#define NVML_FI_DEV_PCIE_COUNT_CORRECTABLE_ERRORS 173 -#define NVML_FI_DEV_PCIE_COUNT_NAKS_RECEIVED 174 -#define NVML_FI_DEV_PCIE_COUNT_RECEIVER_ERROR 175 -#define NVML_FI_DEV_PCIE_COUNT_BAD_TLP 176 -#define NVML_FI_DEV_PCIE_COUNT_NAKS_SENT 177 -#define NVML_FI_DEV_PCIE_COUNT_BAD_DLLP 178 -#define NVML_FI_DEV_PCIE_COUNT_NON_FATAL_ERROR 179 -#define NVML_FI_DEV_PCIE_COUNT_FATAL_ERROR 180 -#define NVML_FI_DEV_PCIE_COUNT_UNSUPPORTED_REQ 181 -#define NVML_FI_DEV_PCIE_COUNT_LCRC_ERROR 182 -#define NVML_FI_DEV_PCIE_COUNT_LANE_ERROR 183 +#define NVML_FI_DEV_PCIE_COUNT_CORRECTABLE_ERRORS 173 //!< PCIe Correctable Errors Counter +#define NVML_FI_DEV_PCIE_COUNT_NAKS_RECEIVED 174 //!< PCIe NAK Receive Counter +#define NVML_FI_DEV_PCIE_COUNT_RECEIVER_ERROR 175 //!< PCIe Receiver Error Counter +#define NVML_FI_DEV_PCIE_COUNT_BAD_TLP 176 //!< PCIe Bad TLP Counter +#define NVML_FI_DEV_PCIE_COUNT_NAKS_SENT 177 //!< PCIe NAK Send Counter +#define NVML_FI_DEV_PCIE_COUNT_BAD_DLLP 178 //!< PCIe Bad DLLP Counter +#define NVML_FI_DEV_PCIE_COUNT_NON_FATAL_ERROR 179 //!< PCIe Non Fatal Error Counter +#define NVML_FI_DEV_PCIE_COUNT_FATAL_ERROR 180 //!< PCIe Fatal Error Counter +#define NVML_FI_DEV_PCIE_COUNT_UNSUPPORTED_REQ 181 //!< PCIe Unsupported Request Counter +#define NVML_FI_DEV_PCIE_COUNT_LCRC_ERROR 182 //!< PCIe LCRC Error Counter +#define NVML_FI_DEV_PCIE_COUNT_LANE_ERROR 183 //!< PCIe Per Lane Error Counter. -#define NVML_FI_DEV_IS_RESETLESS_MIG_SUPPORTED 184 +#define NVML_FI_DEV_IS_RESETLESS_MIG_SUPPORTED 184 //!< Device's Restless MIG Capability /** * Retrieves power usage for this GPU in milliwatts. @@ -2027,9 +2525,165 @@ typedef struct nvmlGpuDynamicPstatesInfo_st #define NVML_FI_DEV_TEMPERATURE_MEM_MAX_TLIMIT 195 //!< T.Limit temperature after which GPU may begin SW slowdown due to memory temperature #define NVML_FI_DEV_TEMPERATURE_GPU_MAX_TLIMIT 196 //!< T.Limit temperature after which GPU may be throttled below base clock +#define NVML_FI_DEV_PCIE_COUNT_TX_BYTES 197 //!< PCIe transmit bytes. Value can be wrapped. +#define NVML_FI_DEV_PCIE_COUNT_RX_BYTES 198 //!< PCIe receive bytes. Value can be wrapped. + #define NVML_FI_DEV_IS_MIG_MODE_INDEPENDENT_MIG_QUERY_CAPABLE 199 //!< MIG mode independent, MIG query capable device. 1=yes. 0=no. -#define NVML_FI_MAX 200 //!< One greater than the largest field ID defined above +#define NVML_FI_DEV_NVLINK_GET_POWER_THRESHOLD_MAX 200 //!< Max Nvlink Power Threshold. See NVML_FI_DEV_NVLINK_GET_POWER_THRESHOLD + +/** + * NVLink counter field id 201-225 + * + * Link ID needs to be specified in the scopeId field in nvmlFieldValue_t. + */ +#define NVML_FI_DEV_NVLINK_COUNT_XMIT_PACKETS 201 //!type is invalid + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the provided version is invalid/unsupported + * - \ref NVML_ERROR_NOT_FOUND if \a uuid does not match a valid device on the system + * - \ref NVML_ERROR_GPU_IS_LOST if any GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceGetHandleByUUIDV(const nvmlUUID_t *uuid, nvmlDevice_t *device); + /** * Acquire the handle for a particular device, based on its PCI bus id. * @@ -3414,6 +4250,11 @@ nvmlReturn_t DECLDIR nvmlDeviceGetHandleByUUID(const char *uuid, nvmlDevice_t *d * instead of NVML_ERROR_NO_PERMISSION. * * @param pciBusId The PCI bus id of the target GPU + * Accept the following formats (all numbers in hexadecimal): + * domain:bus:device.function in format %x:%x:%x.%x + * domain:bus:device in format %x:%x:%x + * bus:device.function in format %x:%x.%x + * * @param device Reference in which to return the device handle * * @return @@ -3532,21 +4373,21 @@ nvmlReturn_t DECLDIR nvmlDeviceGetIndex(nvmlDevice_t device, unsigned int *index */ nvmlReturn_t DECLDIR nvmlDeviceGetSerial(nvmlDevice_t device, char *serial, unsigned int length); -/* -* Get a unique identifier for the device module on the baseboard -* -* This API retrieves a unique identifier for each GPU module that exists on a given baseboard. -* For non-baseboard products, this ID would always be 0. -* -* @param device The identifier of the target device -* @param moduleId Unique identifier for the GPU module -* -* @return -* - \ref NVML_SUCCESS if \a moduleId has been successfully retrieved -* - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized -* - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a moduleId is invalid -* - \ref NVML_ERROR_UNKNOWN on any unexpected error -*/ +/** + * Get a unique identifier for the device module on the baseboard + * + * This API retrieves a unique identifier for each GPU module that exists on a given baseboard. + * For non-baseboard products, this ID would always be 0. + * + * @param device The identifier of the target device + * @param moduleId Unique identifier for the GPU module + * + * @return + * - \ref NVML_SUCCESS if \a moduleId has been successfully retrieved + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device or \a moduleId is invalid + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ nvmlReturn_t DECLDIR nvmlDeviceGetModuleId(nvmlDevice_t device, unsigned int *moduleId); /** @@ -4032,7 +4873,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetPersistenceMode(nvmlDevice_t device, nvmlEnabl * * For all products. * - * See \ref nvmlPciInfoExt_t for details on the available PCI info. + * See \ref nvmlPciInfoExt_v1_t for details on the available PCI info. * * @param device The identifier of the target device * @param pci Reference in which to return the PCI info @@ -4471,6 +5312,30 @@ nvmlReturn_t DECLDIR nvmlDeviceGetFanSpeed(nvmlDevice_t device, unsigned int *sp */ nvmlReturn_t DECLDIR nvmlDeviceGetFanSpeed_v2(nvmlDevice_t device, unsigned int fan, unsigned int * speed); +/** + * Retrieves the intended operating speed in rotations per minute (RPM) of the device's specified fan. + * + * For Maxwell &tm; or newer fully supported devices. + * + * For all discrete products with dedicated fans. + * + * Note: The reported speed is the intended fan speed. If the fan is physically blocked and unable to spin, the + * output will not match the actual fan speed. + * + * @param device The identifier of the target device + * @param fanSpeed Structure specifying the index of the target fan (input) and + * retrieved fan speed value (output) + * + * @return + * - \ref NVML_SUCCESS If everything worked + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device is invalid, \a fan is not an acceptable + * index, or \a speed is NULL + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the provided version is invalid/unsupported + * - \ref NVML_ERROR_NOT_SUPPORTED If the \a device does not support this feature + */ +nvmlReturn_t DECLDIR nvmlDeviceGetFanSpeedRPM(nvmlDevice_t device, nvmlFanSpeedInfo_t *fanSpeed); + /** * Retrieves the intended target speed of the device's specified fan. * @@ -4559,25 +5424,67 @@ nvmlReturn_t DECLDIR nvmlDeviceGetFanControlPolicy_v2(nvmlDevice_t device, unsig nvmlReturn_t DECLDIR nvmlDeviceGetNumFans(nvmlDevice_t device, unsigned int *numFans); /** - * Retrieves the current temperature readings for the device, in degrees C. + * @deprecated Use \ref nvmlDeviceGetTemperatureV instead + */ +nvmlReturn_t DECLDIR nvmlDeviceGetTemperature(nvmlDevice_t device, nvmlTemperatureSensors_t sensorType, unsigned int *temp); + +/** + * Retrieves the cooler's information. + * Returns a cooler's control signal characteristics. The possible types are restricted, Variable and Toggle. + * See \ref nvmlCoolerControl_t for details on available signal types. + * Returns objects that cooler cools. Targets may be GPU, Memory, Power Supply or All of these. + * See \ref nvmlCoolerTarget_t for details on available targets. + * + * For Maxwell &tm; or newer fully supported devices. + * + * For all discrete products with dedicated fans. + * + * @param[in] device The identifier of the target device + * @param[out] coolerInfo Structure specifying the cooler's control signal characteristics (out) + * and the target that cooler cools (out) + * + * @return + * - \ref NVML_SUCCESS If everything worked + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device is invalid, \a signalType or \a target is NULL + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the provided version is invalid/unsupported + * - \ref NVML_ERROR_NOT_SUPPORTED If the \a device does not support this feature + */ +nvmlReturn_t DECLDIR nvmlDeviceGetCoolerInfo(nvmlDevice_t device, nvmlCoolerInfo_t *coolerInfo); + +/** + * Structure used to encapsulate temperature info + */ +typedef struct +{ + unsigned int version; + nvmlTemperatureSensors_t sensorType; + int temperature; +} nvmlTemperature_v1_t; + +typedef nvmlTemperature_v1_t nvmlTemperature_t; + +#define nvmlTemperature_v1 NVML_STRUCT_VERSION(Temperature, 1) + +/** + * Retrieves the current temperature readings (in degrees C) for the given device. * * For all products. * - * See \ref nvmlTemperatureSensors_t for details on available temperature sensors. - * - * @param device The identifier of the target device - * @param sensorType Flag that indicates which sensor reading to retrieve - * @param temp Reference in which to return the temperature reading + * @param[in] device Target device identifier. + * @param[in,out] temperature Structure specifying the sensor type (input) and retrieved + * temperature value (output). * * @return - * - \ref NVML_SUCCESS if \a temp has been set - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a sensorType is invalid or \a temp is NULL - * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not have the specified sensor - * - \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 + * - \ref NVML_SUCCESS if \a temp has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a sensorType is invalid or \a temp is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not have the specified sensor + * - \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 nvmlDeviceGetTemperature(nvmlDevice_t device, nvmlTemperatureSensors_t sensorType, unsigned int *temp); +nvmlReturn_t DECLDIR nvmlDeviceGetTemperatureV(nvmlDevice_t device, nvmlTemperature_t *temperature); + /** * Retrieves the temperature threshold for the GPU with the specified threshold type in degrees C. @@ -4607,6 +5514,22 @@ nvmlReturn_t DECLDIR nvmlDeviceGetTemperature(nvmlDevice_t device, nvmlTemperatu */ nvmlReturn_t DECLDIR nvmlDeviceGetTemperatureThreshold(nvmlDevice_t device, nvmlTemperatureThresholds_t thresholdType, unsigned int *temp); +/** + * Retrieves the thermal margin temperature (distance to nearest slowdown threshold). + * + * @param[in] device The identifier of the target device + * @param[in,out] marginTempInfo Versioned structure in which to return the temperature reading + * + * @returns + * - \ref NVML_SUCCESS if the margin temperature was retrieved successfully + * - \ref NVML_ERROR_NOT_SUPPORTED if request is not supported on the current platform + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a temperature is NULL + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the right versioned structure is not used + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceGetMarginTemperature(nvmlDevice_t device, nvmlMarginTemperature_t *marginTempInfo); + /** * Used to execute a list of thermal system instructions. * @@ -4831,6 +5754,159 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpcClkMinMaxVfOffset(nvmlDevice_t device, nvmlReturn_t DECLDIR nvmlDeviceGetMemClkMinMaxVfOffset(nvmlDevice_t device, int *minOffset, int *maxOffset); +/** + * Retrieve min, max and current clock offset of some clock domain for a given PState + * + * For Maxwell &tm; or newer fully supported devices. + * + * Note: \ref nvmlDeviceGetGpcClkVfOffset, \ref nvmlDeviceGetMemClkVfOffset, \ref nvmlDeviceGetGpcClkMinMaxVfOffset and + * \ref nvmlDeviceGetMemClkMinMaxVfOffset will be deprecated in a future release. + Use \ref nvmlDeviceGetClockOffsets instead. + * + * @param device The identifier of the target device + * @param info Structure specifying the clock type (input) and the pstate (input) + * retrieved clock offset value (output), min clock offset (output) + * and max clock offset (output) + * + * @return + * - \ref NVML_SUCCESS If everything worked + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device, \a type or \a pstate are invalid or both + * \a minClockOffsetMHz and \a maxClockOffsetMHz are NULL + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the provided version is invalid/unsupported + * - \ref NVML_ERROR_NOT_SUPPORTED If the device does not support this feature + */ +nvmlReturn_t DECLDIR nvmlDeviceGetClockOffsets(nvmlDevice_t device, nvmlClockOffset_t *info); + +/** + * Control current clock offset of some clock domain for a given PState + * + * For Maxwell &tm; or newer fully supported devices. + * + * Requires privileged user. + * + * @param device The identifier of the target device + * @param info Structure specifying the clock type (input), the pstate (input) + * and clock offset value (input) + * + * @return + * - \ref NVML_SUCCESS If everything worked + * - \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, \a type or \a pstate are invalid or both + * \a clockOffsetMHz is out of allowed range. + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the provided version is invalid/unsupported + * - \ref NVML_ERROR_NOT_SUPPORTED If the device does not support this feature + */ +nvmlReturn_t DECLDIR nvmlDeviceSetClockOffsets(nvmlDevice_t device, nvmlClockOffset_t *info); + +/** + * Retrieves a performance mode string with all the + * performance modes defined for this device along with their associated + * GPU Clock and Memory Clock values. + * Not all tokens will be reported on all GPUs, and additional tokens + * may be added in the future. + * For backwards compatibility we still provide nvclock and memclock; + * those are the same as nvclockmin and memclockmin. + * + * Note: These clock values take into account the offset + * set by clients through /ref nvmlDeviceSetClockOffsets. + * + * Maximum available Pstate (P15) shows the minimum performance level (0) and vice versa. + * + * Each performance modes are returned as a comma-separated list of + * "token=value" pairs. Each set of performance mode tokens are separated + * by a ";". Valid tokens: + * + * Token Value + * "perf" unsigned int - the Performance level + * "nvclock" unsigned int - the GPU clocks (in MHz) for the perf level + * "nvclockmin" unsigned int - the GPU clocks min (in MHz) for the perf level + * "nvclockmax" unsigned int - the GPU clocks max (in MHz) for the perf level + * "nvclockeditable" unsigned int - if the GPU clock domain is editable for the perf level + * "memclock" unsigned int - the memory clocks (in MHz) for the perf level + * "memclockmin" unsigned int - the memory clocks min (in MHz) for the perf level + * "memclockmax" unsigned int - the memory clocks max (in MHz) for the perf level + * "memclockeditable" unsigned int - if the memory clock domain is editable for the perf level + * "memtransferrate" unsigned int - the memory transfer rate (in MHz) for the perf level + * "memtransferratemin" unsigned int - the memory transfer rate min (in MHz) for the perf level + * "memtransferratemax" unsigned int - the memory transfer rate max (in MHz) for the perf level + * "memtransferrateeditable" unsigned int - if the memory transfer rate is editable for the perf level + * + * Example: + * + * perf=0, nvclock=324, nvclockmin=324, nvclockmax=324, nvclockeditable=0, + * memclock=324, memclockmin=324, memclockmax=324, memclockeditable=0, + * memtransferrate=648, memtransferratemin=648, memtransferratemax=648, + * memtransferrateeditable=0 ; + * perf=1, nvclock=324, nvclockmin=324, nvclockmax=640, nvclockeditable=0, + * memclock=810, memclockmin=810, memclockmax=810, memclockeditable=0, + * memtransferrate=1620, memtransferrate=1620, memtransferrate=1620, + * memtransferrateeditable=0 ; + * + * + * @param device The identifier of the target device + * @param perfModes Reference in which to return the performance level string + * + * @return + * - \ref NVML_SUCCESS if \a perfModes has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a name is NULL + * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small + * - \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 nvmlDeviceGetPerformanceModes(nvmlDevice_t device, nvmlDevicePerfModes_t *perfModes); + +/** + * Retrieves a string with the associated current GPU Clock and Memory Clock values. + * + * Not all tokens will be reported on all GPUs, and additional tokens + * may be added in the future. + * + * Note: These clock values take into account the offset + * set by clients through /ref nvmlDeviceSetClockOffsets. + * + * Clock values are returned as a comma-separated list of + * "token=value" pairs. + * Valid tokens: + * + * Token Value + * "perf" unsigned int - the Performance level + * "nvclock" unsigned int - the GPU clocks (in MHz) for the perf level + * "nvclockmin" unsigned int - the GPU clocks min (in MHz) for the perf level + * "nvclockmax" unsigned int - the GPU clocks max (in MHz) for the perf level + * "nvclockeditable" unsigned int - if the GPU clock domain is editable for the perf level + * "memclock" unsigned int - the memory clocks (in MHz) for the perf level + * "memclockmin" unsigned int - the memory clocks min (in MHz) for the perf level + * "memclockmax" unsigned int - the memory clocks max (in MHz) for the perf level + * "memclockeditable" unsigned int - if the memory clock domain is editable for the perf level + * "memtransferrate" unsigned int - the memory transfer rate (in MHz) for the perf level + * "memtransferratemin" unsigned int - the memory transfer rate min (in MHz) for the perf level + * "memtransferratemax" unsigned int - the memory transfer rate max (in MHz) for the perf level + * "memtransferrateeditable" unsigned int - if the memory transfer rate is editable for the perf level + * + * Example: + * + * nvclock=324, nvclockmin=324, nvclockmax=324, nvclockeditable=0, + * memclock=324, memclockmin=324, memclockmax=324, memclockeditable=0, + * memtransferrate=648, memtransferratemin=648, memtransferratemax=648, + * memtransferrateeditable=0 ; + * + * + * @param device The identifier of the target device + * @param currentClockFreqs Reference in which to return the performance level string + * + * @return + * - \ref NVML_SUCCESS if \a currentClockFreqs has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a name is NULL + * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a length is too small + * - \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 nvmlDeviceGetCurrentClockFreqs(nvmlDevice_t device, nvmlDeviceCurrentClockFreqs_t *currentClockFreqs); + /** * This API has been deprecated. * @@ -5055,6 +6131,10 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuOperationMode(nvmlDevice_t device, nvmlGpuO * - \ref NVML_ERROR_UNKNOWN on any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetMemoryInfo(nvmlDevice_t device, nvmlMemory_t *memory); + +/** + * nvmlDeviceGetMemoryInfo_v2 accounts separately for reserved memory and includes it in the used memory amount. + */ nvmlReturn_t DECLDIR nvmlDeviceGetMemoryInfo_v2(nvmlDevice_t device, nvmlMemory_v2_t *memory); /** @@ -5103,6 +6183,66 @@ nvmlReturn_t DECLDIR nvmlDeviceGetComputeMode(nvmlDevice_t device, nvmlComputeMo */ nvmlReturn_t DECLDIR nvmlDeviceGetCudaComputeCapability(nvmlDevice_t device, int *major, int *minor); +/** + * Retrieves the current and pending DRAM Encryption modes for the device. + * + * %BLACKWELL_OR_NEWER% + * Only applicable to devices that support DRAM Encryption + * Requires \a NVML_INFOROM_DEN version 1.0 or higher. + * + * Changing DRAM Encryption modes requires a reboot. The "pending" DRAM Encryption mode refers to the target mode following + * the next reboot. + * + * See \ref nvmlEnableState_t for details on allowed modes. + * + * @param device The identifier of the target device + * @param current Reference in which to return the current DRAM Encryption mode + * @param pending Reference in which to return the pending DRAM Encryption mode + * + * @return + * - \ref NVML_SUCCESS if \a current and \a pending have been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or either \a current or \a pending is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not 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_ARGUMENT_VERSION_MISMATCH if the argument version is not supported + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlDeviceSetDramEncryptionMode() + */ +nvmlReturn_t DECLDIR nvmlDeviceGetDramEncryptionMode(nvmlDevice_t device, nvmlDramEncryptionInfo_t *current, nvmlDramEncryptionInfo_t *pending); + +/** + * Set the DRAM Encryption mode for the device. + * + * For Kepler &tm; or newer fully supported devices. + * Only applicable to devices that support DRAM Encryption. + * Requires \a NVML_INFOROM_DEN version 1.0 or higher. + * Requires root/admin permissions. + * + * The DRAM Encryption mode determines whether the GPU enables its DRAM Encryption support. + * + * This operation takes effect after the next reboot. + * + * See \ref nvmlEnableState_t for details on available modes. + * + * @param device The identifier of the target device + * @param dramEncryption The target DRAM Encryption mode + * + * @return + * - \ref NVML_SUCCESS if the DRAM Encryption mode was set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a DRAM Encryption is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature + * - \ref NVML_ERROR_NO_PERMISSION if the user doesn't have permission to perform this operation + * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the argument version is not supported + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlDeviceGetDramEncryptionMode() + */ +nvmlReturn_t DECLDIR nvmlDeviceSetDramEncryptionMode(nvmlDevice_t device, const nvmlDramEncryptionInfo_t *dramEncryption); + /** * Retrieves the current and pending ECC modes for the device. * @@ -5538,11 +6678,11 @@ nvmlReturn_t DECLDIR nvmlDeviceGetFBCSessions(nvmlDevice_t device, unsigned int /** * Retrieves the current and pending driver model for the device. * - * For Fermi &tm; or newer fully supported devices. + * For Kepler &tm; or newer fully supported devices. * For windows only. * - * 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. TCC mode is preferred if a display is not attached. + * 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. * * See \ref nvmlDriverModel_t for details on available driver models. * @@ -5558,9 +6698,9 @@ nvmlReturn_t DECLDIR nvmlDeviceGetFBCSessions(nvmlDevice_t device, unsigned int * - \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 nvmlDeviceSetDriverModel() + * @see nvmlDeviceSetDriverModel_v2() */ -nvmlReturn_t DECLDIR nvmlDeviceGetDriverModel(nvmlDevice_t device, nvmlDriverModel_t *current, nvmlDriverModel_t *pending); +nvmlReturn_t DECLDIR nvmlDeviceGetDriverModel_v2(nvmlDevice_t device, nvmlDriverModel_t *current, nvmlDriverModel_t *pending); /** * Get VBIOS version of the device. @@ -5691,7 +6831,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device nvmlReturn_t DECLDIR nvmlDeviceGetGraphicsRunningProcesses_v3(nvmlDevice_t device, unsigned int *infoCount, nvmlProcessInfo_t *infos); /** - * Get information about processes with a MPS compute context on a device + * Get information about processes with a Multi-Process Service (MPS) compute context on a device * * For Volta &tm; or newer fully supported devices. * @@ -5736,17 +6876,17 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMPSComputeRunningProcesses_v3(nvmlDevice_t dev /** * Get information about running processes on a device for input context * - * %HOPPER_OR_NEWER% + * For Hopper &tm; or newer fully supported devices. * * This function returns information only about running processes (e.g. CUDA application which have * active context). * - * To determine the size of the @ref plist->procArray array to allocate, call the function with - * @ref plist->numProcArrayEntries set to zero and @ref plist->procArray set to NULL. The return + * To determine the size of the \a plist->procArray array to allocate, call the function with + * \a plist->numProcArrayEntries set to zero and \a plist->procArray set to NULL. The return * code will be either NVML_ERROR_INSUFFICIENT_SIZE (if there are valid processes of type - * @ref plist->mode to report on, in which case the @ref plist->numProcArrayEntries field will + * \a plist->mode to report on, in which case the \a plist->numProcArrayEntries field will * indicate the required number of entries in the array) or NVML_SUCCESS (if no processes of type - * @ref plist->mode exist). + * \a plist->mode exist). * * The usedGpuMemory field returned is all of the memory used by the application. * The usedGpuCcProtectedMemory field returned is all of the protected memory used by the application. @@ -5763,10 +6903,10 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMPSComputeRunningProcesses_v3(nvmlDevice_t dev * * @param device The device handle or MIG device handle * @param plist Reference in which to process detail list - * @param plist->version The api version - * @param plist->mode The process mode - * @param plist->procArray Reference in which to return the process information - * @param plist->numProcArrayEntries Proc array size of returned entries + * \a plist->version The api version + * \a plist->mode The process mode + * \a plist->procArray Reference in which to return the process information + * \a plist->numProcArrayEntries Proc array size of returned entries * * @return * - \ref NVML_SUCCESS if \a plist->numprocArrayEntries and \a plist->procArray have been populated @@ -5951,7 +7091,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetIrqNum(nvmlDevice_t device, unsigned int *irqN * @param numCores The number of cores for the specified device * * @return - * - \ref NVML_SUCCESS if Gpu core count is successfully retrieved + * - \ref NVML_SUCCESS if GPU core count is successfully retrieved * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a numCores is NULL * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device @@ -5999,7 +7139,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMemoryBusWidth(nvmlDevice_t device, unsigned i * @param maxSpeed The devices's PCIE Max Link speed in MBPS * * @return - * - \ref NVML_SUCCESS if Pcie Max Link Speed is successfully retrieved + * - \ref NVML_SUCCESS if PCIe Max Link Speed is successfully retrieved * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a maxSpeed is NULL * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device @@ -6028,8 +7168,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetPcieSpeed(nvmlDevice_t device, unsigned int *p * * @param device The identifier of the target device * @param adaptiveClockStatus The current adaptive clocking status, either - * @ref NVML_ADAPTIVE_CLOCKING_INFO_STATUS_DISABLED - * or @ref NVML_ADAPTIVE_CLOCKING_INFO_STATUS_ENABLED + * NVML_ADAPTIVE_CLOCKING_INFO_STATUS_DISABLED + * or NVML_ADAPTIVE_CLOCKING_INFO_STATUS_ENABLED * * @return * - \ref NVML_SUCCESS if the current adaptive clocking status is successfully retrieved @@ -6050,7 +7190,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetAdaptiveClockInfoStatus(nvmlDevice_t device, u * return * - \ref NVML_SUCCESS if the bus \a type is successfully retreived * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \device is invalid or \type is NULL + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a type is NULL * - \ref NVML_ERROR_UNKNOWN on any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetBusType(nvmlDevice_t device, nvmlBusType_t *type); @@ -6061,7 +7201,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetBusType(nvmlDevice_t device, nvmlBusType_t *ty * * Get fabric information associated with the device. * - * %HOPPER_OR_NEWER% + * For Hopper &tm; or newer fully supported devices. * * On Hopper + NVSwitch systems, GPU is registered with the NVIDIA Fabric Manager * Upon successful registration, the GPU is added to the NVLink fabric to enable @@ -6091,7 +7231,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGpuFabricInfo(nvmlDevice_t device, nvmlGpuFabr * nvmlReturn_t result = nvmlDeviceGetGpuFabricInfoV(device,&fabricInfo); * \endcode * -* %HOPPER_OR_NEWER% +* For Hopper &tm; or newer fully supported devices. * * @param device The identifier of the target device * @param gpuFabricInfo Information about GPU fabric state @@ -6189,7 +7329,7 @@ nvmlReturn_t DECLDIR nvmlSystemGetConfComputeGpusReadyState(unsigned int *isAcce nvmlReturn_t DECLDIR nvmlDeviceGetConfComputeProtectedMemoryUsage(nvmlDevice_t device, nvmlMemory_t *memory); /** - * Get Conf Computing Gpu certificate details. + * Get Conf Computing GPU certificate details. * * For Ampere &tm; or newer fully supported devices. * Supported on Linux, Windows TCC. @@ -6208,7 +7348,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetConfComputeGpuCertificate(nvmlDevice_t device, nvmlConfComputeGpuCertificate_t *gpuCert); /** - * Get Conf Computing Gpu attestation report. + * Get Conf Computing GPU attestation report. * * For Ampere &tm; or newer fully supported devices. * Supported on Linux, Windows TCC. @@ -6228,7 +7368,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetConfComputeGpuAttestationReport(nvmlDevice_t d /** * Get Conf Computing key rotation threshold detail. * - * %HOPPER_OR_NEWER% + * For Hopper &tm; or newer fully supported devices. * Supported on Linux, Windows TCC. * * @param pKeyRotationThrInfo Reference in which to return the key rotation threshold data @@ -6243,22 +7383,80 @@ nvmlReturn_t DECLDIR nvmlDeviceGetConfComputeGpuAttestationReport(nvmlDevice_t d nvmlReturn_t DECLDIR nvmlSystemGetConfComputeKeyRotationThresholdInfo( nvmlConfComputeGetKeyRotationThresholdInfo_t *pKeyRotationThrInfo); +/** + * Set Conf Computing Unprotected Memory Size. + * + * For Ampere &tm; or newer fully supported devices. + * Supported on Linux, Windows TCC. + * + * @param device Device Handle + * @param sizeKiB Unprotected Memory size to be set in KiB + * + * @return + * - \ref NVML_SUCCESS if \a sizeKiB successfully set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device + */ +nvmlReturn_t DECLDIR nvmlDeviceSetConfComputeUnprotectedMemSize(nvmlDevice_t device, unsigned long long sizeKiB); + +/** + * Set Conf Computing GPUs ready state. + * + * For Ampere &tm; or newer fully supported devices. + * Supported on Linux, Windows TCC. + * + * @param isAcceptingWork GPU accepting new work, NVML_CC_ACCEPTING_CLIENT_REQUESTS_TRUE or + * NVML_CC_ACCEPTING_CLIENT_REQUESTS_FALSE + * + * return + * - \ref NVML_SUCCESS if \a current GPUs ready state is successfully set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a isAcceptingWork is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device + */ +nvmlReturn_t DECLDIR nvmlSystemSetConfComputeGpusReadyState(unsigned int isAcceptingWork); + +/** + * Set Conf Computing key rotation threshold. + * + * For Hopper &tm; or newer fully supported devices. + * Supported on Linux, Windows TCC. + * + * This function is to set the confidential compute key rotation threshold parameters. + * \a pKeyRotationThrInfo->maxAttackerAdvantage should be in the range from + * NVML_CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MIN to NVML_CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MAX. + * Default value is 60. + * + * @param pKeyRotationThrInfo Reference to the key rotation threshold data + * + * @return + * - \ref NVML_SUCCESS if \a key rotation threashold max attacker advantage has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a memory is NULL + * - \ref NVML_ERROR_INVALID_STATE if confidential compute GPU ready state is enabled + * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlSystemSetConfComputeKeyRotationThresholdInfo( + nvmlConfComputeSetKeyRotationThresholdInfo_t *pKeyRotationThrInfo); + /** * Get Conf Computing System Settings. * - * %HOPPER_OR_NEWER% + * For Hopper &tm; or newer fully supported devices. * Supported on Linux, Windows TCC. * * @param settings System CC settings * * @return - * - \ref NVML_SUCCESS if the query is success - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a counters is NULL - * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not 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_ARGUMENT_VERSION_MISMATCH if the provided version is invalid/unsupported - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_SUCCESS If the query is success + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device is invalid or \a counters is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED If the device does not 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_ARGUMENT_VERSION_MISMATCH If the provided version is invalid/unsupported + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlSystemGetConfComputeSettings(nvmlSystemConfComputeSettings_t *settings); @@ -6292,10 +7490,34 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGspFirmwareVersion(nvmlDevice_t device, char * * @return * - \ref NVML_SUCCESS if GSP firmware mode is sucessfully retrieved * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or any of \a isEnabled or \a defaultMode is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if GSP firmware is not enabled for GPU * - \ref NVML_ERROR_UNKNOWN on any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetGspFirmwareMode(nvmlDevice_t device, unsigned int *isEnabled, unsigned int *defaultMode); +/** + * Get SRAM ECC error status of this device. + * + * For Ampere &tm; or newer fully supported devices. + * Requires root/admin permissions. + * + * See \ref nvmlEccSramErrorStatus_v1_t for more information on the struct. + * + * @param device The identifier of the target device + * @param status Returns SRAM ECC error status + * + * @return + * - \ref NVML_SUCCESS If \a limit has been set + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device is invalid or \a counters is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED If the device does not 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_ARGUMENT_VERSION_MISMATCH If the version of \a nvmlEccSramErrorStatus_t is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceGetSramEccErrorStatus(nvmlDevice_t device, + nvmlEccSramErrorStatus_t *status); + /** * @} */ @@ -6369,8 +7591,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetAccountingStats(nvmlDevice_t device, unsigned * * For Kepler &tm; or newer fully supported devices. * - * To just query the number of processes ready to be queried, call this function with *count = 0 and - * pids=NULL. The return code will be NVML_ERROR_INSUFFICIENT_SIZE, or NVML_SUCCESS if list is empty. + * To query the number of processes under Accounting Mode, call this function with *count = 0 and pids=NULL. + * The return code will be NVML_ERROR_INSUFFICIENT_SIZE with an updated count value indicating the number of processes. * * For more details see \ref nvmlDeviceGetAccountingStats. * @@ -6428,7 +7650,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetAccountingBufferSize(nvmlDevice_t device, unsi /** * Returns the list of retired pages by source, including pages that are pending retirement * The address information provided from this API is the hardware address of the page that was retired. Note - * that this does not match the virtual address used in CUDA, but will match the address information in XID 63 + * that this does not match the virtual address used in CUDA, but will match the address information in Xid 63 * * For Kepler &tm; or newer fully supported devices. * @@ -6456,7 +7678,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetRetiredPages(nvmlDevice_t device, nvmlPageReti /** * Returns the list of retired pages by source, including pages that are pending retirement * The address information provided from this API is the hardware address of the page that was retired. Note - * that this does not match the virtual address used in CUDA, but will match the address information in XID 63 + * that this does not match the virtual address used in CUDA, but will match the address information in Xid 63 * * \note nvmlDeviceGetRetiredPages_v2 adds an additional timestamps parameter to return the time of each page's * retirement. @@ -6657,20 +7879,40 @@ nvmlReturn_t DECLDIR nvmlDeviceGetProcessUtilization(nvmlDevice_t device, nvmlPr * @param procesesUtilInfo Pointer to the caller-provided structure of nvmlProcessesUtilizationInfo_t. * @return - * - \ref NVML_SUCCESS if \a procesesUtilInfo->procUtilArray 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 procesesUtilInfo is NULL - * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not support this feature - * - \ref NVML_ERROR_NOT_FOUND if sample entries are not found - * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible - * - \ref NVML_ERROR_VERSION_MISMATCH if the version of \a procesesUtilInfo is invalid - * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a procesesUtilInfo->procUtilArray is NULL, or the buffer size of procesesUtilInfo->procUtilArray is too small. - * The caller should check the minimul array size from the returned procesesUtilInfo->processSamplesCount, and call - * the function again with a buffer no smaller than procesesUtilInfo->processSamplesCount * sizeof(nvmlProcessUtilizationInfo_t) - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_SUCCESS If \a procesesUtilInfo->procUtilArray 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 procesesUtilInfo is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED If the device does not support this feature + * - \ref NVML_ERROR_NOT_FOUND If sample entries are not found + * - \ref NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a procesesUtilInfo is invalid + * - \ref NVML_ERROR_INSUFFICIENT_SIZE If \a procesesUtilInfo->procUtilArray is NULL, or the buffer size of procesesUtilInfo->procUtilArray is too small. + * The caller should check the minimul array size from the returned procesesUtilInfo->processSamplesCount, and call + * the function again with a buffer no smaller than procesesUtilInfo->processSamplesCount * sizeof(nvmlProcessUtilizationInfo_t) + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetProcessesUtilizationInfo(nvmlDevice_t device, nvmlProcessesUtilizationInfo_t *procesesUtilInfo); +/** + * Get platform information of this device. + * + * %BLACKWELL_OR_NEWER% + * + * See \ref nvmlPlatformInfo_v2_t for more information on the struct. + * + * @param device The identifier of the target device + * @param platformInfo Pointer to the caller-provided structure of nvmlPlatformInfo_t. + * + * @return + * - \ref NVML_SUCCESS If \a platformInfo has been retrieved + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device is invalid or \a platformInfo is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED If the device does not support this feature + * - \ref NVML_ERROR_MEMORY if system memory is insufficient + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a nvmlPlatformInfo_t is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceGetPlatformInfo(nvmlDevice_t device, nvmlPlatformInfo_t *platformInfo); + /** @} */ /***************************************************************************************************/ @@ -7327,6 +8569,9 @@ nvmlReturn_t DECLDIR nvmlDeviceSetAPIRestriction(nvmlDevice_t device, nvmlRestri nvmlReturn_t DECLDIR nvmlDeviceSetFanSpeed_v2(nvmlDevice_t device, unsigned int fan, unsigned int speed); /** + * Deprecated: Will be deprecated in a future release. Use \ref nvmlDeviceSetClockOffsets instead. It works + * on Maxwell onwards GPU architectures. + * * Set the GPCCLK VF offset value * @param[in] device The identifier of the target device * @param[in] offset The GPCCLK VF offset value to set @@ -7342,6 +8587,9 @@ nvmlReturn_t DECLDIR nvmlDeviceSetFanSpeed_v2(nvmlDevice_t device, unsigned int nvmlReturn_t DECLDIR nvmlDeviceSetGpcClkVfOffset(nvmlDevice_t device, int offset); /** + * Deprecated: Will be deprecated in a future release. Use \ref nvmlDeviceSetClockOffsets instead. It works + * on Maxwell onwards GPU architectures. + * * Set the MemClk (Memory Clock) VF offset value. It requires elevated privileges. * @param[in] device The identifier of the target device * @param[in] offset The MemClk VF offset value to set @@ -7356,64 +8604,6 @@ nvmlReturn_t DECLDIR nvmlDeviceSetGpcClkVfOffset(nvmlDevice_t device, int offset */ nvmlReturn_t DECLDIR nvmlDeviceSetMemClkVfOffset(nvmlDevice_t device, int offset); -/** - * Set Conf Computing Unprotected Memory Size. - * - * For Ampere &tm; or newer fully supported devices. - * Supported on Linux, Windows TCC. - * - * @param device Device Handle - * @param sizeKiB Unprotected Memory size to be set in KiB - * - * @return - * - \ref NVML_SUCCESS if \a sizeKiB successfully set - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid - * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device - */ -nvmlReturn_t DECLDIR nvmlDeviceSetConfComputeUnprotectedMemSize(nvmlDevice_t device, unsigned long long sizeKiB); - -/** - * Set Conf Computing GPUs ready state. - * - * For Ampere &tm; or newer fully supported devices. - * Supported on Linux, Windows TCC. - * - * @param isAcceptingWork GPU accepting new work, NVML_CC_ACCEPTING_CLIENT_REQUESTS_TRUE or - * NVML_CC_ACCEPTING_CLIENT_REQUESTS_FALSE - * - * return - * - \ref NVML_SUCCESS if \a current GPUs ready state is successfully set - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a isAcceptingWork is invalid - * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device - */ -nvmlReturn_t DECLDIR nvmlSystemSetConfComputeGpusReadyState(unsigned int isAcceptingWork); - -/** - * Set Conf Computing key rotation threshold. - * - * %HOPPER_OR_NEWER% - * Supported on Linux, Windows TCC. - * - * This function is to set the confidential compute key rotation threshold parameters. - * @ref pKeyRotationThrInfo->maxAttackerAdvantage should be in the range from - * NVML_CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MIN to NVML_CC_KEY_ROTATION_THRESHOLD_ATTACKER_ADVANTAGE_MAX. - * Default value is 60. - * - * @param pKeyRotationThrInfo Reference to the key rotation threshold data - * - * @return - * - \ref NVML_SUCCESS if \a key rotation threashold max attacker advantage has been set - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a memory is NULL - * - \ref NVML_ERROR_INVALID_STATE if confidential compute GPU ready state is enabled - * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device - * - \ref NVML_ERROR_UNKNOWN on any unexpected error - */ -nvmlReturn_t DECLDIR nvmlSystemSetConfComputeKeyRotationThresholdInfo( - nvmlConfComputeSetKeyRotationThresholdInfo_t *pKeyRotationThrInfo); - /** * @} */ @@ -7476,6 +8666,99 @@ nvmlReturn_t DECLDIR nvmlDeviceSetAccountingMode(nvmlDevice_t device, nvmlEnable */ nvmlReturn_t DECLDIR nvmlDeviceClearAccountingPids(nvmlDevice_t device); +/** + * Set new power limit of this device. + * + * For Kepler &tm; or newer fully supported devices. + * Requires root/admin permissions. + * + * See \ref nvmlDeviceGetPowerManagementLimitConstraints to check the allowed ranges of values. + * + * See \ref nvmlPowerValue_v2_t for more information on the struct. + * + * \note Limit is not persistent across reboots or driver unloads. + * Enable persistent mode to prevent driver from unloading when no application is using the device. + * + * This API replaces nvmlDeviceSetPowerManagementLimit. It can be used as a drop-in replacement for the older version. + * + * @param device The identifier of the target device + * @param powerValue Power management limit in milliwatts to set + * + * @return + * - \ref NVML_SUCCESS if \a limit has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a powerValue is NULL or contains invalid values + * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not 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 + * + * @see NVML_FI_DEV_POWER_AVERAGE + * @see NVML_FI_DEV_POWER_INSTANT + * @see NVML_FI_DEV_POWER_MIN_LIMIT + * @see NVML_FI_DEV_POWER_MAX_LIMIT + * @see NVML_FI_DEV_POWER_CURRENT_LIMIT + */ +nvmlReturn_t DECLDIR nvmlDeviceSetPowerManagementLimit_v2(nvmlDevice_t device, nvmlPowerValue_v2_t *powerValue); + +/***************************************************************************************************/ +/** @defgroup NVML NVLink + * @{ + */ +/***************************************************************************************************/ + +#define NVML_NVLINK_BER_MANTISSA_SHIFT 8 +#define NVML_NVLINK_BER_MANTISSA_WIDTH 0xf + +#define NVML_NVLINK_BER_EXP_SHIFT 0 +#define NVML_NVLINK_BER_EXP_WIDTH 0xff + +/** + * Nvlink Error counter BER can be obtained using the below macros + * Ex - NVML_NVLINK_ERROR_COUNTER_BER_GET(var, BER_MANTISSA) + */ +#define NVML_NVLINK_ERROR_COUNTER_BER_GET(var, type) \ + (((var) >> NVML_NVLINK_##type##_SHIFT) & \ + (NVML_NVLINK_##type##_WIDTH)) \ + +/* + * NVML_FI_DEV_NVLINK_GET_STATE state enums + */ +#define NVML_NVLINK_STATE_INACTIVE 0x0 +#define NVML_NVLINK_STATE_ACTIVE 0x1 +#define NVML_NVLINK_STATE_SLEEP 0x2 + +#define NVML_NVLINK_TOTAL_SUPPORTED_BW_MODES 23 + +typedef struct +{ + unsigned int version; + unsigned char bwModes[NVML_NVLINK_TOTAL_SUPPORTED_BW_MODES]; + unsigned char totalBwModes; +} nvmlNvlinkSupportedBwModes_v1_t; +typedef nvmlNvlinkSupportedBwModes_v1_t nvmlNvlinkSupportedBwModes_t; +#define nvmlNvlinkSupportedBwModes_v1 NVML_STRUCT_VERSION(NvlinkSupportedBwModes, 1) + +typedef struct +{ + unsigned int version; + unsigned int bIsBest; + unsigned char bwMode; +} nvmlNvlinkGetBwMode_v1_t; +typedef nvmlNvlinkGetBwMode_v1_t nvmlNvlinkGetBwMode_t; +#define nvmlNvlinkGetBwMode_v1 NVML_STRUCT_VERSION(NvlinkGetBwMode, 1) + +typedef struct +{ + unsigned int version; + unsigned int bSetBest; + unsigned char bwMode; +} nvmlNvlinkSetBwMode_v1_t; +typedef nvmlNvlinkSetBwMode_v1_t nvmlNvlinkSetBwMode_t; +#define nvmlNvlinkSetBwMode_v1 NVML_STRUCT_VERSION(NvlinkSetBwMode, 1) + +/** @} */ // @defgroup NVML NVLink + + /** @} */ /***************************************************************************************************/ @@ -7512,7 +8795,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkState(nvmlDevice_t device, unsigned int * * @param device The identifier of the target device * @param link Specifies the NvLink link to be queried - * @param version Requested NvLink version + * @param version Requested NvLink version from nvmlNvlinkVersion_t * * @return * - \ref NVML_SUCCESS if \a version has been set @@ -7741,6 +9024,102 @@ nvmlReturn_t DECLDIR nvmlDeviceResetNvLinkUtilizationCounter (nvmlDevice_t devic */ nvmlReturn_t DECLDIR nvmlDeviceGetNvLinkRemoteDeviceType(nvmlDevice_t device, unsigned int link, nvmlIntNvLinkDeviceType_t *pNvLinkDeviceType); +/** + * Set NvLink Low Power Threshold for device. + * + * For Hopper &tm; or newer fully supported devices. + * + * @param device The identifier of the target device + * @param info Reference to \a nvmlNvLinkPowerThres_t struct + * input parameters + * + * @return + * - \ref NVML_SUCCESS if the \a Threshold is successfully set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a Threshold is not within range + * - \ref NVML_ERROR_NOT_READY if an internal driver setting prevents the threshold from being used + * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device + * + **/ +nvmlReturn_t DECLDIR nvmlDeviceSetNvLinkDeviceLowPowerThreshold(nvmlDevice_t device, nvmlNvLinkPowerThres_t *info); + +/** + * Set the global nvlink bandwith mode + * + * @param nvlinkBwMode nvlink bandwidth mode + * @return + * - \ref NVML_SUCCESS on success + * - \ref NVML_ERROR_INVALID_ARGUMENT if an invalid argument is provided + * - \ref NVML_ERROR_IN_USE if P2P object exists + * - \ref NVML_ERROR_NOT_SUPPORTED if GPU is not Hopper or newer architecture. + * - \ref NVML_ERROR_NO_PERMISSION if not root user + */ +nvmlReturn_t DECLDIR nvmlSystemSetNvlinkBwMode(unsigned int nvlinkBwMode); + +/** + * Get the global nvlink bandwith mode + * + * @param nvlinkBwMode reference of nvlink bandwidth mode + * @return + * - \ref NVML_SUCCESS on success + * - \ref NVML_ERROR_INVALID_ARGUMENT if an invalid pointer is provided + * - \ref NVML_ERROR_NOT_SUPPORTED if GPU is not Hopper or newer architecture. + * - \ref NVML_ERROR_NO_PERMISSION if not root user + */ +nvmlReturn_t DECLDIR nvmlSystemGetNvlinkBwMode(unsigned int *nvlinkBwMode); + +/** + * Get the supported NvLink Reduced Bandwidth Modes of the device + * + * %BLACKWELL_OR_NEWER% + * + * @param device The identifier of the target device + * @param supportedBwMode Reference to \a nvmlNvlinkSupportedBwModes_t + * + * @return + * - \ref NVML_SUCCESS if the query was successful + * - \ref NVML_ERROR_INVALID_ARGUMENT if device is invalid or supportedBwMode is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the version specified is not supported + **/ +nvmlReturn_t DECLDIR nvmlDeviceGetNvlinkSupportedBwModes(nvmlDevice_t device, + nvmlNvlinkSupportedBwModes_t *supportedBwMode); + +/** + * Get the NvLink Reduced Bandwidth Mode for the device + * + * %BLACKWELL_OR_NEWER% + * + * @param device The identifier of the target device + * @param getBwMode Reference to \a nvmlNvlinkGetBwMode_t + * + * @return + * - \ref NVML_SUCCESS if the query was successful + * - \ref NVML_ERROR_INVALID_ARGUMENT if device is invalid or getBwMode is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the version specified is not supported + **/ +nvmlReturn_t DECLDIR nvmlDeviceGetNvlinkBwMode(nvmlDevice_t device, + nvmlNvlinkGetBwMode_t *getBwMode); + +/** + * Set the NvLink Reduced Bandwidth Mode for the device + * + * %BLACKWELL_OR_NEWER% + * + * @param device The identifier of the target device + * @param setBwMode Reference to \a nvmlNvlinkSetBwMode_t + * + * @return + * - \ref NVML_SUCCESS if the Bandwidth mode was successfully set + * - \ref NVML_ERROR_INVALID_ARGUMENT if device is invalid or setBwMode is NULL + * - \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 + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the version specified is not supported + **/ +nvmlReturn_t DECLDIR nvmlDeviceSetNvlinkBwMode(nvmlDevice_t device, + nvmlNvlinkSetBwMode_t *setBwMode); + /** @} */ /***************************************************************************************************/ @@ -7772,13 +9151,11 @@ nvmlReturn_t DECLDIR nvmlEventSetCreate(nvmlEventSet_t *set); * Starts recording of events on a specified devices and add the events to specified \ref nvmlEventSet_t * * For Fermi &tm; or newer fully supported devices. - * Ecc events are available only on ECC enabled devices (see \ref nvmlDeviceGetTotalEccErrors) + * ECC events are available only on ECC-enabled devices (see \ref nvmlDeviceGetTotalEccErrors) * Power capping events are available only on Power Management enabled devices (see \ref nvmlDeviceGetPowerManagementMode) * * For Linux only. * - * \b IMPORTANT: Operations on \a set are not thread safe - * * This call starts recording of events on specific device. * All events that occurred before this call are not recorded. * Checking if some event occurred can be done with \ref nvmlEventSetWait_v2 @@ -7838,11 +9215,11 @@ nvmlReturn_t DECLDIR nvmlDeviceGetSupportedEventTypes(nvmlDevice_t device, unsig * but not longer than specified timeout. This function in certain conditions can return before * specified timeout passes (e.g. when interrupt arrives) * - * On Windows, in case of xid error, the function returns the most recent xid error type seen by the system. - * If there are multiple xid errors generated before nvmlEventSetWait is invoked then the last seen xid error - * type is returned for all xid error events. + * On Windows, in case of Xid error, the function returns the most recent Xid error type seen by the system. + * If there are multiple Xid errors generated before nvmlEventSetWait is invoked then the last seen Xid error + * type is returned for all Xid error events. * - * On Linux, every xid error event would return the associated event data and other information if applicable. + * On Linux, every Xid error event would return the associated event data and other information if applicable. * * In MIG mode, if device handle is provided, the API reports all the events for the available instances, * only if the caller has appropriate privileges. In absence of required privileges, only the events which @@ -7883,6 +9260,98 @@ nvmlReturn_t DECLDIR nvmlEventSetWait_v2(nvmlEventSet_t set, nvmlEventData_t * d */ nvmlReturn_t DECLDIR nvmlEventSetFree(nvmlEventSet_t set); +/* + * Create an empty set of system events. + * Event set should be freed by \ref nvmlSystemEventSetFree + * + * For Fermi &tm; or newer fully supported devices. + * @param request Reference to nvmlSystemEventSetCreateRequest_t + * + * @return + * - \ref NVML_SUCCESS if the event has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if request is NULL + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH for unsupported version + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlSystemEventSetFree + */ +nvmlReturn_t DECLDIR nvmlSystemEventSetCreate(nvmlSystemEventSetCreateRequest_t *request); + +/** + * Releases system event set + * + * For Fermi &tm; or newer fully supported devices. + * + * @param set Reference to nvmlSystemEventSetFreeRequest_t + * + * @return + * - \ref NVML_SUCCESS if the event has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if request is NULL + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH for unsupported version + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlDeviceRegisterEvents + */ +nvmlReturn_t DECLDIR nvmlSystemEventSetFree(nvmlSystemEventSetFreeRequest_t *request); + +/** + * Starts recording of events on system and add the events to specified \ref nvmlSystemEventSet_t + * + * For Linux only. + * + * This call starts recording of events on specific device. + * All events that occurred before this call are not recorded. + * Checking if some event occurred can be done with \ref nvmlSystemEventSetWait + * + * If function reports NVML_ERROR_UNKNOWN, event set is in undefined state and should be freed. + * If function reports NVML_ERROR_NOT_SUPPORTED, event set can still be used. None of the requested eventTypes + * are registered in that case. + * + * @param request Reference to the struct nvmlSystemRegisterEventRequest_t + * + * @return + * - \ref NVML_SUCCESS if the event has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if request is NULL + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH for unsupported version + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlSystemEventType + * @see nvmlSystemEventSetWait + * @see nvmlEventSetFree + */ +nvmlReturn_t DECLDIR nvmlSystemRegisterEvents(nvmlSystemRegisterEventRequest_t *request); + +/** + * Waits on system events and delivers events + * + * For Fermi &tm; or newer fully supported devices. + * + * If some events are ready to be delivered at the time of the call, function returns immediately. + * If there are no events ready to be delivered, function sleeps till event arrives + * but not longer than specified timeout. This function in certain conditions can return before + * specified timeout passes (e.g. when interrupt arrives) + * + * if the return request->numEvent equals to request->dataSize, there might be outstanding + * event, it is recommended to call nvmlSystemEventSetWait again to query all the events. + * + * @param request Reference in which to nvmlSystemEventSetWaitRequest_t + * + * @return + * - \ref NVML_SUCCESS if the event has been set + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if request is NULL + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH for unsupported version + * - \ref NVML_ERROR_TIMEOUT if no event notification after timeoutms + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * + * @see nvmlSystemEventType + * @see nvmlSystemRegisterEvents + */ +nvmlReturn_t DECLDIR nvmlSystemEventSetWait(nvmlSystemEventSetWaitRequest_t *request); + /** @} */ /***************************************************************************************************/ @@ -8044,13 +9513,6 @@ nvmlReturn_t DECLDIR nvmlDeviceClearFieldValues(nvmlDevice_t device, int valuesC /** @} */ -/***************************************************************************************************/ -/** @defgroup vGPU Enums, Constants and Structs - * @{ - */ -/** @} */ -/***************************************************************************************************/ - /***************************************************************************************************/ /** @defgroup nvmlVirtualGpuQueries vGPU APIs * This chapter describes operations that are associated with NVIDIA vGPU Software products. @@ -8125,12 +9587,12 @@ nvmlReturn_t DECLDIR nvmlDeviceSetVirtualizationMode(nvmlDevice_t device, nvmlGp * @param pHeterogeneousMode Pointer to the caller-provided structure of nvmlVgpuHeterogeneousMode_t * * @return - * - \ref NVML_SUCCESS Upon success - * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device is invalid or \a pHeterogeneousMode is NULL - * - \ref NVML_ERROR_NOT_SUPPORTED If \a device doesn't support this feature - * - \ref NVML_ERROR_VERSION_MISMATCH If the version of \a pHeterogeneousMode is invalid - * - \ref NVML_ERROR_UNKNOWN On any unexpected error + * - \ref NVML_SUCCESS Upon success + * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device is invalid or \a pHeterogeneousMode is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED If MIG is enabled or \a device doesn't support this feature + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pHeterogeneousMode is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuHeterogeneousMode(nvmlDevice_t device, nvmlVgpuHeterogeneousMode_t *pHeterogeneousMode); @@ -8142,6 +9604,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuHeterogeneousMode(nvmlDevice_t device, nvm * API would return an appropriate error code upon unsuccessful activation. For example, the heterogeneous mode * set will fail with error \ref NVML_ERROR_IN_USE if any vGPU instance is active on the device. The caller of this API * is expected to shutdown the vGPU VMs and retry setting the \a mode. + * On KVM platform, setting heterogeneous mode is allowed, if no MDEV device is created on the device, else will fail + * with same error \ref NVML_ERROR_IN_USE. * On successful return, the function updates the vGPU heterogeneous mode with the user provided \a pHeterogeneousMode->mode. * \a pHeterogeneousMode->version is the version number of the structure nvmlVgpuHeterogeneousMode_t, the caller should * set the correct version number to set the vGPU heterogeneous mode. @@ -8150,14 +9614,14 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuHeterogeneousMode(nvmlDevice_t device, nvm * @param pHeterogeneousMode Pointer to the caller-provided structure of nvmlVgpuHeterogeneousMode_t * * @return - * - \ref NVML_SUCCESS Upon success - * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device or \a pHeterogeneousMode is NULL or \a pHeterogeneousMode->mode is invalid - * - \ref NVML_ERROR_IN_USE If the \a device is in use - * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation - * - \ref NVML_ERROR_NOT_SUPPORTED If MIG is enabled or \a device doesn't support this feature - * - \ref NVML_ERROR_VERSION_MISMATCH If the version of \a pHeterogeneousMode is invalid - * - \ref NVML_ERROR_UNKNOWN On any unexpected error + * - \ref NVML_SUCCESS Upon success + * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device or \a pHeterogeneousMode is NULL or \a pHeterogeneousMode->mode is invalid + * - \ref NVML_ERROR_IN_USE If the \a device is in use + * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation + * - \ref NVML_ERROR_NOT_SUPPORTED If MIG is enabled or \a device doesn't support this feature + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pHeterogeneousMode is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceSetVgpuHeterogeneousMode(nvmlDevice_t device, const nvmlVgpuHeterogeneousMode_t *pHeterogeneousMode); @@ -8173,35 +9637,41 @@ nvmlReturn_t DECLDIR nvmlDeviceSetVgpuHeterogeneousMode(nvmlDevice_t device, con * @param pPlacement Pointer to vGPU placement ID structure \a nvmlVgpuPlacementId_t * * @return - * - \ref NVML_SUCCESS If information is successfully retrieved - * - \ref NVML_ERROR_NOT_FOUND If \a vgpuInstance does not match a valid active vGPU instance - * - \ref NVML_ERROR_INVALID_ARGUMENT If \a vgpuInstance is invalid or \a pPlacement is NULL - * - \ref NVML_ERROR_VERSION_MISMATCH If the version of \a pPlacement is invalid - * - \ref NVML_ERROR_UNKNOWN On any unexpected error + * - \ref NVML_SUCCESS If information is successfully retrieved + * - \ref NVML_ERROR_NOT_FOUND If \a vgpuInstance does not match a valid active vGPU instance + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a vgpuInstance is invalid or \a pPlacement is NULL + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pPlacement is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlVgpuInstanceGetPlacementId(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuPlacementId_t *pPlacement); /** * Query the supported vGPU placement ID of the vGPU type. * - * An array of supported vGPU placement IDs for the vGPU type ID indicated by \a vgpuTypeId is returned in the - * caller-supplied buffer of \a pPlacementList->placementIds. Memory needed for the placementIds array should be - * allocated based on maximum instances of a vGPU type which can be queried via \ref nvmlVgpuTypeGetMaxInstances(). + * The function returns an array of supported vGPU placement IDs for the specified vGPU type ID in the buffer provided + * by the caller at \a pPlacementList->placementIds. The required memory for the placementIds array must be allocated + * based on the maximum number of vGPU type instances, which is retrievable through \ref nvmlVgpuTypeGetMaxInstances(). + * If the provided count by the caller is insufficient, the function will return NVML_ERROR_INSUFFICIENT_SIZE along with + * the number of required entries in \a pPlacementList->count. The caller should then reallocate a buffer with the size + * of pPlacementList->count * sizeof(pPlacementList->placementIds) and invoke the function again. * - * This function will return supported placement IDs even if GPU is not in vGPU heterogeneous mode. + * To obtain a list of homogeneous placement IDs, the caller needs to set \a pPlacementList->mode to NVML_VGPU_PGPU_HOMOGENEOUS_MODE. + * For heterogeneous placement IDs, \a pPlacementList->mode should be set to NVML_VGPU_PGPU_HETEROGENEOUS_MODE. + * By default, a list of heterogeneous placement IDs is returned. * * @param device Identifier of the target device * @param vgpuTypeId Handle to vGPU type. The vGPU type ID * @param pPlacementList Pointer to the vGPU placement structure \a nvmlVgpuPlacementList_t * * @return - * - \ref NVML_SUCCESS Upon success - * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device or \a vgpuTypeId is invalid or \a pPlacementList is NULL - * - \ref NVML_ERROR_NOT_SUPPORTED If \a device or \a vgpuTypeId isn't supported - * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation - * - \ref NVML_ERROR_VERSION_MISMATCH If the version of \a pPlacementList is invalid - * - \ref NVML_ERROR_UNKNOWN On any unexpected error + * - \ref NVML_SUCCESS Upon success + * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device or \a vgpuTypeId is invalid or \a pPlacementList is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED If \a device or \a vgpuTypeId isn't supported + * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pPlacementList is invalid + * - \ref NVML_ERROR_INSUFFICIENT_SIZE If the buffer is small, element count is returned in \a pPlacementList->count + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuTypeSupportedPlacements(nvmlDevice_t device, nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuPlacementList_t *pPlacementList); @@ -8211,23 +9681,25 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuTypeSupportedPlacements(nvmlDevice_t devic * An array of creatable vGPU placement IDs for the vGPU type ID indicated by \a vgpuTypeId is returned in the * caller-supplied buffer of \a pPlacementList->placementIds. Memory needed for the placementIds array should be * allocated based on maximum instances of a vGPU type which can be queried via \ref nvmlVgpuTypeGetMaxInstances(). + * If the provided count by the caller is insufficient, the function will return NVML_ERROR_INSUFFICIENT_SIZE along with + * the number of required entries in \a pPlacementList->count. The caller should then reallocate a buffer with the size + * of pPlacementList->count * sizeof(pPlacementList->placementIds) and invoke the function again. + * * The creatable vGPU placement IDs may differ over time, as there may be restrictions on what type of vGPU the * vGPU instance is running. * - * The function will return \ref NVML_ERROR_NOT_SUPPORTED if the \a device is not in vGPU heterogeneous mode. - * * @param device The identifier of the target device * @param vgpuTypeId Handle to vGPU type. The vGPU type ID * @param pPlacementList Pointer to the list of vGPU placement structure \a nvmlVgpuPlacementList_t * * @return - * - \ref NVML_SUCCESS Upon success - * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device or \a vgpuTypeId is invalid or \a pPlacementList is NULL - * - \ref NVML_ERROR_NOT_SUPPORTED If \a device or \a vgpuTypeId isn't supported - * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation - * - \ref NVML_ERROR_VERSION_MISMATCH If the version of \a pPlacementList is invalid - * - \ref NVML_ERROR_UNKNOWN On any unexpected error + * - \ref NVML_SUCCESS Upon success + * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device or \a vgpuTypeId is invalid or \a pPlacementList is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED If MIG is enabled or \a device or \a vgpuTypeId isn't supported + * - \ref NVML_ERROR_NO_PERMISSION If user doesn't have permission to perform the operation + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pPlacementList is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuTypeCreatablePlacements(nvmlDevice_t device, nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuPlacementList_t *pPlacementList); @@ -8257,6 +9729,27 @@ nvmlReturn_t DECLDIR nvmlVgpuTypeGetGspHeapSize(nvmlVgpuTypeId_t vgpuTypeId, uns */ nvmlReturn_t DECLDIR nvmlVgpuTypeGetFbReservation(nvmlVgpuTypeId_t vgpuTypeId, unsigned long long *fbReservation); +/** + * Retrieve the currently used runtime state size of the vGPU instance + * + * This size represents the maximum in-memory data size utilized by a vGPU instance during standard operation. + * This measurement is exclusive of frame buffer (FB) data size assigned to the vGPU instance. + * + * For Maxwell &tm; or newer fully supported devices. + * + * @param vgpuInstance Identifier of the target vGPU instance + * @param pState Pointer to the vGPU runtime state's structure \a nvmlVgpuRuntimeState_t + * + * @return + * - \ref NVML_SUCCESS If information is successfully retrieved + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a vgpuInstance is invalid, or \a pState is NULL + * - \ref NVML_ERROR_NOT_FOUND If \a vgpuInstance does not match a valid active vGPU instance on the system + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pState is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlVgpuInstanceGetRuntimeStateSize(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuRuntimeState_t *pState); + /** * Set the desirable vGPU capability of a device * @@ -8598,6 +10091,22 @@ nvmlReturn_t DECLDIR nvmlVgpuTypeGetMaxInstances(nvmlDevice_t device, nvmlVgpuTy */ nvmlReturn_t DECLDIR nvmlVgpuTypeGetMaxInstancesPerVm(nvmlVgpuTypeId_t vgpuTypeId, unsigned int *vgpuInstanceCountPerVm); +/** + * Retrieve the BAR1 info for given vGPU type. + * + * For Maxwell &tm; or newer fully supported devices. + * + * @param vgpuTypeId Handle to vGPU type + * @param bar1Info Pointer to the vGPU type BAR1 information structure \a nvmlVgpuTypeBar1Info_t + * + * @return + * - \ref NVML_SUCCESS successful completion + * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT if \a vgpuTypeId is invalid, or \a bar1Info is NULL + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlVgpuTypeGetBAR1Info(nvmlVgpuTypeId_t vgpuTypeId, nvmlVgpuTypeBar1Info_t *bar1Info); + /** * Retrieve the active vGPU instances on a device. * @@ -9013,6 +10522,237 @@ nvmlReturn_t DECLDIR nvmlVgpuTypeGetCapabilities(nvmlVgpuTypeId_t vgpuTypeId, nv */ nvmlReturn_t DECLDIR nvmlVgpuInstanceGetMdevUUID(nvmlVgpuInstance_t vgpuInstance, char *mdevUuid, unsigned int size); +/** + * Query the currently creatable vGPU types on a specific GPU Instance. + * + * The function returns an array of vGPU types that can be created for a specified GPU instance. This array is stored + * in a caller-supplied buffer, with the buffer's element count passed through \a pVgpus->vgpuCount. The number of + * vGPU types written to the buffer is indicated by \a pVgpus->vgpuCount. If the buffer is too small to hold the vGPU + * type array, the function returns NVML_ERROR_INSUFFICIENT_SIZE and updates \a pVgpus->vgpuCount with the required + * element count. + * + * To determine the creatable vGPUs for a GPU Instance, invoke this function with \a pVgpus->vgpuCount set to 0 and + * \a pVgpus->vgpuTypeIds as NULL. This will result in NVML_ERROR_INSUFFICIENT_SIZE being returned, along with the + * count value in \a pVgpus->vgpuCount. + * + * The creatable vGPU types may differ over time, as there may be restrictions on what type of vGPUs can concurrently + * run on the device. + * + * @param gpuInstance The GPU instance handle + * @param pVgpus Pointer to the caller-provided structure of nvmlVgpuTypeIdInfo_t + * + * @return + * - \ref NVML_SUCCESS Upon success + * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance is NULL or invalid, or \a pVgpus is NULL + * or GPU Instance Id is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED If not on a vGPU host or an unsupported GPU + * - \ref NVML_ERROR_INSUFFICIENT_SIZE If \a pVgpus->vgpuTypeIds buffer is small + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pVgpus is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlGpuInstanceGetCreatableVgpus(nvmlGpuInstance_t gpuInstance, nvmlVgpuTypeIdInfo_t *pVgpus); + +/** + * Retrieve the maximum number of vGPU instances per GPU instance for given vGPU type + * + * @param pMaxInstance Pointer to the caller-provided structure of nvmlVgpuTypeMaxInstance_t + * + * @return + * - \ref NVML_SUCCESS Upon success + * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a pMaxInstance is NULL or \a pMaxInstance->vgpuTypeId is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED If not on a vGPU host or an unsupported GPU or non-MIG vGPU type + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pMaxInstance is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlVgpuTypeGetMaxInstancesPerGpuInstance(nvmlVgpuTypeMaxInstance_t *pMaxInstance); + +/** + * Retrieve the active vGPU instances within a GPU instance. + * + * An array of active vGPU instances is returned in the caller-supplied buffer pointed + * at by \a pVgpuInstanceInfo->vgpuInstances. The array element count is passed in + * \a pVgpuInstanceInfo->vgpuCount, and \a pVgpuInstanceInfo->vgpuCount is used to return + * the number of vGPU instances written to the buffer. + * + * If the supplied buffer is not large enough to accommodate the vGPU instance array, + * the function returns NVML_ERROR_INSUFFICIENT_SIZE, with the element count of + * nvmlVgpuInstance_t array required in \a pVgpuInstanceInfo->vgpuCount. To query the + * number of active vGPU instances, call this function with pVgpuInstanceInfo->vgpuCount = 0 + * and pVgpuInstanceInfo->vgpuTypeIds = NULL. The code will return NVML_ERROR_INSUFFICIENT_SIZE, + * or NVML_SUCCESS if no vGPU Types are active. + * + * @param gpuInstance The GPU instance handle + * @param pVgpuInstanceInfo Pointer to the vGPU instance information structure \a nvmlActiveVgpuInstanceInfo_t + * + * @return + * - \ref NVML_SUCCESS Successful completion + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance is NULL or invalid, or \a pVgpuInstanceInfo is NULL + * or GPU Instance Id is invalid + * - \ref NVML_ERROR_INSUFFICIENT_SIZE \a pVgpuInstanceInfo->vgpuTypeIds buffer is too small, + * array element count is returned in \a pVgpuInstanceInfo->vgpuCount + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pVgpuInstanceInfo is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED If not on a vGPU host or an unsupported GPU + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlGpuInstanceGetActiveVgpus(nvmlGpuInstance_t gpuInstance, nvmlActiveVgpuInstanceInfo_t *pVgpuInstanceInfo); + +/** + * Set vGPU scheduler state for the given GPU instance + * + * %GB20X_OR_NEWER% + * + * Scheduler state and params will be allowed to set only when no VM is running within the GPU instance. + * In \a nvmlVgpuSchedulerState_t, IFF enableARRMode is enabled then provide the avgFactor and frequency + * as input. If enableARRMode is disabled then provide timeslice as input. + * + * The scheduler state change won't persist across module load/unload and GPU Instance creation/deletion. + * + * @param gpuInstance The GPU instance handle + * @param pScheduler Pointer to the caller-provided structure of nvmlVgpuSchedulerState_t + * + * @return + * - \ref NVML_SUCCESS Upon success + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance is NULL or invalid, or \a pScheduler is NULL + * or GPU Instance Id is invalid + * - \ref NVML_ERROR_RESET_REQUIRED If setting the state failed with fatal error, reboot is required + * - \ref NVML_ERROR_NOT_SUPPORTED If not on a vGPU host or an unsupported GPU or if any vGPU instance exists + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pScheduler is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlGpuInstanceSetVgpuSchedulerState(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerState_t *pScheduler); + +/** + * Returns the vGPU scheduler state for the given GPU instance. + * The information returned in \a nvmlVgpuSchedulerStateInfo_t is not relevant if the BEST EFFORT policy is set. + * + * %GB20X_OR_NEWER% + * + * @param gpuInstance The GPU instance handle + * @param pSchedulerStateInfo Reference in which \a pSchedulerStateInfo is returned + * + * @return + * - \ref NVML_SUCCESS vGPU scheduler state is successfully obtained + * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance is NULL or invalid, or \a pSchedulerStateInfo is NULL + * or GPU Instance Id is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED If not on a vGPU host or an unsupported GPU + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pSchedulerStateInfo is invalid + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlGpuInstanceGetVgpuSchedulerState(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerStateInfo_t *pSchedulerStateInfo); + +/** + * Returns the vGPU scheduler logs for the given GPU instance. + * \a pSchedulerLogInfo points to a caller-allocated structure to contain the logs. The number of elements returned will + * never exceed \a NVML_SCHEDULER_SW_MAX_LOG_ENTRIES. + * + * To get the entire logs, call the function atleast 5 times a second. + * + * %GB20X_OR_NEWER% + * + * @param gpuInstance The GPU instance handle + * @param pSchedulerLogInfo Reference in which \a pSchedulerLogInfo is written + * + * @return + * - \ref NVML_SUCCESS vGPU scheduler logs are successfully obtained + * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance is NULL or invalid, or \a pSchedulerLogInfo is NULL + * or GPU Instance Id is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED If not on a vGPU host or an unsupported GPU + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pSchedulerLogInfo is invalid + * - \ref NVML_ERROR_UNKNOWN on any unexpected error + */ +nvmlReturn_t DECLDIR nvmlGpuInstanceGetVgpuSchedulerLog(nvmlGpuInstance_t gpuInstance, nvmlVgpuSchedulerLogInfo_t *pSchedulerLogInfo); + +/** + * Query the creatable vGPU placement ID of the vGPU type within a GPU instance. + * + * %GB20X_OR_NEWER% + * + * An array of creatable vGPU placement IDs for the vGPU type ID indicated by \a pCreatablePlacementInfo->vgpuTypeId + * is returned in the caller-supplied buffer of \a pCreatablePlacementInfo->placementIds. Memory needed for the + * placementIds array should be allocated based on maximum instances of a vGPU type per GPU instance which can be + * queried via \ref nvmlVgpuTypeGetMaxInstancesPerGpuInstance(). + * If the provided count by the caller is insufficient, the function will return NVML_ERROR_INSUFFICIENT_SIZE along with + * the number of required entries in \a pCreatablePlacementInfo->count. The caller should then reallocate a buffer with the size + * of pCreatablePlacementInfo->count * sizeof(pCreatablePlacementInfo->placementIds) and invoke the function again. + * The creatable vGPU placement IDs may differ over time, as there may be restrictions on what type of vGPU the + * vGPU instance is running. + * + * @param gpuInstance The GPU instance handle + * @param pCreatablePlacementInfo Pointer to the list of vGPU creatable placement structure \a nvmlVgpuCreatablePlacementInfo_t + * + * @return + * - \ref NVML_SUCCESS Successful completion + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance is NULL or invalid, or \a pCreatablePlacementInfo is NULL + * or GPU Instance Id is invalid + * - \ref NVML_ERROR_INSUFFICIENT_SIZE If the buffer is small, element count is returned in \a pCreatablePlacementInfo->count + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pCreatablePlacementInfo is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED If not on a vGPU host or an unsupported GPU or vGPU heterogeneous mode is not enabled + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlGpuInstanceGetVgpuTypeCreatablePlacements(nvmlGpuInstance_t gpuInstance, nvmlVgpuCreatablePlacementInfo_t *pCreatablePlacementInfo); + +/** + * Get the vGPU heterogeneous mode for the GPU instance. + * + * When in heterogeneous mode, a vGPU can concurrently host timesliced vGPUs with differing framebuffer sizes. + * + * On successful return, the function returns \a pHeterogeneousMode->mode with the current vGPU heterogeneous mode. + * \a pHeterogeneousMode->version is the version number of the structure nvmlVgpuHeterogeneousMode_t, the caller should + * set the correct version number to retrieve the vGPU heterogeneous mode. + * \a pHeterogeneousMode->mode can either be \ref NVML_FEATURE_ENABLED or \ref NVML_FEATURE_DISABLED. + * + * %GB20X_OR_NEWER% + * + * @param gpuInstance The GPU instance handle + * @param pHeterogeneousMode Pointer to the caller-provided structure of nvmlVgpuHeterogeneousMode_t + * + * @return + * - \ref NVML_SUCCESS Upon success + * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance is NULL or invalid, or \a pHeterogeneousMode is NULL + * or GPU Instance Id is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED If not on a vGPU host or an unsupported GPU or not in MIG mode + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pHeterogeneousMode is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlGpuInstanceGetVgpuHeterogeneousMode(nvmlGpuInstance_t gpuInstance, nvmlVgpuHeterogeneousMode_t *pHeterogeneousMode); + +/** + * Enable or disable vGPU heterogeneous mode for the GPU instance. + * + * When in heterogeneous mode, a vGPU can concurrently host timesliced vGPUs with differing framebuffer sizes. + * + * API would return an appropriate error code upon unsuccessful activation. For example, the heterogeneous mode + * set will fail with error \ref NVML_ERROR_IN_USE if any vGPU instance is active within the GPU instance. + * The caller of this API is expected to shutdown the vGPU VMs and retry setting the \a mode. + * On successful return, the function updates the vGPU heterogeneous mode with the user provided \a pHeterogeneousMode->mode. + * \a pHeterogeneousMode->version is the version number of the structure nvmlVgpuHeterogeneousMode_t, the caller should + * set the correct version number to set the vGPU heterogeneous mode. + * + * %GB20X_OR_NEWER% + * + * @param gpuInstance The GPU instance handle + * @param pHeterogeneousMode Pointer to the caller-provided structure of nvmlVgpuHeterogeneousMode_t + * + * @return + * - \ref NVML_SUCCESS Upon success + * - \ref NVML_ERROR_UNINITIALIZED If library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a gpuInstance is NULL or invalid, + * or \a pHeterogeneousMode is NULL or \a pHeterogeneousMode->mode is invalid + * or GPU Instance Id is invalid + * - \ref NVML_ERROR_IN_USE If the \a gpuInstance is in use + * - \ref NVML_ERROR_NOT_SUPPORTED If not on a vGPU host or an unsupported GPU + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a pHeterogeneousMode is invalid + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlGpuInstanceSetVgpuHeterogeneousMode(nvmlGpuInstance_t gpuInstance, const nvmlVgpuHeterogeneousMode_t *pHeterogeneousMode); + /** @} */ /***************************************************************************************************/ @@ -9166,8 +10906,8 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuMetadata(nvmlDevice_t device, nvmlVgpuPgpu * * @return * - \ref NVML_SUCCESS vGPU metadata structure was successfully returned - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a vgpuMetadata or \a pgpuMetadata or \a bufferSize are NULL - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a vgpuMetadata or \a pgpuMetadata or \a bufferSize are NULL + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlGetVgpuCompatibility(nvmlVgpuMetadata_t *vgpuMetadata, nvmlVgpuPgpuMetadata_t *pgpuMetadata, nvmlVgpuPgpuCompatibility_t *compatibilityInfo); @@ -9185,9 +10925,9 @@ nvmlReturn_t DECLDIR nvmlGetVgpuCompatibility(nvmlVgpuMetadata_t *vgpuMetadata, * @return * - \ref NVML_SUCCESS GPU metadata structure was successfully returned * - \ref NVML_ERROR_INSUFFICIENT_SIZE \a pgpuMetadata buffer is too small, required size is returned in \a bufferSize - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a bufferSize is NULL or \a device is invalid; if \a pgpuMetadata is NULL and the value of \a bufferSize is not 0. - * - \ref NVML_ERROR_NOT_SUPPORTED if vGPU is not supported by the system - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a bufferSize is NULL or \a device is invalid; if \a pgpuMetadata is NULL and the value of \a bufferSize is not 0. + * - \ref NVML_ERROR_NOT_SUPPORTED If vGPU is not supported by the system + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetPgpuMetadataString(nvmlDevice_t device, char *pgpuMetadata, unsigned int *bufferSize); @@ -9205,9 +10945,9 @@ nvmlReturn_t DECLDIR nvmlDeviceGetPgpuMetadataString(nvmlDevice_t device, char * * * @return * - \ref NVML_SUCCESS vGPU scheduler logs were successfully obtained - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a pSchedulerLog is NULL or \a device is invalid - * - \ref NVML_ERROR_NOT_SUPPORTED The API is not supported in current state or \a device not in vGPU host mode - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a pSchedulerLog is NULL or \a device is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED If MIG is enabled or \a device not in vGPU host mode + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuSchedulerLog(nvmlDevice_t device, nvmlVgpuSchedulerLog_t *pSchedulerLog); @@ -9222,9 +10962,9 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuSchedulerLog(nvmlDevice_t device, nvmlVgpu * * @return * - \ref NVML_SUCCESS vGPU scheduler state is successfully obtained - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a pSchedulerState is NULL or \a device is invalid - * - \ref NVML_ERROR_NOT_SUPPORTED The API is not supported in current state or \a device not in vGPU host mode - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a pSchedulerState is NULL or \a device is invalid + * - \ref NVML_ERROR_NOT_SUPPORTED If MIG is enabled or \a device not in vGPU host mode + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuSchedulerState(nvmlDevice_t device, nvmlVgpuSchedulerGetState_t *pSchedulerState); @@ -9245,9 +10985,9 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuSchedulerState(nvmlDevice_t device, nvmlVg * * @return * - \ref NVML_SUCCESS vGPU scheduler capabilities were successfully obtained - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a pCapabilities is NULL or \a device is invalid + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a pCapabilities is NULL or \a device is invalid * - \ref NVML_ERROR_NOT_SUPPORTED The API is not supported in current state or \a device not in vGPU host mode - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuSchedulerCapabilities(nvmlDevice_t device, nvmlVgpuSchedulerCapabilities_t *pCapabilities); @@ -9267,12 +11007,12 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuSchedulerCapabilities(nvmlDevice_t device, * * @return * - \ref NVML_SUCCESS vGPU scheduler state has been successfully set - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a pSchedulerState is NULL or \a device is invalid - * - \ref NVML_ERROR_RESET_REQUIRED if setting \a pSchedulerState failed with fatal error, + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a pSchedulerState is NULL or \a device is invalid + * - \ref NVML_ERROR_RESET_REQUIRED If setting \a pSchedulerState failed with fatal error, * reboot is required to overcome from this error. - * - \ref NVML_ERROR_NOT_SUPPORTED The API is not supported in current state or \a device not in vGPU host mode + * - \ref NVML_ERROR_NOT_SUPPORTED If MIG is enabled or \a device not in vGPU host mode * or if any vGPU instance currently exists on the \a device - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceSetVgpuSchedulerState(nvmlDevice_t device, nvmlVgpuSchedulerSetState_t *pSchedulerState); @@ -9424,17 +11164,17 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuUtilization(nvmlDevice_t device, unsigned * @param vgpuUtilInfo Pointer to the caller-provided structure of nvmlVgpuInstancesUtilizationInfo_t * @return - * - \ref NVML_SUCCESS if utilization samples are successfully retrieved - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, \a vgpuUtilInfo is NULL, or \a vgpuUtilInfo->vgpuInstanceCount is 0 - * - \ref NVML_ERROR_NOT_SUPPORTED if vGPU is not supported by the device - * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible - * - \ref NVML_ERROR_VERSION_MISMATCH if the version of \a vgpuUtilInfo is invalid - * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a vgpuUtilInfo->vgpuUtilArray is NULL, or the buffer size of vgpuUtilInfo->vgpuInstanceCount is too small. - * The caller should check the current vGPU instance count from the returned vgpuUtilInfo->vgpuInstanceCount, and call - * the function again with a buffer of size vgpuUtilInfo->vgpuInstanceCount * sizeof(nvmlVgpuInstanceUtilizationInfo_t) - * - \ref NVML_ERROR_NOT_FOUND if sample entries are not found - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_SUCCESS If utilization samples are successfully retrieved + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device is invalid, \a vgpuUtilInfo is NULL, or \a vgpuUtilInfo->vgpuInstanceCount is 0 + * - \ref NVML_ERROR_NOT_SUPPORTED If vGPU is not supported by the device + * - \ref NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a vgpuUtilInfo is invalid + * - \ref NVML_ERROR_INSUFFICIENT_SIZE If \a vgpuUtilInfo->vgpuUtilArray is NULL, or the buffer size of vgpuUtilInfo->vgpuInstanceCount is too small. + * The caller should check the current vGPU instance count from the returned vgpuUtilInfo->vgpuInstanceCount, and call + * the function again with a buffer of size vgpuUtilInfo->vgpuInstanceCount * sizeof(nvmlVgpuInstanceUtilizationInfo_t) + * - \ref NVML_ERROR_NOT_FOUND If sample entries are not found + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuInstancesUtilizationInfo(nvmlDevice_t device, nvmlVgpuInstancesUtilizationInfo_t *vgpuUtilInfo); @@ -9515,19 +11255,19 @@ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuProcessUtilization(nvmlDevice_t device, un * @param vgpuProcUtilInfo Pointer to the caller-provided structure of nvmlVgpuProcessesUtilizationInfo_t * @return - * - \ref NVML_SUCCESS if utilization samples are successfully retrieved - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid, or \a vgpuProcUtilInfo is null - * - \ref NVML_ERROR_VERSION_MISMATCH if the version of \a vgpuProcUtilInfo is invalid - * - \ref NVML_ERROR_INSUFFICIENT_SIZE if \a vgpuProcUtilInfo->vgpuProcUtilArray is null, or supplied \a vgpuProcUtilInfo->vgpuProcessCount - * is too small to return samples for all processes on vGPU instances currently executing on the device. - * The caller should check the current processes count from the returned \a vgpuProcUtilInfo->vgpuProcessCount, - * and call the function again with a buffer of size - * vgpuProcUtilInfo->vgpuProcessCount * sizeof(nvmlVgpuProcessUtilizationSample_t) - * - \ref NVML_ERROR_NOT_SUPPORTED if vGPU is not supported by the device - * - \ref NVML_ERROR_GPU_IS_LOST if the target GPU has fallen off the bus or is otherwise inaccessible - * - \ref NVML_ERROR_NOT_FOUND if sample entries are not found - * - \ref NVML_ERROR_UNKNOWN on any unexpected error + * - \ref NVML_SUCCESS If utilization samples are successfully retrieved + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device is invalid, or \a vgpuProcUtilInfo is null + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH If the version of \a vgpuProcUtilInfo is invalid + * - \ref NVML_ERROR_INSUFFICIENT_SIZE If \a vgpuProcUtilInfo->vgpuProcUtilArray is null, or supplied \a vgpuProcUtilInfo->vgpuProcessCount + * is too small to return samples for all processes on vGPU instances currently executing on the device. + * The caller should check the current processes count from the returned \a vgpuProcUtilInfo->vgpuProcessCount, + * and call the function again with a buffer of size + * vgpuProcUtilInfo->vgpuProcessCount * sizeof(nvmlVgpuProcessUtilizationSample_t) + * - \ref NVML_ERROR_NOT_SUPPORTED If vGPU is not supported by the device + * - \ref NVML_ERROR_GPU_IS_LOST If the target GPU has fallen off the bus or is otherwise inaccessible + * - \ref NVML_ERROR_NOT_FOUND If sample entries are not found + * - \ref NVML_ERROR_UNKNOWN On any unexpected error */ nvmlReturn_t DECLDIR nvmlDeviceGetVgpuProcessesUtilizationInfo(nvmlDevice_t device, nvmlVgpuProcessesUtilizationInfo_t *vgpuProcUtilInfo); @@ -9737,10 +11477,31 @@ nvmlReturn_t DECLDIR nvmlGetExcludedDeviceInfoByIndex(unsigned int index, nvmlEx #define NVML_GPU_INSTANCE_PROFILE_7_SLICE 0x4 #define NVML_GPU_INSTANCE_PROFILE_8_SLICE 0x5 #define NVML_GPU_INSTANCE_PROFILE_6_SLICE 0x6 +// 1_SLICE profile with at least one (if supported at all) of Decoder, Encoder, JPEG, OFA engines. #define NVML_GPU_INSTANCE_PROFILE_1_SLICE_REV1 0x7 +// 2_SLICE profile with at least one (if supported at all) of Decoder, Encoder, JPEG, OFA engines. #define NVML_GPU_INSTANCE_PROFILE_2_SLICE_REV1 0x8 +// 1_SLICE profile with twice the amount of memory resources. #define NVML_GPU_INSTANCE_PROFILE_1_SLICE_REV2 0x9 -#define NVML_GPU_INSTANCE_PROFILE_COUNT 0xA +// 1_SLICE gfx capable profile +#define NVML_GPU_INSTANCE_PROFILE_1_SLICE_GFX 0x0A +// 2_SLICE gfx capable profile +#define NVML_GPU_INSTANCE_PROFILE_2_SLICE_GFX 0x0B +// 4_SLICE gfx capable profile +#define NVML_GPU_INSTANCE_PROFILE_4_SLICE_GFX 0x0C +// 1_SLICE profile with none of Decode, Encoder, JPEG, OFA engines. +#define NVML_GPU_INSTANCE_PROFILE_1_SLICE_NO_ME 0x0D +// 2_SLICE profile with none of Decode, Encoder, JPEG, OFA engines. +#define NVML_GPU_INSTANCE_PROFILE_2_SLICE_NO_ME 0x0E +// 1_SLICE profile with all of GPU Decode, Encoder, JPEG, OFA engines. +// Allocation of instance of this profile prevents allocation of +// all but _NO_ME profiles. +#define NVML_GPU_INSTANCE_PROFILE_1_SLICE_ALL_ME 0x0F +// 2_SLICE profile with all of GPU Decode, Encoder, JPEG, OFA engines. +// Allocation of instance of this profile prevents allocation of +// all but _NO_ME profiles. +#define NVML_GPU_INSTANCE_PROFILE_2_SLICE_ALL_ME 0x10 +#define NVML_GPU_INSTANCE_PROFILE_COUNT 0x11 /** * MIG GPU instance profile capability. @@ -9748,7 +11509,9 @@ nvmlReturn_t DECLDIR nvmlGetExcludedDeviceInfoByIndex(unsigned int index, nvmlEx * Bit field values representing MIG profile capabilities * \ref nvmlGpuInstanceProfileInfo_v3_t.capabilities */ -#define NVML_GPU_INTSTANCE_PROFILE_CAPS_P2P 0x1 +#define NVML_GPU_INSTANCE_PROFILE_CAPS_P2P 0x1 +#define NVML_GPU_INTSTANCE_PROFILE_CAPS_P2P 0x1 //!< Deprecated, do not use +#define NVML_GPU_INSTANCE_PROFILE_CAPS_GFX 0x2 /** * MIG compute instance profile capability. @@ -9756,7 +11519,7 @@ nvmlReturn_t DECLDIR nvmlGetExcludedDeviceInfoByIndex(unsigned int index, nvmlEx * Bit field values representing MIG profile capabilities * \ref nvmlComputeInstanceProfileInfo_v3_t.capabilities */ -/* No capabilities for compute profiles currently exposed */ +#define NVML_COMPUTE_INSTANCE_PROFILE_CAPS_GFX 0x1 typedef struct nvmlGpuInstancePlacement_st { @@ -9848,11 +11611,6 @@ typedef struct nvmlGpuInstanceInfo_st nvmlGpuInstancePlacement_t placement; //!< Placement for this instance } nvmlGpuInstanceInfo_t; -typedef struct -{ - struct nvmlGpuInstance_st* handle; -} nvmlGpuInstance_t; - /** * Compute instance profiles. * @@ -10025,6 +11783,9 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMigMode(nvmlDevice_t device, unsigned int *cur * * Information provided by this API is immutable throughout the lifetime of a MIG mode. * + * @note This API can be used to enumerate all MIG profiles supported by NVML in a forward compatible + * way by invoking it on \a profile values starting from 0, until the API returns \ref NVML_ERROR_INVALID_ARGUMENT. + * * For Ampere &tm; or newer fully supported devices. * Supported on Linux only. * @@ -10264,6 +12025,9 @@ nvmlReturn_t DECLDIR nvmlGpuInstanceGetInfo(nvmlGpuInstance_t gpuInstance, nvmlG * * Information provided by this API is immutable throughout the lifetime of a MIG mode. * + * @note This API can be used to enumerate all MIG profiles supported by NVML in a forward compatible + * way by invoking it on \a profile values starting from 0, until the API returns \ref NVML_ERROR_INVALID_ARGUMENT. + * * For Ampere &tm; or newer fully supported devices. * Supported on Linux only. * @@ -10657,76 +12421,188 @@ nvmlReturn_t DECLDIR nvmlDeviceGetDeviceHandleFromMigDeviceHandle(nvmlDevice_t m */ typedef enum { - NVML_GPM_METRIC_GRAPHICS_UTIL = 1, //!< Percentage of time any compute/graphics app was active on the GPU. 0.0 - 100.0 - NVML_GPM_METRIC_SM_UTIL = 2, //!< Percentage of SMs that were busy. 0.0 - 100.0 - NVML_GPM_METRIC_SM_OCCUPANCY = 3, //!< Percentage of warps that were active vs theoretical maximum. 0.0 - 100.0 - NVML_GPM_METRIC_INTEGER_UTIL = 4, //!< Percentage of time the GPU's SMs were doing integer operations. 0.0 - 100.0 - NVML_GPM_METRIC_ANY_TENSOR_UTIL = 5, //!< Percentage of time the GPU's SMs were doing ANY tensor operations. 0.0 - 100.0 - NVML_GPM_METRIC_DFMA_TENSOR_UTIL = 6, //!< Percentage of time the GPU's SMs were doing DFMA tensor operations. 0.0 - 100.0 - NVML_GPM_METRIC_HMMA_TENSOR_UTIL = 7, //!< Percentage of time the GPU's SMs were doing HMMA tensor operations. 0.0 - 100.0 - NVML_GPM_METRIC_IMMA_TENSOR_UTIL = 9, //!< Percentage of time the GPU's SMs were doing IMMA tensor operations. 0.0 - 100.0 - NVML_GPM_METRIC_DRAM_BW_UTIL = 10, //!< Percentage of DRAM bw used vs theoretical maximum. 0.0 - 100.0 */ - NVML_GPM_METRIC_FP64_UTIL = 11, //!< Percentage of time the GPU's SMs were doing non-tensor FP64 math. 0.0 - 100.0 - NVML_GPM_METRIC_FP32_UTIL = 12, //!< Percentage of time the GPU's SMs were doing non-tensor FP32 math. 0.0 - 100.0 - NVML_GPM_METRIC_FP16_UTIL = 13, //!< Percentage of time the GPU's SMs were doing non-tensor FP16 math. 0.0 - 100.0 - NVML_GPM_METRIC_PCIE_TX_PER_SEC = 20, //!< PCIe traffic from this GPU in MiB/sec - NVML_GPM_METRIC_PCIE_RX_PER_SEC = 21, //!< PCIe traffic to this GPU in MiB/sec - NVML_GPM_METRIC_NVDEC_0_UTIL = 30, //!< Percent utilization of NVDEC 0. 0.0 - 100.0 - NVML_GPM_METRIC_NVDEC_1_UTIL = 31, //!< Percent utilization of NVDEC 1. 0.0 - 100.0 - NVML_GPM_METRIC_NVDEC_2_UTIL = 32, //!< Percent utilization of NVDEC 2. 0.0 - 100.0 - NVML_GPM_METRIC_NVDEC_3_UTIL = 33, //!< Percent utilization of NVDEC 3. 0.0 - 100.0 - NVML_GPM_METRIC_NVDEC_4_UTIL = 34, //!< Percent utilization of NVDEC 4. 0.0 - 100.0 - NVML_GPM_METRIC_NVDEC_5_UTIL = 35, //!< Percent utilization of NVDEC 5. 0.0 - 100.0 - NVML_GPM_METRIC_NVDEC_6_UTIL = 36, //!< Percent utilization of NVDEC 6. 0.0 - 100.0 - NVML_GPM_METRIC_NVDEC_7_UTIL = 37, //!< Percent utilization of NVDEC 7. 0.0 - 100.0 - NVML_GPM_METRIC_NVJPG_0_UTIL = 40, //!< Percent utilization of NVJPG 0. 0.0 - 100.0 - NVML_GPM_METRIC_NVJPG_1_UTIL = 41, //!< Percent utilization of NVJPG 1. 0.0 - 100.0 - NVML_GPM_METRIC_NVJPG_2_UTIL = 42, //!< Percent utilization of NVJPG 2. 0.0 - 100.0 - NVML_GPM_METRIC_NVJPG_3_UTIL = 43, //!< Percent utilization of NVJPG 3. 0.0 - 100.0 - NVML_GPM_METRIC_NVJPG_4_UTIL = 44, //!< Percent utilization of NVJPG 4. 0.0 - 100.0 - NVML_GPM_METRIC_NVJPG_5_UTIL = 45, //!< Percent utilization of NVJPG 5. 0.0 - 100.0 - NVML_GPM_METRIC_NVJPG_6_UTIL = 46, //!< Percent utilization of NVJPG 6. 0.0 - 100.0 - NVML_GPM_METRIC_NVJPG_7_UTIL = 47, //!< Percent utilization of NVJPG 7. 0.0 - 100.0 - NVML_GPM_METRIC_NVOFA_0_UTIL = 50, //!< Percent utilization of NVOFA 0. 0.0 - 100.0 - NVML_GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC = 60, //!< NvLink read bandwidth for all links in MiB/sec - NVML_GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC = 61, //!< NvLink write bandwidth for all links in MiB/sec - NVML_GPM_METRIC_NVLINK_L0_RX_PER_SEC = 62, //!< NvLink read bandwidth for link 0 in MiB/sec - NVML_GPM_METRIC_NVLINK_L0_TX_PER_SEC = 63, //!< NvLink write bandwidth for link 0 in MiB/sec - NVML_GPM_METRIC_NVLINK_L1_RX_PER_SEC = 64, //!< NvLink read bandwidth for link 1 in MiB/sec - NVML_GPM_METRIC_NVLINK_L1_TX_PER_SEC = 65, //!< NvLink write bandwidth for link 1 in MiB/sec - NVML_GPM_METRIC_NVLINK_L2_RX_PER_SEC = 66, //!< NvLink read bandwidth for link 2 in MiB/sec - NVML_GPM_METRIC_NVLINK_L2_TX_PER_SEC = 67, //!< NvLink write bandwidth for link 2 in MiB/sec - NVML_GPM_METRIC_NVLINK_L3_RX_PER_SEC = 68, //!< NvLink read bandwidth for link 3 in MiB/sec - NVML_GPM_METRIC_NVLINK_L3_TX_PER_SEC = 69, //!< NvLink write bandwidth for link 3 in MiB/sec - NVML_GPM_METRIC_NVLINK_L4_RX_PER_SEC = 70, //!< NvLink read bandwidth for link 4 in MiB/sec - NVML_GPM_METRIC_NVLINK_L4_TX_PER_SEC = 71, //!< NvLink write bandwidth for link 4 in MiB/sec - NVML_GPM_METRIC_NVLINK_L5_RX_PER_SEC = 72, //!< NvLink read bandwidth for link 5 in MiB/sec - NVML_GPM_METRIC_NVLINK_L5_TX_PER_SEC = 73, //!< NvLink write bandwidth for link 5 in MiB/sec - NVML_GPM_METRIC_NVLINK_L6_RX_PER_SEC = 74, //!< NvLink read bandwidth for link 6 in MiB/sec - NVML_GPM_METRIC_NVLINK_L6_TX_PER_SEC = 75, //!< NvLink write bandwidth for link 6 in MiB/sec - NVML_GPM_METRIC_NVLINK_L7_RX_PER_SEC = 76, //!< NvLink read bandwidth for link 7 in MiB/sec - NVML_GPM_METRIC_NVLINK_L7_TX_PER_SEC = 77, //!< NvLink write bandwidth for link 7 in MiB/sec - NVML_GPM_METRIC_NVLINK_L8_RX_PER_SEC = 78, //!< NvLink read bandwidth for link 8 in MiB/sec - NVML_GPM_METRIC_NVLINK_L8_TX_PER_SEC = 79, //!< NvLink write bandwidth for link 8 in MiB/sec - NVML_GPM_METRIC_NVLINK_L9_RX_PER_SEC = 80, //!< NvLink read bandwidth for link 9 in MiB/sec - NVML_GPM_METRIC_NVLINK_L9_TX_PER_SEC = 81, //!< NvLink write bandwidth for link 9 in MiB/sec - NVML_GPM_METRIC_NVLINK_L10_RX_PER_SEC = 82, //!< NvLink read bandwidth for link 10 in MiB/sec - NVML_GPM_METRIC_NVLINK_L10_TX_PER_SEC = 83, //!< NvLink write bandwidth for link 10 in MiB/sec - NVML_GPM_METRIC_NVLINK_L11_RX_PER_SEC = 84, //!< NvLink read bandwidth for link 11 in MiB/sec - NVML_GPM_METRIC_NVLINK_L11_TX_PER_SEC = 85, //!< NvLink write bandwidth for link 11 in MiB/sec - NVML_GPM_METRIC_NVLINK_L12_RX_PER_SEC = 86, //!< NvLink read bandwidth for link 12 in MiB/sec - NVML_GPM_METRIC_NVLINK_L12_TX_PER_SEC = 87, //!< NvLink write bandwidth for link 12 in MiB/sec - NVML_GPM_METRIC_NVLINK_L13_RX_PER_SEC = 88, //!< NvLink read bandwidth for link 13 in MiB/sec - NVML_GPM_METRIC_NVLINK_L13_TX_PER_SEC = 89, //!< NvLink write bandwidth for link 13 in MiB/sec - NVML_GPM_METRIC_NVLINK_L14_RX_PER_SEC = 90, //!< NvLink read bandwidth for link 14 in MiB/sec - NVML_GPM_METRIC_NVLINK_L14_TX_PER_SEC = 91, //!< NvLink write bandwidth for link 14 in MiB/sec - NVML_GPM_METRIC_NVLINK_L15_RX_PER_SEC = 92, //!< NvLink read bandwidth for link 15 in MiB/sec - NVML_GPM_METRIC_NVLINK_L15_TX_PER_SEC = 93, //!< NvLink write bandwidth for link 15 in MiB/sec - NVML_GPM_METRIC_NVLINK_L16_RX_PER_SEC = 94, //!< NvLink read bandwidth for link 16 in MiB/sec - 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_MAX = 98, //!< Maximum value above +1. Note that changing this should also change NVML_GPM_METRICS_GET_VERSION due to struct size change + NVML_GPM_METRIC_GRAPHICS_UTIL = 1, //!< Percentage of time any compute/graphics app was active on the GPU. 0.0 - 100.0 + NVML_GPM_METRIC_SM_UTIL = 2, //!< Percentage of SMs that were busy. 0.0 - 100.0 + NVML_GPM_METRIC_SM_OCCUPANCY = 3, //!< Percentage of warps that were active vs theoretical maximum. 0.0 - 100.0 + NVML_GPM_METRIC_INTEGER_UTIL = 4, //!< Percentage of time the GPU's SMs were doing integer operations. 0.0 - 100.0 + NVML_GPM_METRIC_ANY_TENSOR_UTIL = 5, //!< Percentage of time the GPU's SMs were doing ANY tensor operations. 0.0 - 100.0 + NVML_GPM_METRIC_DFMA_TENSOR_UTIL = 6, //!< Percentage of time the GPU's SMs were doing DFMA tensor operations. 0.0 - 100.0 + NVML_GPM_METRIC_HMMA_TENSOR_UTIL = 7, //!< Percentage of time the GPU's SMs were doing HMMA tensor operations. 0.0 - 100.0 + NVML_GPM_METRIC_IMMA_TENSOR_UTIL = 9, //!< Percentage of time the GPU's SMs were doing IMMA tensor operations. 0.0 - 100.0 + NVML_GPM_METRIC_DRAM_BW_UTIL = 10, //!< Percentage of DRAM bw used vs theoretical maximum. 0.0 - 100.0 */ + NVML_GPM_METRIC_FP64_UTIL = 11, //!< Percentage of time the GPU's SMs were doing non-tensor FP64 math. 0.0 - 100.0 + NVML_GPM_METRIC_FP32_UTIL = 12, //!< Percentage of time the GPU's SMs were doing non-tensor FP32 math. 0.0 - 100.0 + NVML_GPM_METRIC_FP16_UTIL = 13, //!< Percentage of time the GPU's SMs were doing non-tensor FP16 math. 0.0 - 100.0 + NVML_GPM_METRIC_PCIE_TX_PER_SEC = 20, //!< PCIe traffic from this GPU in MiB/sec + NVML_GPM_METRIC_PCIE_RX_PER_SEC = 21, //!< PCIe traffic to this GPU in MiB/sec + NVML_GPM_METRIC_NVDEC_0_UTIL = 30, //!< Percent utilization of NVDEC 0. 0.0 - 100.0 + NVML_GPM_METRIC_NVDEC_1_UTIL = 31, //!< Percent utilization of NVDEC 1. 0.0 - 100.0 + NVML_GPM_METRIC_NVDEC_2_UTIL = 32, //!< Percent utilization of NVDEC 2. 0.0 - 100.0 + NVML_GPM_METRIC_NVDEC_3_UTIL = 33, //!< Percent utilization of NVDEC 3. 0.0 - 100.0 + NVML_GPM_METRIC_NVDEC_4_UTIL = 34, //!< Percent utilization of NVDEC 4. 0.0 - 100.0 + NVML_GPM_METRIC_NVDEC_5_UTIL = 35, //!< Percent utilization of NVDEC 5. 0.0 - 100.0 + NVML_GPM_METRIC_NVDEC_6_UTIL = 36, //!< Percent utilization of NVDEC 6. 0.0 - 100.0 + NVML_GPM_METRIC_NVDEC_7_UTIL = 37, //!< Percent utilization of NVDEC 7. 0.0 - 100.0 + NVML_GPM_METRIC_NVJPG_0_UTIL = 40, //!< Percent utilization of NVJPG 0. 0.0 - 100.0 + NVML_GPM_METRIC_NVJPG_1_UTIL = 41, //!< Percent utilization of NVJPG 1. 0.0 - 100.0 + NVML_GPM_METRIC_NVJPG_2_UTIL = 42, //!< Percent utilization of NVJPG 2. 0.0 - 100.0 + NVML_GPM_METRIC_NVJPG_3_UTIL = 43, //!< Percent utilization of NVJPG 3. 0.0 - 100.0 + NVML_GPM_METRIC_NVJPG_4_UTIL = 44, //!< Percent utilization of NVJPG 4. 0.0 - 100.0 + NVML_GPM_METRIC_NVJPG_5_UTIL = 45, //!< Percent utilization of NVJPG 5. 0.0 - 100.0 + NVML_GPM_METRIC_NVJPG_6_UTIL = 46, //!< Percent utilization of NVJPG 6. 0.0 - 100.0 + NVML_GPM_METRIC_NVJPG_7_UTIL = 47, //!< Percent utilization of NVJPG 7. 0.0 - 100.0 + NVML_GPM_METRIC_NVOFA_0_UTIL = 50, //!< Percent utilization of NVOFA 0. 0.0 - 100.0 + NVML_GPM_METRIC_NVOFA_1_UTIL = 51, //!< Percent utilization of NVOFA 1. 0.0 - 100.0 + NVML_GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC = 60, //!< NvLink read bandwidth for all links in MiB/sec + NVML_GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC = 61, //!< NvLink write bandwidth for all links in MiB/sec + NVML_GPM_METRIC_NVLINK_L0_RX_PER_SEC = 62, //!< NvLink read bandwidth for link 0 in MiB/sec + NVML_GPM_METRIC_NVLINK_L0_TX_PER_SEC = 63, //!< NvLink write bandwidth for link 0 in MiB/sec + NVML_GPM_METRIC_NVLINK_L1_RX_PER_SEC = 64, //!< NvLink read bandwidth for link 1 in MiB/sec + NVML_GPM_METRIC_NVLINK_L1_TX_PER_SEC = 65, //!< NvLink write bandwidth for link 1 in MiB/sec + NVML_GPM_METRIC_NVLINK_L2_RX_PER_SEC = 66, //!< NvLink read bandwidth for link 2 in MiB/sec + NVML_GPM_METRIC_NVLINK_L2_TX_PER_SEC = 67, //!< NvLink write bandwidth for link 2 in MiB/sec + NVML_GPM_METRIC_NVLINK_L3_RX_PER_SEC = 68, //!< NvLink read bandwidth for link 3 in MiB/sec + NVML_GPM_METRIC_NVLINK_L3_TX_PER_SEC = 69, //!< NvLink write bandwidth for link 3 in MiB/sec + NVML_GPM_METRIC_NVLINK_L4_RX_PER_SEC = 70, //!< NvLink read bandwidth for link 4 in MiB/sec + NVML_GPM_METRIC_NVLINK_L4_TX_PER_SEC = 71, //!< NvLink write bandwidth for link 4 in MiB/sec + NVML_GPM_METRIC_NVLINK_L5_RX_PER_SEC = 72, //!< NvLink read bandwidth for link 5 in MiB/sec + NVML_GPM_METRIC_NVLINK_L5_TX_PER_SEC = 73, //!< NvLink write bandwidth for link 5 in MiB/sec + NVML_GPM_METRIC_NVLINK_L6_RX_PER_SEC = 74, //!< NvLink read bandwidth for link 6 in MiB/sec + NVML_GPM_METRIC_NVLINK_L6_TX_PER_SEC = 75, //!< NvLink write bandwidth for link 6 in MiB/sec + NVML_GPM_METRIC_NVLINK_L7_RX_PER_SEC = 76, //!< NvLink read bandwidth for link 7 in MiB/sec + NVML_GPM_METRIC_NVLINK_L7_TX_PER_SEC = 77, //!< NvLink write bandwidth for link 7 in MiB/sec + NVML_GPM_METRIC_NVLINK_L8_RX_PER_SEC = 78, //!< NvLink read bandwidth for link 8 in MiB/sec + NVML_GPM_METRIC_NVLINK_L8_TX_PER_SEC = 79, //!< NvLink write bandwidth for link 8 in MiB/sec + NVML_GPM_METRIC_NVLINK_L9_RX_PER_SEC = 80, //!< NvLink read bandwidth for link 9 in MiB/sec + NVML_GPM_METRIC_NVLINK_L9_TX_PER_SEC = 81, //!< NvLink write bandwidth for link 9 in MiB/sec + NVML_GPM_METRIC_NVLINK_L10_RX_PER_SEC = 82, //!< NvLink read bandwidth for link 10 in MiB/sec + NVML_GPM_METRIC_NVLINK_L10_TX_PER_SEC = 83, //!< NvLink write bandwidth for link 10 in MiB/sec + NVML_GPM_METRIC_NVLINK_L11_RX_PER_SEC = 84, //!< NvLink read bandwidth for link 11 in MiB/sec + NVML_GPM_METRIC_NVLINK_L11_TX_PER_SEC = 85, //!< NvLink write bandwidth for link 11 in MiB/sec + NVML_GPM_METRIC_NVLINK_L12_RX_PER_SEC = 86, //!< NvLink read bandwidth for link 12 in MiB/sec + NVML_GPM_METRIC_NVLINK_L12_TX_PER_SEC = 87, //!< NvLink write bandwidth for link 12 in MiB/sec + NVML_GPM_METRIC_NVLINK_L13_RX_PER_SEC = 88, //!< NvLink read bandwidth for link 13 in MiB/sec + NVML_GPM_METRIC_NVLINK_L13_TX_PER_SEC = 89, //!< NvLink write bandwidth for link 13 in MiB/sec + NVML_GPM_METRIC_NVLINK_L14_RX_PER_SEC = 90, //!< NvLink read bandwidth for link 14 in MiB/sec + NVML_GPM_METRIC_NVLINK_L14_TX_PER_SEC = 91, //!< NvLink write bandwidth for link 14 in MiB/sec + NVML_GPM_METRIC_NVLINK_L15_RX_PER_SEC = 92, //!< NvLink read bandwidth for link 15 in MiB/sec + NVML_GPM_METRIC_NVLINK_L15_TX_PER_SEC = 93, //!< NvLink write bandwidth for link 15 in MiB/sec + NVML_GPM_METRIC_NVLINK_L16_RX_PER_SEC = 94, //!< NvLink read bandwidth for link 16 in MiB/sec + 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 + //Put new metrics for BLACKWELL here... + 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_MAX = 210, //!< Maximum value above +1. Note that changing this should also change NVML_GPM_METRICS_GET_VERSION due to struct size change } nvmlGpmMetricId_t; /** @} */ // @defgroup nvmlGpmEnums @@ -10757,7 +12633,7 @@ typedef struct { */ typedef struct { - unsigned int metricId; //!< IN: NVML_GPM_METRIC_? #define of which metric to retrieve + unsigned int metricId; //!< IN: NVML_GPM_METRIC_? define of which metric to retrieve nvmlReturn_t nvmlReturn; //!< OUT: Status of this metric. If this is nonzero, then value is not valid double value; //!< OUT: Value of this metric. Is only valid if nvmlReturn is 0 (NVML_SUCCESS) nvmlGpmMetricMetricInfo_t metricInfo; //!< OUT: Metric name and unit. Those can be NULL if not defined @@ -10801,6 +12677,14 @@ typedef struct * * For Hopper &tm; or newer fully supported devices. * + * To retrieve metrics, the user must first allocate the two sample buffers at \a metricsGet->sample1 + * and \a metricsGet->sample2 by calling \a nvmlGpmSampleAlloc(). Next, the user should fill in the ID of each metric + * in \a metricsGet->metrics[i].metricId and specify the total number of metrics to retrieve in \a metricsGet->numMetrics, + * The version should be set to NVML_GPM_METRICS_GET_VERSION in \a metricsGet->version. The user then calls the + * \a nvmlGpmSampleGet() API twice to obtain 2 samples of counters. \note that the interval between these + * two \a nvmlGpmSampleGet() calls should be greater than 100ms due to the internal sample refresh rate. + * Finally, the user calls \a nvmlGpmMetricsGet to retrieve the metrics, which will be stored at \a metricsGet->metrics + * * @param metricsGet IN/OUT: populated \a nvmlGpmMetricsGet_t struct * * @return @@ -10846,6 +12730,9 @@ nvmlReturn_t DECLDIR nvmlGpmSampleAlloc(nvmlGpmSample_t *gpmSample); * * For Hopper &tm; or newer fully supported devices. * + * @note The interval between two \a nvmlGpmSampleGet() calls should be greater than 100ms due to + * the internal sample refresh rate. + * * @param device Device to get samples for * @param gpmSample Buffer to read samples into * @@ -10863,6 +12750,9 @@ nvmlReturn_t DECLDIR nvmlGpmSampleGet(nvmlDevice_t device, nvmlGpmSample_t gpmSa * * For Hopper &tm; or newer fully supported devices. * + * @note The interval between two \a nvmlGpmMigSampleGet() calls should be greater than 100ms due to + * the internal sample refresh rate. + * * @param device Device to get samples for * @param gpuInstanceId MIG GPU Instance ID * @param gpmSample Buffer to read samples into @@ -10876,6 +12766,8 @@ nvmlReturn_t DECLDIR nvmlGpmMigSampleGet(nvmlDevice_t device, unsigned int gpuIn /** * Indicate whether the supplied device supports GPM * + * For Hopper &tm; or newer fully supported devices. + * * @param device NVML device to query for * @param gpmSupport Structure to indicate GPM support \a nvmlGpmSupport_t. Indicates * GPM support per system for the supplied device @@ -10890,7 +12782,7 @@ nvmlReturn_t DECLDIR nvmlGpmQueryDeviceSupport(nvmlDevice_t device, nvmlGpmSuppo /** * Get GPM stream state. * - * %HOPPER_OR_NEWER% + * For Hopper &tm; or newer fully supported devices. * Supported on Linux, Windows TCC. * * @param device The identifier of the target device @@ -10908,7 +12800,7 @@ nvmlReturn_t DECLDIR nvmlGpmQueryIfStreamingEnabled(nvmlDevice_t device, unsigne /** * Set GPM stream state. * - * %HOPPER_OR_NEWER% + * For Hopper &tm; or newer fully supported devices. * Supported on Linux, Windows TCC. * * @param device The identifier of the target device @@ -10926,118 +12818,348 @@ nvmlReturn_t DECLDIR nvmlGpmSetStreamingEnabled(nvmlDevice_t device, unsigned in /** @} */ // @defgroup nvmlGpmFunctions /** @} */ // @defgroup GPM -#define NVML_NVLINK_POWER_STATE_HIGH_SPEED 0x0 -#define NVML_NVLINK_POWER_STATE_LOW 0x1 - -#define NVML_NVLINK_LOW_POWER_THRESHOLD_MIN 0x1 -#define NVML_NVLINK_LOW_POWER_THRESHOLD_MAX 0x1FFF -#define NVML_NVLINK_LOW_POWER_THRESHOLD_RESET 0xFFFFFFFF - -/* Structure containing Low Power parameters */ -typedef struct nvmlNvLinkPowerThres_st +#define NVML_DEV_CAP_EGM (1 << 0) // Extended GPU memory +/** + * Device capabilities + */ +typedef struct { - unsigned int lowPwrThreshold; //!< Low power threshold (in units of 100us) -} nvmlNvLinkPowerThres_t; + unsigned int version; //!< the API version number + unsigned int capMask; //!< OUT: Bit mask of capabilities. +} nvmlDeviceCapabilities_v1_t; +typedef nvmlDeviceCapabilities_v1_t nvmlDeviceCapabilities_t; +#define nvmlDeviceCapabilities_v1 NVML_STRUCT_VERSION(DeviceCapabilities, 1) /** - * Set NvLink Low Power Threshold for device. + * Get device capabilities * - * %HOPPER_OR_NEWER% + * See \ref nvmlDeviceCapabilities_v1_t for more information on the struct. * * @param device The identifier of the target device - * @param info Reference to \a nvmlNvLinkPowerThres_t struct - * input parameters + * @param caps Returns GPU's capabilities * * @return - * - \ref NVML_SUCCESS if the \a Threshold is successfully set - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a Threshold is not within range - * - \ref NVML_ERROR_NOT_SUPPORTED if this query is not supported by the device + * - \ref NVML_SUCCESS If the query is success + * - \ref NVML_ERROR_UNINITIALIZED If the library has not been successfully initialized + * - \ref NVML_ERROR_INVALID_ARGUMENT If \a device is invalid or \a counters is NULL + * - \ref NVML_ERROR_NOT_SUPPORTED If the device does not 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_ARGUMENT_VERSION_MISMATCH If the provided version is invalid/unsupported + * - \ref NVML_ERROR_UNKNOWN On any unexpected error + */ +nvmlReturn_t DECLDIR nvmlDeviceGetCapabilities(nvmlDevice_t device, + nvmlDeviceCapabilities_t *caps); + +/* + * Generic bitmask to hold 255 bits, represented by 8 elements of 32 bits + */ +#define NVML_255_MASK_BITS_PER_ELEM 32 +#define NVML_255_MASK_NUM_ELEMS 8 +#define NVML_255_MASK_BIT_SET(index, nvmlMask) \ + nvmlMask.mask[index / NVML_255_MASK_BITS_PER_ELEM] |= (1 << (index % NVML_255_MASK_BITS_PER_ELEM)) + +#define NVML_255_MASK_BIT_GET(index, nvmlMask) \ + nvmlMask.mask[index / NVML_255_MASK_BITS_PER_ELEM] & (1 << (index % NVML_255_MASK_BITS_PER_ELEM)) + +#define NVML_255_MASK_BIT_SET_PTR(index, nvmlMask) \ + nvmlMask->mask[index / NVML_255_MASK_BITS_PER_ELEM] |= (1 << (index % NVML_255_MASK_BITS_PER_ELEM)) + +#define NVML_255_MASK_BIT_GET_PTR(index, nvmlMask) \ + nvmlMask->mask[index / NVML_255_MASK_BITS_PER_ELEM] & (1 << (index % NVML_255_MASK_BITS_PER_ELEM)) + +typedef struct +{ + unsigned int mask[NVML_255_MASK_NUM_ELEMS]; //profileId is used and + * the rest of the structure is ignored. + * + * @return + * - \ref NVML_SUCCESS if the Desired Profile was successfully set + * - \ref NVML_ERROR_INVALID_ARGUMENT if device is invalid or structure was NULL + * - \ref NVML_ERROR_NO_PERMISSION if user does not have permission to change the profile number + * - \ref NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device * **/ -nvmlReturn_t DECLDIR nvmlDeviceSetNvLinkDeviceLowPowerThreshold(nvmlDevice_t device, nvmlNvLinkPowerThres_t *info); +nvmlReturn_t DECLDIR nvmlDevicePowerSmoothingActivatePresetProfile(nvmlDevice_t device, + nvmlPowerSmoothingProfile_t *profile); /** - * Set the global nvlink bandwith mode - * - * @param nvlinkBwMode nvlink bandwidth mode - * @return - * - \ref NVML_SUCCESS on success - * - \ref NVML_ERROR_INVALID_ARGUMENT if an invalid argument is provided - * - \ref NVML_ERROR_IN_USE if P2P object exists - * - \ref NVML_ERROR_NOT_SUPPORTED if GPU is not Hopper or newer architecture. - * - \ref NVML_ERROR_NO_PERMISSION if not root user - */ -nvmlReturn_t DECLDIR nvmlSystemSetNvlinkBwMode(unsigned int nvlinkBwMode); - -/** - * Get the global nvlink bandwith mode - * - * @param nvlinkBwMode reference of nvlink bandwidth mode - * @return - * - \ref NVML_SUCCESS on success - * - \ref NVML_ERROR_INVALID_ARGUMENT if an invalid pointer is provided - * - \ref NVML_ERROR_NOT_SUPPORTED if GPU is not Hopper or newer architecture. - * - \ref NVML_ERROR_NO_PERMISSION if not root user - */ -nvmlReturn_t DECLDIR nvmlSystemGetNvlinkBwMode(unsigned int *nvlinkBwMode); - -/** - * Set new power limit of this device. - * - * For Kepler &tm; or newer fully supported devices. + * Update the value of a specific profile parameter contained within \ref nvmlPowerSmoothingProfile_v1_t. * Requires root/admin permissions. * - * See \ref nvmlDeviceGetPowerManagementLimitConstraints to check the allowed ranges of values. + * %BLACKWELL_OR_NEWER% * - * See \ref nvmlPowerValue_v2_t for more information on the struct. + * NVML_POWER_SMOOTHING_PROFILE_PARAM_PERCENT_TMP_FLOOR expects a value as a percentage from 00.00-100.00% + * NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_UP_RATE expects a value in W/s + * NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_RATE expects a value in W/s + * NVML_POWER_SMOOTHING_PROFILE_PARAM_RAMP_DOWN_HYSTERESIS expects a value in ms * - * \note Limit is not persistent across reboots or driver unloads. - * Enable persistent mode to prevent driver from unloading when no application is using the device. - * - * This API replaces nvmlDeviceSetPowerManagementLimit. It can be used as a drop-in replacement for the older version. - * - * @param device The identifier of the target device - * @param powerValue Power management limit in milliwatts to set + * @param device The identifier of the target device + * @param profile Reference to \ref nvmlPowerSmoothingProfile_v1_t struct * * @return - * - \ref NVML_SUCCESS if \a limit has been set - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a powerValue is NULL or contains invalid values - * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not 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 + * - \ref NVML_SUCCESS if the Active Profile was successfully set + * - \ref NVML_ERROR_INVALID_ARGUMENT if device is invalid or profile parameter/value was invalid + * - \ref NVML_ERROR_NO_PERMISSION if user does not have permission to change any profile parameters + * - \ref NVML_ERROR_ARGUMENT_VERSION_MISMATCH if the structure version is not supported * - * @see NVML_FI_DEV_POWER_AVERAGE - * @see NVML_FI_DEV_POWER_INSTANT - * @see NVML_FI_DEV_POWER_MIN_LIMIT - * @see NVML_FI_DEV_POWER_MAX_LIMIT - * @see NVML_FI_DEV_POWER_CURRENT_LIMIT - */ -nvmlReturn_t DECLDIR nvmlDeviceSetPowerManagementLimit_v2(nvmlDevice_t device, nvmlPowerValue_v2_t *powerValue); - + **/ +nvmlReturn_t DECLDIR nvmlDevicePowerSmoothingUpdatePresetProfileParam(nvmlDevice_t device, + nvmlPowerSmoothingProfile_t *profile); /** - * Get SRAM ECC error status of this device. - * - * For Ampere &tm; or newer fully supported devices. + * Enable or disable the Power Smoothing Feature. * Requires root/admin permissions. * - * See \ref nvmlEccSramErrorStatus_v1_t for more information on the struct. + * %BLACKWELL_OR_NEWER% * - * @param device The identifier of the target device - * @param status Returns SRAM ECC error status + * See \ref nvmlEnableState_t for details on allowed states + * + * @param device The identifier of the target device + * @param state Reference to \ref nvmlPowerSmoothingState_v1_t * * @return - * - \ref NVML_SUCCESS if \a limit has been set - * - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - * - \ref NVML_ERROR_INVALID_ARGUMENT if \a device is invalid or \a counters is NULL - * - \ref NVML_ERROR_NOT_SUPPORTED if the device does not 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_VERSION_MISMATCH if the version of \a nvmlEccSramErrorStatus_t is invalid - * - \ref NVML_ERROR_UNKNOWN on any unexpected error - */ -nvmlReturn_t DECLDIR nvmlDeviceGetSramEccErrorStatus(nvmlDevice_t device, - nvmlEccSramErrorStatus_t *status); + * - \ref NVML_SUCCESS if the feature state was successfully set + * - \ref NVML_ERROR_INVALID_ARGUMENT if device is invalid or state is NULL + * - \ref NVML_ERROR_NO_PERMISSION if user does not have permission to change feature state + * - \ref NVML_ERROR_NOT_SUPPORTED if this feature is not supported by the device + * + **/ +nvmlReturn_t DECLDIR nvmlDevicePowerSmoothingSetState(nvmlDevice_t device, + nvmlPowerSmoothingState_t *state); +/** @} */ // @defgroup + /** * NVML API versioning support */ @@ -11065,6 +13187,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetMPSComputeRunningProcesses(nvmlDevice_t device nvmlReturn_t DECLDIR nvmlDeviceGetMPSComputeRunningProcesses_v2(nvmlDevice_t device, unsigned int *infoCount, nvmlProcessInfo_v2_t *infos); nvmlReturn_t DECLDIR nvmlDeviceGetGpuInstancePossiblePlacements(nvmlDevice_t device, unsigned int profileId, nvmlGpuInstancePlacement_t *placements, unsigned int *count); nvmlReturn_t DECLDIR nvmlVgpuInstanceGetLicenseInfo(nvmlVgpuInstance_t vgpuInstance, nvmlVgpuLicenseInfo_t *licenseInfo); +nvmlReturn_t DECLDIR nvmlDeviceGetDriverModel(nvmlDevice_t device, nvmlDriverModel_t *current, nvmlDriverModel_t *pending); #endif // #ifdef NVML_NO_UNVERSIONED_FUNC_DEFS #if defined(NVML_NO_UNVERSIONED_FUNC_DEFS) @@ -11090,6 +13213,7 @@ nvmlReturn_t DECLDIR nvmlVgpuInstanceGetLicenseInfo(nvmlVgpuInstance_t vgpuInsta #undef nvmlGetBlacklistDeviceInfoByIndex #undef nvmlDeviceGetGpuInstancePossiblePlacements #undef nvmlVgpuInstanceGetLicenseInfo +#undef nvmlDeviceGetDriverModel #undef nvmlDeviceSetPowerManagementLimit #endif diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/system.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/system.go index a1cc7db4..f8247102 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/system.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/system.go @@ -88,31 +88,31 @@ func (l *library) SystemGetConfComputeCapabilities() (ConfComputeSystemCaps, Ret } // nvml.SystemGetConfComputeState() -func SystemGetConfComputeState() (ConfComputeSystemState, Return) { +func (l *library) SystemGetConfComputeState() (ConfComputeSystemState, Return) { var state ConfComputeSystemState ret := nvmlSystemGetConfComputeState(&state) return state, ret } // nvml.SystemGetConfComputeGpusReadyState() -func SystemGetConfComputeGpusReadyState() (uint32, Return) { +func (l *library) SystemGetConfComputeGpusReadyState() (uint32, Return) { var isAcceptingWork uint32 ret := nvmlSystemGetConfComputeGpusReadyState(&isAcceptingWork) return isAcceptingWork, ret } // nvml.SystemSetConfComputeGpusReadyState() -func SystemSetConfComputeGpusReadyState(isAcceptingWork uint32) Return { +func (l *library) SystemSetConfComputeGpusReadyState(isAcceptingWork uint32) Return { return nvmlSystemSetConfComputeGpusReadyState(isAcceptingWork) } // nvml.SystemSetNvlinkBwMode() -func SystemSetNvlinkBwMode(nvlinkBwMode uint32) Return { +func (l *library) SystemSetNvlinkBwMode(nvlinkBwMode uint32) Return { return nvmlSystemSetNvlinkBwMode(nvlinkBwMode) } // nvml.SystemGetNvlinkBwMode() -func SystemGetNvlinkBwMode() (uint32, Return) { +func (l *library) SystemGetNvlinkBwMode() (uint32, Return) { var nvlinkBwMode uint32 ret := nvmlSystemGetNvlinkBwMode(&nvlinkBwMode) return nvlinkBwMode, ret @@ -138,3 +138,11 @@ func (l *library) SystemGetConfComputeSettings() (SystemConfComputeSettings, Ret func (l *library) SystemSetConfComputeKeyRotationThresholdInfo(keyRotationThresholdInfo ConfComputeSetKeyRotationThresholdInfo) Return { return nvmlSystemSetConfComputeKeyRotationThresholdInfo(&keyRotationThresholdInfo) } + +// nvml.SystemGetDriverBranch() +func (l *library) SystemGetDriverBranch() (SystemDriverBranchInfo, Return) { + var branchInfo SystemDriverBranchInfo + branchInfo.Version = STRUCT_VERSION(branchInfo, 1) + ret := nvmlSystemGetDriverBranch(&branchInfo, SYSTEM_DRIVER_VERSION_BUFFER_SIZE) + return branchInfo, ret +} 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 6ee33a6a..3be17966 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 @@ -9,6 +9,10 @@ type nvmlDevice struct { Handle *_Ctype_struct_nvmlDevice_st } +type nvmlGpuInstance struct { + Handle *_Ctype_struct_nvmlGpuInstance_st +} + type PciInfoExt_v1 struct { Version uint32 Domain uint32 @@ -182,6 +186,58 @@ type GpuThermalSettings struct { Sensor [3]GpuThermalSettingsSensor } +type CoolerInfo_v1 struct { + Version uint32 + Index uint32 + SignalType uint32 + Target uint32 +} + +type CoolerInfo struct { + Version uint32 + Index uint32 + SignalType uint32 + Target uint32 +} + +const sizeofUUIDValue = unsafe.Sizeof([41]byte{}) + +type UUIDValue [sizeofUUIDValue]byte + +type UUID_v1 struct { + Version uint32 + Type uint32 + Value [41]byte + Pad_cgo_0 [3]byte +} + +type UUID struct { + Version uint32 + Type uint32 + Value [41]byte + Pad_cgo_0 [3]byte +} + +type DramEncryptionInfo_v1 struct { + Version uint32 + EncryptionState uint32 +} + +type DramEncryptionInfo struct { + Version uint32 + EncryptionState uint32 +} + +type MarginTemperature_v1 struct { + Version uint32 + MarginTemperature int32 +} + +type MarginTemperature struct { + Version uint32 + MarginTemperature int32 +} + type ClkMonFaultInfo struct { ClkApiDomain uint32 ClkDomainFaultMask uint32 @@ -193,6 +249,189 @@ type ClkMonStatus struct { ClkMonList [32]ClkMonFaultInfo } +type ClockOffset_v1 struct { + Version uint32 + Type uint32 + Pstate uint32 + ClockOffsetMHz int32 + MinClockOffsetMHz int32 + MaxClockOffsetMHz int32 +} + +type ClockOffset struct { + Version uint32 + Type uint32 + Pstate uint32 + ClockOffsetMHz int32 + MinClockOffsetMHz int32 + MaxClockOffsetMHz int32 +} + +type FanSpeedInfo_v1 struct { + Version uint32 + Fan uint32 + Speed uint32 +} + +type FanSpeedInfo struct { + Version uint32 + Fan uint32 + Speed uint32 +} + +type DevicePerfModes_v1 struct { + Version uint32 + Str [2048]int8 +} + +type DevicePerfModes struct { + Version uint32 + Str [2048]int8 +} + +type DeviceCurrentClockFreqs_v1 struct { + Version uint32 + Str [2048]int8 +} + +type DeviceCurrentClockFreqs struct { + Version uint32 + Str [2048]int8 +} + +type ProcessUtilizationSample struct { + Pid uint32 + TimeStamp uint64 + SmUtil uint32 + MemUtil uint32 + EncUtil uint32 + DecUtil uint32 +} + +type ProcessUtilizationInfo_v1 struct { + TimeStamp uint64 + Pid uint32 + SmUtil uint32 + MemUtil uint32 + EncUtil uint32 + DecUtil uint32 + JpgUtil uint32 + OfaUtil uint32 + Pad_cgo_0 [4]byte +} + +type ProcessesUtilizationInfo_v1 struct { + Version uint32 + ProcessSamplesCount uint32 + LastSeenTimeStamp uint64 + ProcUtilArray *ProcessUtilizationInfo_v1 +} + +type ProcessesUtilizationInfo struct { + Version uint32 + ProcessSamplesCount uint32 + LastSeenTimeStamp uint64 + ProcUtilArray *ProcessUtilizationInfo_v1 +} + +type EccSramErrorStatus_v1 struct { + Version uint32 + AggregateUncParity uint64 + AggregateUncSecDed uint64 + AggregateCor uint64 + VolatileUncParity uint64 + VolatileUncSecDed uint64 + VolatileCor uint64 + AggregateUncBucketL2 uint64 + AggregateUncBucketSm uint64 + AggregateUncBucketPcie uint64 + AggregateUncBucketMcu uint64 + AggregateUncBucketOther uint64 + BThresholdExceeded uint32 + Pad_cgo_0 [4]byte +} + +type EccSramErrorStatus struct { + Version uint32 + AggregateUncParity uint64 + AggregateUncSecDed uint64 + AggregateCor uint64 + VolatileUncParity uint64 + VolatileUncSecDed uint64 + VolatileCor uint64 + AggregateUncBucketL2 uint64 + AggregateUncBucketSm uint64 + AggregateUncBucketPcie uint64 + AggregateUncBucketMcu uint64 + AggregateUncBucketOther uint64 + BThresholdExceeded uint32 + Pad_cgo_0 [4]byte +} + +type PlatformInfo_v1 struct { + Version uint32 + IbGuid [16]uint8 + RackGuid [16]uint8 + ChassisPhysicalSlotNumber uint8 + ComputeSlotIndex uint8 + NodeIndex uint8 + PeerType uint8 + ModuleId uint8 + Pad_cgo_0 [3]byte +} + +type PlatformInfo_v2 struct { + Version uint32 + IbGuid [16]uint8 + ChassisSerialNumber [16]uint8 + SlotNumber uint8 + TrayIndex uint8 + HostId uint8 + PeerType uint8 + ModuleId uint8 + Pad_cgo_0 [3]byte +} + +type PlatformInfo struct { + Version uint32 + IbGuid [16]uint8 + ChassisSerialNumber [16]uint8 + SlotNumber uint8 + TrayIndex uint8 + HostId uint8 + PeerType uint8 + ModuleId uint8 + Pad_cgo_0 [3]byte +} + +type DeviceArchitecture uint32 + +type BusType uint32 + +type FanControlPolicy uint32 + +type PowerSource uint32 + +type GpuDynamicPstatesInfoUtilization struct { + BIsPresent uint32 + Percentage uint32 + IncThreshold uint32 + DecThreshold uint32 +} + +type GpuDynamicPstatesInfo struct { + Flags uint32 + Utilization [8]GpuDynamicPstatesInfoUtilization +} + +type PowerScopeType byte + +type PowerValue_v2 struct { + Version uint32 + PowerScope uint8 + PowerValueMw uint32 +} + type nvmlVgpuTypeId uint32 type nvmlVgpuInstance uint32 @@ -224,11 +463,32 @@ type VgpuPlacementList_v1 struct { PlacementIds *uint32 } +type VgpuPlacementList_v2 struct { + Version uint32 + PlacementSize uint32 + Count uint32 + PlacementIds *uint32 + Mode uint32 + Pad_cgo_0 [4]byte +} + type VgpuPlacementList struct { Version uint32 PlacementSize uint32 Count uint32 PlacementIds *uint32 + Mode uint32 + Pad_cgo_0 [4]byte +} + +type VgpuTypeBar1Info_v1 struct { + Version uint32 + Bar1Size uint64 +} + +type VgpuTypeBar1Info struct { + Version uint32 + Bar1Size uint64 } type VgpuInstanceUtilizationSample struct { @@ -306,6 +566,16 @@ type VgpuProcessesUtilizationInfo struct { VgpuProcUtilArray *VgpuProcessUtilizationInfo_v1 } +type VgpuRuntimeState_v1 struct { + Version uint32 + Size uint64 +} + +type VgpuRuntimeState struct { + Version uint32 + Size uint64 +} + type VgpuSchedulerParamsVgpuSchedDataWithARR struct { AvgFactor uint32 Timeslice uint32 @@ -390,41 +660,6 @@ type VgpuLicenseInfo struct { CurrentState uint32 } -type ProcessUtilizationSample struct { - Pid uint32 - TimeStamp uint64 - SmUtil uint32 - MemUtil uint32 - EncUtil uint32 - DecUtil uint32 -} - -type ProcessUtilizationInfo_v1 struct { - TimeStamp uint64 - Pid uint32 - SmUtil uint32 - MemUtil uint32 - EncUtil uint32 - DecUtil uint32 - JpgUtil uint32 - OfaUtil uint32 - Pad_cgo_0 [4]byte -} - -type ProcessesUtilizationInfo_v1 struct { - Version uint32 - ProcessSamplesCount uint32 - LastSeenTimeStamp uint64 - ProcUtilArray *ProcessUtilizationInfo_v1 -} - -type ProcessesUtilizationInfo struct { - Version uint32 - ProcessSamplesCount uint32 - LastSeenTimeStamp uint64 - ProcUtilArray *ProcessUtilizationInfo_v1 -} - type GridLicenseExpiry struct { Year uint32 Month uint16 @@ -451,58 +686,114 @@ type GridLicensableFeatures struct { GridLicensableFeatures [3]GridLicensableFeature } -type EccSramErrorStatus_v1 struct { - Version uint32 - AggregateUncParity uint64 - AggregateUncSecDed uint64 - AggregateCor uint64 - VolatileUncParity uint64 - VolatileUncSecDed uint64 - VolatileCor uint64 - AggregateUncBucketL2 uint64 - AggregateUncBucketSm uint64 - AggregateUncBucketPcie uint64 - AggregateUncBucketMcu uint64 - AggregateUncBucketOther uint64 - BThresholdExceeded uint32 - Pad_cgo_0 [4]byte +type VgpuTypeIdInfo_v1 struct { + Version uint32 + VgpuCount uint32 + VgpuTypeIds *uint32 } -type EccSramErrorStatus struct { - Version uint32 - AggregateUncParity uint64 - AggregateUncSecDed uint64 - AggregateCor uint64 - VolatileUncParity uint64 - VolatileUncSecDed uint64 - VolatileCor uint64 - AggregateUncBucketL2 uint64 - AggregateUncBucketSm uint64 - AggregateUncBucketPcie uint64 - AggregateUncBucketMcu uint64 - AggregateUncBucketOther uint64 - BThresholdExceeded uint32 - Pad_cgo_0 [4]byte +type VgpuTypeIdInfo struct { + Version uint32 + VgpuCount uint32 + VgpuTypeIds *uint32 } -type DeviceArchitecture uint32 - -type BusType uint32 - -type FanControlPolicy uint32 - -type PowerSource uint32 - -type GpuDynamicPstatesInfoUtilization struct { - BIsPresent uint32 - Percentage uint32 - IncThreshold uint32 - DecThreshold uint32 +type VgpuTypeMaxInstance_v1 struct { + Version uint32 + VgpuTypeId uint32 + MaxInstancePerGI uint32 } -type GpuDynamicPstatesInfo struct { - Flags uint32 - Utilization [8]GpuDynamicPstatesInfoUtilization +type VgpuTypeMaxInstance struct { + Version uint32 + VgpuTypeId uint32 + MaxInstancePerGI uint32 +} + +type ActiveVgpuInstanceInfo_v1 struct { + Version uint32 + VgpuCount uint32 + VgpuInstances *uint32 +} + +type ActiveVgpuInstanceInfo struct { + Version uint32 + VgpuCount uint32 + VgpuInstances *uint32 +} + +type VgpuSchedulerState_v1 struct { + Version uint32 + EngineId uint32 + SchedulerPolicy uint32 + EnableARRMode uint32 + SchedulerParams [8]byte +} + +type VgpuSchedulerState struct { + Version uint32 + EngineId uint32 + SchedulerPolicy uint32 + EnableARRMode uint32 + SchedulerParams [8]byte +} + +type VgpuSchedulerStateInfo_v1 struct { + Version uint32 + EngineId uint32 + SchedulerPolicy uint32 + ArrMode uint32 + SchedulerParams [8]byte +} + +type VgpuSchedulerStateInfo struct { + Version uint32 + EngineId uint32 + SchedulerPolicy uint32 + ArrMode uint32 + SchedulerParams [8]byte +} + +type VgpuSchedulerLogInfo_v1 struct { + Version uint32 + EngineId uint32 + SchedulerPolicy uint32 + ArrMode uint32 + SchedulerParams [8]byte + EntriesCount uint32 + LogEntries [200]VgpuSchedulerLogEntry +} + +type VgpuSchedulerLogInfo struct { + Version uint32 + EngineId uint32 + SchedulerPolicy uint32 + ArrMode uint32 + SchedulerParams [8]byte + EntriesCount uint32 + LogEntries [200]VgpuSchedulerLogEntry +} + +type VgpuCreatablePlacementInfo_v1 struct { + Version uint32 + VgpuTypeId uint32 + Count uint32 + PlacementIds *uint32 + PlacementSize uint32 + Pad_cgo_0 [4]byte +} + +type VgpuCreatablePlacementInfo struct { + Version uint32 + VgpuTypeId uint32 + Count uint32 + PlacementIds *uint32 + PlacementSize uint32 + Pad_cgo_0 [4]byte +} + +type NvLinkPowerThres struct { + LowPwrThreshold uint32 } type FieldValue struct { @@ -565,6 +856,66 @@ type nvmlEventData struct { ComputeInstanceId uint32 } +type SystemEventSet struct { + Handle *_Ctype_struct_nvmlSystemEventSet_st +} + +type SystemEventSetCreateRequest_v1 struct { + Version uint32 + Set SystemEventSet +} + +type SystemEventSetCreateRequest struct { + Version uint32 + Set SystemEventSet +} + +type SystemEventSetFreeRequest_v1 struct { + Version uint32 + Set SystemEventSet +} + +type SystemEventSetFreeRequest struct { + Version uint32 + Set SystemEventSet +} + +type SystemRegisterEventRequest_v1 struct { + Version uint32 + EventTypes uint64 + Set SystemEventSet +} + +type SystemRegisterEventRequest struct { + Version uint32 + EventTypes uint64 + Set SystemEventSet +} + +type SystemEventData_v1 struct { + EventType uint64 + GpuId uint32 + Pad_cgo_0 [4]byte +} + +type SystemEventSetWaitRequest_v1 struct { + Version uint32 + Timeoutms uint32 + Set SystemEventSet + Data *SystemEventData_v1 + DataSize uint32 + NumEvent uint32 +} + +type SystemEventSetWaitRequest struct { + Version uint32 + Timeoutms uint32 + Set SystemEventSet + Data *SystemEventData_v1 + DataSize uint32 + NumEvent uint32 +} + type AccountingStats struct { GpuUtilization uint32 MemoryUtilization uint32 @@ -703,16 +1054,70 @@ type GpuFabricInfoV struct { HealthMask uint32 } -type PowerScopeType byte +type SystemDriverBranchInfo_v1 struct { + Version uint32 + Branch [80]int8 +} -type PowerValue_v2 struct { - Version uint32 - PowerScope uint8 - PowerValueMw uint32 +type SystemDriverBranchInfo struct { + Version uint32 + Branch [80]int8 } type AffinityScope uint32 +type Temperature_v1 struct { + Version uint32 + SensorType uint32 + Temperature int32 +} + +type Temperature struct { + Version uint32 + SensorType uint32 + Temperature int32 +} + +type NvlinkSupportedBwModes_v1 struct { + Version uint32 + BwModes [23]uint8 + TotalBwModes uint8 +} + +type NvlinkSupportedBwModes struct { + Version uint32 + BwModes [23]uint8 + TotalBwModes uint8 +} + +type NvlinkGetBwMode_v1 struct { + Version uint32 + BIsBest uint32 + BwMode uint8 + Pad_cgo_0 [3]byte +} + +type NvlinkGetBwMode struct { + Version uint32 + BIsBest uint32 + BwMode uint8 + Pad_cgo_0 [3]byte +} + +type NvlinkSetBwMode_v1 struct { + Version uint32 + BSetBest uint32 + BwMode uint8 + Pad_cgo_0 [3]byte +} + +type NvlinkSetBwMode struct { + Version uint32 + BSetBest uint32 + BwMode uint8 + Pad_cgo_0 [3]byte +} + type VgpuVersion struct { MinVersion uint32 MaxVersion uint32 @@ -811,10 +1216,6 @@ type nvmlGpuInstanceInfo struct { Placement GpuInstancePlacement } -type nvmlGpuInstance struct { - Handle *_Ctype_struct_nvmlGpuInstance_st -} - type ComputeInstancePlacement struct { Start uint32 Size uint32 @@ -895,7 +1296,7 @@ type nvmlGpmMetricsGetType struct { NumMetrics uint32 Sample1 nvmlGpmSample Sample2 nvmlGpmSample - Metrics [98]GpmMetric + Metrics [210]GpmMetric } type GpmSupport struct { @@ -903,6 +1304,90 @@ type GpmSupport struct { IsSupportedDevice uint32 } -type NvLinkPowerThres struct { - LowPwrThreshold uint32 +type DeviceCapabilities_v1 struct { + Version uint32 + CapMask uint32 +} + +type DeviceCapabilities struct { + Version uint32 + CapMask uint32 +} + +type Mask255 struct { + Mask [8]uint32 +} + +type WorkloadPowerProfileInfo_v1 struct { + Version uint32 + ProfileId uint32 + Priority uint32 + ConflictingMask Mask255 +} + +type WorkloadPowerProfileInfo struct { + Version uint32 + ProfileId uint32 + Priority uint32 + ConflictingMask Mask255 +} + +type WorkloadPowerProfileProfilesInfo_v1 struct { + Version uint32 + PerfProfilesMask Mask255 + PerfProfile [255]WorkloadPowerProfileInfo +} + +type WorkloadPowerProfileProfilesInfo struct { + Version uint32 + PerfProfilesMask Mask255 + PerfProfile [255]WorkloadPowerProfileInfo +} + +type WorkloadPowerProfileCurrentProfiles_v1 struct { + Version uint32 + PerfProfilesMask Mask255 + RequestedProfilesMask Mask255 + EnforcedProfilesMask Mask255 +} + +type WorkloadPowerProfileCurrentProfiles struct { + Version uint32 + PerfProfilesMask Mask255 + RequestedProfilesMask Mask255 + EnforcedProfilesMask Mask255 +} + +type WorkloadPowerProfileRequestedProfiles_v1 struct { + Version uint32 + RequestedProfilesMask Mask255 +} + +type WorkloadPowerProfileRequestedProfiles struct { + Version uint32 + RequestedProfilesMask Mask255 +} + +type PowerSmoothingProfile_v1 struct { + Version uint32 + ProfileId uint32 + ParamId uint32 + Value float64 +} + +type PowerSmoothingProfile struct { + Version uint32 + ProfileId uint32 + ParamId uint32 + Value float64 +} + +type PowerSmoothingState_v1 struct { + Version uint32 + State uint32 +} + +type PowerSmoothingState struct { + Version uint32 + State uint32 } 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 da495242..b1e0fa7c 100644 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/vgpu.go +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/vgpu.go @@ -478,3 +478,32 @@ func (l *library) GetVgpuDriverCapabilities(capability VgpuDriverCapability) (bo ret := nvmlGetVgpuDriverCapabilities(capability, &capResult) return (capResult != 0), ret } + +// nvml.VgpuTypeGetBAR1Info() +func (l *library) VgpuTypeGetBAR1Info(vgpuTypeId VgpuTypeId) (VgpuTypeBar1Info, Return) { + return vgpuTypeId.GetBAR1Info() +} + +func (vgpuTypeId nvmlVgpuTypeId) GetBAR1Info() (VgpuTypeBar1Info, Return) { + var bar1Info VgpuTypeBar1Info + bar1Info.Version = STRUCT_VERSION(bar1Info, 1) + ret := nvmlVgpuTypeGetBAR1Info(vgpuTypeId, &bar1Info) + return bar1Info, ret +} + +// nvml.VgpuInstanceGetRuntimeStateSize() +func (l *library) VgpuInstanceGetRuntimeStateSize(vgpuInstance VgpuInstance) (VgpuRuntimeState, Return) { + return vgpuInstance.GetRuntimeStateSize() +} + +func (vgpuInstance nvmlVgpuInstance) GetRuntimeStateSize() (VgpuRuntimeState, Return) { + var pState VgpuRuntimeState + pState.Version = STRUCT_VERSION(pState, 1) + ret := nvmlVgpuInstanceGetRuntimeStateSize(vgpuInstance, &pState) + return pState, ret +} + +// nvml.VgpuTypeGetMaxInstancesPerGpuInstance() +func (l *library) VgpuTypeGetMaxInstancesPerGpuInstance(maxInstance *VgpuTypeMaxInstance) Return { + return nvmlVgpuTypeGetMaxInstancesPerGpuInstance(maxInstance) +} 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 c1ecb2d0..bfe4d079 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,327 +20,372 @@ 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 - DeviceGetActiveVgpus = libnvml.DeviceGetActiveVgpus - DeviceGetAdaptiveClockInfoStatus = libnvml.DeviceGetAdaptiveClockInfoStatus - DeviceGetApplicationsClock = libnvml.DeviceGetApplicationsClock - DeviceGetArchitecture = libnvml.DeviceGetArchitecture - DeviceGetAttributes = libnvml.DeviceGetAttributes - DeviceGetAutoBoostedClocksEnabled = libnvml.DeviceGetAutoBoostedClocksEnabled - DeviceGetBAR1MemoryInfo = libnvml.DeviceGetBAR1MemoryInfo - DeviceGetBoardId = libnvml.DeviceGetBoardId - DeviceGetBoardPartNumber = libnvml.DeviceGetBoardPartNumber - DeviceGetBrand = libnvml.DeviceGetBrand - DeviceGetBridgeChipInfo = libnvml.DeviceGetBridgeChipInfo - DeviceGetBusType = libnvml.DeviceGetBusType - DeviceGetC2cModeInfoV = libnvml.DeviceGetC2cModeInfoV - DeviceGetClkMonStatus = libnvml.DeviceGetClkMonStatus - DeviceGetClock = libnvml.DeviceGetClock - DeviceGetClockInfo = libnvml.DeviceGetClockInfo - DeviceGetComputeInstanceId = libnvml.DeviceGetComputeInstanceId - DeviceGetComputeMode = libnvml.DeviceGetComputeMode - DeviceGetComputeRunningProcesses = libnvml.DeviceGetComputeRunningProcesses - DeviceGetConfComputeGpuAttestationReport = libnvml.DeviceGetConfComputeGpuAttestationReport - DeviceGetConfComputeGpuCertificate = libnvml.DeviceGetConfComputeGpuCertificate - DeviceGetConfComputeMemSizeInfo = libnvml.DeviceGetConfComputeMemSizeInfo - DeviceGetConfComputeProtectedMemoryUsage = libnvml.DeviceGetConfComputeProtectedMemoryUsage - DeviceGetCount = libnvml.DeviceGetCount - DeviceGetCpuAffinity = libnvml.DeviceGetCpuAffinity - DeviceGetCpuAffinityWithinScope = libnvml.DeviceGetCpuAffinityWithinScope - DeviceGetCreatableVgpus = libnvml.DeviceGetCreatableVgpus - DeviceGetCudaComputeCapability = libnvml.DeviceGetCudaComputeCapability - DeviceGetCurrPcieLinkGeneration = libnvml.DeviceGetCurrPcieLinkGeneration - DeviceGetCurrPcieLinkWidth = libnvml.DeviceGetCurrPcieLinkWidth - 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 - DeviceGetDriverModel = libnvml.DeviceGetDriverModel - 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 - 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 - 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 - DeviceGetHostVgpuMode = libnvml.DeviceGetHostVgpuMode - DeviceGetIndex = libnvml.DeviceGetIndex - DeviceGetInforomConfigurationChecksum = libnvml.DeviceGetInforomConfigurationChecksum - DeviceGetInforomImageVersion = libnvml.DeviceGetInforomImageVersion - DeviceGetInforomVersion = libnvml.DeviceGetInforomVersion - DeviceGetIrqNum = libnvml.DeviceGetIrqNum - DeviceGetJpgUtilization = libnvml.DeviceGetJpgUtilization - DeviceGetLastBBXFlushTime = libnvml.DeviceGetLastBBXFlushTime - DeviceGetMPSComputeRunningProcesses = libnvml.DeviceGetMPSComputeRunningProcesses - 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 - DeviceGetNvLinkRemoteDeviceType = libnvml.DeviceGetNvLinkRemoteDeviceType - DeviceGetNvLinkRemotePciInfo = libnvml.DeviceGetNvLinkRemotePciInfo - DeviceGetNvLinkState = libnvml.DeviceGetNvLinkState - DeviceGetNvLinkUtilizationControl = libnvml.DeviceGetNvLinkUtilizationControl - DeviceGetNvLinkUtilizationCounter = libnvml.DeviceGetNvLinkUtilizationCounter - DeviceGetNvLinkVersion = libnvml.DeviceGetNvLinkVersion - DeviceGetOfaUtilization = libnvml.DeviceGetOfaUtilization - DeviceGetP2PStatus = libnvml.DeviceGetP2PStatus - DeviceGetPciInfo = libnvml.DeviceGetPciInfo - DeviceGetPciInfoExt = libnvml.DeviceGetPciInfoExt - DeviceGetPcieLinkMaxSpeed = libnvml.DeviceGetPcieLinkMaxSpeed - DeviceGetPcieReplayCounter = libnvml.DeviceGetPcieReplayCounter - DeviceGetPcieSpeed = libnvml.DeviceGetPcieSpeed - DeviceGetPcieThroughput = libnvml.DeviceGetPcieThroughput - DeviceGetPerformanceState = libnvml.DeviceGetPerformanceState - DeviceGetPersistenceMode = libnvml.DeviceGetPersistenceMode - DeviceGetPgpuMetadataString = libnvml.DeviceGetPgpuMetadataString - DeviceGetPowerManagementDefaultLimit = libnvml.DeviceGetPowerManagementDefaultLimit - DeviceGetPowerManagementLimit = libnvml.DeviceGetPowerManagementLimit - DeviceGetPowerManagementLimitConstraints = libnvml.DeviceGetPowerManagementLimitConstraints - DeviceGetPowerManagementMode = libnvml.DeviceGetPowerManagementMode - DeviceGetPowerSource = libnvml.DeviceGetPowerSource - DeviceGetPowerState = libnvml.DeviceGetPowerState - DeviceGetPowerUsage = libnvml.DeviceGetPowerUsage - DeviceGetProcessUtilization = libnvml.DeviceGetProcessUtilization - DeviceGetProcessesUtilizationInfo = libnvml.DeviceGetProcessesUtilizationInfo - DeviceGetRemappedRows = libnvml.DeviceGetRemappedRows - 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 - 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 - DeviceGetThermalSettings = libnvml.DeviceGetThermalSettings - DeviceGetTopologyCommonAncestor = libnvml.DeviceGetTopologyCommonAncestor - DeviceGetTopologyNearestGpus = libnvml.DeviceGetTopologyNearestGpus - DeviceGetTotalEccErrors = libnvml.DeviceGetTotalEccErrors - DeviceGetTotalEnergyConsumption = libnvml.DeviceGetTotalEnergyConsumption - DeviceGetUUID = libnvml.DeviceGetUUID - 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 - DeviceGetVgpuSchedulerState = libnvml.DeviceGetVgpuSchedulerState - DeviceGetVgpuTypeCreatablePlacements = libnvml.DeviceGetVgpuTypeCreatablePlacements - DeviceGetVgpuTypeSupportedPlacements = libnvml.DeviceGetVgpuTypeSupportedPlacements - DeviceGetVgpuUtilization = libnvml.DeviceGetVgpuUtilization - DeviceGetViolationStatus = libnvml.DeviceGetViolationStatus - DeviceGetVirtualizationMode = libnvml.DeviceGetVirtualizationMode - DeviceIsMigDeviceHandle = libnvml.DeviceIsMigDeviceHandle - DeviceModifyDrainState = libnvml.DeviceModifyDrainState - DeviceOnSameBoard = libnvml.DeviceOnSameBoard - DeviceQueryDrainState = libnvml.DeviceQueryDrainState - 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 - DeviceSetComputeMode = libnvml.DeviceSetComputeMode - DeviceSetConfComputeUnprotectedMemSize = libnvml.DeviceSetConfComputeUnprotectedMemSize - DeviceSetCpuAffinity = libnvml.DeviceSetCpuAffinity - DeviceSetDefaultAutoBoostedClocksEnabled = libnvml.DeviceSetDefaultAutoBoostedClocksEnabled - DeviceSetDefaultFanSpeed_v2 = libnvml.DeviceSetDefaultFanSpeed_v2 - DeviceSetDriverModel = libnvml.DeviceSetDriverModel - DeviceSetEccMode = libnvml.DeviceSetEccMode - DeviceSetFanControlPolicy = libnvml.DeviceSetFanControlPolicy - DeviceSetFanSpeed_v2 = libnvml.DeviceSetFanSpeed_v2 - DeviceSetGpcClkVfOffset = libnvml.DeviceSetGpcClkVfOffset - DeviceSetGpuLockedClocks = libnvml.DeviceSetGpuLockedClocks - DeviceSetGpuOperationMode = libnvml.DeviceSetGpuOperationMode - DeviceSetMemClkVfOffset = libnvml.DeviceSetMemClkVfOffset - DeviceSetMemoryLockedClocks = libnvml.DeviceSetMemoryLockedClocks - DeviceSetMigMode = libnvml.DeviceSetMigMode - DeviceSetNvLinkDeviceLowPowerThreshold = libnvml.DeviceSetNvLinkDeviceLowPowerThreshold - DeviceSetNvLinkUtilizationControl = libnvml.DeviceSetNvLinkUtilizationControl - DeviceSetPersistenceMode = libnvml.DeviceSetPersistenceMode - DeviceSetPowerManagementLimit = libnvml.DeviceSetPowerManagementLimit - DeviceSetPowerManagementLimit_v2 = libnvml.DeviceSetPowerManagementLimit_v2 - DeviceSetTemperatureThreshold = libnvml.DeviceSetTemperatureThreshold - DeviceSetVgpuCapabilities = libnvml.DeviceSetVgpuCapabilities - DeviceSetVgpuHeterogeneousMode = libnvml.DeviceSetVgpuHeterogeneousMode - DeviceSetVgpuSchedulerState = libnvml.DeviceSetVgpuSchedulerState - DeviceSetVirtualizationMode = libnvml.DeviceSetVirtualizationMode - DeviceValidateInforom = libnvml.DeviceValidateInforom - 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 - GpuInstanceGetComputeInstanceById = libnvml.GpuInstanceGetComputeInstanceById - GpuInstanceGetComputeInstancePossiblePlacements = libnvml.GpuInstanceGetComputeInstancePossiblePlacements - GpuInstanceGetComputeInstanceProfileInfo = libnvml.GpuInstanceGetComputeInstanceProfileInfo - GpuInstanceGetComputeInstanceProfileInfoV = libnvml.GpuInstanceGetComputeInstanceProfileInfoV - GpuInstanceGetComputeInstanceRemainingCapacity = libnvml.GpuInstanceGetComputeInstanceRemainingCapacity - GpuInstanceGetComputeInstances = libnvml.GpuInstanceGetComputeInstances - GpuInstanceGetInfo = libnvml.GpuInstanceGetInfo - Init = libnvml.Init - InitWithFlags = libnvml.InitWithFlags - SetVgpuVersion = libnvml.SetVgpuVersion - Shutdown = libnvml.Shutdown - SystemGetConfComputeCapabilities = libnvml.SystemGetConfComputeCapabilities - SystemGetConfComputeKeyRotationThresholdInfo = libnvml.SystemGetConfComputeKeyRotationThresholdInfo - SystemGetConfComputeSettings = libnvml.SystemGetConfComputeSettings - SystemGetCudaDriverVersion = libnvml.SystemGetCudaDriverVersion - SystemGetCudaDriverVersion_v2 = libnvml.SystemGetCudaDriverVersion_v2 - SystemGetDriverVersion = libnvml.SystemGetDriverVersion - SystemGetHicVersion = libnvml.SystemGetHicVersion - SystemGetNVMLVersion = libnvml.SystemGetNVMLVersion - SystemGetProcessName = libnvml.SystemGetProcessName - SystemGetTopologyGpuSet = libnvml.SystemGetTopologyGpuSet - SystemSetConfComputeKeyRotationThresholdInfo = libnvml.SystemSetConfComputeKeyRotationThresholdInfo - 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 - VgpuInstanceGetType = libnvml.VgpuInstanceGetType - VgpuInstanceGetUUID = libnvml.VgpuInstanceGetUUID - VgpuInstanceGetVmDriverVersion = libnvml.VgpuInstanceGetVmDriverVersion - VgpuInstanceGetVmID = libnvml.VgpuInstanceGetVmID - VgpuInstanceSetEncoderCapacity = libnvml.VgpuInstanceSetEncoderCapacity - VgpuTypeGetCapabilities = libnvml.VgpuTypeGetCapabilities - VgpuTypeGetClass = libnvml.VgpuTypeGetClass - VgpuTypeGetDeviceID = libnvml.VgpuTypeGetDeviceID - VgpuTypeGetFrameRateLimit = libnvml.VgpuTypeGetFrameRateLimit - VgpuTypeGetFramebufferSize = libnvml.VgpuTypeGetFramebufferSize - VgpuTypeGetGpuInstanceProfileId = libnvml.VgpuTypeGetGpuInstanceProfileId - VgpuTypeGetLicense = libnvml.VgpuTypeGetLicense - VgpuTypeGetMaxInstances = libnvml.VgpuTypeGetMaxInstances - 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 + DeviceGetActiveVgpus = libnvml.DeviceGetActiveVgpus + DeviceGetAdaptiveClockInfoStatus = libnvml.DeviceGetAdaptiveClockInfoStatus + DeviceGetApplicationsClock = libnvml.DeviceGetApplicationsClock + DeviceGetArchitecture = libnvml.DeviceGetArchitecture + DeviceGetAttributes = libnvml.DeviceGetAttributes + DeviceGetAutoBoostedClocksEnabled = libnvml.DeviceGetAutoBoostedClocksEnabled + DeviceGetBAR1MemoryInfo = libnvml.DeviceGetBAR1MemoryInfo + 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 + 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 + 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 + 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 + 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 + DeviceGetPowerSource = libnvml.DeviceGetPowerSource + DeviceGetPowerState = libnvml.DeviceGetPowerState + DeviceGetPowerUsage = libnvml.DeviceGetPowerUsage + DeviceGetProcessUtilization = libnvml.DeviceGetProcessUtilization + DeviceGetProcessesUtilizationInfo = libnvml.DeviceGetProcessesUtilizationInfo + DeviceGetRemappedRows = libnvml.DeviceGetRemappedRows + 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 + 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 + 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 + DeviceGetVgpuSchedulerState = libnvml.DeviceGetVgpuSchedulerState + 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 + 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 + 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 + DeviceSetTemperatureThreshold = libnvml.DeviceSetTemperatureThreshold + DeviceSetVgpuCapabilities = libnvml.DeviceSetVgpuCapabilities + DeviceSetVgpuHeterogeneousMode = libnvml.DeviceSetVgpuHeterogeneousMode + DeviceSetVgpuSchedulerState = libnvml.DeviceSetVgpuSchedulerState + DeviceSetVirtualizationMode = libnvml.DeviceSetVirtualizationMode + DeviceValidateInforom = libnvml.DeviceValidateInforom + DeviceWorkloadPowerProfileClearRequestedProfiles = libnvml.DeviceWorkloadPowerProfileClearRequestedProfiles + DeviceWorkloadPowerProfileGetCurrentProfiles = libnvml.DeviceWorkloadPowerProfileGetCurrentProfiles + DeviceWorkloadPowerProfileGetProfilesInfo = libnvml.DeviceWorkloadPowerProfileGetProfilesInfo + DeviceWorkloadPowerProfileSetRequestedProfiles = libnvml.DeviceWorkloadPowerProfileSetRequestedProfiles + 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 + GpuInstanceGetVgpuSchedulerState = libnvml.GpuInstanceGetVgpuSchedulerState + GpuInstanceGetVgpuTypeCreatablePlacements = libnvml.GpuInstanceGetVgpuTypeCreatablePlacements + GpuInstanceSetVgpuHeterogeneousMode = libnvml.GpuInstanceSetVgpuHeterogeneousMode + GpuInstanceSetVgpuSchedulerState = libnvml.GpuInstanceSetVgpuSchedulerState + Init = libnvml.Init + InitWithFlags = libnvml.InitWithFlags + SetVgpuVersion = libnvml.SetVgpuVersion + Shutdown = libnvml.Shutdown + SystemEventSetCreate = libnvml.SystemEventSetCreate + SystemEventSetFree = libnvml.SystemEventSetFree + SystemEventSetWait = libnvml.SystemEventSetWait + 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 ) // Interface represents the interface for the library type. @@ -375,9 +420,11 @@ type Interface interface { DeviceGetBridgeChipInfo(Device) (BridgeChipHierarchy, Return) DeviceGetBusType(Device) (BusType, Return) DeviceGetC2cModeInfoV(Device) C2cModeInfoHandler + DeviceGetCapabilities(Device) (DeviceCapabilities, Return) DeviceGetClkMonStatus(Device) (ClkMonStatus, Return) DeviceGetClock(Device, ClockType, ClockId) (uint32, Return) DeviceGetClockInfo(Device, ClockType) (uint32, Return) + DeviceGetClockOffsets(Device) (ClockOffset, Return) DeviceGetComputeInstanceId(Device) (int, Return) DeviceGetComputeMode(Device) (ComputeMode, Return) DeviceGetComputeRunningProcesses(Device) ([]ProcessInfo, Return) @@ -385,6 +432,7 @@ type Interface interface { DeviceGetConfComputeGpuCertificate(Device) (ConfComputeGpuCertificate, Return) DeviceGetConfComputeMemSizeInfo(Device) (ConfComputeMemSizeInfo, Return) DeviceGetConfComputeProtectedMemoryUsage(Device) (Memory, Return) + DeviceGetCoolerInfo(Device) (CoolerInfo, Return) DeviceGetCount() (int, Return) DeviceGetCpuAffinity(Device, int) ([]uint, Return) DeviceGetCpuAffinityWithinScope(Device, int, AffinityScope) ([]uint, Return) @@ -392,6 +440,7 @@ type Interface interface { DeviceGetCudaComputeCapability(Device) (int, int, Return) DeviceGetCurrPcieLinkGeneration(Device) (int, Return) DeviceGetCurrPcieLinkWidth(Device) (int, Return) + DeviceGetCurrentClockFreqs(Device) (DeviceCurrentClockFreqs, Return) DeviceGetCurrentClocksEventReasons(Device) (uint64, Return) DeviceGetCurrentClocksThrottleReasons(Device) (uint64, Return) DeviceGetDecoderUtilization(Device) (uint32, uint32, Return) @@ -401,7 +450,9 @@ type Interface interface { DeviceGetDeviceHandleFromMigDeviceHandle(Device) (Device, Return) DeviceGetDisplayActive(Device) (EnableState, Return) DeviceGetDisplayMode(Device) (EnableState, Return) + DeviceGetDramEncryptionMode(Device) (DramEncryptionInfo, DramEncryptionInfo, Return) DeviceGetDriverModel(Device) (DriverModel, DriverModel, Return) + DeviceGetDriverModel_v2(Device) (DriverModel, DriverModel, Return) DeviceGetDynamicPstatesInfo(Device) (GpuDynamicPstatesInfo, Return) DeviceGetEccMode(Device) (EnableState, EnableState, Return) DeviceGetEncoderCapacity(Device, EncoderType) (int, Return) @@ -413,6 +464,7 @@ type Interface interface { DeviceGetFBCStats(Device) (FBCStats, Return) DeviceGetFanControlPolicy_v2(Device, int) (FanControlPolicy, Return) DeviceGetFanSpeed(Device) (uint32, Return) + DeviceGetFanSpeedRPM(Device) (FanSpeedInfo, Return) DeviceGetFanSpeed_v2(Device, int) (uint32, Return) DeviceGetFieldValues(Device, []FieldValue) Return DeviceGetGpcClkMinMaxVfOffset(Device) (int, int, Return) @@ -436,6 +488,7 @@ type Interface interface { DeviceGetHandleByPciBusId(string) (Device, Return) DeviceGetHandleBySerial(string) (Device, Return) DeviceGetHandleByUUID(string) (Device, Return) + DeviceGetHandleByUUIDV(*UUID) (Device, Return) DeviceGetHostVgpuMode(Device) (HostVgpuMode, Return) DeviceGetIndex(Device) (int, Return) DeviceGetInforomConfigurationChecksum(Device) (uint32, Return) @@ -445,6 +498,7 @@ type Interface interface { DeviceGetJpgUtilization(Device) (uint32, uint32, Return) DeviceGetLastBBXFlushTime(Device) (uint64, uint, Return) DeviceGetMPSComputeRunningProcesses(Device) ([]ProcessInfo, Return) + DeviceGetMarginTemperature(Device) (MarginTemperature, Return) DeviceGetMaxClockInfo(Device, ClockType) (uint32, Return) DeviceGetMaxCustomerBoostClock(Device, ClockType) (uint32, Return) DeviceGetMaxMigDeviceCount(Device) (int, Return) @@ -476,6 +530,8 @@ type Interface interface { DeviceGetNvLinkUtilizationControl(Device, int, int) (NvLinkUtilizationControl, Return) DeviceGetNvLinkUtilizationCounter(Device, int, int) (uint64, uint64, Return) DeviceGetNvLinkVersion(Device, int) (uint32, Return) + DeviceGetNvlinkBwMode(Device) (NvlinkGetBwMode, Return) + DeviceGetNvlinkSupportedBwModes(Device) (NvlinkSupportedBwModes, Return) DeviceGetOfaUtilization(Device) (uint32, uint32, Return) DeviceGetP2PStatus(Device, Device, GpuP2PCapsIndex) (GpuP2PStatus, Return) DeviceGetPciInfo(Device) (PciInfo, Return) @@ -484,9 +540,11 @@ type Interface interface { DeviceGetPcieReplayCounter(Device) (int, Return) DeviceGetPcieSpeed(Device) (int, Return) DeviceGetPcieThroughput(Device, PcieUtilCounter) (uint32, Return) + DeviceGetPerformanceModes(Device) (DevicePerfModes, Return) DeviceGetPerformanceState(Device) (Pstates, Return) DeviceGetPersistenceMode(Device) (EnableState, Return) DeviceGetPgpuMetadataString(Device) (string, Return) + DeviceGetPlatformInfo(Device) (PlatformInfo, Return) DeviceGetPowerManagementDefaultLimit(Device) (uint32, Return) DeviceGetPowerManagementLimit(Device) (uint32, Return) DeviceGetPowerManagementLimitConstraints(Device) (uint32, uint32, Return) @@ -515,6 +573,7 @@ type Interface interface { DeviceGetTargetFanSpeed(Device, int) (int, Return) DeviceGetTemperature(Device, TemperatureSensors) (uint32, Return) DeviceGetTemperatureThreshold(Device, TemperatureThresholds) (uint32, Return) + DeviceGetTemperatureV(Device) TemperatureHandler DeviceGetThermalSettings(Device, uint32) (GpuThermalSettings, Return) DeviceGetTopologyCommonAncestor(Device, Device) (GpuTopologyLevel, Return) DeviceGetTopologyNearestGpus(Device, GpuTopologyLevel) ([]Device, Return) @@ -540,6 +599,9 @@ type Interface interface { DeviceIsMigDeviceHandle(Device) (bool, Return) DeviceModifyDrainState(*PciInfo, EnableState) Return DeviceOnSameBoard(Device, Device) (int, Return) + DevicePowerSmoothingActivatePresetProfile(Device, *PowerSmoothingProfile) Return + DevicePowerSmoothingSetState(Device, *PowerSmoothingState) Return + DevicePowerSmoothingUpdatePresetProfileParam(Device, *PowerSmoothingProfile) Return DeviceQueryDrainState(*PciInfo) (EnableState, Return) DeviceRegisterEvents(Device, uint64, EventSet) Return DeviceRemoveGpu(*PciInfo) Return @@ -553,11 +615,13 @@ type Interface interface { DeviceSetAccountingMode(Device, EnableState) Return DeviceSetApplicationsClocks(Device, uint32, uint32) Return DeviceSetAutoBoostedClocksEnabled(Device, EnableState) Return + DeviceSetClockOffsets(Device, ClockOffset) Return DeviceSetComputeMode(Device, ComputeMode) Return DeviceSetConfComputeUnprotectedMemSize(Device, uint64) Return DeviceSetCpuAffinity(Device) Return DeviceSetDefaultAutoBoostedClocksEnabled(Device, EnableState, uint32) Return DeviceSetDefaultFanSpeed_v2(Device, int) Return + DeviceSetDramEncryptionMode(Device, *DramEncryptionInfo) Return DeviceSetDriverModel(Device, DriverModel, uint32) Return DeviceSetEccMode(Device, EnableState) Return DeviceSetFanControlPolicy(Device, int, FanControlPolicy) Return @@ -570,6 +634,7 @@ type Interface interface { DeviceSetMigMode(Device, int) (Return, Return) DeviceSetNvLinkDeviceLowPowerThreshold(Device, *NvLinkPowerThres) Return DeviceSetNvLinkUtilizationControl(Device, int, int, *NvLinkUtilizationControl, bool) Return + DeviceSetNvlinkBwMode(Device, *NvlinkSetBwMode) Return DeviceSetPersistenceMode(Device, EnableState) Return DeviceSetPowerManagementLimit(Device, uint32) Return DeviceSetPowerManagementLimit_v2(Device, *PowerValue_v2) Return @@ -579,6 +644,10 @@ type Interface interface { DeviceSetVgpuSchedulerState(Device, *VgpuSchedulerSetState) Return DeviceSetVirtualizationMode(Device, GpuVirtualizationMode) Return DeviceValidateInforom(Device) Return + DeviceWorkloadPowerProfileClearRequestedProfiles(Device, *WorkloadPowerProfileRequestedProfiles) Return + DeviceWorkloadPowerProfileGetCurrentProfiles(Device) (WorkloadPowerProfileCurrentProfiles, Return) + DeviceWorkloadPowerProfileGetProfilesInfo(Device) (WorkloadPowerProfileProfilesInfo, Return) + DeviceWorkloadPowerProfileSetRequestedProfiles(Device, *WorkloadPowerProfileRequestedProfiles) Return ErrorString(Return) string EventSetCreate() (EventSet, Return) EventSetFree(EventSet) Return @@ -602,28 +671,46 @@ type Interface interface { GpuInstanceCreateComputeInstance(GpuInstance, *ComputeInstanceProfileInfo) (ComputeInstance, Return) GpuInstanceCreateComputeInstanceWithPlacement(GpuInstance, *ComputeInstanceProfileInfo, *ComputeInstancePlacement) (ComputeInstance, Return) GpuInstanceDestroy(GpuInstance) Return + GpuInstanceGetActiveVgpus(GpuInstance) (ActiveVgpuInstanceInfo, Return) GpuInstanceGetComputeInstanceById(GpuInstance, int) (ComputeInstance, Return) GpuInstanceGetComputeInstancePossiblePlacements(GpuInstance, *ComputeInstanceProfileInfo) ([]ComputeInstancePlacement, Return) GpuInstanceGetComputeInstanceProfileInfo(GpuInstance, int, int) (ComputeInstanceProfileInfo, Return) GpuInstanceGetComputeInstanceProfileInfoV(GpuInstance, int, int) ComputeInstanceProfileInfoHandler GpuInstanceGetComputeInstanceRemainingCapacity(GpuInstance, *ComputeInstanceProfileInfo) (int, Return) GpuInstanceGetComputeInstances(GpuInstance, *ComputeInstanceProfileInfo) ([]ComputeInstance, Return) + GpuInstanceGetCreatableVgpus(GpuInstance) (VgpuTypeIdInfo, Return) GpuInstanceGetInfo(GpuInstance) (GpuInstanceInfo, Return) + GpuInstanceGetVgpuHeterogeneousMode(GpuInstance) (VgpuHeterogeneousMode, Return) + GpuInstanceGetVgpuSchedulerLog(GpuInstance) (VgpuSchedulerLogInfo, Return) + GpuInstanceGetVgpuSchedulerState(GpuInstance) (VgpuSchedulerStateInfo, Return) + GpuInstanceGetVgpuTypeCreatablePlacements(GpuInstance) (VgpuCreatablePlacementInfo, Return) + GpuInstanceSetVgpuHeterogeneousMode(GpuInstance, *VgpuHeterogeneousMode) Return + GpuInstanceSetVgpuSchedulerState(GpuInstance, *VgpuSchedulerState) Return Init() Return InitWithFlags(uint32) Return SetVgpuVersion(*VgpuVersion) Return Shutdown() Return + SystemEventSetCreate(*SystemEventSetCreateRequest) Return + SystemEventSetFree(*SystemEventSetFreeRequest) Return + SystemEventSetWait(*SystemEventSetWaitRequest) Return SystemGetConfComputeCapabilities() (ConfComputeSystemCaps, Return) + SystemGetConfComputeGpusReadyState() (uint32, Return) SystemGetConfComputeKeyRotationThresholdInfo() (ConfComputeGetKeyRotationThresholdInfo, Return) SystemGetConfComputeSettings() (SystemConfComputeSettings, Return) + SystemGetConfComputeState() (ConfComputeSystemState, Return) SystemGetCudaDriverVersion() (int, Return) SystemGetCudaDriverVersion_v2() (int, Return) + SystemGetDriverBranch() (SystemDriverBranchInfo, Return) SystemGetDriverVersion() (string, Return) SystemGetHicVersion() ([]HwbcEntry, Return) SystemGetNVMLVersion() (string, Return) + SystemGetNvlinkBwMode() (uint32, Return) SystemGetProcessName(int) (string, Return) SystemGetTopologyGpuSet(int) ([]Device, Return) + SystemRegisterEvents(*SystemRegisterEventRequest) Return + SystemSetConfComputeGpusReadyState(uint32) Return SystemSetConfComputeKeyRotationThresholdInfo(ConfComputeSetKeyRotationThresholdInfo) Return + SystemSetNvlinkBwMode(uint32) Return UnitGetCount() (int, Return) UnitGetDevices(Unit) ([]Device, Return) UnitGetFanSpeedInfo(Unit) (UnitFanSpeeds, Return) @@ -651,11 +738,13 @@ type Interface interface { VgpuInstanceGetLicenseStatus(VgpuInstance) (int, Return) VgpuInstanceGetMdevUUID(VgpuInstance) (string, Return) VgpuInstanceGetMetadata(VgpuInstance) (VgpuMetadata, Return) + VgpuInstanceGetRuntimeStateSize(VgpuInstance) (VgpuRuntimeState, Return) VgpuInstanceGetType(VgpuInstance) (VgpuTypeId, Return) VgpuInstanceGetUUID(VgpuInstance) (string, Return) VgpuInstanceGetVmDriverVersion(VgpuInstance) (string, Return) VgpuInstanceGetVmID(VgpuInstance) (string, VgpuVmIdType, Return) VgpuInstanceSetEncoderCapacity(VgpuInstance, int) Return + VgpuTypeGetBAR1Info(VgpuTypeId) (VgpuTypeBar1Info, Return) VgpuTypeGetCapabilities(VgpuTypeId, VgpuCapability) (bool, Return) VgpuTypeGetClass(VgpuTypeId) (string, Return) VgpuTypeGetDeviceID(VgpuTypeId) (uint64, uint64, Return) @@ -664,6 +753,7 @@ type Interface interface { VgpuTypeGetGpuInstanceProfileId(VgpuTypeId) (uint32, Return) VgpuTypeGetLicense(VgpuTypeId) (string, Return) VgpuTypeGetMaxInstances(Device, VgpuTypeId) (int, Return) + VgpuTypeGetMaxInstancesPerGpuInstance(*VgpuTypeMaxInstance) Return VgpuTypeGetMaxInstancesPerVm(VgpuTypeId) (int, Return) VgpuTypeGetName(VgpuTypeId) (string, Return) VgpuTypeGetNumDisplayHeads(VgpuTypeId) (int, Return) @@ -699,9 +789,11 @@ type Device interface { GetBridgeChipInfo() (BridgeChipHierarchy, Return) GetBusType() (BusType, Return) GetC2cModeInfoV() C2cModeInfoHandler + GetCapabilities() (DeviceCapabilities, Return) GetClkMonStatus() (ClkMonStatus, Return) GetClock(ClockType, ClockId) (uint32, Return) GetClockInfo(ClockType) (uint32, Return) + GetClockOffsets() (ClockOffset, Return) GetComputeInstanceId() (int, Return) GetComputeMode() (ComputeMode, Return) GetComputeRunningProcesses() ([]ProcessInfo, Return) @@ -709,12 +801,14 @@ type Device interface { GetConfComputeGpuCertificate() (ConfComputeGpuCertificate, Return) GetConfComputeMemSizeInfo() (ConfComputeMemSizeInfo, Return) GetConfComputeProtectedMemoryUsage() (Memory, Return) + GetCoolerInfo() (CoolerInfo, Return) GetCpuAffinity(int) ([]uint, Return) GetCpuAffinityWithinScope(int, AffinityScope) ([]uint, Return) GetCreatableVgpus() ([]VgpuTypeId, Return) GetCudaComputeCapability() (int, int, Return) GetCurrPcieLinkGeneration() (int, Return) GetCurrPcieLinkWidth() (int, Return) + GetCurrentClockFreqs() (DeviceCurrentClockFreqs, Return) GetCurrentClocksEventReasons() (uint64, Return) GetCurrentClocksThrottleReasons() (uint64, Return) GetDecoderUtilization() (uint32, uint32, Return) @@ -724,7 +818,9 @@ type Device interface { GetDeviceHandleFromMigDeviceHandle() (Device, Return) GetDisplayActive() (EnableState, Return) GetDisplayMode() (EnableState, Return) + GetDramEncryptionMode() (DramEncryptionInfo, DramEncryptionInfo, Return) GetDriverModel() (DriverModel, DriverModel, Return) + GetDriverModel_v2() (DriverModel, DriverModel, Return) GetDynamicPstatesInfo() (GpuDynamicPstatesInfo, Return) GetEccMode() (EnableState, EnableState, Return) GetEncoderCapacity(EncoderType) (int, Return) @@ -736,6 +832,7 @@ type Device interface { GetFBCStats() (FBCStats, Return) GetFanControlPolicy_v2(int) (FanControlPolicy, Return) GetFanSpeed() (uint32, Return) + GetFanSpeedRPM() (FanSpeedInfo, Return) GetFanSpeed_v2(int) (uint32, Return) GetFieldValues([]FieldValue) Return GetGpcClkMinMaxVfOffset() (int, int, Return) @@ -764,6 +861,7 @@ type Device interface { GetJpgUtilization() (uint32, uint32, Return) GetLastBBXFlushTime() (uint64, uint, Return) GetMPSComputeRunningProcesses() ([]ProcessInfo, Return) + GetMarginTemperature() (MarginTemperature, Return) GetMaxClockInfo(ClockType) (uint32, Return) GetMaxCustomerBoostClock(ClockType) (uint32, Return) GetMaxMigDeviceCount() (int, Return) @@ -795,6 +893,8 @@ type Device interface { GetNvLinkUtilizationControl(int, int) (NvLinkUtilizationControl, Return) GetNvLinkUtilizationCounter(int, int) (uint64, uint64, Return) GetNvLinkVersion(int) (uint32, Return) + GetNvlinkBwMode() (NvlinkGetBwMode, Return) + GetNvlinkSupportedBwModes() (NvlinkSupportedBwModes, Return) GetOfaUtilization() (uint32, uint32, Return) GetP2PStatus(Device, GpuP2PCapsIndex) (GpuP2PStatus, Return) GetPciInfo() (PciInfo, Return) @@ -803,9 +903,11 @@ type Device interface { GetPcieReplayCounter() (int, Return) GetPcieSpeed() (int, Return) GetPcieThroughput(PcieUtilCounter) (uint32, Return) + GetPerformanceModes() (DevicePerfModes, Return) GetPerformanceState() (Pstates, Return) GetPersistenceMode() (EnableState, Return) GetPgpuMetadataString() (string, Return) + GetPlatformInfo() (PlatformInfo, Return) GetPowerManagementDefaultLimit() (uint32, Return) GetPowerManagementLimit() (uint32, Return) GetPowerManagementLimitConstraints() (uint32, uint32, Return) @@ -834,6 +936,7 @@ type Device interface { GetTargetFanSpeed(int) (int, Return) GetTemperature(TemperatureSensors) (uint32, Return) GetTemperatureThreshold(TemperatureThresholds) (uint32, Return) + GetTemperatureV() TemperatureHandler GetThermalSettings(uint32) (GpuThermalSettings, Return) GetTopologyCommonAncestor(Device) (GpuTopologyLevel, Return) GetTopologyNearestGpus(GpuTopologyLevel) ([]Device, Return) @@ -864,6 +967,9 @@ type Device interface { GpmSetStreamingEnabled(uint32) Return IsMigDeviceHandle() (bool, Return) OnSameBoard(Device) (int, Return) + PowerSmoothingActivatePresetProfile(*PowerSmoothingProfile) Return + PowerSmoothingSetState(*PowerSmoothingState) Return + PowerSmoothingUpdatePresetProfileParam(*PowerSmoothingProfile) Return RegisterEvents(uint64, EventSet) Return ResetApplicationsClocks() Return ResetGpuLockedClocks() Return @@ -874,11 +980,13 @@ type Device interface { SetAccountingMode(EnableState) Return SetApplicationsClocks(uint32, uint32) Return SetAutoBoostedClocksEnabled(EnableState) Return + SetClockOffsets(ClockOffset) Return SetComputeMode(ComputeMode) Return SetConfComputeUnprotectedMemSize(uint64) Return SetCpuAffinity() Return SetDefaultAutoBoostedClocksEnabled(EnableState, uint32) Return SetDefaultFanSpeed_v2(int) Return + SetDramEncryptionMode(*DramEncryptionInfo) Return SetDriverModel(DriverModel, uint32) Return SetEccMode(EnableState) Return SetFanControlPolicy(int, FanControlPolicy) Return @@ -891,6 +999,7 @@ type Device interface { SetMigMode(int) (Return, Return) SetNvLinkDeviceLowPowerThreshold(*NvLinkPowerThres) Return SetNvLinkUtilizationControl(int, int, *NvLinkUtilizationControl, bool) Return + SetNvlinkBwMode(*NvlinkSetBwMode) Return SetPersistenceMode(EnableState) Return SetPowerManagementLimit(uint32) Return SetPowerManagementLimit_v2(*PowerValue_v2) Return @@ -901,6 +1010,10 @@ type Device interface { SetVirtualizationMode(GpuVirtualizationMode) Return ValidateInforom() Return VgpuTypeGetMaxInstances(VgpuTypeId) (int, Return) + WorkloadPowerProfileClearRequestedProfiles(*WorkloadPowerProfileRequestedProfiles) Return + WorkloadPowerProfileGetCurrentProfiles() (WorkloadPowerProfileCurrentProfiles, Return) + WorkloadPowerProfileGetProfilesInfo() (WorkloadPowerProfileProfilesInfo, Return) + WorkloadPowerProfileSetRequestedProfiles(*WorkloadPowerProfileRequestedProfiles) Return } // GpuInstance represents the interface for the nvmlGpuInstance type. @@ -910,13 +1023,21 @@ type GpuInstance interface { CreateComputeInstance(*ComputeInstanceProfileInfo) (ComputeInstance, Return) CreateComputeInstanceWithPlacement(*ComputeInstanceProfileInfo, *ComputeInstancePlacement) (ComputeInstance, Return) Destroy() Return + GetActiveVgpus() (ActiveVgpuInstanceInfo, Return) GetComputeInstanceById(int) (ComputeInstance, Return) GetComputeInstancePossiblePlacements(*ComputeInstanceProfileInfo) ([]ComputeInstancePlacement, Return) GetComputeInstanceProfileInfo(int, int) (ComputeInstanceProfileInfo, Return) GetComputeInstanceProfileInfoV(int, int) ComputeInstanceProfileInfoHandler GetComputeInstanceRemainingCapacity(*ComputeInstanceProfileInfo) (int, Return) GetComputeInstances(*ComputeInstanceProfileInfo) ([]ComputeInstance, Return) + GetCreatableVgpus() (VgpuTypeIdInfo, Return) GetInfo() (GpuInstanceInfo, Return) + GetVgpuHeterogeneousMode() (VgpuHeterogeneousMode, Return) + GetVgpuSchedulerLog() (VgpuSchedulerLogInfo, Return) + GetVgpuSchedulerState() (VgpuSchedulerStateInfo, Return) + GetVgpuTypeCreatablePlacements() (VgpuCreatablePlacementInfo, Return) + SetVgpuHeterogeneousMode(*VgpuHeterogeneousMode) Return + SetVgpuSchedulerState(*VgpuSchedulerState) Return } // ComputeInstance represents the interface for the nvmlComputeInstance type. @@ -979,6 +1100,7 @@ type VgpuInstance interface { GetLicenseStatus() (int, Return) GetMdevUUID() (string, Return) GetMetadata() (VgpuMetadata, Return) + GetRuntimeStateSize() (VgpuRuntimeState, Return) GetType() (VgpuTypeId, Return) GetUUID() (string, Return) GetVmDriverVersion() (string, Return) @@ -990,6 +1112,7 @@ type VgpuInstance interface { // //go:generate moq -out mock/vgputypeid.go -pkg mock . VgpuTypeId:VgpuTypeId type VgpuTypeId interface { + GetBAR1Info() (VgpuTypeBar1Info, Return) GetCapabilities(VgpuCapability) (bool, Return) GetClass() (string, Return) GetCreatablePlacements(Device) (VgpuPlacementList, Return) diff --git a/vendor/modules.txt b/vendor/modules.txt index 8eeadd32..fe411053 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -6,7 +6,7 @@ github.com/NVIDIA/go-nvlib/pkg/nvpci github.com/NVIDIA/go-nvlib/pkg/nvpci/bytes github.com/NVIDIA/go-nvlib/pkg/nvpci/mmio github.com/NVIDIA/go-nvlib/pkg/pciids -# github.com/NVIDIA/go-nvml v0.12.4-1 +# github.com/NVIDIA/go-nvml v0.12.9-0 ## explicit; go 1.20 github.com/NVIDIA/go-nvml/pkg/dl github.com/NVIDIA/go-nvml/pkg/nvml