diff --git a/Makefile b/Makefile index 1a9055d..7a88326 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,11 @@ fmt: go list -f '{{.Dir}}' $(MODULE)/pkg/... $(MODULE)/gen/... \ | xargs gofmt -s -l -w +# Apply goimports -local to the codebase +goimports: + go list -f {{.Dir}} $(MODULE)/... \ + | xargs goimports -local $(MODULE) -w + golangci-lint: golangci-lint run ./pkg/... diff --git a/examples/compute-processes/main.go b/examples/compute-processes/main.go index 5adeb5a..de37cfb 100644 --- a/examples/compute-processes/main.go +++ b/examples/compute-processes/main.go @@ -24,31 +24,31 @@ import ( ) func main() { - ret := nvml.Init() - if ret != nvml.SUCCESS { - log.Fatalf("Unable to initialize NVML: %v", nvml.ErrorString(ret)) + err := nvml.Init() + if err != nil { + log.Fatalf("Unable to initialize NVML: %v", err) } defer func() { - ret := nvml.Shutdown() - if ret != nvml.SUCCESS { - log.Fatalf("Unable to shutdown NVML: %v", nvml.ErrorString(ret)) + err := nvml.Shutdown() + if err != nil { + log.Fatalf("Unable to shutdown NVML: %v", err) } }() - count, ret := nvml.DeviceGetCount() - if ret != nvml.SUCCESS { - log.Fatalf("Unable to get device count: %v", nvml.ErrorString(ret)) + count, err := nvml.DeviceGetCount() + if err != nil { + log.Fatalf("Unable to get device count: %v", err) } for di := 0; di < count; di++ { - device, ret := nvml.DeviceGetHandleByIndex(di) - if ret != nvml.SUCCESS { - log.Fatalf("Unable to get device at index %d: %v", di, nvml.ErrorString(ret)) + device, err := nvml.DeviceGetHandleByIndex(di) + if err != nil { + log.Fatalf("Unable to get device at index %d: %v", di, err) } - processInfos, ret := device.GetComputeRunningProcesses() - if ret != nvml.SUCCESS { - log.Fatalf("Unable to get process info for device at index %d: %v", di, nvml.ErrorString(ret)) + processInfos, err := device.GetComputeRunningProcesses() + if err != nil { + log.Fatalf("Unable to get process info for device at index %d: %v", di, err) } fmt.Printf("Found %d processes on device %d\n", len(processInfos), di) for pi, processInfo := range processInfos { diff --git a/examples/devices/main.go b/examples/devices/main.go index 649f371..7714724 100644 --- a/examples/devices/main.go +++ b/examples/devices/main.go @@ -17,6 +17,7 @@ package main import ( + "errors" "fmt" "log" @@ -24,33 +25,41 @@ import ( ) func main() { - ret := nvml.Init() - if ret != nvml.SUCCESS { - log.Fatalf("Unable to initialize NVML: %v", nvml.ErrorString(ret)) + err := nvml.Init() + if err != nil { + log.Fatalf("Unable to initialize NVML: %v", err) } defer func() { - ret := nvml.Shutdown() - if ret != nvml.SUCCESS { - log.Fatalf("Unable to shutdown NVML: %v", nvml.ErrorString(ret)) + err := nvml.Shutdown() + if err != nil { + log.Fatalf("Unable to shutdown NVML: %v", err) } }() - count, ret := nvml.DeviceGetCount() - if ret != nvml.SUCCESS { - log.Fatalf("Unable to get device count: %v", nvml.ErrorString(ret)) + count, err := nvml.DeviceGetCount() + if err != nil { + log.Fatalf("Unable to get device count: %v", err) } for i := 0; i < count; i++ { - device, ret := nvml.DeviceGetHandleByIndex(i) - if ret != nvml.SUCCESS { - log.Fatalf("Unable to get device at index %d: %v", i, nvml.ErrorString(ret)) + device, err := nvml.DeviceGetHandleByIndex(i) + if err != nil { + log.Fatalf("Unable to get device at index %d: %v", i, err) } - uuid, ret := device.GetUUID() - if ret != nvml.SUCCESS { - log.Fatalf("Unable to get uuid of device at index %d: %v", i, nvml.ErrorString(ret)) + uuid, err := device.GetUUID() + if err != nil { + log.Fatalf("Unable to get uuid of device at index %d: %v", i, err) } - fmt.Printf("%v\n", uuid) + + current, pending, err := device.GetMigMode() + if errors.Is(err, nvml.ERROR_NOT_SUPPORTED) { + fmt.Printf("MIG is not supported for device %v\n", i) + + } else if err != nil { + log.Fatalf("Error getting MIG mode for device at index %d: %v", i, err) + } + fmt.Printf("MIG mode for device %v: current=%v pending=%v\n", i, current, pending) } } diff --git a/gen/nvml/generateapi.go b/gen/nvml/generateapi.go index 5ec4a07..16183bc 100644 --- a/gen/nvml/generateapi.go +++ b/gen/nvml/generateapi.go @@ -198,7 +198,7 @@ func generateInterfaceComment(input GeneratableInterfacePoperties) (string, erro commentFmt := []string{ "// %s represents the interface for the %s type.", "//", - "//go:generate moq -out mock/%s.go -pkg mock . %s:%s", + "//go:generate moq -rm -out mock/%s.go -pkg mock . %s:%s", } var signature strings.Builder diff --git a/gen/nvml/nvml.yml b/gen/nvml/nvml.yml index 73ea49c..245ba3c 100644 --- a/gen/nvml/nvml.yml +++ b/gen/nvml/nvml.yml @@ -59,6 +59,9 @@ TRANSLATOR: - {action: replace, from: "^nvml"} - {action: replace, from: "_t$"} - {transform: export} + # We explicitly unexport the SUCCESS and ERROR_ constants to allow for go-native error implementations. + - {action: replace, from: "^SUCCESS", to: "nvmlSUCCESS"} + - {action: replace, from: "^ERROR", to: "nvmlERROR"} type: - {action: accept, from: "^nvml"} - {action: replace, from: "^nvml"} diff --git a/pkg/nvml/api.go b/pkg/nvml/api.go index fdf27bd..3269d43 100644 --- a/pkg/nvml/api.go +++ b/pkg/nvml/api.go @@ -22,7 +22,7 @@ package nvml // with the list of excluded methods for the Interface type in // gen/nvml/generateapi.go. In the future we should automate this. // -//go:generate moq -out mock/extendedinterface.go -pkg mock . ExtendedInterface:ExtendedInterface +//go:generate moq -rm -out mock/extendedinterface.go -pkg mock . ExtendedInterface:ExtendedInterface type ExtendedInterface interface { LookupSymbol(string) error } diff --git a/pkg/nvml/const.go b/pkg/nvml/const.go index 1ccb501..b44b856 100644 --- a/pkg/nvml/const.go +++ b/pkg/nvml/const.go @@ -1153,37 +1153,37 @@ type Return int32 // Return enumeration from nvml/nvml.h const ( - SUCCESS Return = iota - ERROR_UNINITIALIZED Return = 1 - ERROR_INVALID_ARGUMENT Return = 2 - ERROR_NOT_SUPPORTED Return = 3 - ERROR_NO_PERMISSION Return = 4 - ERROR_ALREADY_INITIALIZED Return = 5 - ERROR_NOT_FOUND Return = 6 - ERROR_INSUFFICIENT_SIZE Return = 7 - ERROR_INSUFFICIENT_POWER Return = 8 - ERROR_DRIVER_NOT_LOADED Return = 9 - ERROR_TIMEOUT Return = 10 - ERROR_IRQ_ISSUE Return = 11 - ERROR_LIBRARY_NOT_FOUND Return = 12 - ERROR_FUNCTION_NOT_FOUND Return = 13 - ERROR_CORRUPTED_INFOROM Return = 14 - ERROR_GPU_IS_LOST Return = 15 - ERROR_RESET_REQUIRED Return = 16 - ERROR_OPERATING_SYSTEM Return = 17 - ERROR_LIB_RM_VERSION_MISMATCH Return = 18 - ERROR_IN_USE Return = 19 - ERROR_MEMORY Return = 20 - ERROR_NO_DATA Return = 21 - ERROR_VGPU_ECC_NOT_SUPPORTED Return = 22 - ERROR_INSUFFICIENT_RESOURCES Return = 23 - ERROR_FREQ_NOT_SUPPORTED Return = 24 - ERROR_ARGUMENT_VERSION_MISMATCH Return = 25 - ERROR_DEPRECATED Return = 26 - ERROR_NOT_READY Return = 27 - ERROR_GPU_NOT_FOUND Return = 28 - ERROR_INVALID_STATE Return = 29 - ERROR_UNKNOWN Return = 999 + nvmlSUCCESS Return = iota + nvmlERROR_UNINITIALIZED Return = 1 + nvmlERROR_INVALID_ARGUMENT Return = 2 + nvmlERROR_NOT_SUPPORTED Return = 3 + nvmlERROR_NO_PERMISSION Return = 4 + nvmlERROR_ALREADY_INITIALIZED Return = 5 + nvmlERROR_NOT_FOUND Return = 6 + nvmlERROR_INSUFFICIENT_SIZE Return = 7 + nvmlERROR_INSUFFICIENT_POWER Return = 8 + nvmlERROR_DRIVER_NOT_LOADED Return = 9 + nvmlERROR_TIMEOUT Return = 10 + nvmlERROR_IRQ_ISSUE Return = 11 + nvmlERROR_LIBRARY_NOT_FOUND Return = 12 + nvmlERROR_FUNCTION_NOT_FOUND Return = 13 + nvmlERROR_CORRUPTED_INFOROM Return = 14 + nvmlERROR_GPU_IS_LOST Return = 15 + nvmlERROR_RESET_REQUIRED Return = 16 + nvmlERROR_OPERATING_SYSTEM Return = 17 + nvmlERROR_LIB_RM_VERSION_MISMATCH Return = 18 + nvmlERROR_IN_USE Return = 19 + nvmlERROR_MEMORY Return = 20 + nvmlERROR_NO_DATA Return = 21 + nvmlERROR_VGPU_ECC_NOT_SUPPORTED Return = 22 + nvmlERROR_INSUFFICIENT_RESOURCES Return = 23 + nvmlERROR_FREQ_NOT_SUPPORTED Return = 24 + nvmlERROR_ARGUMENT_VERSION_MISMATCH Return = 25 + nvmlERROR_DEPRECATED Return = 26 + nvmlERROR_NOT_READY Return = 27 + nvmlERROR_GPU_NOT_FOUND Return = 28 + nvmlERROR_INVALID_STATE Return = 29 + nvmlERROR_UNKNOWN Return = 999 ) // MemoryLocation as declared in nvml/nvml.h diff --git a/pkg/nvml/device.go b/pkg/nvml/device.go index ac778e5..27d200f 100644 --- a/pkg/nvml/device.go +++ b/pkg/nvml/device.go @@ -68,6 +68,7 @@ type GpuInstanceInfo struct { Placement GpuInstancePlacement } +//nolint:unused func (g GpuInstanceInfo) convert() nvmlGpuInstanceInfo { out := nvmlGpuInstanceInfo{ Device: g.Device.(nvmlDevice), @@ -97,6 +98,7 @@ type ComputeInstanceInfo struct { Placement ComputeInstancePlacement } +//nolint:unused func (c ComputeInstanceInfo) convert() nvmlComputeInstanceInfo { out := nvmlComputeInstanceInfo{ Device: c.Device.(nvmlDevice), @@ -120,1798 +122,1798 @@ func (c nvmlComputeInstanceInfo) convert() ComputeInstanceInfo { } // nvml.DeviceGetCount() -func (l *library) DeviceGetCount() (int, Return) { +func (l *library) DeviceGetCount() (int, error) { var deviceCount uint32 ret := nvmlDeviceGetCount(&deviceCount) - return int(deviceCount), ret + return int(deviceCount), ret.error() } // nvml.DeviceGetHandleByIndex() -func (l *library) DeviceGetHandleByIndex(index int) (Device, Return) { +func (l *library) DeviceGetHandleByIndex(index int) (Device, error) { var device nvmlDevice ret := nvmlDeviceGetHandleByIndex(uint32(index), &device) - return device, ret + return device, ret.error() } // nvml.DeviceGetHandleBySerial() -func (l *library) DeviceGetHandleBySerial(serial string) (Device, Return) { +func (l *library) DeviceGetHandleBySerial(serial string) (Device, error) { var device nvmlDevice ret := nvmlDeviceGetHandleBySerial(serial+string(rune(0)), &device) - return device, ret + return device, ret.error() } // nvml.DeviceGetHandleByUUID() -func (l *library) DeviceGetHandleByUUID(uuid string) (Device, Return) { +func (l *library) DeviceGetHandleByUUID(uuid string) (Device, error) { var device nvmlDevice ret := nvmlDeviceGetHandleByUUID(uuid+string(rune(0)), &device) - return device, ret + return device, ret.error() } // nvml.DeviceGetHandleByPciBusId() -func (l *library) DeviceGetHandleByPciBusId(pciBusId string) (Device, Return) { +func (l *library) DeviceGetHandleByPciBusId(pciBusId string) (Device, error) { var device nvmlDevice ret := nvmlDeviceGetHandleByPciBusId(pciBusId+string(rune(0)), &device) - return device, ret + return device, ret.error() } // nvml.DeviceGetName() -func (l *library) DeviceGetName(device Device) (string, Return) { +func (l *library) DeviceGetName(device Device) (string, error) { return device.GetName() } -func (device nvmlDevice) GetName() (string, Return) { +func (device nvmlDevice) GetName() (string, error) { name := make([]byte, DEVICE_NAME_V2_BUFFER_SIZE) ret := nvmlDeviceGetName(device, &name[0], DEVICE_NAME_V2_BUFFER_SIZE) - return string(name[:clen(name)]), ret + return string(name[:clen(name)]), ret.error() } // nvml.DeviceGetBrand() -func (l *library) DeviceGetBrand(device Device) (BrandType, Return) { +func (l *library) DeviceGetBrand(device Device) (BrandType, error) { return device.GetBrand() } -func (device nvmlDevice) GetBrand() (BrandType, Return) { +func (device nvmlDevice) GetBrand() (BrandType, error) { var brandType BrandType ret := nvmlDeviceGetBrand(device, &brandType) - return brandType, ret + return brandType, ret.error() } // nvml.DeviceGetIndex() -func (l *library) DeviceGetIndex(device Device) (int, Return) { +func (l *library) DeviceGetIndex(device Device) (int, error) { return device.GetIndex() } -func (device nvmlDevice) GetIndex() (int, Return) { +func (device nvmlDevice) GetIndex() (int, error) { var index uint32 ret := nvmlDeviceGetIndex(device, &index) - return int(index), ret + return int(index), ret.error() } // nvml.DeviceGetSerial() -func (l *library) DeviceGetSerial(device Device) (string, Return) { +func (l *library) DeviceGetSerial(device Device) (string, error) { return device.GetSerial() } -func (device nvmlDevice) GetSerial() (string, Return) { +func (device nvmlDevice) GetSerial() (string, error) { serial := make([]byte, DEVICE_SERIAL_BUFFER_SIZE) ret := nvmlDeviceGetSerial(device, &serial[0], DEVICE_SERIAL_BUFFER_SIZE) - return string(serial[:clen(serial)]), ret + return string(serial[:clen(serial)]), ret.error() } // nvml.DeviceGetCpuAffinity() -func (l *library) DeviceGetCpuAffinity(device Device, numCPUs int) ([]uint, Return) { +func (l *library) DeviceGetCpuAffinity(device Device, numCPUs int) ([]uint, error) { return device.GetCpuAffinity(numCPUs) } -func (device nvmlDevice) GetCpuAffinity(numCPUs int) ([]uint, Return) { +func (device nvmlDevice) GetCpuAffinity(numCPUs int) ([]uint, error) { cpuSetSize := uint32((numCPUs-1)/int(unsafe.Sizeof(uint(0))) + 1) cpuSet := make([]uint, cpuSetSize) ret := nvmlDeviceGetCpuAffinity(device, cpuSetSize, &cpuSet[0]) - return cpuSet, ret + return cpuSet, ret.error() } // nvml.DeviceSetCpuAffinity() -func (l *library) DeviceSetCpuAffinity(device Device) Return { +func (l *library) DeviceSetCpuAffinity(device Device) error { return device.SetCpuAffinity() } -func (device nvmlDevice) SetCpuAffinity() Return { - return nvmlDeviceSetCpuAffinity(device) +func (device nvmlDevice) SetCpuAffinity() error { + return nvmlDeviceSetCpuAffinity(device).error() } // nvml.DeviceClearCpuAffinity() -func (l *library) DeviceClearCpuAffinity(device Device) Return { +func (l *library) DeviceClearCpuAffinity(device Device) error { return device.ClearCpuAffinity() } -func (device nvmlDevice) ClearCpuAffinity() Return { - return nvmlDeviceClearCpuAffinity(device) +func (device nvmlDevice) ClearCpuAffinity() error { + return nvmlDeviceClearCpuAffinity(device).error() } // nvml.DeviceGetMemoryAffinity() -func (l *library) DeviceGetMemoryAffinity(device Device, numNodes int, scope AffinityScope) ([]uint, Return) { +func (l *library) DeviceGetMemoryAffinity(device Device, numNodes int, scope AffinityScope) ([]uint, error) { return device.GetMemoryAffinity(numNodes, scope) } -func (device nvmlDevice) GetMemoryAffinity(numNodes int, scope AffinityScope) ([]uint, Return) { +func (device nvmlDevice) GetMemoryAffinity(numNodes int, scope AffinityScope) ([]uint, error) { nodeSetSize := uint32((numNodes-1)/int(unsafe.Sizeof(uint(0))) + 1) nodeSet := make([]uint, nodeSetSize) ret := nvmlDeviceGetMemoryAffinity(device, nodeSetSize, &nodeSet[0], scope) - return nodeSet, ret + return nodeSet, ret.error() } // nvml.DeviceGetCpuAffinityWithinScope() -func (l *library) DeviceGetCpuAffinityWithinScope(device Device, numCPUs int, scope AffinityScope) ([]uint, Return) { +func (l *library) DeviceGetCpuAffinityWithinScope(device Device, numCPUs int, scope AffinityScope) ([]uint, error) { return device.GetCpuAffinityWithinScope(numCPUs, scope) } -func (device nvmlDevice) GetCpuAffinityWithinScope(numCPUs int, scope AffinityScope) ([]uint, Return) { +func (device nvmlDevice) GetCpuAffinityWithinScope(numCPUs int, scope AffinityScope) ([]uint, error) { cpuSetSize := uint32((numCPUs-1)/int(unsafe.Sizeof(uint(0))) + 1) cpuSet := make([]uint, cpuSetSize) ret := nvmlDeviceGetCpuAffinityWithinScope(device, cpuSetSize, &cpuSet[0], scope) - return cpuSet, ret + return cpuSet, ret.error() } // nvml.DeviceGetTopologyCommonAncestor() -func (l *library) DeviceGetTopologyCommonAncestor(device1 Device, device2 Device) (GpuTopologyLevel, Return) { +func (l *library) DeviceGetTopologyCommonAncestor(device1 Device, device2 Device) (GpuTopologyLevel, error) { return device1.GetTopologyCommonAncestor(device2) } -func (device1 nvmlDevice) GetTopologyCommonAncestor(device2 Device) (GpuTopologyLevel, Return) { +func (device1 nvmlDevice) GetTopologyCommonAncestor(device2 Device) (GpuTopologyLevel, error) { var pathInfo GpuTopologyLevel ret := nvmlDeviceGetTopologyCommonAncestorStub(device1, nvmlDeviceHandle(device2), &pathInfo) - return pathInfo, ret + return pathInfo, ret.error() } // nvmlDeviceGetTopologyCommonAncestorStub allows us to override this for testing. var nvmlDeviceGetTopologyCommonAncestorStub = nvmlDeviceGetTopologyCommonAncestor // nvml.DeviceGetTopologyNearestGpus() -func (l *library) DeviceGetTopologyNearestGpus(device Device, level GpuTopologyLevel) ([]Device, Return) { +func (l *library) DeviceGetTopologyNearestGpus(device Device, level GpuTopologyLevel) ([]Device, error) { return device.GetTopologyNearestGpus(level) } -func (device nvmlDevice) GetTopologyNearestGpus(level GpuTopologyLevel) ([]Device, Return) { +func (device nvmlDevice) GetTopologyNearestGpus(level GpuTopologyLevel) ([]Device, error) { var count uint32 ret := nvmlDeviceGetTopologyNearestGpus(device, level, &count, nil) - if ret != SUCCESS { - return nil, ret + if ret != nvmlSUCCESS { + return nil, ret.error() } if count == 0 { - return []Device{}, ret + return []Device{}, ret.error() } deviceArray := make([]nvmlDevice, count) ret = nvmlDeviceGetTopologyNearestGpus(device, level, &count, &deviceArray[0]) - return convertSlice[nvmlDevice, Device](deviceArray), ret + return convertSlice[nvmlDevice, Device](deviceArray), ret.error() } // nvml.DeviceGetP2PStatus() -func (l *library) DeviceGetP2PStatus(device1 Device, device2 Device, p2pIndex GpuP2PCapsIndex) (GpuP2PStatus, Return) { +func (l *library) DeviceGetP2PStatus(device1 Device, device2 Device, p2pIndex GpuP2PCapsIndex) (GpuP2PStatus, error) { return device1.GetP2PStatus(device2, p2pIndex) } -func (device1 nvmlDevice) GetP2PStatus(device2 Device, p2pIndex GpuP2PCapsIndex) (GpuP2PStatus, Return) { +func (device1 nvmlDevice) GetP2PStatus(device2 Device, p2pIndex GpuP2PCapsIndex) (GpuP2PStatus, error) { var p2pStatus GpuP2PStatus ret := nvmlDeviceGetP2PStatus(device1, nvmlDeviceHandle(device2), p2pIndex, &p2pStatus) - return p2pStatus, ret + return p2pStatus, ret.error() } // nvml.DeviceGetUUID() -func (l *library) DeviceGetUUID(device Device) (string, Return) { +func (l *library) DeviceGetUUID(device Device) (string, error) { return device.GetUUID() } -func (device nvmlDevice) GetUUID() (string, Return) { +func (device nvmlDevice) GetUUID() (string, error) { uuid := make([]byte, DEVICE_UUID_V2_BUFFER_SIZE) ret := nvmlDeviceGetUUID(device, &uuid[0], DEVICE_UUID_V2_BUFFER_SIZE) - return string(uuid[:clen(uuid)]), ret + return string(uuid[:clen(uuid)]), ret.error() } // nvml.DeviceGetMinorNumber() -func (l *library) DeviceGetMinorNumber(device Device) (int, Return) { +func (l *library) DeviceGetMinorNumber(device Device) (int, error) { return device.GetMinorNumber() } -func (device nvmlDevice) GetMinorNumber() (int, Return) { +func (device nvmlDevice) GetMinorNumber() (int, error) { var minorNumber uint32 ret := nvmlDeviceGetMinorNumber(device, &minorNumber) - return int(minorNumber), ret + return int(minorNumber), ret.error() } // nvml.DeviceGetBoardPartNumber() -func (l *library) DeviceGetBoardPartNumber(device Device) (string, Return) { +func (l *library) DeviceGetBoardPartNumber(device Device) (string, error) { return device.GetBoardPartNumber() } -func (device nvmlDevice) GetBoardPartNumber() (string, Return) { +func (device nvmlDevice) GetBoardPartNumber() (string, error) { partNumber := make([]byte, DEVICE_PART_NUMBER_BUFFER_SIZE) ret := nvmlDeviceGetBoardPartNumber(device, &partNumber[0], DEVICE_PART_NUMBER_BUFFER_SIZE) - return string(partNumber[:clen(partNumber)]), ret + return string(partNumber[:clen(partNumber)]), ret.error() } // nvml.DeviceGetInforomVersion() -func (l *library) DeviceGetInforomVersion(device Device, object InforomObject) (string, Return) { +func (l *library) DeviceGetInforomVersion(device Device, object InforomObject) (string, error) { return device.GetInforomVersion(object) } -func (device nvmlDevice) GetInforomVersion(object InforomObject) (string, Return) { +func (device nvmlDevice) GetInforomVersion(object InforomObject) (string, error) { version := make([]byte, DEVICE_INFOROM_VERSION_BUFFER_SIZE) ret := nvmlDeviceGetInforomVersion(device, object, &version[0], DEVICE_INFOROM_VERSION_BUFFER_SIZE) - return string(version[:clen(version)]), ret + return string(version[:clen(version)]), ret.error() } // nvml.DeviceGetInforomImageVersion() -func (l *library) DeviceGetInforomImageVersion(device Device) (string, Return) { +func (l *library) DeviceGetInforomImageVersion(device Device) (string, error) { return device.GetInforomImageVersion() } -func (device nvmlDevice) GetInforomImageVersion() (string, Return) { +func (device nvmlDevice) GetInforomImageVersion() (string, error) { version := make([]byte, DEVICE_INFOROM_VERSION_BUFFER_SIZE) ret := nvmlDeviceGetInforomImageVersion(device, &version[0], DEVICE_INFOROM_VERSION_BUFFER_SIZE) - return string(version[:clen(version)]), ret + return string(version[:clen(version)]), ret.error() } // nvml.DeviceGetInforomConfigurationChecksum() -func (l *library) DeviceGetInforomConfigurationChecksum(device Device) (uint32, Return) { +func (l *library) DeviceGetInforomConfigurationChecksum(device Device) (uint32, error) { return device.GetInforomConfigurationChecksum() } -func (device nvmlDevice) GetInforomConfigurationChecksum() (uint32, Return) { +func (device nvmlDevice) GetInforomConfigurationChecksum() (uint32, error) { var checksum uint32 ret := nvmlDeviceGetInforomConfigurationChecksum(device, &checksum) - return checksum, ret + return checksum, ret.error() } // nvml.DeviceValidateInforom() -func (l *library) DeviceValidateInforom(device Device) Return { +func (l *library) DeviceValidateInforom(device Device) error { return device.ValidateInforom() } -func (device nvmlDevice) ValidateInforom() Return { - return nvmlDeviceValidateInforom(device) +func (device nvmlDevice) ValidateInforom() error { + return nvmlDeviceValidateInforom(device).error() } // nvml.DeviceGetDisplayMode() -func (l *library) DeviceGetDisplayMode(device Device) (EnableState, Return) { +func (l *library) DeviceGetDisplayMode(device Device) (EnableState, error) { return device.GetDisplayMode() } -func (device nvmlDevice) GetDisplayMode() (EnableState, Return) { +func (device nvmlDevice) GetDisplayMode() (EnableState, error) { var display EnableState ret := nvmlDeviceGetDisplayMode(device, &display) - return display, ret + return display, ret.error() } // nvml.DeviceGetDisplayActive() -func (l *library) DeviceGetDisplayActive(device Device) (EnableState, Return) { +func (l *library) DeviceGetDisplayActive(device Device) (EnableState, error) { return device.GetDisplayActive() } -func (device nvmlDevice) GetDisplayActive() (EnableState, Return) { +func (device nvmlDevice) GetDisplayActive() (EnableState, error) { var isActive EnableState ret := nvmlDeviceGetDisplayActive(device, &isActive) - return isActive, ret + return isActive, ret.error() } // nvml.DeviceGetPersistenceMode() -func (l *library) DeviceGetPersistenceMode(device Device) (EnableState, Return) { +func (l *library) DeviceGetPersistenceMode(device Device) (EnableState, error) { return device.GetPersistenceMode() } -func (device nvmlDevice) GetPersistenceMode() (EnableState, Return) { +func (device nvmlDevice) GetPersistenceMode() (EnableState, error) { var mode EnableState ret := nvmlDeviceGetPersistenceMode(device, &mode) - return mode, ret + return mode, ret.error() } // nvml.DeviceGetPciInfo() -func (l *library) DeviceGetPciInfo(device Device) (PciInfo, Return) { +func (l *library) DeviceGetPciInfo(device Device) (PciInfo, error) { return device.GetPciInfo() } -func (device nvmlDevice) GetPciInfo() (PciInfo, Return) { +func (device nvmlDevice) GetPciInfo() (PciInfo, error) { var pci PciInfo ret := nvmlDeviceGetPciInfo(device, &pci) - return pci, ret + return pci, ret.error() } // nvml.DeviceGetMaxPcieLinkGeneration() -func (l *library) DeviceGetMaxPcieLinkGeneration(device Device) (int, Return) { +func (l *library) DeviceGetMaxPcieLinkGeneration(device Device) (int, error) { return device.GetMaxPcieLinkGeneration() } -func (device nvmlDevice) GetMaxPcieLinkGeneration() (int, Return) { +func (device nvmlDevice) GetMaxPcieLinkGeneration() (int, error) { var maxLinkGen uint32 ret := nvmlDeviceGetMaxPcieLinkGeneration(device, &maxLinkGen) - return int(maxLinkGen), ret + return int(maxLinkGen), ret.error() } // nvml.DeviceGetMaxPcieLinkWidth() -func (l *library) DeviceGetMaxPcieLinkWidth(device Device) (int, Return) { +func (l *library) DeviceGetMaxPcieLinkWidth(device Device) (int, error) { return device.GetMaxPcieLinkWidth() } -func (device nvmlDevice) GetMaxPcieLinkWidth() (int, Return) { +func (device nvmlDevice) GetMaxPcieLinkWidth() (int, error) { var maxLinkWidth uint32 ret := nvmlDeviceGetMaxPcieLinkWidth(device, &maxLinkWidth) - return int(maxLinkWidth), ret + return int(maxLinkWidth), ret.error() } // nvml.DeviceGetCurrPcieLinkGeneration() -func (l *library) DeviceGetCurrPcieLinkGeneration(device Device) (int, Return) { +func (l *library) DeviceGetCurrPcieLinkGeneration(device Device) (int, error) { return device.GetCurrPcieLinkGeneration() } -func (device nvmlDevice) GetCurrPcieLinkGeneration() (int, Return) { +func (device nvmlDevice) GetCurrPcieLinkGeneration() (int, error) { var currLinkGen uint32 ret := nvmlDeviceGetCurrPcieLinkGeneration(device, &currLinkGen) - return int(currLinkGen), ret + return int(currLinkGen), ret.error() } // nvml.DeviceGetCurrPcieLinkWidth() -func (l *library) DeviceGetCurrPcieLinkWidth(device Device) (int, Return) { +func (l *library) DeviceGetCurrPcieLinkWidth(device Device) (int, error) { return device.GetCurrPcieLinkWidth() } -func (device nvmlDevice) GetCurrPcieLinkWidth() (int, Return) { +func (device nvmlDevice) GetCurrPcieLinkWidth() (int, error) { var currLinkWidth uint32 ret := nvmlDeviceGetCurrPcieLinkWidth(device, &currLinkWidth) - return int(currLinkWidth), ret + return int(currLinkWidth), ret.error() } // nvml.DeviceGetPcieThroughput() -func (l *library) DeviceGetPcieThroughput(device Device, counter PcieUtilCounter) (uint32, Return) { +func (l *library) DeviceGetPcieThroughput(device Device, counter PcieUtilCounter) (uint32, error) { return device.GetPcieThroughput(counter) } -func (device nvmlDevice) GetPcieThroughput(counter PcieUtilCounter) (uint32, Return) { +func (device nvmlDevice) GetPcieThroughput(counter PcieUtilCounter) (uint32, error) { var value uint32 ret := nvmlDeviceGetPcieThroughput(device, counter, &value) - return value, ret + return value, ret.error() } // nvml.DeviceGetPcieReplayCounter() -func (l *library) DeviceGetPcieReplayCounter(device Device) (int, Return) { +func (l *library) DeviceGetPcieReplayCounter(device Device) (int, error) { return device.GetPcieReplayCounter() } -func (device nvmlDevice) GetPcieReplayCounter() (int, Return) { +func (device nvmlDevice) GetPcieReplayCounter() (int, error) { var value uint32 ret := nvmlDeviceGetPcieReplayCounter(device, &value) - return int(value), ret + return int(value), ret.error() } // nvml.nvmlDeviceGetClockInfo() -func (l *library) DeviceGetClockInfo(device Device, clockType ClockType) (uint32, Return) { +func (l *library) DeviceGetClockInfo(device Device, clockType ClockType) (uint32, error) { return device.GetClockInfo(clockType) } -func (device nvmlDevice) GetClockInfo(clockType ClockType) (uint32, Return) { +func (device nvmlDevice) GetClockInfo(clockType ClockType) (uint32, error) { var clock uint32 ret := nvmlDeviceGetClockInfo(device, clockType, &clock) - return clock, ret + return clock, ret.error() } // nvml.DeviceGetMaxClockInfo() -func (l *library) DeviceGetMaxClockInfo(device Device, clockType ClockType) (uint32, Return) { +func (l *library) DeviceGetMaxClockInfo(device Device, clockType ClockType) (uint32, error) { return device.GetMaxClockInfo(clockType) } -func (device nvmlDevice) GetMaxClockInfo(clockType ClockType) (uint32, Return) { +func (device nvmlDevice) GetMaxClockInfo(clockType ClockType) (uint32, error) { var clock uint32 ret := nvmlDeviceGetMaxClockInfo(device, clockType, &clock) - return clock, ret + return clock, ret.error() } // nvml.DeviceGetApplicationsClock() -func (l *library) DeviceGetApplicationsClock(device Device, clockType ClockType) (uint32, Return) { +func (l *library) DeviceGetApplicationsClock(device Device, clockType ClockType) (uint32, error) { return device.GetApplicationsClock(clockType) } -func (device nvmlDevice) GetApplicationsClock(clockType ClockType) (uint32, Return) { +func (device nvmlDevice) GetApplicationsClock(clockType ClockType) (uint32, error) { var clockMHz uint32 ret := nvmlDeviceGetApplicationsClock(device, clockType, &clockMHz) - return clockMHz, ret + return clockMHz, ret.error() } // nvml.DeviceGetDefaultApplicationsClock() -func (l *library) DeviceGetDefaultApplicationsClock(device Device, clockType ClockType) (uint32, Return) { +func (l *library) DeviceGetDefaultApplicationsClock(device Device, clockType ClockType) (uint32, error) { return device.GetDefaultApplicationsClock(clockType) } -func (device nvmlDevice) GetDefaultApplicationsClock(clockType ClockType) (uint32, Return) { +func (device nvmlDevice) GetDefaultApplicationsClock(clockType ClockType) (uint32, error) { var clockMHz uint32 ret := nvmlDeviceGetDefaultApplicationsClock(device, clockType, &clockMHz) - return clockMHz, ret + return clockMHz, ret.error() } // nvml.DeviceResetApplicationsClocks() -func (l *library) DeviceResetApplicationsClocks(device Device) Return { +func (l *library) DeviceResetApplicationsClocks(device Device) error { return device.ResetApplicationsClocks() } -func (device nvmlDevice) ResetApplicationsClocks() Return { - return nvmlDeviceResetApplicationsClocks(device) +func (device nvmlDevice) ResetApplicationsClocks() error { + return nvmlDeviceResetApplicationsClocks(device).error() } // nvml.DeviceGetClock() -func (l *library) DeviceGetClock(device Device, clockType ClockType, clockId ClockId) (uint32, Return) { +func (l *library) DeviceGetClock(device Device, clockType ClockType, clockId ClockId) (uint32, error) { return device.GetClock(clockType, clockId) } -func (device nvmlDevice) GetClock(clockType ClockType, clockId ClockId) (uint32, Return) { +func (device nvmlDevice) GetClock(clockType ClockType, clockId ClockId) (uint32, error) { var clockMHz uint32 ret := nvmlDeviceGetClock(device, clockType, clockId, &clockMHz) - return clockMHz, ret + return clockMHz, ret.error() } // nvml.DeviceGetMaxCustomerBoostClock() -func (l *library) DeviceGetMaxCustomerBoostClock(device Device, clockType ClockType) (uint32, Return) { +func (l *library) DeviceGetMaxCustomerBoostClock(device Device, clockType ClockType) (uint32, error) { return device.GetMaxCustomerBoostClock(clockType) } -func (device nvmlDevice) GetMaxCustomerBoostClock(clockType ClockType) (uint32, Return) { +func (device nvmlDevice) GetMaxCustomerBoostClock(clockType ClockType) (uint32, error) { var clockMHz uint32 ret := nvmlDeviceGetMaxCustomerBoostClock(device, clockType, &clockMHz) - return clockMHz, ret + return clockMHz, ret.error() } // nvml.DeviceGetSupportedMemoryClocks() -func (l *library) DeviceGetSupportedMemoryClocks(device Device) (int, uint32, Return) { +func (l *library) DeviceGetSupportedMemoryClocks(device Device) (int, uint32, error) { return device.GetSupportedMemoryClocks() } -func (device nvmlDevice) GetSupportedMemoryClocks() (int, uint32, Return) { +func (device nvmlDevice) GetSupportedMemoryClocks() (int, uint32, error) { var count, clocksMHz uint32 ret := nvmlDeviceGetSupportedMemoryClocks(device, &count, &clocksMHz) - return int(count), clocksMHz, ret + return int(count), clocksMHz, ret.error() } // nvml.DeviceGetSupportedGraphicsClocks() -func (l *library) DeviceGetSupportedGraphicsClocks(device Device, memoryClockMHz int) (int, uint32, Return) { +func (l *library) DeviceGetSupportedGraphicsClocks(device Device, memoryClockMHz int) (int, uint32, error) { return device.GetSupportedGraphicsClocks(memoryClockMHz) } -func (device nvmlDevice) GetSupportedGraphicsClocks(memoryClockMHz int) (int, uint32, Return) { +func (device nvmlDevice) GetSupportedGraphicsClocks(memoryClockMHz int) (int, uint32, error) { var count, clocksMHz uint32 ret := nvmlDeviceGetSupportedGraphicsClocks(device, uint32(memoryClockMHz), &count, &clocksMHz) - return int(count), clocksMHz, ret + return int(count), clocksMHz, ret.error() } // nvml.DeviceGetAutoBoostedClocksEnabled() -func (l *library) DeviceGetAutoBoostedClocksEnabled(device Device) (EnableState, EnableState, Return) { +func (l *library) DeviceGetAutoBoostedClocksEnabled(device Device) (EnableState, EnableState, error) { return device.GetAutoBoostedClocksEnabled() } -func (device nvmlDevice) GetAutoBoostedClocksEnabled() (EnableState, EnableState, Return) { +func (device nvmlDevice) GetAutoBoostedClocksEnabled() (EnableState, EnableState, error) { var isEnabled, defaultIsEnabled EnableState ret := nvmlDeviceGetAutoBoostedClocksEnabled(device, &isEnabled, &defaultIsEnabled) - return isEnabled, defaultIsEnabled, ret + return isEnabled, defaultIsEnabled, ret.error() } // nvml.DeviceSetAutoBoostedClocksEnabled() -func (l *library) DeviceSetAutoBoostedClocksEnabled(device Device, enabled EnableState) Return { +func (l *library) DeviceSetAutoBoostedClocksEnabled(device Device, enabled EnableState) error { return device.SetAutoBoostedClocksEnabled(enabled) } -func (device nvmlDevice) SetAutoBoostedClocksEnabled(enabled EnableState) Return { - return nvmlDeviceSetAutoBoostedClocksEnabled(device, enabled) +func (device nvmlDevice) SetAutoBoostedClocksEnabled(enabled EnableState) error { + return nvmlDeviceSetAutoBoostedClocksEnabled(device, enabled).error() } // nvml.DeviceSetDefaultAutoBoostedClocksEnabled() -func (l *library) DeviceSetDefaultAutoBoostedClocksEnabled(device Device, enabled EnableState, flags uint32) Return { +func (l *library) DeviceSetDefaultAutoBoostedClocksEnabled(device Device, enabled EnableState, flags uint32) error { return device.SetDefaultAutoBoostedClocksEnabled(enabled, flags) } -func (device nvmlDevice) SetDefaultAutoBoostedClocksEnabled(enabled EnableState, flags uint32) Return { - return nvmlDeviceSetDefaultAutoBoostedClocksEnabled(device, enabled, flags) +func (device nvmlDevice) SetDefaultAutoBoostedClocksEnabled(enabled EnableState, flags uint32) error { + return nvmlDeviceSetDefaultAutoBoostedClocksEnabled(device, enabled, flags).error() } // nvml.DeviceGetFanSpeed() -func (l *library) DeviceGetFanSpeed(device Device) (uint32, Return) { +func (l *library) DeviceGetFanSpeed(device Device) (uint32, error) { return device.GetFanSpeed() } -func (device nvmlDevice) GetFanSpeed() (uint32, Return) { +func (device nvmlDevice) GetFanSpeed() (uint32, error) { var speed uint32 ret := nvmlDeviceGetFanSpeed(device, &speed) - return speed, ret + return speed, ret.error() } // nvml.DeviceGetFanSpeed_v2() -func (l *library) DeviceGetFanSpeed_v2(device Device, fan int) (uint32, Return) { +func (l *library) DeviceGetFanSpeed_v2(device Device, fan int) (uint32, error) { return device.GetFanSpeed_v2(fan) } -func (device nvmlDevice) GetFanSpeed_v2(fan int) (uint32, Return) { +func (device nvmlDevice) GetFanSpeed_v2(fan int) (uint32, error) { var speed uint32 ret := nvmlDeviceGetFanSpeed_v2(device, uint32(fan), &speed) - return speed, ret + return speed, ret.error() } // nvml.DeviceGetNumFans() -func (l *library) DeviceGetNumFans(device Device) (int, Return) { +func (l *library) DeviceGetNumFans(device Device) (int, error) { return device.GetNumFans() } -func (device nvmlDevice) GetNumFans() (int, Return) { +func (device nvmlDevice) GetNumFans() (int, error) { var numFans uint32 ret := nvmlDeviceGetNumFans(device, &numFans) - return int(numFans), ret + return int(numFans), ret.error() } // nvml.DeviceGetTemperature() -func (l *library) DeviceGetTemperature(device Device, sensorType TemperatureSensors) (uint32, Return) { +func (l *library) DeviceGetTemperature(device Device, sensorType TemperatureSensors) (uint32, error) { return device.GetTemperature(sensorType) } -func (device nvmlDevice) GetTemperature(sensorType TemperatureSensors) (uint32, Return) { +func (device nvmlDevice) GetTemperature(sensorType TemperatureSensors) (uint32, error) { var temp uint32 ret := nvmlDeviceGetTemperature(device, sensorType, &temp) - return temp, ret + return temp, ret.error() } // nvml.DeviceGetTemperatureThreshold() -func (l *library) DeviceGetTemperatureThreshold(device Device, thresholdType TemperatureThresholds) (uint32, Return) { +func (l *library) DeviceGetTemperatureThreshold(device Device, thresholdType TemperatureThresholds) (uint32, error) { return device.GetTemperatureThreshold(thresholdType) } -func (device nvmlDevice) GetTemperatureThreshold(thresholdType TemperatureThresholds) (uint32, Return) { +func (device nvmlDevice) GetTemperatureThreshold(thresholdType TemperatureThresholds) (uint32, error) { var temp uint32 ret := nvmlDeviceGetTemperatureThreshold(device, thresholdType, &temp) - return temp, ret + return temp, ret.error() } // nvml.DeviceSetTemperatureThreshold() -func (l *library) DeviceSetTemperatureThreshold(device Device, thresholdType TemperatureThresholds, temp int) Return { +func (l *library) DeviceSetTemperatureThreshold(device Device, thresholdType TemperatureThresholds, temp int) error { return device.SetTemperatureThreshold(thresholdType, temp) } -func (device nvmlDevice) SetTemperatureThreshold(thresholdType TemperatureThresholds, temp int) Return { +func (device nvmlDevice) SetTemperatureThreshold(thresholdType TemperatureThresholds, temp int) error { t := int32(temp) ret := nvmlDeviceSetTemperatureThreshold(device, thresholdType, &t) - return ret + return ret.error() } // nvml.DeviceGetPerformanceState() -func (l *library) DeviceGetPerformanceState(device Device) (Pstates, Return) { +func (l *library) DeviceGetPerformanceState(device Device) (Pstates, error) { return device.GetPerformanceState() } -func (device nvmlDevice) GetPerformanceState() (Pstates, Return) { +func (device nvmlDevice) GetPerformanceState() (Pstates, error) { var pState Pstates ret := nvmlDeviceGetPerformanceState(device, &pState) - return pState, ret + return pState, ret.error() } // nvml.DeviceGetCurrentClocksThrottleReasons() -func (l *library) DeviceGetCurrentClocksThrottleReasons(device Device) (uint64, Return) { +func (l *library) DeviceGetCurrentClocksThrottleReasons(device Device) (uint64, error) { return device.GetCurrentClocksThrottleReasons() } -func (device nvmlDevice) GetCurrentClocksThrottleReasons() (uint64, Return) { +func (device nvmlDevice) GetCurrentClocksThrottleReasons() (uint64, error) { var clocksThrottleReasons uint64 ret := nvmlDeviceGetCurrentClocksThrottleReasons(device, &clocksThrottleReasons) - return clocksThrottleReasons, ret + return clocksThrottleReasons, ret.error() } // nvml.DeviceGetSupportedClocksThrottleReasons() -func (l *library) DeviceGetSupportedClocksThrottleReasons(device Device) (uint64, Return) { +func (l *library) DeviceGetSupportedClocksThrottleReasons(device Device) (uint64, error) { return device.GetSupportedClocksThrottleReasons() } -func (device nvmlDevice) GetSupportedClocksThrottleReasons() (uint64, Return) { +func (device nvmlDevice) GetSupportedClocksThrottleReasons() (uint64, error) { var supportedClocksThrottleReasons uint64 ret := nvmlDeviceGetSupportedClocksThrottleReasons(device, &supportedClocksThrottleReasons) - return supportedClocksThrottleReasons, ret + return supportedClocksThrottleReasons, ret.error() } // nvml.DeviceGetPowerState() -func (l *library) DeviceGetPowerState(device Device) (Pstates, Return) { +func (l *library) DeviceGetPowerState(device Device) (Pstates, error) { return device.GetPowerState() } -func (device nvmlDevice) GetPowerState() (Pstates, Return) { +func (device nvmlDevice) GetPowerState() (Pstates, error) { var pState Pstates ret := nvmlDeviceGetPowerState(device, &pState) - return pState, ret + return pState, ret.error() } // nvml.DeviceGetPowerManagementMode() -func (l *library) DeviceGetPowerManagementMode(device Device) (EnableState, Return) { +func (l *library) DeviceGetPowerManagementMode(device Device) (EnableState, error) { return device.GetPowerManagementMode() } -func (device nvmlDevice) GetPowerManagementMode() (EnableState, Return) { +func (device nvmlDevice) GetPowerManagementMode() (EnableState, error) { var mode EnableState ret := nvmlDeviceGetPowerManagementMode(device, &mode) - return mode, ret + return mode, ret.error() } // nvml.DeviceGetPowerManagementLimit() -func (l *library) DeviceGetPowerManagementLimit(device Device) (uint32, Return) { +func (l *library) DeviceGetPowerManagementLimit(device Device) (uint32, error) { return device.GetPowerManagementLimit() } -func (device nvmlDevice) GetPowerManagementLimit() (uint32, Return) { +func (device nvmlDevice) GetPowerManagementLimit() (uint32, error) { var limit uint32 ret := nvmlDeviceGetPowerManagementLimit(device, &limit) - return limit, ret + return limit, ret.error() } // nvml.DeviceGetPowerManagementLimitConstraints() -func (l *library) DeviceGetPowerManagementLimitConstraints(device Device) (uint32, uint32, Return) { +func (l *library) DeviceGetPowerManagementLimitConstraints(device Device) (uint32, uint32, error) { return device.GetPowerManagementLimitConstraints() } -func (device nvmlDevice) GetPowerManagementLimitConstraints() (uint32, uint32, Return) { +func (device nvmlDevice) GetPowerManagementLimitConstraints() (uint32, uint32, error) { var minLimit, maxLimit uint32 ret := nvmlDeviceGetPowerManagementLimitConstraints(device, &minLimit, &maxLimit) - return minLimit, maxLimit, ret + return minLimit, maxLimit, ret.error() } // nvml.DeviceGetPowerManagementDefaultLimit() -func (l *library) DeviceGetPowerManagementDefaultLimit(device Device) (uint32, Return) { +func (l *library) DeviceGetPowerManagementDefaultLimit(device Device) (uint32, error) { return device.GetPowerManagementDefaultLimit() } -func (device nvmlDevice) GetPowerManagementDefaultLimit() (uint32, Return) { +func (device nvmlDevice) GetPowerManagementDefaultLimit() (uint32, error) { var defaultLimit uint32 ret := nvmlDeviceGetPowerManagementDefaultLimit(device, &defaultLimit) - return defaultLimit, ret + return defaultLimit, ret.error() } // nvml.DeviceGetPowerUsage() -func (l *library) DeviceGetPowerUsage(device Device) (uint32, Return) { +func (l *library) DeviceGetPowerUsage(device Device) (uint32, error) { return device.GetPowerUsage() } -func (device nvmlDevice) GetPowerUsage() (uint32, Return) { +func (device nvmlDevice) GetPowerUsage() (uint32, error) { var power uint32 ret := nvmlDeviceGetPowerUsage(device, &power) - return power, ret + return power, ret.error() } // nvml.DeviceGetTotalEnergyConsumption() -func (l *library) DeviceGetTotalEnergyConsumption(device Device) (uint64, Return) { +func (l *library) DeviceGetTotalEnergyConsumption(device Device) (uint64, error) { return device.GetTotalEnergyConsumption() } -func (device nvmlDevice) GetTotalEnergyConsumption() (uint64, Return) { +func (device nvmlDevice) GetTotalEnergyConsumption() (uint64, error) { var energy uint64 ret := nvmlDeviceGetTotalEnergyConsumption(device, &energy) - return energy, ret + return energy, ret.error() } // nvml.DeviceGetEnforcedPowerLimit() -func (l *library) DeviceGetEnforcedPowerLimit(device Device) (uint32, Return) { +func (l *library) DeviceGetEnforcedPowerLimit(device Device) (uint32, error) { return device.GetEnforcedPowerLimit() } -func (device nvmlDevice) GetEnforcedPowerLimit() (uint32, Return) { +func (device nvmlDevice) GetEnforcedPowerLimit() (uint32, error) { var limit uint32 ret := nvmlDeviceGetEnforcedPowerLimit(device, &limit) - return limit, ret + return limit, ret.error() } // nvml.DeviceGetGpuOperationMode() -func (l *library) DeviceGetGpuOperationMode(device Device) (GpuOperationMode, GpuOperationMode, Return) { +func (l *library) DeviceGetGpuOperationMode(device Device) (GpuOperationMode, GpuOperationMode, error) { return device.GetGpuOperationMode() } -func (device nvmlDevice) GetGpuOperationMode() (GpuOperationMode, GpuOperationMode, Return) { +func (device nvmlDevice) GetGpuOperationMode() (GpuOperationMode, GpuOperationMode, error) { var current, pending GpuOperationMode ret := nvmlDeviceGetGpuOperationMode(device, ¤t, &pending) - return current, pending, ret + return current, pending, ret.error() } // nvml.DeviceGetMemoryInfo() -func (l *library) DeviceGetMemoryInfo(device Device) (Memory, Return) { +func (l *library) DeviceGetMemoryInfo(device Device) (Memory, error) { return device.GetMemoryInfo() } -func (device nvmlDevice) GetMemoryInfo() (Memory, Return) { +func (device nvmlDevice) GetMemoryInfo() (Memory, error) { var memory Memory ret := nvmlDeviceGetMemoryInfo(device, &memory) - return memory, ret + return memory, ret.error() } // nvml.DeviceGetMemoryInfo_v2() -func (l *library) DeviceGetMemoryInfo_v2(device Device) (Memory_v2, Return) { +func (l *library) DeviceGetMemoryInfo_v2(device Device) (Memory_v2, error) { return device.GetMemoryInfo_v2() } -func (device nvmlDevice) GetMemoryInfo_v2() (Memory_v2, Return) { +func (device nvmlDevice) GetMemoryInfo_v2() (Memory_v2, error) { var memory Memory_v2 memory.Version = STRUCT_VERSION(memory, 2) ret := nvmlDeviceGetMemoryInfo_v2(device, &memory) - return memory, ret + return memory, ret.error() } // nvml.DeviceGetComputeMode() -func (l *library) DeviceGetComputeMode(device Device) (ComputeMode, Return) { +func (l *library) DeviceGetComputeMode(device Device) (ComputeMode, error) { return device.GetComputeMode() } -func (device nvmlDevice) GetComputeMode() (ComputeMode, Return) { +func (device nvmlDevice) GetComputeMode() (ComputeMode, error) { var mode ComputeMode ret := nvmlDeviceGetComputeMode(device, &mode) - return mode, ret + return mode, ret.error() } // nvml.DeviceGetCudaComputeCapability() -func (l *library) DeviceGetCudaComputeCapability(device Device) (int, int, Return) { +func (l *library) DeviceGetCudaComputeCapability(device Device) (int, int, error) { return device.GetCudaComputeCapability() } -func (device nvmlDevice) GetCudaComputeCapability() (int, int, Return) { +func (device nvmlDevice) GetCudaComputeCapability() (int, int, error) { var major, minor int32 ret := nvmlDeviceGetCudaComputeCapability(device, &major, &minor) - return int(major), int(minor), ret + return int(major), int(minor), ret.error() } // nvml.DeviceGetEccMode() -func (l *library) DeviceGetEccMode(device Device) (EnableState, EnableState, Return) { +func (l *library) DeviceGetEccMode(device Device) (EnableState, EnableState, error) { return device.GetEccMode() } -func (device nvmlDevice) GetEccMode() (EnableState, EnableState, Return) { +func (device nvmlDevice) GetEccMode() (EnableState, EnableState, error) { var current, pending EnableState ret := nvmlDeviceGetEccMode(device, ¤t, &pending) - return current, pending, ret + return current, pending, ret.error() } // nvml.DeviceGetBoardId() -func (l *library) DeviceGetBoardId(device Device) (uint32, Return) { +func (l *library) DeviceGetBoardId(device Device) (uint32, error) { return device.GetBoardId() } -func (device nvmlDevice) GetBoardId() (uint32, Return) { +func (device nvmlDevice) GetBoardId() (uint32, error) { var boardId uint32 ret := nvmlDeviceGetBoardId(device, &boardId) - return boardId, ret + return boardId, ret.error() } // nvml.DeviceGetMultiGpuBoard() -func (l *library) DeviceGetMultiGpuBoard(device Device) (int, Return) { +func (l *library) DeviceGetMultiGpuBoard(device Device) (int, error) { return device.GetMultiGpuBoard() } -func (device nvmlDevice) GetMultiGpuBoard() (int, Return) { +func (device nvmlDevice) GetMultiGpuBoard() (int, error) { var multiGpuBool uint32 ret := nvmlDeviceGetMultiGpuBoard(device, &multiGpuBool) - return int(multiGpuBool), ret + return int(multiGpuBool), ret.error() } // nvml.DeviceGetTotalEccErrors() -func (l *library) DeviceGetTotalEccErrors(device Device, errorType MemoryErrorType, counterType EccCounterType) (uint64, Return) { +func (l *library) DeviceGetTotalEccErrors(device Device, errorType MemoryErrorType, counterType EccCounterType) (uint64, error) { return device.GetTotalEccErrors(errorType, counterType) } -func (device nvmlDevice) GetTotalEccErrors(errorType MemoryErrorType, counterType EccCounterType) (uint64, Return) { +func (device nvmlDevice) GetTotalEccErrors(errorType MemoryErrorType, counterType EccCounterType) (uint64, error) { var eccCounts uint64 ret := nvmlDeviceGetTotalEccErrors(device, errorType, counterType, &eccCounts) - return eccCounts, ret + return eccCounts, ret.error() } // nvml.DeviceGetDetailedEccErrors() -func (l *library) DeviceGetDetailedEccErrors(device Device, errorType MemoryErrorType, counterType EccCounterType) (EccErrorCounts, Return) { +func (l *library) DeviceGetDetailedEccErrors(device Device, errorType MemoryErrorType, counterType EccCounterType) (EccErrorCounts, error) { return device.GetDetailedEccErrors(errorType, counterType) } -func (device nvmlDevice) GetDetailedEccErrors(errorType MemoryErrorType, counterType EccCounterType) (EccErrorCounts, Return) { +func (device nvmlDevice) GetDetailedEccErrors(errorType MemoryErrorType, counterType EccCounterType) (EccErrorCounts, error) { var eccCounts EccErrorCounts ret := nvmlDeviceGetDetailedEccErrors(device, errorType, counterType, &eccCounts) - return eccCounts, ret + return eccCounts, ret.error() } // nvml.DeviceGetMemoryErrorCounter() -func (l *library) DeviceGetMemoryErrorCounter(device Device, errorType MemoryErrorType, counterType EccCounterType, locationType MemoryLocation) (uint64, Return) { +func (l *library) DeviceGetMemoryErrorCounter(device Device, errorType MemoryErrorType, counterType EccCounterType, locationType MemoryLocation) (uint64, error) { return device.GetMemoryErrorCounter(errorType, counterType, locationType) } -func (device nvmlDevice) GetMemoryErrorCounter(errorType MemoryErrorType, counterType EccCounterType, locationType MemoryLocation) (uint64, Return) { +func (device nvmlDevice) GetMemoryErrorCounter(errorType MemoryErrorType, counterType EccCounterType, locationType MemoryLocation) (uint64, error) { var count uint64 ret := nvmlDeviceGetMemoryErrorCounter(device, errorType, counterType, locationType, &count) - return count, ret + return count, ret.error() } // nvml.DeviceGetUtilizationRates() -func (l *library) DeviceGetUtilizationRates(device Device) (Utilization, Return) { +func (l *library) DeviceGetUtilizationRates(device Device) (Utilization, error) { return device.GetUtilizationRates() } -func (device nvmlDevice) GetUtilizationRates() (Utilization, Return) { +func (device nvmlDevice) GetUtilizationRates() (Utilization, error) { var utilization Utilization ret := nvmlDeviceGetUtilizationRates(device, &utilization) - return utilization, ret + return utilization, ret.error() } // nvml.DeviceGetEncoderUtilization() -func (l *library) DeviceGetEncoderUtilization(device Device) (uint32, uint32, Return) { +func (l *library) DeviceGetEncoderUtilization(device Device) (uint32, uint32, error) { return device.GetEncoderUtilization() } -func (device nvmlDevice) GetEncoderUtilization() (uint32, uint32, Return) { +func (device nvmlDevice) GetEncoderUtilization() (uint32, uint32, error) { var utilization, samplingPeriodUs uint32 ret := nvmlDeviceGetEncoderUtilization(device, &utilization, &samplingPeriodUs) - return utilization, samplingPeriodUs, ret + return utilization, samplingPeriodUs, ret.error() } // nvml.DeviceGetEncoderCapacity() -func (l *library) DeviceGetEncoderCapacity(device Device, encoderQueryType EncoderType) (int, Return) { +func (l *library) DeviceGetEncoderCapacity(device Device, encoderQueryType EncoderType) (int, error) { return device.GetEncoderCapacity(encoderQueryType) } -func (device nvmlDevice) GetEncoderCapacity(encoderQueryType EncoderType) (int, Return) { +func (device nvmlDevice) GetEncoderCapacity(encoderQueryType EncoderType) (int, error) { var encoderCapacity uint32 ret := nvmlDeviceGetEncoderCapacity(device, encoderQueryType, &encoderCapacity) - return int(encoderCapacity), ret + return int(encoderCapacity), ret.error() } // nvml.DeviceGetEncoderStats() -func (l *library) DeviceGetEncoderStats(device Device) (int, uint32, uint32, Return) { +func (l *library) DeviceGetEncoderStats(device Device) (int, uint32, uint32, error) { return device.GetEncoderStats() } -func (device nvmlDevice) GetEncoderStats() (int, uint32, uint32, Return) { +func (device nvmlDevice) GetEncoderStats() (int, uint32, uint32, error) { var sessionCount, averageFps, averageLatency uint32 ret := nvmlDeviceGetEncoderStats(device, &sessionCount, &averageFps, &averageLatency) - return int(sessionCount), averageFps, averageLatency, ret + return int(sessionCount), averageFps, averageLatency, ret.error() } // nvml.DeviceGetEncoderSessions() -func (l *library) DeviceGetEncoderSessions(device Device) ([]EncoderSessionInfo, Return) { +func (l *library) DeviceGetEncoderSessions(device Device) ([]EncoderSessionInfo, error) { return device.GetEncoderSessions() } -func (device nvmlDevice) GetEncoderSessions() ([]EncoderSessionInfo, Return) { +func (device nvmlDevice) GetEncoderSessions() ([]EncoderSessionInfo, error) { var sessionCount uint32 = 1 // Will be reduced upon returning for { sessionInfos := make([]EncoderSessionInfo, sessionCount) ret := nvmlDeviceGetEncoderSessions(device, &sessionCount, &sessionInfos[0]) - if ret == SUCCESS { - return sessionInfos[:sessionCount], ret + if ret == nvmlSUCCESS { + return sessionInfos[:sessionCount], ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } sessionCount *= 2 } } // nvml.DeviceGetDecoderUtilization() -func (l *library) DeviceGetDecoderUtilization(device Device) (uint32, uint32, Return) { +func (l *library) DeviceGetDecoderUtilization(device Device) (uint32, uint32, error) { return device.GetDecoderUtilization() } -func (device nvmlDevice) GetDecoderUtilization() (uint32, uint32, Return) { +func (device nvmlDevice) GetDecoderUtilization() (uint32, uint32, error) { var utilization, samplingPeriodUs uint32 ret := nvmlDeviceGetDecoderUtilization(device, &utilization, &samplingPeriodUs) - return utilization, samplingPeriodUs, ret + return utilization, samplingPeriodUs, ret.error() } // nvml.DeviceGetFBCStats() -func (l *library) DeviceGetFBCStats(device Device) (FBCStats, Return) { +func (l *library) DeviceGetFBCStats(device Device) (FBCStats, error) { return device.GetFBCStats() } -func (device nvmlDevice) GetFBCStats() (FBCStats, Return) { +func (device nvmlDevice) GetFBCStats() (FBCStats, error) { var fbcStats FBCStats ret := nvmlDeviceGetFBCStats(device, &fbcStats) - return fbcStats, ret + return fbcStats, ret.error() } // nvml.DeviceGetFBCSessions() -func (l *library) DeviceGetFBCSessions(device Device) ([]FBCSessionInfo, Return) { +func (l *library) DeviceGetFBCSessions(device Device) ([]FBCSessionInfo, error) { return device.GetFBCSessions() } -func (device nvmlDevice) GetFBCSessions() ([]FBCSessionInfo, Return) { +func (device nvmlDevice) GetFBCSessions() ([]FBCSessionInfo, error) { var sessionCount uint32 = 1 // Will be reduced upon returning for { sessionInfo := make([]FBCSessionInfo, sessionCount) ret := nvmlDeviceGetFBCSessions(device, &sessionCount, &sessionInfo[0]) - if ret == SUCCESS { - return sessionInfo[:sessionCount], ret + if ret == nvmlSUCCESS { + return sessionInfo[:sessionCount], ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } sessionCount *= 2 } } // nvml.DeviceGetDriverModel() -func (l *library) DeviceGetDriverModel(device Device) (DriverModel, DriverModel, Return) { +func (l *library) DeviceGetDriverModel(device Device) (DriverModel, DriverModel, error) { return device.GetDriverModel() } -func (device nvmlDevice) GetDriverModel() (DriverModel, DriverModel, Return) { +func (device nvmlDevice) GetDriverModel() (DriverModel, DriverModel, error) { var current, pending DriverModel ret := nvmlDeviceGetDriverModel(device, ¤t, &pending) - return current, pending, ret + return current, pending, ret.error() } // nvml.DeviceGetVbiosVersion() -func (l *library) DeviceGetVbiosVersion(device Device) (string, Return) { +func (l *library) DeviceGetVbiosVersion(device Device) (string, error) { return device.GetVbiosVersion() } -func (device nvmlDevice) GetVbiosVersion() (string, Return) { +func (device nvmlDevice) GetVbiosVersion() (string, error) { version := make([]byte, DEVICE_VBIOS_VERSION_BUFFER_SIZE) ret := nvmlDeviceGetVbiosVersion(device, &version[0], DEVICE_VBIOS_VERSION_BUFFER_SIZE) - return string(version[:clen(version)]), ret + return string(version[:clen(version)]), ret.error() } // nvml.DeviceGetBridgeChipInfo() -func (l *library) DeviceGetBridgeChipInfo(device Device) (BridgeChipHierarchy, Return) { +func (l *library) DeviceGetBridgeChipInfo(device Device) (BridgeChipHierarchy, error) { return device.GetBridgeChipInfo() } -func (device nvmlDevice) GetBridgeChipInfo() (BridgeChipHierarchy, Return) { +func (device nvmlDevice) GetBridgeChipInfo() (BridgeChipHierarchy, error) { var bridgeHierarchy BridgeChipHierarchy ret := nvmlDeviceGetBridgeChipInfo(device, &bridgeHierarchy) - return bridgeHierarchy, ret + return bridgeHierarchy, ret.error() } // nvml.DeviceGetComputeRunningProcesses() -func deviceGetComputeRunningProcesses_v1(device nvmlDevice) ([]ProcessInfo, Return) { +func deviceGetComputeRunningProcesses_v1(device nvmlDevice) ([]ProcessInfo, error) { var infoCount uint32 = 1 // Will be reduced upon returning for { infos := make([]ProcessInfo_v1, infoCount) ret := nvmlDeviceGetComputeRunningProcesses_v1(device, &infoCount, &infos[0]) - if ret == SUCCESS { - return ProcessInfo_v1Slice(infos[:infoCount]).ToProcessInfoSlice(), ret + if ret == nvmlSUCCESS { + return ProcessInfo_v1Slice(infos[:infoCount]).ToProcessInfoSlice(), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } infoCount *= 2 } } -func deviceGetComputeRunningProcesses_v2(device nvmlDevice) ([]ProcessInfo, Return) { +func deviceGetComputeRunningProcesses_v2(device nvmlDevice) ([]ProcessInfo, error) { var infoCount uint32 = 1 // Will be reduced upon returning for { infos := make([]ProcessInfo_v2, infoCount) ret := nvmlDeviceGetComputeRunningProcesses_v2(device, &infoCount, &infos[0]) - if ret == SUCCESS { - return ProcessInfo_v2Slice(infos[:infoCount]).ToProcessInfoSlice(), ret + if ret == nvmlSUCCESS { + return ProcessInfo_v2Slice(infos[:infoCount]).ToProcessInfoSlice(), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } infoCount *= 2 } } -func deviceGetComputeRunningProcesses_v3(device nvmlDevice) ([]ProcessInfo, Return) { +func deviceGetComputeRunningProcesses_v3(device nvmlDevice) ([]ProcessInfo, error) { var infoCount uint32 = 1 // Will be reduced upon returning for { infos := make([]ProcessInfo, infoCount) ret := nvmlDeviceGetComputeRunningProcesses_v3(device, &infoCount, &infos[0]) - if ret == SUCCESS { - return infos[:infoCount], ret + if ret == nvmlSUCCESS { + return infos[:infoCount], ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } infoCount *= 2 } } -func (l *library) DeviceGetComputeRunningProcesses(device Device) ([]ProcessInfo, Return) { +func (l *library) DeviceGetComputeRunningProcesses(device Device) ([]ProcessInfo, error) { return device.GetComputeRunningProcesses() } -func (device nvmlDevice) GetComputeRunningProcesses() ([]ProcessInfo, Return) { +func (device nvmlDevice) GetComputeRunningProcesses() ([]ProcessInfo, error) { return deviceGetComputeRunningProcesses(device) } // nvml.DeviceGetGraphicsRunningProcesses() -func deviceGetGraphicsRunningProcesses_v1(device nvmlDevice) ([]ProcessInfo, Return) { +func deviceGetGraphicsRunningProcesses_v1(device nvmlDevice) ([]ProcessInfo, error) { var infoCount uint32 = 1 // Will be reduced upon returning for { infos := make([]ProcessInfo_v1, infoCount) ret := nvmlDeviceGetGraphicsRunningProcesses_v1(device, &infoCount, &infos[0]) - if ret == SUCCESS { - return ProcessInfo_v1Slice(infos[:infoCount]).ToProcessInfoSlice(), ret + if ret == nvmlSUCCESS { + return ProcessInfo_v1Slice(infos[:infoCount]).ToProcessInfoSlice(), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } infoCount *= 2 } } -func deviceGetGraphicsRunningProcesses_v2(device nvmlDevice) ([]ProcessInfo, Return) { +func deviceGetGraphicsRunningProcesses_v2(device nvmlDevice) ([]ProcessInfo, error) { var infoCount uint32 = 1 // Will be reduced upon returning for { infos := make([]ProcessInfo_v2, infoCount) ret := nvmlDeviceGetGraphicsRunningProcesses_v2(device, &infoCount, &infos[0]) - if ret == SUCCESS { - return ProcessInfo_v2Slice(infos[:infoCount]).ToProcessInfoSlice(), ret + if ret == nvmlSUCCESS { + return ProcessInfo_v2Slice(infos[:infoCount]).ToProcessInfoSlice(), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } infoCount *= 2 } } -func deviceGetGraphicsRunningProcesses_v3(device nvmlDevice) ([]ProcessInfo, Return) { +func deviceGetGraphicsRunningProcesses_v3(device nvmlDevice) ([]ProcessInfo, error) { var infoCount uint32 = 1 // Will be reduced upon returning for { infos := make([]ProcessInfo, infoCount) ret := nvmlDeviceGetGraphicsRunningProcesses_v3(device, &infoCount, &infos[0]) - if ret == SUCCESS { - return infos[:infoCount], ret + if ret == nvmlSUCCESS { + return infos[:infoCount], ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } infoCount *= 2 } } -func (l *library) DeviceGetGraphicsRunningProcesses(device Device) ([]ProcessInfo, Return) { +func (l *library) DeviceGetGraphicsRunningProcesses(device Device) ([]ProcessInfo, error) { return device.GetGraphicsRunningProcesses() } -func (device nvmlDevice) GetGraphicsRunningProcesses() ([]ProcessInfo, Return) { +func (device nvmlDevice) GetGraphicsRunningProcesses() ([]ProcessInfo, error) { return deviceGetGraphicsRunningProcesses(device) } // nvml.DeviceGetMPSComputeRunningProcesses() -func deviceGetMPSComputeRunningProcesses_v1(device nvmlDevice) ([]ProcessInfo, Return) { +func deviceGetMPSComputeRunningProcesses_v1(device nvmlDevice) ([]ProcessInfo, error) { var infoCount uint32 = 1 // Will be reduced upon returning for { infos := make([]ProcessInfo_v1, infoCount) ret := nvmlDeviceGetMPSComputeRunningProcesses_v1(device, &infoCount, &infos[0]) - if ret == SUCCESS { - return ProcessInfo_v1Slice(infos[:infoCount]).ToProcessInfoSlice(), ret + if ret == nvmlSUCCESS { + return ProcessInfo_v1Slice(infos[:infoCount]).ToProcessInfoSlice(), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } infoCount *= 2 } } -func deviceGetMPSComputeRunningProcesses_v2(device nvmlDevice) ([]ProcessInfo, Return) { +func deviceGetMPSComputeRunningProcesses_v2(device nvmlDevice) ([]ProcessInfo, error) { var infoCount uint32 = 1 // Will be reduced upon returning for { infos := make([]ProcessInfo_v2, infoCount) ret := nvmlDeviceGetMPSComputeRunningProcesses_v2(device, &infoCount, &infos[0]) - if ret == SUCCESS { - return ProcessInfo_v2Slice(infos[:infoCount]).ToProcessInfoSlice(), ret + if ret == nvmlSUCCESS { + return ProcessInfo_v2Slice(infos[:infoCount]).ToProcessInfoSlice(), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } infoCount *= 2 } } -func deviceGetMPSComputeRunningProcesses_v3(device nvmlDevice) ([]ProcessInfo, Return) { +func deviceGetMPSComputeRunningProcesses_v3(device nvmlDevice) ([]ProcessInfo, error) { var infoCount uint32 = 1 // Will be reduced upon returning for { infos := make([]ProcessInfo, infoCount) ret := nvmlDeviceGetMPSComputeRunningProcesses_v3(device, &infoCount, &infos[0]) - if ret == SUCCESS { - return infos[:infoCount], ret + if ret == nvmlSUCCESS { + return infos[:infoCount], ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } infoCount *= 2 } } -func (l *library) DeviceGetMPSComputeRunningProcesses(device Device) ([]ProcessInfo, Return) { +func (l *library) DeviceGetMPSComputeRunningProcesses(device Device) ([]ProcessInfo, error) { return device.GetMPSComputeRunningProcesses() } -func (device nvmlDevice) GetMPSComputeRunningProcesses() ([]ProcessInfo, Return) { +func (device nvmlDevice) GetMPSComputeRunningProcesses() ([]ProcessInfo, error) { return deviceGetMPSComputeRunningProcesses(device) } // nvml.DeviceOnSameBoard() -func (l *library) DeviceOnSameBoard(device1 Device, device2 Device) (int, Return) { +func (l *library) DeviceOnSameBoard(device1 Device, device2 Device) (int, error) { return device1.OnSameBoard(device2) } -func (device1 nvmlDevice) OnSameBoard(device2 Device) (int, Return) { +func (device1 nvmlDevice) OnSameBoard(device2 Device) (int, error) { var onSameBoard int32 ret := nvmlDeviceOnSameBoard(device1, nvmlDeviceHandle(device2), &onSameBoard) - return int(onSameBoard), ret + return int(onSameBoard), ret.error() } // nvml.DeviceGetAPIRestriction() -func (l *library) DeviceGetAPIRestriction(device Device, apiType RestrictedAPI) (EnableState, Return) { +func (l *library) DeviceGetAPIRestriction(device Device, apiType RestrictedAPI) (EnableState, error) { return device.GetAPIRestriction(apiType) } -func (device nvmlDevice) GetAPIRestriction(apiType RestrictedAPI) (EnableState, Return) { +func (device nvmlDevice) GetAPIRestriction(apiType RestrictedAPI) (EnableState, error) { var isRestricted EnableState ret := nvmlDeviceGetAPIRestriction(device, apiType, &isRestricted) - return isRestricted, ret + return isRestricted, ret.error() } // nvml.DeviceGetSamples() -func (l *library) DeviceGetSamples(device Device, samplingType SamplingType, lastSeenTimestamp uint64) (ValueType, []Sample, Return) { +func (l *library) DeviceGetSamples(device Device, samplingType SamplingType, lastSeenTimestamp uint64) (ValueType, []Sample, error) { return device.GetSamples(samplingType, lastSeenTimestamp) } -func (device nvmlDevice) GetSamples(samplingType SamplingType, lastSeenTimestamp uint64) (ValueType, []Sample, Return) { +func (device nvmlDevice) GetSamples(samplingType SamplingType, lastSeenTimestamp uint64) (ValueType, []Sample, error) { var sampleValType ValueType var sampleCount uint32 ret := nvmlDeviceGetSamples(device, samplingType, lastSeenTimestamp, &sampleValType, &sampleCount, nil) - if ret != SUCCESS { - return sampleValType, nil, ret + if ret != nvmlSUCCESS { + return sampleValType, nil, ret.error() } if sampleCount == 0 { - return sampleValType, []Sample{}, ret + return sampleValType, []Sample{}, ret.error() } samples := make([]Sample, sampleCount) ret = nvmlDeviceGetSamples(device, samplingType, lastSeenTimestamp, &sampleValType, &sampleCount, &samples[0]) - return sampleValType, samples, ret + return sampleValType, samples, ret.error() } // nvml.DeviceGetBAR1MemoryInfo() -func (l *library) DeviceGetBAR1MemoryInfo(device Device) (BAR1Memory, Return) { +func (l *library) DeviceGetBAR1MemoryInfo(device Device) (BAR1Memory, error) { return device.GetBAR1MemoryInfo() } -func (device nvmlDevice) GetBAR1MemoryInfo() (BAR1Memory, Return) { +func (device nvmlDevice) GetBAR1MemoryInfo() (BAR1Memory, error) { var bar1Memory BAR1Memory ret := nvmlDeviceGetBAR1MemoryInfo(device, &bar1Memory) - return bar1Memory, ret + return bar1Memory, ret.error() } // nvml.DeviceGetViolationStatus() -func (l *library) DeviceGetViolationStatus(device Device, perfPolicyType PerfPolicyType) (ViolationTime, Return) { +func (l *library) DeviceGetViolationStatus(device Device, perfPolicyType PerfPolicyType) (ViolationTime, error) { return device.GetViolationStatus(perfPolicyType) } -func (device nvmlDevice) GetViolationStatus(perfPolicyType PerfPolicyType) (ViolationTime, Return) { +func (device nvmlDevice) GetViolationStatus(perfPolicyType PerfPolicyType) (ViolationTime, error) { var violTime ViolationTime ret := nvmlDeviceGetViolationStatus(device, perfPolicyType, &violTime) - return violTime, ret + return violTime, ret.error() } // nvml.DeviceGetIrqNum() -func (l *library) DeviceGetIrqNum(device Device) (int, Return) { +func (l *library) DeviceGetIrqNum(device Device) (int, error) { return device.GetIrqNum() } -func (device nvmlDevice) GetIrqNum() (int, Return) { +func (device nvmlDevice) GetIrqNum() (int, error) { var irqNum uint32 ret := nvmlDeviceGetIrqNum(device, &irqNum) - return int(irqNum), ret + return int(irqNum), ret.error() } // nvml.DeviceGetNumGpuCores() -func (l *library) DeviceGetNumGpuCores(device Device) (int, Return) { +func (l *library) DeviceGetNumGpuCores(device Device) (int, error) { return device.GetNumGpuCores() } -func (device nvmlDevice) GetNumGpuCores() (int, Return) { +func (device nvmlDevice) GetNumGpuCores() (int, error) { var numCores uint32 ret := nvmlDeviceGetNumGpuCores(device, &numCores) - return int(numCores), ret + return int(numCores), ret.error() } // nvml.DeviceGetPowerSource() -func (l *library) DeviceGetPowerSource(device Device) (PowerSource, Return) { +func (l *library) DeviceGetPowerSource(device Device) (PowerSource, error) { return device.GetPowerSource() } -func (device nvmlDevice) GetPowerSource() (PowerSource, Return) { +func (device nvmlDevice) GetPowerSource() (PowerSource, error) { var powerSource PowerSource ret := nvmlDeviceGetPowerSource(device, &powerSource) - return powerSource, ret + return powerSource, ret.error() } // nvml.DeviceGetMemoryBusWidth() -func (l *library) DeviceGetMemoryBusWidth(device Device) (uint32, Return) { +func (l *library) DeviceGetMemoryBusWidth(device Device) (uint32, error) { return device.GetMemoryBusWidth() } -func (device nvmlDevice) GetMemoryBusWidth() (uint32, Return) { +func (device nvmlDevice) GetMemoryBusWidth() (uint32, error) { var busWidth uint32 ret := nvmlDeviceGetMemoryBusWidth(device, &busWidth) - return busWidth, ret + return busWidth, ret.error() } // nvml.DeviceGetPcieLinkMaxSpeed() -func (l *library) DeviceGetPcieLinkMaxSpeed(device Device) (uint32, Return) { +func (l *library) DeviceGetPcieLinkMaxSpeed(device Device) (uint32, error) { return device.GetPcieLinkMaxSpeed() } -func (device nvmlDevice) GetPcieLinkMaxSpeed() (uint32, Return) { +func (device nvmlDevice) GetPcieLinkMaxSpeed() (uint32, error) { var maxSpeed uint32 ret := nvmlDeviceGetPcieLinkMaxSpeed(device, &maxSpeed) - return maxSpeed, ret + return maxSpeed, ret.error() } // nvml.DeviceGetAdaptiveClockInfoStatus() -func (l *library) DeviceGetAdaptiveClockInfoStatus(device Device) (uint32, Return) { +func (l *library) DeviceGetAdaptiveClockInfoStatus(device Device) (uint32, error) { return device.GetAdaptiveClockInfoStatus() } -func (device nvmlDevice) GetAdaptiveClockInfoStatus() (uint32, Return) { +func (device nvmlDevice) GetAdaptiveClockInfoStatus() (uint32, error) { var adaptiveClockStatus uint32 ret := nvmlDeviceGetAdaptiveClockInfoStatus(device, &adaptiveClockStatus) - return adaptiveClockStatus, ret + return adaptiveClockStatus, ret.error() } // nvml.DeviceGetAccountingMode() -func (l *library) DeviceGetAccountingMode(device Device) (EnableState, Return) { +func (l *library) DeviceGetAccountingMode(device Device) (EnableState, error) { return device.GetAccountingMode() } -func (device nvmlDevice) GetAccountingMode() (EnableState, Return) { +func (device nvmlDevice) GetAccountingMode() (EnableState, error) { var mode EnableState ret := nvmlDeviceGetAccountingMode(device, &mode) - return mode, ret + return mode, ret.error() } // nvml.DeviceGetAccountingStats() -func (l *library) DeviceGetAccountingStats(device Device, pid uint32) (AccountingStats, Return) { +func (l *library) DeviceGetAccountingStats(device Device, pid uint32) (AccountingStats, error) { return device.GetAccountingStats(pid) } -func (device nvmlDevice) GetAccountingStats(pid uint32) (AccountingStats, Return) { +func (device nvmlDevice) GetAccountingStats(pid uint32) (AccountingStats, error) { var stats AccountingStats ret := nvmlDeviceGetAccountingStats(device, pid, &stats) - return stats, ret + return stats, ret.error() } // nvml.DeviceGetAccountingPids() -func (l *library) DeviceGetAccountingPids(device Device) ([]int, Return) { +func (l *library) DeviceGetAccountingPids(device Device) ([]int, error) { return device.GetAccountingPids() } -func (device nvmlDevice) GetAccountingPids() ([]int, Return) { +func (device nvmlDevice) GetAccountingPids() ([]int, error) { var count uint32 = 1 // Will be reduced upon returning for { pids := make([]uint32, count) ret := nvmlDeviceGetAccountingPids(device, &count, &pids[0]) - if ret == SUCCESS { - return uint32SliceToIntSlice(pids[:count]), ret + if ret == nvmlSUCCESS { + return uint32SliceToIntSlice(pids[:count]), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } count *= 2 } } // nvml.DeviceGetAccountingBufferSize() -func (l *library) DeviceGetAccountingBufferSize(device Device) (int, Return) { +func (l *library) DeviceGetAccountingBufferSize(device Device) (int, error) { return device.GetAccountingBufferSize() } -func (device nvmlDevice) GetAccountingBufferSize() (int, Return) { +func (device nvmlDevice) GetAccountingBufferSize() (int, error) { var bufferSize uint32 ret := nvmlDeviceGetAccountingBufferSize(device, &bufferSize) - return int(bufferSize), ret + return int(bufferSize), ret.error() } // nvml.DeviceGetRetiredPages() -func (l *library) DeviceGetRetiredPages(device Device, cause PageRetirementCause) ([]uint64, Return) { +func (l *library) DeviceGetRetiredPages(device Device, cause PageRetirementCause) ([]uint64, error) { return device.GetRetiredPages(cause) } -func (device nvmlDevice) GetRetiredPages(cause PageRetirementCause) ([]uint64, Return) { +func (device nvmlDevice) GetRetiredPages(cause PageRetirementCause) ([]uint64, error) { var pageCount uint32 = 1 // Will be reduced upon returning for { addresses := make([]uint64, pageCount) ret := nvmlDeviceGetRetiredPages(device, cause, &pageCount, &addresses[0]) - if ret == SUCCESS { - return addresses[:pageCount], ret + if ret == nvmlSUCCESS { + return addresses[:pageCount], ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } pageCount *= 2 } } // nvml.DeviceGetRetiredPages_v2() -func (l *library) DeviceGetRetiredPages_v2(device Device, cause PageRetirementCause) ([]uint64, []uint64, Return) { +func (l *library) DeviceGetRetiredPages_v2(device Device, cause PageRetirementCause) ([]uint64, []uint64, error) { return device.GetRetiredPages_v2(cause) } -func (device nvmlDevice) GetRetiredPages_v2(cause PageRetirementCause) ([]uint64, []uint64, Return) { +func (device nvmlDevice) GetRetiredPages_v2(cause PageRetirementCause) ([]uint64, []uint64, error) { var pageCount uint32 = 1 // Will be reduced upon returning for { addresses := make([]uint64, pageCount) timestamps := make([]uint64, pageCount) ret := nvmlDeviceGetRetiredPages_v2(device, cause, &pageCount, &addresses[0], ×tamps[0]) - if ret == SUCCESS { - return addresses[:pageCount], timestamps[:pageCount], ret + if ret == nvmlSUCCESS { + return addresses[:pageCount], timestamps[:pageCount], ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, nil, ret.error() } pageCount *= 2 } } // nvml.DeviceGetRetiredPagesPendingStatus() -func (l *library) DeviceGetRetiredPagesPendingStatus(device Device) (EnableState, Return) { +func (l *library) DeviceGetRetiredPagesPendingStatus(device Device) (EnableState, error) { return device.GetRetiredPagesPendingStatus() } -func (device nvmlDevice) GetRetiredPagesPendingStatus() (EnableState, Return) { +func (device nvmlDevice) GetRetiredPagesPendingStatus() (EnableState, error) { var isPending EnableState ret := nvmlDeviceGetRetiredPagesPendingStatus(device, &isPending) - return isPending, ret + return isPending, ret.error() } // nvml.DeviceSetPersistenceMode() -func (l *library) DeviceSetPersistenceMode(device Device, mode EnableState) Return { +func (l *library) DeviceSetPersistenceMode(device Device, mode EnableState) error { return device.SetPersistenceMode(mode) } -func (device nvmlDevice) SetPersistenceMode(mode EnableState) Return { - return nvmlDeviceSetPersistenceMode(device, mode) +func (device nvmlDevice) SetPersistenceMode(mode EnableState) error { + return nvmlDeviceSetPersistenceMode(device, mode).error() } // nvml.DeviceSetComputeMode() -func (l *library) DeviceSetComputeMode(device Device, mode ComputeMode) Return { +func (l *library) DeviceSetComputeMode(device Device, mode ComputeMode) error { return device.SetComputeMode(mode) } -func (device nvmlDevice) SetComputeMode(mode ComputeMode) Return { - return nvmlDeviceSetComputeMode(device, mode) +func (device nvmlDevice) SetComputeMode(mode ComputeMode) error { + return nvmlDeviceSetComputeMode(device, mode).error() } // nvml.DeviceSetEccMode() -func (l *library) DeviceSetEccMode(device Device, ecc EnableState) Return { +func (l *library) DeviceSetEccMode(device Device, ecc EnableState) error { return device.SetEccMode(ecc) } -func (device nvmlDevice) SetEccMode(ecc EnableState) Return { - return nvmlDeviceSetEccMode(device, ecc) +func (device nvmlDevice) SetEccMode(ecc EnableState) error { + return nvmlDeviceSetEccMode(device, ecc).error() } // nvml.DeviceClearEccErrorCounts() -func (l *library) DeviceClearEccErrorCounts(device Device, counterType EccCounterType) Return { +func (l *library) DeviceClearEccErrorCounts(device Device, counterType EccCounterType) error { return device.ClearEccErrorCounts(counterType) } -func (device nvmlDevice) ClearEccErrorCounts(counterType EccCounterType) Return { - return nvmlDeviceClearEccErrorCounts(device, counterType) +func (device nvmlDevice) ClearEccErrorCounts(counterType EccCounterType) error { + return nvmlDeviceClearEccErrorCounts(device, counterType).error() } // nvml.DeviceSetDriverModel() -func (l *library) DeviceSetDriverModel(device Device, driverModel DriverModel, flags uint32) Return { +func (l *library) DeviceSetDriverModel(device Device, driverModel DriverModel, flags uint32) error { return device.SetDriverModel(driverModel, flags) } -func (device nvmlDevice) SetDriverModel(driverModel DriverModel, flags uint32) Return { - return nvmlDeviceSetDriverModel(device, driverModel, flags) +func (device nvmlDevice) SetDriverModel(driverModel DriverModel, flags uint32) error { + return nvmlDeviceSetDriverModel(device, driverModel, flags).error() } // nvml.DeviceSetGpuLockedClocks() -func (l *library) DeviceSetGpuLockedClocks(device Device, minGpuClockMHz uint32, maxGpuClockMHz uint32) Return { +func (l *library) DeviceSetGpuLockedClocks(device Device, minGpuClockMHz uint32, maxGpuClockMHz uint32) error { return device.SetGpuLockedClocks(minGpuClockMHz, maxGpuClockMHz) } -func (device nvmlDevice) SetGpuLockedClocks(minGpuClockMHz uint32, maxGpuClockMHz uint32) Return { - return nvmlDeviceSetGpuLockedClocks(device, minGpuClockMHz, maxGpuClockMHz) +func (device nvmlDevice) SetGpuLockedClocks(minGpuClockMHz uint32, maxGpuClockMHz uint32) error { + return nvmlDeviceSetGpuLockedClocks(device, minGpuClockMHz, maxGpuClockMHz).error() } // nvml.DeviceResetGpuLockedClocks() -func (l *library) DeviceResetGpuLockedClocks(device Device) Return { +func (l *library) DeviceResetGpuLockedClocks(device Device) error { return device.ResetGpuLockedClocks() } -func (device nvmlDevice) ResetGpuLockedClocks() Return { - return nvmlDeviceResetGpuLockedClocks(device) +func (device nvmlDevice) ResetGpuLockedClocks() error { + return nvmlDeviceResetGpuLockedClocks(device).error() } // nvmlDeviceSetMemoryLockedClocks() -func (l *library) DeviceSetMemoryLockedClocks(device Device, minMemClockMHz uint32, maxMemClockMHz uint32) Return { +func (l *library) DeviceSetMemoryLockedClocks(device Device, minMemClockMHz uint32, maxMemClockMHz uint32) error { return device.SetMemoryLockedClocks(minMemClockMHz, maxMemClockMHz) } -func (device nvmlDevice) SetMemoryLockedClocks(minMemClockMHz uint32, maxMemClockMHz uint32) Return { - return nvmlDeviceSetMemoryLockedClocks(device, minMemClockMHz, maxMemClockMHz) +func (device nvmlDevice) SetMemoryLockedClocks(minMemClockMHz uint32, maxMemClockMHz uint32) error { + return nvmlDeviceSetMemoryLockedClocks(device, minMemClockMHz, maxMemClockMHz).error() } // nvmlDeviceResetMemoryLockedClocks() -func (l *library) DeviceResetMemoryLockedClocks(device Device) Return { +func (l *library) DeviceResetMemoryLockedClocks(device Device) error { return device.ResetMemoryLockedClocks() } -func (device nvmlDevice) ResetMemoryLockedClocks() Return { - return nvmlDeviceResetMemoryLockedClocks(device) +func (device nvmlDevice) ResetMemoryLockedClocks() error { + return nvmlDeviceResetMemoryLockedClocks(device).error() } // nvml.DeviceGetClkMonStatus() -func (l *library) DeviceGetClkMonStatus(device Device) (ClkMonStatus, Return) { +func (l *library) DeviceGetClkMonStatus(device Device) (ClkMonStatus, error) { return device.GetClkMonStatus() } -func (device nvmlDevice) GetClkMonStatus() (ClkMonStatus, Return) { +func (device nvmlDevice) GetClkMonStatus() (ClkMonStatus, error) { var status ClkMonStatus ret := nvmlDeviceGetClkMonStatus(device, &status) - return status, ret + return status, ret.error() } // nvml.DeviceSetApplicationsClocks() -func (l *library) DeviceSetApplicationsClocks(device Device, memClockMHz uint32, graphicsClockMHz uint32) Return { +func (l *library) DeviceSetApplicationsClocks(device Device, memClockMHz uint32, graphicsClockMHz uint32) error { return device.SetApplicationsClocks(memClockMHz, graphicsClockMHz) } -func (device nvmlDevice) SetApplicationsClocks(memClockMHz uint32, graphicsClockMHz uint32) Return { - return nvmlDeviceSetApplicationsClocks(device, memClockMHz, graphicsClockMHz) +func (device nvmlDevice) SetApplicationsClocks(memClockMHz uint32, graphicsClockMHz uint32) error { + return nvmlDeviceSetApplicationsClocks(device, memClockMHz, graphicsClockMHz).error() } // nvml.DeviceSetPowerManagementLimit() -func (l *library) DeviceSetPowerManagementLimit(device Device, limit uint32) Return { +func (l *library) DeviceSetPowerManagementLimit(device Device, limit uint32) error { return device.SetPowerManagementLimit(limit) } -func (device nvmlDevice) SetPowerManagementLimit(limit uint32) Return { - return nvmlDeviceSetPowerManagementLimit(device, limit) +func (device nvmlDevice) SetPowerManagementLimit(limit uint32) error { + return nvmlDeviceSetPowerManagementLimit(device, limit).error() } // nvml.DeviceSetGpuOperationMode() -func (l *library) DeviceSetGpuOperationMode(device Device, mode GpuOperationMode) Return { +func (l *library) DeviceSetGpuOperationMode(device Device, mode GpuOperationMode) error { return device.SetGpuOperationMode(mode) } -func (device nvmlDevice) SetGpuOperationMode(mode GpuOperationMode) Return { - return nvmlDeviceSetGpuOperationMode(device, mode) +func (device nvmlDevice) SetGpuOperationMode(mode GpuOperationMode) error { + return nvmlDeviceSetGpuOperationMode(device, mode).error() } // nvml.DeviceSetAPIRestriction() -func (l *library) DeviceSetAPIRestriction(device Device, apiType RestrictedAPI, isRestricted EnableState) Return { +func (l *library) DeviceSetAPIRestriction(device Device, apiType RestrictedAPI, isRestricted EnableState) error { return device.SetAPIRestriction(apiType, isRestricted) } -func (device nvmlDevice) SetAPIRestriction(apiType RestrictedAPI, isRestricted EnableState) Return { - return nvmlDeviceSetAPIRestriction(device, apiType, isRestricted) +func (device nvmlDevice) SetAPIRestriction(apiType RestrictedAPI, isRestricted EnableState) error { + return nvmlDeviceSetAPIRestriction(device, apiType, isRestricted).error() } // nvml.DeviceSetAccountingMode() -func (l *library) DeviceSetAccountingMode(device Device, mode EnableState) Return { +func (l *library) DeviceSetAccountingMode(device Device, mode EnableState) error { return device.SetAccountingMode(mode) } -func (device nvmlDevice) SetAccountingMode(mode EnableState) Return { - return nvmlDeviceSetAccountingMode(device, mode) +func (device nvmlDevice) SetAccountingMode(mode EnableState) error { + return nvmlDeviceSetAccountingMode(device, mode).error() } // nvml.DeviceClearAccountingPids() -func (l *library) DeviceClearAccountingPids(device Device) Return { +func (l *library) DeviceClearAccountingPids(device Device) error { return device.ClearAccountingPids() } -func (device nvmlDevice) ClearAccountingPids() Return { - return nvmlDeviceClearAccountingPids(device) +func (device nvmlDevice) ClearAccountingPids() error { + return nvmlDeviceClearAccountingPids(device).error() } // nvml.DeviceGetNvLinkState() -func (l *library) DeviceGetNvLinkState(device Device, link int) (EnableState, Return) { +func (l *library) DeviceGetNvLinkState(device Device, link int) (EnableState, error) { return device.GetNvLinkState(link) } -func (device nvmlDevice) GetNvLinkState(link int) (EnableState, Return) { +func (device nvmlDevice) GetNvLinkState(link int) (EnableState, error) { var isActive EnableState ret := nvmlDeviceGetNvLinkState(device, uint32(link), &isActive) - return isActive, ret + return isActive, ret.error() } // nvml.DeviceGetNvLinkVersion() -func (l *library) DeviceGetNvLinkVersion(device Device, link int) (uint32, Return) { +func (l *library) DeviceGetNvLinkVersion(device Device, link int) (uint32, error) { return device.GetNvLinkVersion(link) } -func (device nvmlDevice) GetNvLinkVersion(link int) (uint32, Return) { +func (device nvmlDevice) GetNvLinkVersion(link int) (uint32, error) { var version uint32 ret := nvmlDeviceGetNvLinkVersion(device, uint32(link), &version) - return version, ret + return version, ret.error() } // nvml.DeviceGetNvLinkCapability() -func (l *library) DeviceGetNvLinkCapability(device Device, link int, capability NvLinkCapability) (uint32, Return) { +func (l *library) DeviceGetNvLinkCapability(device Device, link int, capability NvLinkCapability) (uint32, error) { return device.GetNvLinkCapability(link, capability) } -func (device nvmlDevice) GetNvLinkCapability(link int, capability NvLinkCapability) (uint32, Return) { +func (device nvmlDevice) GetNvLinkCapability(link int, capability NvLinkCapability) (uint32, error) { var capResult uint32 ret := nvmlDeviceGetNvLinkCapability(device, uint32(link), capability, &capResult) - return capResult, ret + return capResult, ret.error() } // nvml.DeviceGetNvLinkRemotePciInfo() -func (l *library) DeviceGetNvLinkRemotePciInfo(device Device, link int) (PciInfo, Return) { +func (l *library) DeviceGetNvLinkRemotePciInfo(device Device, link int) (PciInfo, error) { return device.GetNvLinkRemotePciInfo(link) } -func (device nvmlDevice) GetNvLinkRemotePciInfo(link int) (PciInfo, Return) { +func (device nvmlDevice) GetNvLinkRemotePciInfo(link int) (PciInfo, error) { var pci PciInfo ret := nvmlDeviceGetNvLinkRemotePciInfo(device, uint32(link), &pci) - return pci, ret + return pci, ret.error() } // nvml.DeviceGetNvLinkErrorCounter() -func (l *library) DeviceGetNvLinkErrorCounter(device Device, link int, counter NvLinkErrorCounter) (uint64, Return) { +func (l *library) DeviceGetNvLinkErrorCounter(device Device, link int, counter NvLinkErrorCounter) (uint64, error) { return device.GetNvLinkErrorCounter(link, counter) } -func (device nvmlDevice) GetNvLinkErrorCounter(link int, counter NvLinkErrorCounter) (uint64, Return) { +func (device nvmlDevice) GetNvLinkErrorCounter(link int, counter NvLinkErrorCounter) (uint64, error) { var counterValue uint64 ret := nvmlDeviceGetNvLinkErrorCounter(device, uint32(link), counter, &counterValue) - return counterValue, ret + return counterValue, ret.error() } // nvml.DeviceResetNvLinkErrorCounters() -func (l *library) DeviceResetNvLinkErrorCounters(device Device, link int) Return { +func (l *library) DeviceResetNvLinkErrorCounters(device Device, link int) error { return device.ResetNvLinkErrorCounters(link) } -func (device nvmlDevice) ResetNvLinkErrorCounters(link int) Return { - return nvmlDeviceResetNvLinkErrorCounters(device, uint32(link)) +func (device nvmlDevice) ResetNvLinkErrorCounters(link int) error { + return nvmlDeviceResetNvLinkErrorCounters(device, uint32(link)).error() } // nvml.DeviceSetNvLinkUtilizationControl() -func (l *library) DeviceSetNvLinkUtilizationControl(device Device, link int, counter int, control *NvLinkUtilizationControl, reset bool) Return { +func (l *library) DeviceSetNvLinkUtilizationControl(device Device, link int, counter int, control *NvLinkUtilizationControl, reset bool) error { return device.SetNvLinkUtilizationControl(link, counter, control, reset) } -func (device nvmlDevice) SetNvLinkUtilizationControl(link int, counter int, control *NvLinkUtilizationControl, reset bool) Return { +func (device nvmlDevice) SetNvLinkUtilizationControl(link int, counter int, control *NvLinkUtilizationControl, reset bool) error { resetValue := uint32(0) if reset { resetValue = 1 } - return nvmlDeviceSetNvLinkUtilizationControl(device, uint32(link), uint32(counter), control, resetValue) + return nvmlDeviceSetNvLinkUtilizationControl(device, uint32(link), uint32(counter), control, resetValue).error() } // nvml.DeviceGetNvLinkUtilizationControl() -func (l *library) DeviceGetNvLinkUtilizationControl(device Device, link int, counter int) (NvLinkUtilizationControl, Return) { +func (l *library) DeviceGetNvLinkUtilizationControl(device Device, link int, counter int) (NvLinkUtilizationControl, error) { return device.GetNvLinkUtilizationControl(link, counter) } -func (device nvmlDevice) GetNvLinkUtilizationControl(link int, counter int) (NvLinkUtilizationControl, Return) { +func (device nvmlDevice) GetNvLinkUtilizationControl(link int, counter int) (NvLinkUtilizationControl, error) { var control NvLinkUtilizationControl ret := nvmlDeviceGetNvLinkUtilizationControl(device, uint32(link), uint32(counter), &control) - return control, ret + return control, ret.error() } // nvml.DeviceGetNvLinkUtilizationCounter() -func (l *library) DeviceGetNvLinkUtilizationCounter(device Device, link int, counter int) (uint64, uint64, Return) { +func (l *library) DeviceGetNvLinkUtilizationCounter(device Device, link int, counter int) (uint64, uint64, error) { return device.GetNvLinkUtilizationCounter(link, counter) } -func (device nvmlDevice) GetNvLinkUtilizationCounter(link int, counter int) (uint64, uint64, Return) { +func (device nvmlDevice) GetNvLinkUtilizationCounter(link int, counter int) (uint64, uint64, error) { var rxCounter, txCounter uint64 ret := nvmlDeviceGetNvLinkUtilizationCounter(device, uint32(link), uint32(counter), &rxCounter, &txCounter) - return rxCounter, txCounter, ret + return rxCounter, txCounter, ret.error() } // nvml.DeviceFreezeNvLinkUtilizationCounter() -func (l *library) DeviceFreezeNvLinkUtilizationCounter(device Device, link int, counter int, freeze EnableState) Return { +func (l *library) DeviceFreezeNvLinkUtilizationCounter(device Device, link int, counter int, freeze EnableState) error { return device.FreezeNvLinkUtilizationCounter(link, counter, freeze) } -func (device nvmlDevice) FreezeNvLinkUtilizationCounter(link int, counter int, freeze EnableState) Return { - return nvmlDeviceFreezeNvLinkUtilizationCounter(device, uint32(link), uint32(counter), freeze) +func (device nvmlDevice) FreezeNvLinkUtilizationCounter(link int, counter int, freeze EnableState) error { + return nvmlDeviceFreezeNvLinkUtilizationCounter(device, uint32(link), uint32(counter), freeze).error() } // nvml.DeviceResetNvLinkUtilizationCounter() -func (l *library) DeviceResetNvLinkUtilizationCounter(device Device, link int, counter int) Return { +func (l *library) DeviceResetNvLinkUtilizationCounter(device Device, link int, counter int) error { return device.ResetNvLinkUtilizationCounter(link, counter) } -func (device nvmlDevice) ResetNvLinkUtilizationCounter(link int, counter int) Return { - return nvmlDeviceResetNvLinkUtilizationCounter(device, uint32(link), uint32(counter)) +func (device nvmlDevice) ResetNvLinkUtilizationCounter(link int, counter int) error { + return nvmlDeviceResetNvLinkUtilizationCounter(device, uint32(link), uint32(counter)).error() } // nvml.DeviceGetNvLinkRemoteDeviceType() -func (l *library) DeviceGetNvLinkRemoteDeviceType(device Device, link int) (IntNvLinkDeviceType, Return) { +func (l *library) DeviceGetNvLinkRemoteDeviceType(device Device, link int) (IntNvLinkDeviceType, error) { return device.GetNvLinkRemoteDeviceType(link) } -func (device nvmlDevice) GetNvLinkRemoteDeviceType(link int) (IntNvLinkDeviceType, Return) { +func (device nvmlDevice) GetNvLinkRemoteDeviceType(link int) (IntNvLinkDeviceType, error) { var nvLinkDeviceType IntNvLinkDeviceType ret := nvmlDeviceGetNvLinkRemoteDeviceType(device, uint32(link), &nvLinkDeviceType) - return nvLinkDeviceType, ret + return nvLinkDeviceType, ret.error() } // nvml.DeviceRegisterEvents() -func (l *library) DeviceRegisterEvents(device Device, eventTypes uint64, set EventSet) Return { +func (l *library) DeviceRegisterEvents(device Device, eventTypes uint64, set EventSet) error { return device.RegisterEvents(eventTypes, set) } -func (device nvmlDevice) RegisterEvents(eventTypes uint64, set EventSet) Return { - return nvmlDeviceRegisterEvents(device, eventTypes, set.(nvmlEventSet)) +func (device nvmlDevice) RegisterEvents(eventTypes uint64, set EventSet) error { + return nvmlDeviceRegisterEvents(device, eventTypes, set.(nvmlEventSet)).error() } // nvmlDeviceGetSupportedEventTypes() -func (l *library) DeviceGetSupportedEventTypes(device Device) (uint64, Return) { +func (l *library) DeviceGetSupportedEventTypes(device Device) (uint64, error) { return device.GetSupportedEventTypes() } -func (device nvmlDevice) GetSupportedEventTypes() (uint64, Return) { +func (device nvmlDevice) GetSupportedEventTypes() (uint64, error) { var eventTypes uint64 ret := nvmlDeviceGetSupportedEventTypes(device, &eventTypes) - return eventTypes, ret + return eventTypes, ret.error() } // nvml.DeviceModifyDrainState() -func (l *library) DeviceModifyDrainState(pciInfo *PciInfo, newState EnableState) Return { - return nvmlDeviceModifyDrainState(pciInfo, newState) +func (l *library) DeviceModifyDrainState(pciInfo *PciInfo, newState EnableState) error { + return nvmlDeviceModifyDrainState(pciInfo, newState).error() } // nvml.DeviceQueryDrainState() -func (l *library) DeviceQueryDrainState(pciInfo *PciInfo) (EnableState, Return) { +func (l *library) DeviceQueryDrainState(pciInfo *PciInfo) (EnableState, error) { var currentState EnableState ret := nvmlDeviceQueryDrainState(pciInfo, ¤tState) - return currentState, ret + return currentState, ret.error() } // nvml.DeviceRemoveGpu() -func (l *library) DeviceRemoveGpu(pciInfo *PciInfo) Return { - return nvmlDeviceRemoveGpu(pciInfo) +func (l *library) DeviceRemoveGpu(pciInfo *PciInfo) error { + return nvmlDeviceRemoveGpu(pciInfo).error() } // nvml.DeviceRemoveGpu_v2() -func (l *library) DeviceRemoveGpu_v2(pciInfo *PciInfo, gpuState DetachGpuState, linkState PcieLinkState) Return { - return nvmlDeviceRemoveGpu_v2(pciInfo, gpuState, linkState) +func (l *library) DeviceRemoveGpu_v2(pciInfo *PciInfo, gpuState DetachGpuState, linkState PcieLinkState) error { + return nvmlDeviceRemoveGpu_v2(pciInfo, gpuState, linkState).error() } // nvml.DeviceDiscoverGpus() -func (l *library) DeviceDiscoverGpus() (PciInfo, Return) { +func (l *library) DeviceDiscoverGpus() (PciInfo, error) { var pciInfo PciInfo ret := nvmlDeviceDiscoverGpus(&pciInfo) - return pciInfo, ret + return pciInfo, ret.error() } // nvml.DeviceGetFieldValues() -func (l *library) DeviceGetFieldValues(device Device, values []FieldValue) Return { +func (l *library) DeviceGetFieldValues(device Device, values []FieldValue) error { return device.GetFieldValues(values) } -func (device nvmlDevice) GetFieldValues(values []FieldValue) Return { +func (device nvmlDevice) GetFieldValues(values []FieldValue) error { valuesCount := len(values) - return nvmlDeviceGetFieldValues(device, int32(valuesCount), &values[0]) + return nvmlDeviceGetFieldValues(device, int32(valuesCount), &values[0]).error() } // nvml.DeviceGetVirtualizationMode() -func (l *library) DeviceGetVirtualizationMode(device Device) (GpuVirtualizationMode, Return) { +func (l *library) DeviceGetVirtualizationMode(device Device) (GpuVirtualizationMode, error) { return device.GetVirtualizationMode() } -func (device nvmlDevice) GetVirtualizationMode() (GpuVirtualizationMode, Return) { +func (device nvmlDevice) GetVirtualizationMode() (GpuVirtualizationMode, error) { var pVirtualMode GpuVirtualizationMode ret := nvmlDeviceGetVirtualizationMode(device, &pVirtualMode) - return pVirtualMode, ret + return pVirtualMode, ret.error() } // nvml.DeviceGetHostVgpuMode() -func (l *library) DeviceGetHostVgpuMode(device Device) (HostVgpuMode, Return) { +func (l *library) DeviceGetHostVgpuMode(device Device) (HostVgpuMode, error) { return device.GetHostVgpuMode() } -func (device nvmlDevice) GetHostVgpuMode() (HostVgpuMode, Return) { +func (device nvmlDevice) GetHostVgpuMode() (HostVgpuMode, error) { var pHostVgpuMode HostVgpuMode ret := nvmlDeviceGetHostVgpuMode(device, &pHostVgpuMode) - return pHostVgpuMode, ret + return pHostVgpuMode, ret.error() } // nvml.DeviceSetVirtualizationMode() -func (l *library) DeviceSetVirtualizationMode(device Device, virtualMode GpuVirtualizationMode) Return { +func (l *library) DeviceSetVirtualizationMode(device Device, virtualMode GpuVirtualizationMode) error { return device.SetVirtualizationMode(virtualMode) } -func (device nvmlDevice) SetVirtualizationMode(virtualMode GpuVirtualizationMode) Return { - return nvmlDeviceSetVirtualizationMode(device, virtualMode) +func (device nvmlDevice) SetVirtualizationMode(virtualMode GpuVirtualizationMode) error { + return nvmlDeviceSetVirtualizationMode(device, virtualMode).error() } // nvml.DeviceGetGridLicensableFeatures() -func (l *library) DeviceGetGridLicensableFeatures(device Device) (GridLicensableFeatures, Return) { +func (l *library) DeviceGetGridLicensableFeatures(device Device) (GridLicensableFeatures, error) { return device.GetGridLicensableFeatures() } -func (device nvmlDevice) GetGridLicensableFeatures() (GridLicensableFeatures, Return) { +func (device nvmlDevice) GetGridLicensableFeatures() (GridLicensableFeatures, error) { var pGridLicensableFeatures GridLicensableFeatures ret := nvmlDeviceGetGridLicensableFeatures(device, &pGridLicensableFeatures) - return pGridLicensableFeatures, ret + return pGridLicensableFeatures, ret.error() } // nvml.DeviceGetProcessUtilization() -func (l *library) DeviceGetProcessUtilization(device Device, lastSeenTimestamp uint64) ([]ProcessUtilizationSample, Return) { +func (l *library) DeviceGetProcessUtilization(device Device, lastSeenTimestamp uint64) ([]ProcessUtilizationSample, error) { return device.GetProcessUtilization(lastSeenTimestamp) } -func (device nvmlDevice) GetProcessUtilization(lastSeenTimestamp uint64) ([]ProcessUtilizationSample, Return) { +func (device nvmlDevice) GetProcessUtilization(lastSeenTimestamp uint64) ([]ProcessUtilizationSample, error) { var processSamplesCount uint32 ret := nvmlDeviceGetProcessUtilization(device, nil, &processSamplesCount, lastSeenTimestamp) - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } if processSamplesCount == 0 { - return []ProcessUtilizationSample{}, ret + return []ProcessUtilizationSample{}, ret.error() } utilization := make([]ProcessUtilizationSample, processSamplesCount) ret = nvmlDeviceGetProcessUtilization(device, &utilization[0], &processSamplesCount, lastSeenTimestamp) - return utilization[:processSamplesCount], ret + return utilization[:processSamplesCount], ret.error() } // nvml.DeviceGetSupportedVgpus() -func (l *library) DeviceGetSupportedVgpus(device Device) ([]VgpuTypeId, Return) { +func (l *library) DeviceGetSupportedVgpus(device Device) ([]VgpuTypeId, error) { return device.GetSupportedVgpus() } -func (device nvmlDevice) GetSupportedVgpus() ([]VgpuTypeId, Return) { +func (device nvmlDevice) GetSupportedVgpus() ([]VgpuTypeId, error) { var vgpuCount uint32 = 1 // Will be reduced upon returning for { vgpuTypeIds := make([]nvmlVgpuTypeId, vgpuCount) ret := nvmlDeviceGetSupportedVgpus(device, &vgpuCount, &vgpuTypeIds[0]) - if ret == SUCCESS { - return convertSlice[nvmlVgpuTypeId, VgpuTypeId](vgpuTypeIds[:vgpuCount]), ret + if ret == nvmlSUCCESS { + return convertSlice[nvmlVgpuTypeId, VgpuTypeId](vgpuTypeIds[:vgpuCount]), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } vgpuCount *= 2 } } // nvml.DeviceGetCreatableVgpus() -func (l *library) DeviceGetCreatableVgpus(device Device) ([]VgpuTypeId, Return) { +func (l *library) DeviceGetCreatableVgpus(device Device) ([]VgpuTypeId, error) { return device.GetCreatableVgpus() } -func (device nvmlDevice) GetCreatableVgpus() ([]VgpuTypeId, Return) { +func (device nvmlDevice) GetCreatableVgpus() ([]VgpuTypeId, error) { var vgpuCount uint32 = 1 // Will be reduced upon returning for { vgpuTypeIds := make([]nvmlVgpuTypeId, vgpuCount) ret := nvmlDeviceGetCreatableVgpus(device, &vgpuCount, &vgpuTypeIds[0]) - if ret == SUCCESS { - return convertSlice[nvmlVgpuTypeId, VgpuTypeId](vgpuTypeIds[:vgpuCount]), ret + if ret == nvmlSUCCESS { + return convertSlice[nvmlVgpuTypeId, VgpuTypeId](vgpuTypeIds[:vgpuCount]), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } vgpuCount *= 2 } } // nvml.DeviceGetActiveVgpus() -func (l *library) DeviceGetActiveVgpus(device Device) ([]VgpuInstance, Return) { +func (l *library) DeviceGetActiveVgpus(device Device) ([]VgpuInstance, error) { return device.GetActiveVgpus() } -func (device nvmlDevice) GetActiveVgpus() ([]VgpuInstance, Return) { +func (device nvmlDevice) GetActiveVgpus() ([]VgpuInstance, error) { var vgpuCount uint32 = 1 // Will be reduced upon returning for { vgpuInstances := make([]nvmlVgpuInstance, vgpuCount) ret := nvmlDeviceGetActiveVgpus(device, &vgpuCount, &vgpuInstances[0]) - if ret == SUCCESS { - return convertSlice[nvmlVgpuInstance, VgpuInstance](vgpuInstances[:vgpuCount]), ret + if ret == nvmlSUCCESS { + return convertSlice[nvmlVgpuInstance, VgpuInstance](vgpuInstances[:vgpuCount]), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } vgpuCount *= 2 } } // nvml.DeviceGetVgpuMetadata() -func (l *library) DeviceGetVgpuMetadata(device Device) (VgpuPgpuMetadata, Return) { +func (l *library) DeviceGetVgpuMetadata(device Device) (VgpuPgpuMetadata, error) { return device.GetVgpuMetadata() } -func (device nvmlDevice) GetVgpuMetadata() (VgpuPgpuMetadata, Return) { +func (device nvmlDevice) GetVgpuMetadata() (VgpuPgpuMetadata, error) { var vgpuPgpuMetadata VgpuPgpuMetadata opaqueDataSize := unsafe.Sizeof(vgpuPgpuMetadata.nvmlVgpuPgpuMetadata.OpaqueData) vgpuPgpuMetadataSize := unsafe.Sizeof(vgpuPgpuMetadata.nvmlVgpuPgpuMetadata) - opaqueDataSize @@ -1920,168 +1922,168 @@ func (device nvmlDevice) GetVgpuMetadata() (VgpuPgpuMetadata, Return) { buffer := make([]byte, bufferSize) nvmlVgpuPgpuMetadataPtr := (*nvmlVgpuPgpuMetadata)(unsafe.Pointer(&buffer[0])) ret := nvmlDeviceGetVgpuMetadata(device, nvmlVgpuPgpuMetadataPtr, &bufferSize) - if ret == SUCCESS { + if ret == nvmlSUCCESS { vgpuPgpuMetadata.nvmlVgpuPgpuMetadata = *nvmlVgpuPgpuMetadataPtr vgpuPgpuMetadata.OpaqueData = buffer[vgpuPgpuMetadataSize:bufferSize] - return vgpuPgpuMetadata, ret + return vgpuPgpuMetadata, ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return vgpuPgpuMetadata, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return vgpuPgpuMetadata, ret.error() } opaqueDataSize = 2 * opaqueDataSize } } // nvml.DeviceGetPgpuMetadataString() -func (l *library) DeviceGetPgpuMetadataString(device Device) (string, Return) { +func (l *library) DeviceGetPgpuMetadataString(device Device) (string, error) { return device.GetPgpuMetadataString() } -func (device nvmlDevice) GetPgpuMetadataString() (string, Return) { +func (device nvmlDevice) GetPgpuMetadataString() (string, error) { var bufferSize uint32 = 1 // Will be reduced upon returning for { pgpuMetadata := make([]byte, bufferSize) ret := nvmlDeviceGetPgpuMetadataString(device, &pgpuMetadata[0], &bufferSize) - if ret == SUCCESS { - return string(pgpuMetadata[:clen(pgpuMetadata)]), ret + if ret == nvmlSUCCESS { + return string(pgpuMetadata[:clen(pgpuMetadata)]), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return "", ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return "", ret.error() } bufferSize *= 2 } } // nvml.DeviceGetVgpuUtilization() -func (l *library) DeviceGetVgpuUtilization(device Device, lastSeenTimestamp uint64) (ValueType, []VgpuInstanceUtilizationSample, Return) { +func (l *library) DeviceGetVgpuUtilization(device Device, lastSeenTimestamp uint64) (ValueType, []VgpuInstanceUtilizationSample, error) { return device.GetVgpuUtilization(lastSeenTimestamp) } -func (device nvmlDevice) GetVgpuUtilization(lastSeenTimestamp uint64) (ValueType, []VgpuInstanceUtilizationSample, Return) { +func (device nvmlDevice) GetVgpuUtilization(lastSeenTimestamp uint64) (ValueType, []VgpuInstanceUtilizationSample, error) { var sampleValType ValueType var vgpuInstanceSamplesCount uint32 = 1 // Will be reduced upon returning for { utilizationSamples := make([]VgpuInstanceUtilizationSample, vgpuInstanceSamplesCount) ret := nvmlDeviceGetVgpuUtilization(device, lastSeenTimestamp, &sampleValType, &vgpuInstanceSamplesCount, &utilizationSamples[0]) - if ret == SUCCESS { - return sampleValType, utilizationSamples[:vgpuInstanceSamplesCount], ret + if ret == nvmlSUCCESS { + return sampleValType, utilizationSamples[:vgpuInstanceSamplesCount], ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return sampleValType, nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return sampleValType, nil, ret.error() } vgpuInstanceSamplesCount *= 2 } } // nvml.DeviceGetAttributes() -func (l *library) DeviceGetAttributes(device Device) (DeviceAttributes, Return) { +func (l *library) DeviceGetAttributes(device Device) (DeviceAttributes, error) { return device.GetAttributes() } -func (device nvmlDevice) GetAttributes() (DeviceAttributes, Return) { +func (device nvmlDevice) GetAttributes() (DeviceAttributes, error) { var attributes DeviceAttributes ret := nvmlDeviceGetAttributes(device, &attributes) - return attributes, ret + return attributes, ret.error() } // nvml.DeviceGetRemappedRows() -func (l *library) DeviceGetRemappedRows(device Device) (int, int, bool, bool, Return) { +func (l *library) DeviceGetRemappedRows(device Device) (int, int, bool, bool, error) { return device.GetRemappedRows() } -func (device nvmlDevice) GetRemappedRows() (int, int, bool, bool, Return) { +func (device nvmlDevice) GetRemappedRows() (int, int, bool, bool, error) { var corrRows, uncRows, isPending, failureOccured uint32 ret := nvmlDeviceGetRemappedRows(device, &corrRows, &uncRows, &isPending, &failureOccured) - return int(corrRows), int(uncRows), (isPending != 0), (failureOccured != 0), ret + return int(corrRows), int(uncRows), (isPending != 0), (failureOccured != 0), ret.error() } // nvml.DeviceGetRowRemapperHistogram() -func (l *library) DeviceGetRowRemapperHistogram(device Device) (RowRemapperHistogramValues, Return) { +func (l *library) DeviceGetRowRemapperHistogram(device Device) (RowRemapperHistogramValues, error) { return device.GetRowRemapperHistogram() } -func (device nvmlDevice) GetRowRemapperHistogram() (RowRemapperHistogramValues, Return) { +func (device nvmlDevice) GetRowRemapperHistogram() (RowRemapperHistogramValues, error) { var values RowRemapperHistogramValues ret := nvmlDeviceGetRowRemapperHistogram(device, &values) - return values, ret + return values, ret.error() } // nvml.DeviceGetArchitecture() -func (l *library) DeviceGetArchitecture(device Device) (DeviceArchitecture, Return) { +func (l *library) DeviceGetArchitecture(device Device) (DeviceArchitecture, error) { return device.GetArchitecture() } -func (device nvmlDevice) GetArchitecture() (DeviceArchitecture, Return) { +func (device nvmlDevice) GetArchitecture() (DeviceArchitecture, error) { var arch DeviceArchitecture ret := nvmlDeviceGetArchitecture(device, &arch) - return arch, ret + return arch, ret.error() } // nvml.DeviceGetVgpuProcessUtilization() -func (l *library) DeviceGetVgpuProcessUtilization(device Device, lastSeenTimestamp uint64) ([]VgpuProcessUtilizationSample, Return) { +func (l *library) DeviceGetVgpuProcessUtilization(device Device, lastSeenTimestamp uint64) ([]VgpuProcessUtilizationSample, error) { return device.GetVgpuProcessUtilization(lastSeenTimestamp) } -func (device nvmlDevice) GetVgpuProcessUtilization(lastSeenTimestamp uint64) ([]VgpuProcessUtilizationSample, Return) { +func (device nvmlDevice) GetVgpuProcessUtilization(lastSeenTimestamp uint64) ([]VgpuProcessUtilizationSample, error) { var vgpuProcessSamplesCount uint32 = 1 // Will be reduced upon returning for { utilizationSamples := make([]VgpuProcessUtilizationSample, vgpuProcessSamplesCount) ret := nvmlDeviceGetVgpuProcessUtilization(device, lastSeenTimestamp, &vgpuProcessSamplesCount, &utilizationSamples[0]) - if ret == SUCCESS { - return utilizationSamples[:vgpuProcessSamplesCount], ret + if ret == nvmlSUCCESS { + return utilizationSamples[:vgpuProcessSamplesCount], ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } vgpuProcessSamplesCount *= 2 } } // nvml.GetExcludedDeviceCount() -func (l *library) GetExcludedDeviceCount() (int, Return) { +func (l *library) GetExcludedDeviceCount() (int, error) { var deviceCount uint32 ret := nvmlGetExcludedDeviceCount(&deviceCount) - return int(deviceCount), ret + return int(deviceCount), ret.error() } // nvml.GetExcludedDeviceInfoByIndex() -func (l *library) GetExcludedDeviceInfoByIndex(index int) (ExcludedDeviceInfo, Return) { +func (l *library) GetExcludedDeviceInfoByIndex(index int) (ExcludedDeviceInfo, error) { var info ExcludedDeviceInfo ret := nvmlGetExcludedDeviceInfoByIndex(uint32(index), &info) - return info, ret + return info, ret.error() } // nvml.DeviceSetMigMode() -func (l *library) DeviceSetMigMode(device Device, mode int) (Return, Return) { +func (l *library) DeviceSetMigMode(device Device, mode int) (error, error) { return device.SetMigMode(mode) } -func (device nvmlDevice) SetMigMode(mode int) (Return, Return) { +func (device nvmlDevice) SetMigMode(mode int) (error, error) { var activationStatus Return ret := nvmlDeviceSetMigMode(device, uint32(mode), &activationStatus) - return activationStatus, ret + return activationStatus.error(), ret.error() } // nvml.DeviceGetMigMode() -func (l *library) DeviceGetMigMode(device Device) (int, int, Return) { +func (l *library) DeviceGetMigMode(device Device) (int, int, error) { return device.GetMigMode() } -func (device nvmlDevice) GetMigMode() (int, int, Return) { +func (device nvmlDevice) GetMigMode() (int, int, error) { var currentMode, pendingMode uint32 ret := nvmlDeviceGetMigMode(device, ¤tMode, &pendingMode) - return int(currentMode), int(pendingMode), ret + return int(currentMode), int(pendingMode), ret.error() } // nvml.DeviceGetGpuInstanceProfileInfo() -func (l *library) DeviceGetGpuInstanceProfileInfo(device Device, profile int) (GpuInstanceProfileInfo, Return) { +func (l *library) DeviceGetGpuInstanceProfileInfo(device Device, profile int) (GpuInstanceProfileInfo, error) { return device.GetGpuInstanceProfileInfo(profile) } -func (device nvmlDevice) GetGpuInstanceProfileInfo(profile int) (GpuInstanceProfileInfo, Return) { +func (device nvmlDevice) GetGpuInstanceProfileInfo(profile int) (GpuInstanceProfileInfo, error) { var info GpuInstanceProfileInfo ret := nvmlDeviceGetGpuInstanceProfileInfo(device, uint32(profile), &info) - return info, ret + return info, ret.error() } // nvml.DeviceGetGpuInstanceProfileInfoV() @@ -2090,15 +2092,15 @@ type GpuInstanceProfileInfoHandler struct { profile int } -func (handler GpuInstanceProfileInfoHandler) V1() (GpuInstanceProfileInfo, Return) { +func (handler GpuInstanceProfileInfoHandler) V1() (GpuInstanceProfileInfo, error) { return DeviceGetGpuInstanceProfileInfo(handler.device, handler.profile) } -func (handler GpuInstanceProfileInfoHandler) V2() (GpuInstanceProfileInfo_v2, Return) { +func (handler GpuInstanceProfileInfoHandler) V2() (GpuInstanceProfileInfo_v2, error) { var info GpuInstanceProfileInfo_v2 info.Version = STRUCT_VERSION(info, 2) ret := nvmlDeviceGetGpuInstanceProfileInfoV(handler.device, uint32(handler.profile), &info) - return info, ret + return info, ret.error() } func (l *library) DeviceGetGpuInstanceProfileInfoV(device Device, profile int) GpuInstanceProfileInfoHandler { @@ -2110,124 +2112,124 @@ func (device nvmlDevice) GetGpuInstanceProfileInfoV(profile int) GpuInstanceProf } // nvml.DeviceGetGpuInstancePossiblePlacements() -func (l *library) DeviceGetGpuInstancePossiblePlacements(device Device, info *GpuInstanceProfileInfo) ([]GpuInstancePlacement, Return) { +func (l *library) DeviceGetGpuInstancePossiblePlacements(device Device, info *GpuInstanceProfileInfo) ([]GpuInstancePlacement, error) { return device.GetGpuInstancePossiblePlacements(info) } -func (device nvmlDevice) GetGpuInstancePossiblePlacements(info *GpuInstanceProfileInfo) ([]GpuInstancePlacement, Return) { +func (device nvmlDevice) GetGpuInstancePossiblePlacements(info *GpuInstanceProfileInfo) ([]GpuInstancePlacement, error) { if info == nil { return nil, ERROR_INVALID_ARGUMENT } var count uint32 ret := nvmlDeviceGetGpuInstancePossiblePlacements(device, info.Id, nil, &count) - if ret != SUCCESS { - return nil, ret + if ret != nvmlSUCCESS { + return nil, ret.error() } if count == 0 { - return []GpuInstancePlacement{}, ret + return []GpuInstancePlacement{}, ret.error() } placements := make([]GpuInstancePlacement, count) ret = nvmlDeviceGetGpuInstancePossiblePlacements(device, info.Id, &placements[0], &count) - return placements[:count], ret + return placements[:count], ret.error() } // nvml.DeviceGetGpuInstanceRemainingCapacity() -func (l *library) DeviceGetGpuInstanceRemainingCapacity(device Device, info *GpuInstanceProfileInfo) (int, Return) { +func (l *library) DeviceGetGpuInstanceRemainingCapacity(device Device, info *GpuInstanceProfileInfo) (int, error) { return device.GetGpuInstanceRemainingCapacity(info) } -func (device nvmlDevice) GetGpuInstanceRemainingCapacity(info *GpuInstanceProfileInfo) (int, Return) { +func (device nvmlDevice) GetGpuInstanceRemainingCapacity(info *GpuInstanceProfileInfo) (int, error) { if info == nil { return 0, ERROR_INVALID_ARGUMENT } var count uint32 ret := nvmlDeviceGetGpuInstanceRemainingCapacity(device, info.Id, &count) - return int(count), ret + return int(count), ret.error() } // nvml.DeviceCreateGpuInstance() -func (l *library) DeviceCreateGpuInstance(device Device, info *GpuInstanceProfileInfo) (GpuInstance, Return) { +func (l *library) DeviceCreateGpuInstance(device Device, info *GpuInstanceProfileInfo) (GpuInstance, error) { return device.CreateGpuInstance(info) } -func (device nvmlDevice) CreateGpuInstance(info *GpuInstanceProfileInfo) (GpuInstance, Return) { +func (device nvmlDevice) CreateGpuInstance(info *GpuInstanceProfileInfo) (GpuInstance, error) { if info == nil { return nil, ERROR_INVALID_ARGUMENT } var gpuInstance nvmlGpuInstance ret := nvmlDeviceCreateGpuInstance(device, info.Id, &gpuInstance) - return gpuInstance, ret + return gpuInstance, ret.error() } // nvml.DeviceCreateGpuInstanceWithPlacement() -func (l *library) DeviceCreateGpuInstanceWithPlacement(device Device, info *GpuInstanceProfileInfo, placement *GpuInstancePlacement) (GpuInstance, Return) { +func (l *library) DeviceCreateGpuInstanceWithPlacement(device Device, info *GpuInstanceProfileInfo, placement *GpuInstancePlacement) (GpuInstance, error) { return device.CreateGpuInstanceWithPlacement(info, placement) } -func (device nvmlDevice) CreateGpuInstanceWithPlacement(info *GpuInstanceProfileInfo, placement *GpuInstancePlacement) (GpuInstance, Return) { +func (device nvmlDevice) CreateGpuInstanceWithPlacement(info *GpuInstanceProfileInfo, placement *GpuInstancePlacement) (GpuInstance, error) { if info == nil { return nil, ERROR_INVALID_ARGUMENT } var gpuInstance nvmlGpuInstance ret := nvmlDeviceCreateGpuInstanceWithPlacement(device, info.Id, placement, &gpuInstance) - return gpuInstance, ret + return gpuInstance, ret.error() } // nvml.GpuInstanceDestroy() -func (l *library) GpuInstanceDestroy(gpuInstance GpuInstance) Return { +func (l *library) GpuInstanceDestroy(gpuInstance GpuInstance) error { return gpuInstance.Destroy() } -func (gpuInstance nvmlGpuInstance) Destroy() Return { - return nvmlGpuInstanceDestroy(gpuInstance) +func (gpuInstance nvmlGpuInstance) Destroy() error { + return nvmlGpuInstanceDestroy(gpuInstance).error() } // nvml.DeviceGetGpuInstances() -func (l *library) DeviceGetGpuInstances(device Device, info *GpuInstanceProfileInfo) ([]GpuInstance, Return) { +func (l *library) DeviceGetGpuInstances(device Device, info *GpuInstanceProfileInfo) ([]GpuInstance, error) { return device.GetGpuInstances(info) } -func (device nvmlDevice) GetGpuInstances(info *GpuInstanceProfileInfo) ([]GpuInstance, Return) { +func (device nvmlDevice) GetGpuInstances(info *GpuInstanceProfileInfo) ([]GpuInstance, error) { if info == nil { return nil, ERROR_INVALID_ARGUMENT } var count uint32 = info.InstanceCount gpuInstances := make([]nvmlGpuInstance, count) ret := nvmlDeviceGetGpuInstances(device, info.Id, &gpuInstances[0], &count) - return convertSlice[nvmlGpuInstance, GpuInstance](gpuInstances[:count]), ret + return convertSlice[nvmlGpuInstance, GpuInstance](gpuInstances[:count]), ret.error() } // nvml.DeviceGetGpuInstanceById() -func (l *library) DeviceGetGpuInstanceById(device Device, id int) (GpuInstance, Return) { +func (l *library) DeviceGetGpuInstanceById(device Device, id int) (GpuInstance, error) { return device.GetGpuInstanceById(id) } -func (device nvmlDevice) GetGpuInstanceById(id int) (GpuInstance, Return) { +func (device nvmlDevice) GetGpuInstanceById(id int) (GpuInstance, error) { var gpuInstance nvmlGpuInstance ret := nvmlDeviceGetGpuInstanceById(device, uint32(id), &gpuInstance) - return gpuInstance, ret + return gpuInstance, ret.error() } // nvml.GpuInstanceGetInfo() -func (l *library) GpuInstanceGetInfo(gpuInstance GpuInstance) (GpuInstanceInfo, Return) { +func (l *library) GpuInstanceGetInfo(gpuInstance GpuInstance) (GpuInstanceInfo, error) { return gpuInstance.GetInfo() } -func (gpuInstance nvmlGpuInstance) GetInfo() (GpuInstanceInfo, Return) { +func (gpuInstance nvmlGpuInstance) GetInfo() (GpuInstanceInfo, error) { var info nvmlGpuInstanceInfo ret := nvmlGpuInstanceGetInfo(gpuInstance, &info) - return info.convert(), ret + return info.convert(), ret.error() } // nvml.GpuInstanceGetComputeInstanceProfileInfo() -func (l *library) GpuInstanceGetComputeInstanceProfileInfo(gpuInstance GpuInstance, profile int, engProfile int) (ComputeInstanceProfileInfo, Return) { +func (l *library) GpuInstanceGetComputeInstanceProfileInfo(gpuInstance GpuInstance, profile int, engProfile int) (ComputeInstanceProfileInfo, error) { return gpuInstance.GetComputeInstanceProfileInfo(profile, engProfile) } -func (gpuInstance nvmlGpuInstance) GetComputeInstanceProfileInfo(profile int, engProfile int) (ComputeInstanceProfileInfo, Return) { +func (gpuInstance nvmlGpuInstance) GetComputeInstanceProfileInfo(profile int, engProfile int) (ComputeInstanceProfileInfo, error) { var info ComputeInstanceProfileInfo ret := nvmlGpuInstanceGetComputeInstanceProfileInfo(gpuInstance, uint32(profile), uint32(engProfile), &info) - return info, ret + return info, ret.error() } // nvml.GpuInstanceGetComputeInstanceProfileInfoV() @@ -2237,15 +2239,15 @@ type ComputeInstanceProfileInfoHandler struct { engProfile int } -func (handler ComputeInstanceProfileInfoHandler) V1() (ComputeInstanceProfileInfo, Return) { +func (handler ComputeInstanceProfileInfoHandler) V1() (ComputeInstanceProfileInfo, error) { return GpuInstanceGetComputeInstanceProfileInfo(handler.gpuInstance, handler.profile, handler.engProfile) } -func (handler ComputeInstanceProfileInfoHandler) V2() (ComputeInstanceProfileInfo_v2, Return) { +func (handler ComputeInstanceProfileInfoHandler) V2() (ComputeInstanceProfileInfo_v2, error) { var info ComputeInstanceProfileInfo_v2 info.Version = STRUCT_VERSION(info, 2) ret := nvmlGpuInstanceGetComputeInstanceProfileInfoV(handler.gpuInstance, uint32(handler.profile), uint32(handler.engProfile), &info) - return info, ret + return info, ret.error() } func (l *library) GpuInstanceGetComputeInstanceProfileInfoV(gpuInstance GpuInstance, profile int, engProfile int) ComputeInstanceProfileInfoHandler { @@ -2257,621 +2259,621 @@ func (gpuInstance nvmlGpuInstance) GetComputeInstanceProfileInfoV(profile int, e } // nvml.GpuInstanceGetComputeInstanceRemainingCapacity() -func (l *library) GpuInstanceGetComputeInstanceRemainingCapacity(gpuInstance GpuInstance, info *ComputeInstanceProfileInfo) (int, Return) { +func (l *library) GpuInstanceGetComputeInstanceRemainingCapacity(gpuInstance GpuInstance, info *ComputeInstanceProfileInfo) (int, error) { return gpuInstance.GetComputeInstanceRemainingCapacity(info) } -func (gpuInstance nvmlGpuInstance) GetComputeInstanceRemainingCapacity(info *ComputeInstanceProfileInfo) (int, Return) { +func (gpuInstance nvmlGpuInstance) GetComputeInstanceRemainingCapacity(info *ComputeInstanceProfileInfo) (int, error) { if info == nil { return 0, ERROR_INVALID_ARGUMENT } var count uint32 ret := nvmlGpuInstanceGetComputeInstanceRemainingCapacity(gpuInstance, info.Id, &count) - return int(count), ret + return int(count), ret.error() } // nvml.GpuInstanceCreateComputeInstance() -func (l *library) GpuInstanceCreateComputeInstance(gpuInstance GpuInstance, info *ComputeInstanceProfileInfo) (ComputeInstance, Return) { +func (l *library) GpuInstanceCreateComputeInstance(gpuInstance GpuInstance, info *ComputeInstanceProfileInfo) (ComputeInstance, error) { return gpuInstance.CreateComputeInstance(info) } -func (gpuInstance nvmlGpuInstance) CreateComputeInstance(info *ComputeInstanceProfileInfo) (ComputeInstance, Return) { +func (gpuInstance nvmlGpuInstance) CreateComputeInstance(info *ComputeInstanceProfileInfo) (ComputeInstance, error) { if info == nil { return nil, ERROR_INVALID_ARGUMENT } var computeInstance nvmlComputeInstance ret := nvmlGpuInstanceCreateComputeInstance(gpuInstance, info.Id, &computeInstance) - return computeInstance, ret + return computeInstance, ret.error() } // nvml.ComputeInstanceDestroy() -func (l *library) ComputeInstanceDestroy(computeInstance ComputeInstance) Return { +func (l *library) ComputeInstanceDestroy(computeInstance ComputeInstance) error { return computeInstance.Destroy() } -func (computeInstance nvmlComputeInstance) Destroy() Return { - return nvmlComputeInstanceDestroy(computeInstance) +func (computeInstance nvmlComputeInstance) Destroy() error { + return nvmlComputeInstanceDestroy(computeInstance).error() } // nvml.GpuInstanceGetComputeInstances() -func (l *library) GpuInstanceGetComputeInstances(gpuInstance GpuInstance, info *ComputeInstanceProfileInfo) ([]ComputeInstance, Return) { +func (l *library) GpuInstanceGetComputeInstances(gpuInstance GpuInstance, info *ComputeInstanceProfileInfo) ([]ComputeInstance, error) { return gpuInstance.GetComputeInstances(info) } -func (gpuInstance nvmlGpuInstance) GetComputeInstances(info *ComputeInstanceProfileInfo) ([]ComputeInstance, Return) { +func (gpuInstance nvmlGpuInstance) GetComputeInstances(info *ComputeInstanceProfileInfo) ([]ComputeInstance, error) { if info == nil { return nil, ERROR_INVALID_ARGUMENT } var count uint32 = info.InstanceCount computeInstances := make([]nvmlComputeInstance, count) ret := nvmlGpuInstanceGetComputeInstances(gpuInstance, info.Id, &computeInstances[0], &count) - return convertSlice[nvmlComputeInstance, ComputeInstance](computeInstances[:count]), ret + return convertSlice[nvmlComputeInstance, ComputeInstance](computeInstances[:count]), ret.error() } // nvml.GpuInstanceGetComputeInstanceById() -func (l *library) GpuInstanceGetComputeInstanceById(gpuInstance GpuInstance, id int) (ComputeInstance, Return) { +func (l *library) GpuInstanceGetComputeInstanceById(gpuInstance GpuInstance, id int) (ComputeInstance, error) { return gpuInstance.GetComputeInstanceById(id) } -func (gpuInstance nvmlGpuInstance) GetComputeInstanceById(id int) (ComputeInstance, Return) { +func (gpuInstance nvmlGpuInstance) GetComputeInstanceById(id int) (ComputeInstance, error) { var computeInstance nvmlComputeInstance ret := nvmlGpuInstanceGetComputeInstanceById(gpuInstance, uint32(id), &computeInstance) - return computeInstance, ret + return computeInstance, ret.error() } // nvml.ComputeInstanceGetInfo() -func (l *library) ComputeInstanceGetInfo(computeInstance ComputeInstance) (ComputeInstanceInfo, Return) { +func (l *library) ComputeInstanceGetInfo(computeInstance ComputeInstance) (ComputeInstanceInfo, error) { return computeInstance.GetInfo() } -func (computeInstance nvmlComputeInstance) GetInfo() (ComputeInstanceInfo, Return) { +func (computeInstance nvmlComputeInstance) GetInfo() (ComputeInstanceInfo, error) { var info nvmlComputeInstanceInfo ret := nvmlComputeInstanceGetInfo(computeInstance, &info) - return info.convert(), ret + return info.convert(), ret.error() } // nvml.DeviceIsMigDeviceHandle() -func (l *library) DeviceIsMigDeviceHandle(device Device) (bool, Return) { +func (l *library) DeviceIsMigDeviceHandle(device Device) (bool, error) { return device.IsMigDeviceHandle() } -func (device nvmlDevice) IsMigDeviceHandle() (bool, Return) { +func (device nvmlDevice) IsMigDeviceHandle() (bool, error) { var isMigDevice uint32 ret := nvmlDeviceIsMigDeviceHandle(device, &isMigDevice) - return (isMigDevice != 0), ret + return (isMigDevice != 0), ret.error() } // nvml DeviceGetGpuInstanceId() -func (l *library) DeviceGetGpuInstanceId(device Device) (int, Return) { +func (l *library) DeviceGetGpuInstanceId(device Device) (int, error) { return device.GetGpuInstanceId() } -func (device nvmlDevice) GetGpuInstanceId() (int, Return) { +func (device nvmlDevice) GetGpuInstanceId() (int, error) { var id uint32 ret := nvmlDeviceGetGpuInstanceId(device, &id) - return int(id), ret + return int(id), ret.error() } // nvml.DeviceGetComputeInstanceId() -func (l *library) DeviceGetComputeInstanceId(device Device) (int, Return) { +func (l *library) DeviceGetComputeInstanceId(device Device) (int, error) { return device.GetComputeInstanceId() } -func (device nvmlDevice) GetComputeInstanceId() (int, Return) { +func (device nvmlDevice) GetComputeInstanceId() (int, error) { var id uint32 ret := nvmlDeviceGetComputeInstanceId(device, &id) - return int(id), ret + return int(id), ret.error() } // nvml.DeviceGetMaxMigDeviceCount() -func (l *library) DeviceGetMaxMigDeviceCount(device Device) (int, Return) { +func (l *library) DeviceGetMaxMigDeviceCount(device Device) (int, error) { return device.GetMaxMigDeviceCount() } -func (device nvmlDevice) GetMaxMigDeviceCount() (int, Return) { +func (device nvmlDevice) GetMaxMigDeviceCount() (int, error) { var count uint32 ret := nvmlDeviceGetMaxMigDeviceCount(device, &count) - return int(count), ret + return int(count), ret.error() } // nvml.DeviceGetMigDeviceHandleByIndex() -func (l *library) DeviceGetMigDeviceHandleByIndex(device Device, index int) (Device, Return) { +func (l *library) DeviceGetMigDeviceHandleByIndex(device Device, index int) (Device, error) { return device.GetMigDeviceHandleByIndex(index) } -func (device nvmlDevice) GetMigDeviceHandleByIndex(index int) (Device, Return) { +func (device nvmlDevice) GetMigDeviceHandleByIndex(index int) (Device, error) { var migDevice nvmlDevice ret := nvmlDeviceGetMigDeviceHandleByIndex(device, uint32(index), &migDevice) - return migDevice, ret + return migDevice, ret.error() } // nvml.DeviceGetDeviceHandleFromMigDeviceHandle() -func (l *library) DeviceGetDeviceHandleFromMigDeviceHandle(migdevice Device) (Device, Return) { +func (l *library) DeviceGetDeviceHandleFromMigDeviceHandle(migdevice Device) (Device, error) { return migdevice.GetDeviceHandleFromMigDeviceHandle() } -func (migDevice nvmlDevice) GetDeviceHandleFromMigDeviceHandle() (Device, Return) { +func (migDevice nvmlDevice) GetDeviceHandleFromMigDeviceHandle() (Device, error) { var device nvmlDevice ret := nvmlDeviceGetDeviceHandleFromMigDeviceHandle(migDevice, &device) - return device, ret + return device, ret.error() } // nvml.DeviceGetBusType() -func (l *library) DeviceGetBusType(device Device) (BusType, Return) { +func (l *library) DeviceGetBusType(device Device) (BusType, error) { return device.GetBusType() } -func (device nvmlDevice) GetBusType() (BusType, Return) { +func (device nvmlDevice) GetBusType() (BusType, error) { var busType BusType ret := nvmlDeviceGetBusType(device, &busType) - return busType, ret + return busType, ret.error() } // nvml.DeviceSetDefaultFanSpeed_v2() -func (l *library) DeviceSetDefaultFanSpeed_v2(device Device, fan int) Return { +func (l *library) DeviceSetDefaultFanSpeed_v2(device Device, fan int) error { return device.SetDefaultFanSpeed_v2(fan) } -func (device nvmlDevice) SetDefaultFanSpeed_v2(fan int) Return { - return nvmlDeviceSetDefaultFanSpeed_v2(device, uint32(fan)) +func (device nvmlDevice) SetDefaultFanSpeed_v2(fan int) error { + return nvmlDeviceSetDefaultFanSpeed_v2(device, uint32(fan)).error() } // nvml.DeviceGetMinMaxFanSpeed() -func (l *library) DeviceGetMinMaxFanSpeed(device Device) (int, int, Return) { +func (l *library) DeviceGetMinMaxFanSpeed(device Device) (int, int, error) { return device.GetMinMaxFanSpeed() } -func (device nvmlDevice) GetMinMaxFanSpeed() (int, int, Return) { +func (device nvmlDevice) GetMinMaxFanSpeed() (int, int, error) { var minSpeed, maxSpeed uint32 ret := nvmlDeviceGetMinMaxFanSpeed(device, &minSpeed, &maxSpeed) - return int(minSpeed), int(maxSpeed), ret + return int(minSpeed), int(maxSpeed), ret.error() } // nvml.DeviceGetThermalSettings() -func (l *library) DeviceGetThermalSettings(device Device, sensorIndex uint32) (GpuThermalSettings, Return) { +func (l *library) DeviceGetThermalSettings(device Device, sensorIndex uint32) (GpuThermalSettings, error) { return device.GetThermalSettings(sensorIndex) } -func (device nvmlDevice) GetThermalSettings(sensorIndex uint32) (GpuThermalSettings, Return) { +func (device nvmlDevice) GetThermalSettings(sensorIndex uint32) (GpuThermalSettings, error) { var pThermalSettings GpuThermalSettings ret := nvmlDeviceGetThermalSettings(device, sensorIndex, &pThermalSettings) - return pThermalSettings, ret + return pThermalSettings, ret.error() } // nvml.DeviceGetDefaultEccMode() -func (l *library) DeviceGetDefaultEccMode(device Device) (EnableState, Return) { +func (l *library) DeviceGetDefaultEccMode(device Device) (EnableState, error) { return device.GetDefaultEccMode() } -func (device nvmlDevice) GetDefaultEccMode() (EnableState, Return) { +func (device nvmlDevice) GetDefaultEccMode() (EnableState, error) { var defaultMode EnableState ret := nvmlDeviceGetDefaultEccMode(device, &defaultMode) - return defaultMode, ret + return defaultMode, ret.error() } // nvml.DeviceGetPcieSpeed() -func (l *library) DeviceGetPcieSpeed(device Device) (int, Return) { +func (l *library) DeviceGetPcieSpeed(device Device) (int, error) { return device.GetPcieSpeed() } -func (device nvmlDevice) GetPcieSpeed() (int, Return) { +func (device nvmlDevice) GetPcieSpeed() (int, error) { var pcieSpeed uint32 ret := nvmlDeviceGetPcieSpeed(device, &pcieSpeed) - return int(pcieSpeed), ret + return int(pcieSpeed), ret.error() } // nvml.DeviceGetGspFirmwareVersion() -func (l *library) DeviceGetGspFirmwareVersion(device Device) (string, Return) { +func (l *library) DeviceGetGspFirmwareVersion(device Device) (string, error) { return device.GetGspFirmwareVersion() } -func (device nvmlDevice) GetGspFirmwareVersion() (string, Return) { +func (device nvmlDevice) GetGspFirmwareVersion() (string, error) { version := make([]byte, GSP_FIRMWARE_VERSION_BUF_SIZE) ret := nvmlDeviceGetGspFirmwareVersion(device, &version[0]) - return string(version[:clen(version)]), ret + return string(version[:clen(version)]), ret.error() } // nvml.DeviceGetGspFirmwareMode() -func (l *library) DeviceGetGspFirmwareMode(device Device) (bool, bool, Return) { +func (l *library) DeviceGetGspFirmwareMode(device Device) (bool, bool, error) { return device.GetGspFirmwareMode() } -func (device nvmlDevice) GetGspFirmwareMode() (bool, bool, Return) { +func (device nvmlDevice) GetGspFirmwareMode() (bool, bool, error) { var isEnabled, defaultMode uint32 ret := nvmlDeviceGetGspFirmwareMode(device, &isEnabled, &defaultMode) - return (isEnabled != 0), (defaultMode != 0), ret + return (isEnabled != 0), (defaultMode != 0), ret.error() } // nvml.DeviceGetDynamicPstatesInfo() -func (l *library) DeviceGetDynamicPstatesInfo(device Device) (GpuDynamicPstatesInfo, Return) { +func (l *library) DeviceGetDynamicPstatesInfo(device Device) (GpuDynamicPstatesInfo, error) { return device.GetDynamicPstatesInfo() } -func (device nvmlDevice) GetDynamicPstatesInfo() (GpuDynamicPstatesInfo, Return) { +func (device nvmlDevice) GetDynamicPstatesInfo() (GpuDynamicPstatesInfo, error) { var pDynamicPstatesInfo GpuDynamicPstatesInfo ret := nvmlDeviceGetDynamicPstatesInfo(device, &pDynamicPstatesInfo) - return pDynamicPstatesInfo, ret + return pDynamicPstatesInfo, ret.error() } // nvml.DeviceSetFanSpeed_v2() -func (l *library) DeviceSetFanSpeed_v2(device Device, fan int, speed int) Return { +func (l *library) DeviceSetFanSpeed_v2(device Device, fan int, speed int) error { return device.SetFanSpeed_v2(fan, speed) } -func (device nvmlDevice) SetFanSpeed_v2(fan int, speed int) Return { - return nvmlDeviceSetFanSpeed_v2(device, uint32(fan), uint32(speed)) +func (device nvmlDevice) SetFanSpeed_v2(fan int, speed int) error { + return nvmlDeviceSetFanSpeed_v2(device, uint32(fan), uint32(speed)).error() } // nvml.DeviceGetGpcClkVfOffset() -func (l *library) DeviceGetGpcClkVfOffset(device Device) (int, Return) { +func (l *library) DeviceGetGpcClkVfOffset(device Device) (int, error) { return device.GetGpcClkVfOffset() } -func (device nvmlDevice) GetGpcClkVfOffset() (int, Return) { +func (device nvmlDevice) GetGpcClkVfOffset() (int, error) { var offset int32 ret := nvmlDeviceGetGpcClkVfOffset(device, &offset) - return int(offset), ret + return int(offset), ret.error() } // nvml.DeviceSetGpcClkVfOffset() -func (l *library) DeviceSetGpcClkVfOffset(device Device, offset int) Return { +func (l *library) DeviceSetGpcClkVfOffset(device Device, offset int) error { return device.SetGpcClkVfOffset(offset) } -func (device nvmlDevice) SetGpcClkVfOffset(offset int) Return { - return nvmlDeviceSetGpcClkVfOffset(device, int32(offset)) +func (device nvmlDevice) SetGpcClkVfOffset(offset int) error { + return nvmlDeviceSetGpcClkVfOffset(device, int32(offset)).error() } // nvml.DeviceGetMinMaxClockOfPState() -func (l *library) DeviceGetMinMaxClockOfPState(device Device, clockType ClockType, pstate Pstates) (uint32, uint32, Return) { +func (l *library) DeviceGetMinMaxClockOfPState(device Device, clockType ClockType, pstate Pstates) (uint32, uint32, error) { return device.GetMinMaxClockOfPState(clockType, pstate) } -func (device nvmlDevice) GetMinMaxClockOfPState(clockType ClockType, pstate Pstates) (uint32, uint32, Return) { +func (device nvmlDevice) GetMinMaxClockOfPState(clockType ClockType, pstate Pstates) (uint32, uint32, error) { var minClockMHz, maxClockMHz uint32 ret := nvmlDeviceGetMinMaxClockOfPState(device, clockType, pstate, &minClockMHz, &maxClockMHz) - return minClockMHz, maxClockMHz, ret + return minClockMHz, maxClockMHz, ret.error() } // nvml.DeviceGetSupportedPerformanceStates() -func (l *library) DeviceGetSupportedPerformanceStates(device Device) ([]Pstates, Return) { +func (l *library) DeviceGetSupportedPerformanceStates(device Device) ([]Pstates, error) { return device.GetSupportedPerformanceStates() } -func (device nvmlDevice) GetSupportedPerformanceStates() ([]Pstates, Return) { +func (device nvmlDevice) GetSupportedPerformanceStates() ([]Pstates, error) { pstates := make([]Pstates, MAX_GPU_PERF_PSTATES) ret := nvmlDeviceGetSupportedPerformanceStates(device, &pstates[0], MAX_GPU_PERF_PSTATES) for i := 0; i < MAX_GPU_PERF_PSTATES; i++ { if pstates[i] == PSTATE_UNKNOWN { - return pstates[0:i], ret + return pstates[0:i], ret.error() } } - return pstates, ret + return pstates, ret.error() } // nvml.DeviceGetTargetFanSpeed() -func (l *library) DeviceGetTargetFanSpeed(device Device, fan int) (int, Return) { +func (l *library) DeviceGetTargetFanSpeed(device Device, fan int) (int, error) { return device.GetTargetFanSpeed(fan) } -func (device nvmlDevice) GetTargetFanSpeed(fan int) (int, Return) { +func (device nvmlDevice) GetTargetFanSpeed(fan int) (int, error) { var targetSpeed uint32 ret := nvmlDeviceGetTargetFanSpeed(device, uint32(fan), &targetSpeed) - return int(targetSpeed), ret + return int(targetSpeed), ret.error() } // nvml.DeviceGetMemClkVfOffset() -func (l *library) DeviceGetMemClkVfOffset(device Device) (int, Return) { +func (l *library) DeviceGetMemClkVfOffset(device Device) (int, error) { return device.GetMemClkVfOffset() } -func (device nvmlDevice) GetMemClkVfOffset() (int, Return) { +func (device nvmlDevice) GetMemClkVfOffset() (int, error) { var offset int32 ret := nvmlDeviceGetMemClkVfOffset(device, &offset) - return int(offset), ret + return int(offset), ret.error() } // nvml.DeviceSetMemClkVfOffset() -func (l *library) DeviceSetMemClkVfOffset(device Device, offset int) Return { +func (l *library) DeviceSetMemClkVfOffset(device Device, offset int) error { return device.SetMemClkVfOffset(offset) } -func (device nvmlDevice) SetMemClkVfOffset(offset int) Return { - return nvmlDeviceSetMemClkVfOffset(device, int32(offset)) +func (device nvmlDevice) SetMemClkVfOffset(offset int) error { + return nvmlDeviceSetMemClkVfOffset(device, int32(offset)).error() } // nvml.DeviceGetGpcClkMinMaxVfOffset() -func (l *library) DeviceGetGpcClkMinMaxVfOffset(device Device) (int, int, Return) { +func (l *library) DeviceGetGpcClkMinMaxVfOffset(device Device) (int, int, error) { return device.GetGpcClkMinMaxVfOffset() } -func (device nvmlDevice) GetGpcClkMinMaxVfOffset() (int, int, Return) { +func (device nvmlDevice) GetGpcClkMinMaxVfOffset() (int, int, error) { var minOffset, maxOffset int32 ret := nvmlDeviceGetGpcClkMinMaxVfOffset(device, &minOffset, &maxOffset) - return int(minOffset), int(maxOffset), ret + return int(minOffset), int(maxOffset), ret.error() } // nvml.DeviceGetMemClkMinMaxVfOffset() -func (l *library) DeviceGetMemClkMinMaxVfOffset(device Device) (int, int, Return) { +func (l *library) DeviceGetMemClkMinMaxVfOffset(device Device) (int, int, error) { return device.GetMemClkMinMaxVfOffset() } -func (device nvmlDevice) GetMemClkMinMaxVfOffset() (int, int, Return) { +func (device nvmlDevice) GetMemClkMinMaxVfOffset() (int, int, error) { var minOffset, maxOffset int32 ret := nvmlDeviceGetMemClkMinMaxVfOffset(device, &minOffset, &maxOffset) - return int(minOffset), int(maxOffset), ret + return int(minOffset), int(maxOffset), ret.error() } // nvml.DeviceGetGpuMaxPcieLinkGeneration() -func (l *library) DeviceGetGpuMaxPcieLinkGeneration(device Device) (int, Return) { +func (l *library) DeviceGetGpuMaxPcieLinkGeneration(device Device) (int, error) { return device.GetGpuMaxPcieLinkGeneration() } -func (device nvmlDevice) GetGpuMaxPcieLinkGeneration() (int, Return) { +func (device nvmlDevice) GetGpuMaxPcieLinkGeneration() (int, error) { var maxLinkGenDevice uint32 ret := nvmlDeviceGetGpuMaxPcieLinkGeneration(device, &maxLinkGenDevice) - return int(maxLinkGenDevice), ret + return int(maxLinkGenDevice), ret.error() } // nvml.DeviceGetFanControlPolicy_v2() -func (l *library) DeviceGetFanControlPolicy_v2(device Device, fan int) (FanControlPolicy, Return) { +func (l *library) DeviceGetFanControlPolicy_v2(device Device, fan int) (FanControlPolicy, error) { return device.GetFanControlPolicy_v2(fan) } -func (device nvmlDevice) GetFanControlPolicy_v2(fan int) (FanControlPolicy, Return) { +func (device nvmlDevice) GetFanControlPolicy_v2(fan int) (FanControlPolicy, error) { var policy FanControlPolicy ret := nvmlDeviceGetFanControlPolicy_v2(device, uint32(fan), &policy) - return policy, ret + return policy, ret.error() } // nvml.DeviceSetFanControlPolicy() -func (l *library) DeviceSetFanControlPolicy(device Device, fan int, policy FanControlPolicy) Return { +func (l *library) DeviceSetFanControlPolicy(device Device, fan int, policy FanControlPolicy) error { return device.SetFanControlPolicy(fan, policy) } -func (device nvmlDevice) SetFanControlPolicy(fan int, policy FanControlPolicy) Return { - return nvmlDeviceSetFanControlPolicy(device, uint32(fan), policy) +func (device nvmlDevice) SetFanControlPolicy(fan int, policy FanControlPolicy) error { + return nvmlDeviceSetFanControlPolicy(device, uint32(fan), policy).error() } // nvml.DeviceClearFieldValues() -func (l *library) DeviceClearFieldValues(device Device, values []FieldValue) Return { +func (l *library) DeviceClearFieldValues(device Device, values []FieldValue) error { return device.ClearFieldValues(values) } -func (device nvmlDevice) ClearFieldValues(values []FieldValue) Return { +func (device nvmlDevice) ClearFieldValues(values []FieldValue) error { valuesCount := len(values) - return nvmlDeviceClearFieldValues(device, int32(valuesCount), &values[0]) + return nvmlDeviceClearFieldValues(device, int32(valuesCount), &values[0]).error() } // nvml.DeviceGetVgpuCapabilities() -func (l *library) DeviceGetVgpuCapabilities(device Device, capability DeviceVgpuCapability) (bool, Return) { +func (l *library) DeviceGetVgpuCapabilities(device Device, capability DeviceVgpuCapability) (bool, error) { return device.GetVgpuCapabilities(capability) } -func (device nvmlDevice) GetVgpuCapabilities(capability DeviceVgpuCapability) (bool, Return) { +func (device nvmlDevice) GetVgpuCapabilities(capability DeviceVgpuCapability) (bool, error) { var capResult uint32 ret := nvmlDeviceGetVgpuCapabilities(device, capability, &capResult) - return (capResult != 0), ret + return (capResult != 0), ret.error() } // nvml.DeviceGetVgpuSchedulerLog() -func (l *library) DeviceGetVgpuSchedulerLog(device Device) (VgpuSchedulerLog, Return) { +func (l *library) DeviceGetVgpuSchedulerLog(device Device) (VgpuSchedulerLog, error) { return device.GetVgpuSchedulerLog() } -func (device nvmlDevice) GetVgpuSchedulerLog() (VgpuSchedulerLog, Return) { +func (device nvmlDevice) GetVgpuSchedulerLog() (VgpuSchedulerLog, error) { var pSchedulerLog VgpuSchedulerLog ret := nvmlDeviceGetVgpuSchedulerLog(device, &pSchedulerLog) - return pSchedulerLog, ret + return pSchedulerLog, ret.error() } // nvml.DeviceGetVgpuSchedulerState() -func (l *library) DeviceGetVgpuSchedulerState(device Device) (VgpuSchedulerGetState, Return) { +func (l *library) DeviceGetVgpuSchedulerState(device Device) (VgpuSchedulerGetState, error) { return device.GetVgpuSchedulerState() } -func (device nvmlDevice) GetVgpuSchedulerState() (VgpuSchedulerGetState, Return) { +func (device nvmlDevice) GetVgpuSchedulerState() (VgpuSchedulerGetState, error) { var pSchedulerState VgpuSchedulerGetState ret := nvmlDeviceGetVgpuSchedulerState(device, &pSchedulerState) - return pSchedulerState, ret + return pSchedulerState, ret.error() } // nvml.DeviceSetVgpuSchedulerState() -func (l *library) DeviceSetVgpuSchedulerState(device Device, pSchedulerState *VgpuSchedulerSetState) Return { +func (l *library) DeviceSetVgpuSchedulerState(device Device, pSchedulerState *VgpuSchedulerSetState) error { return device.SetVgpuSchedulerState(pSchedulerState) } -func (device nvmlDevice) SetVgpuSchedulerState(pSchedulerState *VgpuSchedulerSetState) Return { - return nvmlDeviceSetVgpuSchedulerState(device, pSchedulerState) +func (device nvmlDevice) SetVgpuSchedulerState(pSchedulerState *VgpuSchedulerSetState) error { + return nvmlDeviceSetVgpuSchedulerState(device, pSchedulerState).error() } // nvml.DeviceGetVgpuSchedulerCapabilities() -func (l *library) DeviceGetVgpuSchedulerCapabilities(device Device) (VgpuSchedulerCapabilities, Return) { +func (l *library) DeviceGetVgpuSchedulerCapabilities(device Device) (VgpuSchedulerCapabilities, error) { return device.GetVgpuSchedulerCapabilities() } -func (device nvmlDevice) GetVgpuSchedulerCapabilities() (VgpuSchedulerCapabilities, Return) { +func (device nvmlDevice) GetVgpuSchedulerCapabilities() (VgpuSchedulerCapabilities, error) { var pCapabilities VgpuSchedulerCapabilities ret := nvmlDeviceGetVgpuSchedulerCapabilities(device, &pCapabilities) - return pCapabilities, ret + return pCapabilities, ret.error() } // nvml.GpuInstanceGetComputeInstancePossiblePlacements() -func (l *library) GpuInstanceGetComputeInstancePossiblePlacements(gpuInstance GpuInstance, info *ComputeInstanceProfileInfo) ([]ComputeInstancePlacement, Return) { +func (l *library) GpuInstanceGetComputeInstancePossiblePlacements(gpuInstance GpuInstance, info *ComputeInstanceProfileInfo) ([]ComputeInstancePlacement, error) { return gpuInstance.GetComputeInstancePossiblePlacements(info) } -func (gpuInstance nvmlGpuInstance) GetComputeInstancePossiblePlacements(info *ComputeInstanceProfileInfo) ([]ComputeInstancePlacement, Return) { +func (gpuInstance nvmlGpuInstance) GetComputeInstancePossiblePlacements(info *ComputeInstanceProfileInfo) ([]ComputeInstancePlacement, error) { var count uint32 ret := nvmlGpuInstanceGetComputeInstancePossiblePlacements(gpuInstance, info.Id, nil, &count) - if ret != SUCCESS { - return nil, ret + if ret != nvmlSUCCESS { + return nil, ret.error() } if count == 0 { - return []ComputeInstancePlacement{}, ret + return []ComputeInstancePlacement{}, ret.error() } placementArray := make([]ComputeInstancePlacement, count) ret = nvmlGpuInstanceGetComputeInstancePossiblePlacements(gpuInstance, info.Id, &placementArray[0], &count) - return placementArray, ret + return placementArray, ret.error() } // nvml.GpuInstanceCreateComputeInstanceWithPlacement() -func (l *library) GpuInstanceCreateComputeInstanceWithPlacement(gpuInstance GpuInstance, info *ComputeInstanceProfileInfo, placement *ComputeInstancePlacement) (ComputeInstance, Return) { +func (l *library) GpuInstanceCreateComputeInstanceWithPlacement(gpuInstance GpuInstance, info *ComputeInstanceProfileInfo, placement *ComputeInstancePlacement) (ComputeInstance, error) { return gpuInstance.CreateComputeInstanceWithPlacement(info, placement) } -func (gpuInstance nvmlGpuInstance) CreateComputeInstanceWithPlacement(info *ComputeInstanceProfileInfo, placement *ComputeInstancePlacement) (ComputeInstance, Return) { +func (gpuInstance nvmlGpuInstance) CreateComputeInstanceWithPlacement(info *ComputeInstanceProfileInfo, placement *ComputeInstancePlacement) (ComputeInstance, error) { var computeInstance nvmlComputeInstance ret := nvmlGpuInstanceCreateComputeInstanceWithPlacement(gpuInstance, info.Id, placement, &computeInstance) - return computeInstance, ret + return computeInstance, ret.error() } // nvml.DeviceGetGpuFabricInfo() -func (l *library) DeviceGetGpuFabricInfo(device Device) (GpuFabricInfo, Return) { +func (l *library) DeviceGetGpuFabricInfo(device Device) (GpuFabricInfo, error) { return device.GetGpuFabricInfo() } -func (device nvmlDevice) GetGpuFabricInfo() (GpuFabricInfo, Return) { +func (device nvmlDevice) GetGpuFabricInfo() (GpuFabricInfo, error) { var gpuFabricInfo GpuFabricInfo ret := nvmlDeviceGetGpuFabricInfo(device, &gpuFabricInfo) - return gpuFabricInfo, ret + return gpuFabricInfo, ret.error() } // nvml.DeviceSetNvLinkDeviceLowPowerThreshold() -func (l *library) DeviceSetNvLinkDeviceLowPowerThreshold(device Device, info *NvLinkPowerThres) Return { +func (l *library) DeviceSetNvLinkDeviceLowPowerThreshold(device Device, info *NvLinkPowerThres) error { return device.SetNvLinkDeviceLowPowerThreshold(info) } -func (device nvmlDevice) SetNvLinkDeviceLowPowerThreshold(info *NvLinkPowerThres) Return { - return nvmlDeviceSetNvLinkDeviceLowPowerThreshold(device, info) +func (device nvmlDevice) SetNvLinkDeviceLowPowerThreshold(info *NvLinkPowerThres) error { + return nvmlDeviceSetNvLinkDeviceLowPowerThreshold(device, info).error() } // nvml.DeviceGetModuleId() -func (l *library) DeviceGetModuleId(device Device) (int, Return) { +func (l *library) DeviceGetModuleId(device Device) (int, error) { return device.GetModuleId() } -func (device nvmlDevice) GetModuleId() (int, Return) { +func (device nvmlDevice) GetModuleId() (int, error) { var moduleID uint32 ret := nvmlDeviceGetModuleId(device, &moduleID) - return int(moduleID), ret + return int(moduleID), ret.error() } // nvml.DeviceGetCurrentClocksEventReasons() -func (l *library) DeviceGetCurrentClocksEventReasons(device Device) (uint64, Return) { +func (l *library) DeviceGetCurrentClocksEventReasons(device Device) (uint64, error) { return device.GetCurrentClocksEventReasons() } -func (device nvmlDevice) GetCurrentClocksEventReasons() (uint64, Return) { +func (device nvmlDevice) GetCurrentClocksEventReasons() (uint64, error) { var clocksEventReasons uint64 ret := nvmlDeviceGetCurrentClocksEventReasons(device, &clocksEventReasons) - return clocksEventReasons, ret + return clocksEventReasons, ret.error() } // nvml.DeviceGetSupportedClocksEventReasons() -func (l *library) DeviceGetSupportedClocksEventReasons(device Device) (uint64, Return) { +func (l *library) DeviceGetSupportedClocksEventReasons(device Device) (uint64, error) { return device.GetSupportedClocksEventReasons() } -func (device nvmlDevice) GetSupportedClocksEventReasons() (uint64, Return) { +func (device nvmlDevice) GetSupportedClocksEventReasons() (uint64, error) { var supportedClocksEventReasons uint64 ret := nvmlDeviceGetSupportedClocksEventReasons(device, &supportedClocksEventReasons) - return supportedClocksEventReasons, ret + return supportedClocksEventReasons, ret.error() } // nvml.DeviceGetJpgUtilization() -func (l *library) DeviceGetJpgUtilization(device Device) (uint32, uint32, Return) { +func (l *library) DeviceGetJpgUtilization(device Device) (uint32, uint32, error) { return device.GetJpgUtilization() } -func (device nvmlDevice) GetJpgUtilization() (uint32, uint32, Return) { +func (device nvmlDevice) GetJpgUtilization() (uint32, uint32, error) { var utilization, samplingPeriodUs uint32 ret := nvmlDeviceGetJpgUtilization(device, &utilization, &samplingPeriodUs) - return utilization, samplingPeriodUs, ret + return utilization, samplingPeriodUs, ret.error() } // nvml.DeviceGetOfaUtilization() -func (l *library) DeviceGetOfaUtilization(device Device) (uint32, uint32, Return) { +func (l *library) DeviceGetOfaUtilization(device Device) (uint32, uint32, error) { return device.GetOfaUtilization() } -func (device nvmlDevice) GetOfaUtilization() (uint32, uint32, Return) { +func (device nvmlDevice) GetOfaUtilization() (uint32, uint32, error) { var utilization, samplingPeriodUs uint32 ret := nvmlDeviceGetOfaUtilization(device, &utilization, &samplingPeriodUs) - return utilization, samplingPeriodUs, ret + return utilization, samplingPeriodUs, ret.error() } // nvml.DeviceGetRunningProcessDetailList() -func (l *library) DeviceGetRunningProcessDetailList(device Device) (ProcessDetailList, Return) { +func (l *library) DeviceGetRunningProcessDetailList(device Device) (ProcessDetailList, error) { return device.GetRunningProcessDetailList() } -func (device nvmlDevice) GetRunningProcessDetailList() (ProcessDetailList, Return) { +func (device nvmlDevice) GetRunningProcessDetailList() (ProcessDetailList, error) { var plist ProcessDetailList ret := nvmlDeviceGetRunningProcessDetailList(device, &plist) - return plist, ret + return plist, ret.error() } // nvml.DeviceGetConfComputeMemSizeInfo() -func (l *library) DeviceGetConfComputeMemSizeInfo(device Device) (ConfComputeMemSizeInfo, Return) { +func (l *library) DeviceGetConfComputeMemSizeInfo(device Device) (ConfComputeMemSizeInfo, error) { return device.GetConfComputeMemSizeInfo() } -func (device nvmlDevice) GetConfComputeMemSizeInfo() (ConfComputeMemSizeInfo, Return) { +func (device nvmlDevice) GetConfComputeMemSizeInfo() (ConfComputeMemSizeInfo, error) { var memInfo ConfComputeMemSizeInfo ret := nvmlDeviceGetConfComputeMemSizeInfo(device, &memInfo) - return memInfo, ret + return memInfo, ret.error() } // nvml.DeviceGetConfComputeProtectedMemoryUsage() -func (l *library) DeviceGetConfComputeProtectedMemoryUsage(device Device) (Memory, Return) { +func (l *library) DeviceGetConfComputeProtectedMemoryUsage(device Device) (Memory, error) { return device.GetConfComputeProtectedMemoryUsage() } -func (device nvmlDevice) GetConfComputeProtectedMemoryUsage() (Memory, Return) { +func (device nvmlDevice) GetConfComputeProtectedMemoryUsage() (Memory, error) { var memory Memory ret := nvmlDeviceGetConfComputeProtectedMemoryUsage(device, &memory) - return memory, ret + return memory, ret.error() } // nvml.DeviceGetConfComputeGpuCertificate() -func (l *library) DeviceGetConfComputeGpuCertificate(device Device) (ConfComputeGpuCertificate, Return) { +func (l *library) DeviceGetConfComputeGpuCertificate(device Device) (ConfComputeGpuCertificate, error) { return device.GetConfComputeGpuCertificate() } -func (device nvmlDevice) GetConfComputeGpuCertificate() (ConfComputeGpuCertificate, Return) { +func (device nvmlDevice) GetConfComputeGpuCertificate() (ConfComputeGpuCertificate, error) { var gpuCert ConfComputeGpuCertificate ret := nvmlDeviceGetConfComputeGpuCertificate(device, &gpuCert) - return gpuCert, ret + return gpuCert, ret.error() } // nvml.DeviceGetConfComputeGpuAttestationReport() -func (l *library) DeviceGetConfComputeGpuAttestationReport(device Device) (ConfComputeGpuAttestationReport, Return) { +func (l *library) DeviceGetConfComputeGpuAttestationReport(device Device) (ConfComputeGpuAttestationReport, error) { return device.GetConfComputeGpuAttestationReport() } -func (device nvmlDevice) GetConfComputeGpuAttestationReport() (ConfComputeGpuAttestationReport, Return) { +func (device nvmlDevice) GetConfComputeGpuAttestationReport() (ConfComputeGpuAttestationReport, error) { var gpuAtstReport ConfComputeGpuAttestationReport ret := nvmlDeviceGetConfComputeGpuAttestationReport(device, &gpuAtstReport) - return gpuAtstReport, ret + return gpuAtstReport, ret.error() } // nvml.DeviceSetConfComputeUnprotectedMemSize() -func (l *library) DeviceSetConfComputeUnprotectedMemSize(device Device, sizeKiB uint64) Return { +func (l *library) DeviceSetConfComputeUnprotectedMemSize(device Device, sizeKiB uint64) error { return device.SetConfComputeUnprotectedMemSize(sizeKiB) } -func (device nvmlDevice) SetConfComputeUnprotectedMemSize(sizeKiB uint64) Return { - return nvmlDeviceSetConfComputeUnprotectedMemSize(device, sizeKiB) +func (device nvmlDevice) SetConfComputeUnprotectedMemSize(sizeKiB uint64) error { + return nvmlDeviceSetConfComputeUnprotectedMemSize(device, sizeKiB).error() } // nvml.DeviceSetPowerManagementLimit_v2() -func (l *library) DeviceSetPowerManagementLimit_v2(device Device, powerValue *PowerValue_v2) Return { +func (l *library) DeviceSetPowerManagementLimit_v2(device Device, powerValue *PowerValue_v2) error { return device.SetPowerManagementLimit_v2(powerValue) } -func (device nvmlDevice) SetPowerManagementLimit_v2(powerValue *PowerValue_v2) Return { - return nvmlDeviceSetPowerManagementLimit_v2(device, powerValue) +func (device nvmlDevice) SetPowerManagementLimit_v2(powerValue *PowerValue_v2) error { + return nvmlDeviceSetPowerManagementLimit_v2(device, powerValue).error() } // nvml.DeviceGetC2cModeInfoV() @@ -2879,10 +2881,10 @@ type C2cModeInfoHandler struct { device nvmlDevice } -func (handler C2cModeInfoHandler) V1() (C2cModeInfo_v1, Return) { +func (handler C2cModeInfoHandler) V1() (C2cModeInfo_v1, error) { var c2cModeInfo C2cModeInfo_v1 ret := nvmlDeviceGetC2cModeInfoV(handler.device, &c2cModeInfo) - return c2cModeInfo, ret + return c2cModeInfo, ret.error() } func (l *library) DeviceGetC2cModeInfoV(device Device) C2cModeInfoHandler { @@ -2894,37 +2896,37 @@ func (device nvmlDevice) GetC2cModeInfoV() C2cModeInfoHandler { } // nvml.DeviceGetLastBBXFlushTime() -func (l *library) DeviceGetLastBBXFlushTime(device Device) (uint64, uint, Return) { +func (l *library) DeviceGetLastBBXFlushTime(device Device) (uint64, uint, error) { return device.GetLastBBXFlushTime() } -func (device nvmlDevice) GetLastBBXFlushTime() (uint64, uint, Return) { +func (device nvmlDevice) GetLastBBXFlushTime() (uint64, uint, error) { var timestamp uint64 var durationUs uint ret := nvmlDeviceGetLastBBXFlushTime(device, ×tamp, &durationUs) - return timestamp, durationUs, ret + return timestamp, durationUs, ret.error() } // nvml.DeviceGetNumaNodeId() -func (l *library) DeviceGetNumaNodeId(device Device) (int, Return) { +func (l *library) DeviceGetNumaNodeId(device Device) (int, error) { return device.GetNumaNodeId() } -func (device nvmlDevice) GetNumaNodeId() (int, Return) { +func (device nvmlDevice) GetNumaNodeId() (int, error) { var node uint32 ret := nvmlDeviceGetNumaNodeId(device, &node) - return int(node), ret + return int(node), ret.error() } // nvml.DeviceGetPciInfoExt() -func (l *library) DeviceGetPciInfoExt(device Device) (PciInfoExt, Return) { +func (l *library) DeviceGetPciInfoExt(device Device) (PciInfoExt, error) { return device.GetPciInfoExt() } -func (device nvmlDevice) GetPciInfoExt() (PciInfoExt, Return) { +func (device nvmlDevice) GetPciInfoExt() (PciInfoExt, error) { var pciInfo PciInfoExt ret := nvmlDeviceGetPciInfoExt(device, &pciInfo) - return pciInfo, ret + return pciInfo, ret.error() } // nvml.DeviceGetGpuFabricInfoV() @@ -2932,15 +2934,15 @@ type GpuFabricInfoHandler struct { device nvmlDevice } -func (handler GpuFabricInfoHandler) V1() (GpuFabricInfo, Return) { +func (handler GpuFabricInfoHandler) V1() (GpuFabricInfo, error) { return handler.device.GetGpuFabricInfo() } -func (handler GpuFabricInfoHandler) V2() (GpuFabricInfo_v2, Return) { +func (handler GpuFabricInfoHandler) V2() (GpuFabricInfo_v2, error) { var info GpuFabricInfoV info.Version = STRUCT_VERSION(info, 2) ret := nvmlDeviceGetGpuFabricInfoV(handler.device, &info) - return GpuFabricInfo_v2(info), ret + return GpuFabricInfo_v2(info), ret.error() } func (l *library) DeviceGetGpuFabricInfoV(device Device) GpuFabricInfoHandler { @@ -2952,106 +2954,106 @@ func (device nvmlDevice) GetGpuFabricInfoV() GpuFabricInfoHandler { } // nvml.DeviceGetProcessesUtilizationInfo() -func (l *library) DeviceGetProcessesUtilizationInfo(device Device) (ProcessesUtilizationInfo, Return) { +func (l *library) DeviceGetProcessesUtilizationInfo(device Device) (ProcessesUtilizationInfo, error) { return device.GetProcessesUtilizationInfo() } -func (device nvmlDevice) GetProcessesUtilizationInfo() (ProcessesUtilizationInfo, Return) { +func (device nvmlDevice) GetProcessesUtilizationInfo() (ProcessesUtilizationInfo, error) { var processesUtilInfo ProcessesUtilizationInfo ret := nvmlDeviceGetProcessesUtilizationInfo(device, &processesUtilInfo) - return processesUtilInfo, ret + return processesUtilInfo, ret.error() } // nvml.DeviceGetVgpuHeterogeneousMode() -func (l *library) DeviceGetVgpuHeterogeneousMode(device Device) (VgpuHeterogeneousMode, Return) { +func (l *library) DeviceGetVgpuHeterogeneousMode(device Device) (VgpuHeterogeneousMode, error) { return device.GetVgpuHeterogeneousMode() } -func (device nvmlDevice) GetVgpuHeterogeneousMode() (VgpuHeterogeneousMode, Return) { +func (device nvmlDevice) GetVgpuHeterogeneousMode() (VgpuHeterogeneousMode, error) { var heterogeneousMode VgpuHeterogeneousMode ret := nvmlDeviceGetVgpuHeterogeneousMode(device, &heterogeneousMode) - return heterogeneousMode, ret + return heterogeneousMode, ret.error() } // nvml.DeviceSetVgpuHeterogeneousMode() -func (l *library) DeviceSetVgpuHeterogeneousMode(device Device, heterogeneousMode VgpuHeterogeneousMode) Return { +func (l *library) DeviceSetVgpuHeterogeneousMode(device Device, heterogeneousMode VgpuHeterogeneousMode) error { return device.SetVgpuHeterogeneousMode(heterogeneousMode) } -func (device nvmlDevice) SetVgpuHeterogeneousMode(heterogeneousMode VgpuHeterogeneousMode) Return { +func (device nvmlDevice) SetVgpuHeterogeneousMode(heterogeneousMode VgpuHeterogeneousMode) error { ret := nvmlDeviceSetVgpuHeterogeneousMode(device, &heterogeneousMode) - return ret + return ret.error() } // nvml.DeviceGetVgpuTypeSupportedPlacements() -func (l *library) DeviceGetVgpuTypeSupportedPlacements(device Device, vgpuTypeId VgpuTypeId) (VgpuPlacementList, Return) { +func (l *library) DeviceGetVgpuTypeSupportedPlacements(device Device, vgpuTypeId VgpuTypeId) (VgpuPlacementList, error) { return device.GetVgpuTypeSupportedPlacements(vgpuTypeId) } -func (device nvmlDevice) GetVgpuTypeSupportedPlacements(vgpuTypeId VgpuTypeId) (VgpuPlacementList, Return) { +func (device nvmlDevice) GetVgpuTypeSupportedPlacements(vgpuTypeId VgpuTypeId) (VgpuPlacementList, error) { return vgpuTypeId.GetSupportedPlacements(device) } -func (vgpuTypeId nvmlVgpuTypeId) GetSupportedPlacements(device Device) (VgpuPlacementList, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetSupportedPlacements(device Device) (VgpuPlacementList, error) { var placementList VgpuPlacementList ret := nvmlDeviceGetVgpuTypeSupportedPlacements(nvmlDeviceHandle(device), vgpuTypeId, &placementList) - return placementList, ret + return placementList, ret.error() } // nvml.DeviceGetVgpuTypeCreatablePlacements() -func (l *library) DeviceGetVgpuTypeCreatablePlacements(device Device, vgpuTypeId VgpuTypeId) (VgpuPlacementList, Return) { +func (l *library) DeviceGetVgpuTypeCreatablePlacements(device Device, vgpuTypeId VgpuTypeId) (VgpuPlacementList, error) { return device.GetVgpuTypeCreatablePlacements(vgpuTypeId) } -func (device nvmlDevice) GetVgpuTypeCreatablePlacements(vgpuTypeId VgpuTypeId) (VgpuPlacementList, Return) { +func (device nvmlDevice) GetVgpuTypeCreatablePlacements(vgpuTypeId VgpuTypeId) (VgpuPlacementList, error) { return vgpuTypeId.GetCreatablePlacements(device) } -func (vgpuTypeId nvmlVgpuTypeId) GetCreatablePlacements(device Device) (VgpuPlacementList, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetCreatablePlacements(device Device) (VgpuPlacementList, error) { var placementList VgpuPlacementList ret := nvmlDeviceGetVgpuTypeCreatablePlacements(nvmlDeviceHandle(device), vgpuTypeId, &placementList) - return placementList, ret + return placementList, ret.error() } // nvml.DeviceSetVgpuCapabilities() -func (l *library) DeviceSetVgpuCapabilities(device Device, capability DeviceVgpuCapability, state EnableState) Return { +func (l *library) DeviceSetVgpuCapabilities(device Device, capability DeviceVgpuCapability, state EnableState) error { return device.SetVgpuCapabilities(capability, state) } -func (device nvmlDevice) SetVgpuCapabilities(capability DeviceVgpuCapability, state EnableState) Return { +func (device nvmlDevice) SetVgpuCapabilities(capability DeviceVgpuCapability, state EnableState) error { ret := nvmlDeviceSetVgpuCapabilities(device, capability, state) - return ret + return ret.error() } // nvml.DeviceGetVgpuInstancesUtilizationInfo() -func (l *library) DeviceGetVgpuInstancesUtilizationInfo(device Device) (VgpuInstancesUtilizationInfo, Return) { +func (l *library) DeviceGetVgpuInstancesUtilizationInfo(device Device) (VgpuInstancesUtilizationInfo, error) { return device.GetVgpuInstancesUtilizationInfo() } -func (device nvmlDevice) GetVgpuInstancesUtilizationInfo() (VgpuInstancesUtilizationInfo, Return) { +func (device nvmlDevice) GetVgpuInstancesUtilizationInfo() (VgpuInstancesUtilizationInfo, error) { var vgpuUtilInfo VgpuInstancesUtilizationInfo ret := nvmlDeviceGetVgpuInstancesUtilizationInfo(device, &vgpuUtilInfo) - return vgpuUtilInfo, ret + return vgpuUtilInfo, ret.error() } // nvml.DeviceGetVgpuProcessesUtilizationInfo() -func (l *library) DeviceGetVgpuProcessesUtilizationInfo(device Device) (VgpuProcessesUtilizationInfo, Return) { +func (l *library) DeviceGetVgpuProcessesUtilizationInfo(device Device) (VgpuProcessesUtilizationInfo, error) { return device.GetVgpuProcessesUtilizationInfo() } -func (device nvmlDevice) GetVgpuProcessesUtilizationInfo() (VgpuProcessesUtilizationInfo, Return) { +func (device nvmlDevice) GetVgpuProcessesUtilizationInfo() (VgpuProcessesUtilizationInfo, error) { var vgpuProcUtilInfo VgpuProcessesUtilizationInfo ret := nvmlDeviceGetVgpuProcessesUtilizationInfo(device, &vgpuProcUtilInfo) - return vgpuProcUtilInfo, ret + return vgpuProcUtilInfo, ret.error() } // nvml.DeviceGetSramEccErrorStatus() -func (l *library) DeviceGetSramEccErrorStatus(device Device) (EccSramErrorStatus, Return) { +func (l *library) DeviceGetSramEccErrorStatus(device Device) (EccSramErrorStatus, error) { return device.GetSramEccErrorStatus() } -func (device nvmlDevice) GetSramEccErrorStatus() (EccSramErrorStatus, Return) { +func (device nvmlDevice) GetSramEccErrorStatus() (EccSramErrorStatus, error) { var status EccSramErrorStatus ret := nvmlDeviceGetSramEccErrorStatus(device, &status) - return status, ret + return status, ret.error() } diff --git a/pkg/nvml/device_test.go b/pkg/nvml/device_test.go index e92d73c..6069d61 100644 --- a/pkg/nvml/device_test.go +++ b/pkg/nvml/device_test.go @@ -79,7 +79,7 @@ func TestGetTopologyCommonAncestor(t *testing.T) { for _, tc := range testCases { t.Run(tc.description, func(t *testing.T) { - defer setNvmlDeviceGetTopologyCommonAncestorStubForTest(SUCCESS)() + defer setNvmlDeviceGetTopologyCommonAncestorStubForTest(nvmlSUCCESS)() _, ret := nvmlDevice{}.GetTopologyCommonAncestor(tc.device) require.Equal(t, SUCCESS, ret) diff --git a/pkg/nvml/errors.go b/pkg/nvml/errors.go new file mode 100644 index 0000000..3a805c2 --- /dev/null +++ b/pkg/nvml/errors.go @@ -0,0 +1,53 @@ +/** +# Copyright 2024 NVIDIA CORPORATION +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +**/ + +package nvml + +import "errors" + +var ( + SUCCESS = error(nil) + ERROR_UNINITIALIZED = errors.New("ERROR_UNINITIALIZED") + ERROR_INVALID_ARGUMENT = errors.New("ERROR_INVALID_ARGUMENT") + ERROR_NOT_SUPPORTED = errors.New("ERROR_NOT_SUPPORTED") + ERROR_NO_PERMISSION = errors.New("ERROR_NO_PERMISSION") + ERROR_ALREADY_INITIALIZED = errors.New("ERROR_ALREADY_INITIALIZED") + ERROR_NOT_FOUND = errors.New("ERROR_NOT_FOUND") + ERROR_INSUFFICIENT_SIZE = errors.New("ERROR_INSUFFICIENT_SIZE") + ERROR_INSUFFICIENT_POWER = errors.New("ERROR_INSUFFICIENT_POWER") + ERROR_DRIVER_NOT_LOADED = errors.New("ERROR_DRIVER_NOT_LOADED") + ERROR_TIMEOUT = errors.New("ERROR_TIMEOUT") + ERROR_IRQ_ISSUE = errors.New("ERROR_IRQ_ISSUE") + ERROR_LIBRARY_NOT_FOUND = errors.New("ERROR_LIBRARY_NOT_FOUND") + ERROR_FUNCTION_NOT_FOUND = errors.New("ERROR_FUNCTION_NOT_FOUND") + ERROR_CORRUPTED_INFOROM = errors.New("ERROR_CORRUPTED_INFOROM") + ERROR_GPU_IS_LOST = errors.New("ERROR_GPU_IS_LOST") + ERROR_RESET_REQUIRED = errors.New("ERROR_RESET_REQUIRED") + ERROR_OPERATING_SYSTEM = errors.New("ERROR_OPERATING_SYSTEM") + ERROR_LIB_RM_VERSION_MISMATCH = errors.New("ERROR_LIB_RM_VERSION_MISMATCH") + ERROR_IN_USE = errors.New("ERROR_IN_USE") + ERROR_MEMORY = errors.New("ERROR_MEMORY") + ERROR_NO_DATA = errors.New("ERROR_NO_DATA") + ERROR_VGPU_ECC_NOT_SUPPORTED = errors.New("ERROR_VGPU_ECC_NOT_SUPPORTED") + ERROR_INSUFFICIENT_RESOURCES = errors.New("ERROR_INSUFFICIENT_RESOURCES") + ERROR_FREQ_NOT_SUPPORTED = errors.New("ERROR_FREQ_NOT_SUPPORTED") + ERROR_ARGUMENT_VERSION_MISMATCH = errors.New("ERROR_ARGUMENT_VERSION_MISMATCH") + ERROR_DEPRECATED = errors.New("ERROR_DEPRECATED") + ERROR_NOT_READY = errors.New("ERROR_NOT_READY") + ERROR_GPU_NOT_FOUND = errors.New("ERROR_GPU_NOT_FOUND") + ERROR_INVALID_STATE = errors.New("ERROR_INVALID_STATE") + ERROR_UNKNOWN = errors.New("ERROR_UNKNOWN") +) diff --git a/pkg/nvml/event_set.go b/pkg/nvml/event_set.go index 933b4de..aa7cef1 100644 --- a/pkg/nvml/event_set.go +++ b/pkg/nvml/event_set.go @@ -23,6 +23,7 @@ type EventData struct { ComputeInstanceId uint32 } +//nolint:unused func (e EventData) convert() nvmlEventData { out := nvmlEventData{ Device: e.Device.(nvmlDevice), @@ -46,28 +47,28 @@ func (e nvmlEventData) convert() EventData { } // nvml.EventSetCreate() -func (l *library) EventSetCreate() (EventSet, Return) { +func (l *library) EventSetCreate() (EventSet, error) { var Set nvmlEventSet ret := nvmlEventSetCreate(&Set) - return Set, ret + return Set, ret.error() } // nvml.EventSetWait() -func (l *library) EventSetWait(set EventSet, timeoutms uint32) (EventData, Return) { +func (l *library) EventSetWait(set EventSet, timeoutms uint32) (EventData, error) { return set.Wait(timeoutms) } -func (set nvmlEventSet) Wait(timeoutms uint32) (EventData, Return) { +func (set nvmlEventSet) Wait(timeoutms uint32) (EventData, error) { var data nvmlEventData ret := nvmlEventSetWait(set, &data, timeoutms) - return data.convert(), ret + return data.convert(), ret.error() } // nvml.EventSetFree() -func (l *library) EventSetFree(set EventSet) Return { +func (l *library) EventSetFree(set EventSet) error { return set.Free() } -func (set nvmlEventSet) Free() Return { - return nvmlEventSetFree(set) +func (set nvmlEventSet) Free() error { + return nvmlEventSetFree(set).error() } diff --git a/pkg/nvml/gpm.go b/pkg/nvml/gpm.go index 7f8995c..50aa2f7 100644 --- a/pkg/nvml/gpm.go +++ b/pkg/nvml/gpm.go @@ -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] - } + 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] - } + out.Metrics = g.Metrics + return out } @@ -61,50 +59,50 @@ func (l *library) GpmMetricsGetV(metricsGet *GpmMetricsGetType) GpmMetricsGetVTy // nvmlGpmMetricsGetStub is a stub function that can be overridden for testing. var nvmlGpmMetricsGetStub = nvmlGpmMetricsGet -func (metricsGetV GpmMetricsGetVType) V1() Return { +func (metricsGetV GpmMetricsGetVType) V1() error { metricsGetV.metricsGet.Version = 1 return gpmMetricsGet(metricsGetV.metricsGet) } -func (l *library) GpmMetricsGet(metricsGet *GpmMetricsGetType) Return { +func (l *library) GpmMetricsGet(metricsGet *GpmMetricsGetType) error { metricsGet.Version = GPM_METRICS_GET_VERSION return gpmMetricsGet(metricsGet) } -func gpmMetricsGet(metricsGet *GpmMetricsGetType) Return { +func gpmMetricsGet(metricsGet *GpmMetricsGetType) error { nvmlMetricsGet := metricsGet.convert() ret := nvmlGpmMetricsGetStub(nvmlMetricsGet) *metricsGet = *nvmlMetricsGet.convert() - return ret + return ret.error() } // nvml.GpmSampleFree() -func (l *library) GpmSampleFree(gpmSample GpmSample) Return { +func (l *library) GpmSampleFree(gpmSample GpmSample) error { return gpmSample.Free() } -func (gpmSample nvmlGpmSample) Free() Return { - return nvmlGpmSampleFree(gpmSample) +func (gpmSample nvmlGpmSample) Free() error { + return nvmlGpmSampleFree(gpmSample).error() } // nvml.GpmSampleAlloc() -func (l *library) GpmSampleAlloc() (GpmSample, Return) { +func (l *library) GpmSampleAlloc() (GpmSample, error) { var gpmSample nvmlGpmSample ret := nvmlGpmSampleAlloc(&gpmSample) - return gpmSample, ret + return gpmSample, ret.error() } // nvml.GpmSampleGet() -func (l *library) GpmSampleGet(device Device, gpmSample GpmSample) Return { +func (l *library) GpmSampleGet(device Device, gpmSample GpmSample) error { return gpmSample.Get(device) } -func (device nvmlDevice) GpmSampleGet(gpmSample GpmSample) Return { +func (device nvmlDevice) GpmSampleGet(gpmSample GpmSample) error { return gpmSample.Get(device) } -func (gpmSample nvmlGpmSample) Get(device Device) Return { - return nvmlGpmSampleGet(nvmlDeviceHandle(device), gpmSample) +func (gpmSample nvmlGpmSample) Get(device Device) error { + return nvmlGpmSampleGet(nvmlDeviceHandle(device), gpmSample).error() } // nvml.GpmQueryDeviceSupport() @@ -120,53 +118,53 @@ func (device nvmlDevice) GpmQueryDeviceSupportV() GpmSupportV { return GpmSupportV{device} } -func (gpmSupportV GpmSupportV) V1() (GpmSupport, Return) { +func (gpmSupportV GpmSupportV) V1() (GpmSupport, error) { var gpmSupport GpmSupport gpmSupport.Version = 1 ret := nvmlGpmQueryDeviceSupport(gpmSupportV.device, &gpmSupport) - return gpmSupport, ret + return gpmSupport, ret.error() } -func (l *library) GpmQueryDeviceSupport(device Device) (GpmSupport, Return) { +func (l *library) GpmQueryDeviceSupport(device Device) (GpmSupport, error) { return device.GpmQueryDeviceSupport() } -func (device nvmlDevice) GpmQueryDeviceSupport() (GpmSupport, Return) { +func (device nvmlDevice) GpmQueryDeviceSupport() (GpmSupport, error) { var gpmSupport GpmSupport gpmSupport.Version = GPM_SUPPORT_VERSION ret := nvmlGpmQueryDeviceSupport(device, &gpmSupport) - return gpmSupport, ret + return gpmSupport, ret.error() } // nvml.GpmMigSampleGet() -func (l *library) GpmMigSampleGet(device Device, gpuInstanceId int, gpmSample GpmSample) Return { +func (l *library) GpmMigSampleGet(device Device, gpuInstanceId int, gpmSample GpmSample) error { return gpmSample.MigGet(device, gpuInstanceId) } -func (device nvmlDevice) GpmMigSampleGet(gpuInstanceId int, gpmSample GpmSample) Return { +func (device nvmlDevice) GpmMigSampleGet(gpuInstanceId int, gpmSample GpmSample) error { return gpmSample.MigGet(device, gpuInstanceId) } -func (gpmSample nvmlGpmSample) MigGet(device Device, gpuInstanceId int) Return { - return nvmlGpmMigSampleGet(nvmlDeviceHandle(device), uint32(gpuInstanceId), gpmSample) +func (gpmSample nvmlGpmSample) MigGet(device Device, gpuInstanceId int) error { + return nvmlGpmMigSampleGet(nvmlDeviceHandle(device), uint32(gpuInstanceId), gpmSample).error() } // nvml.GpmQueryIfStreamingEnabled() -func (l *library) GpmQueryIfStreamingEnabled(device Device) (uint32, Return) { +func (l *library) GpmQueryIfStreamingEnabled(device Device) (uint32, error) { return device.GpmQueryIfStreamingEnabled() } -func (device nvmlDevice) GpmQueryIfStreamingEnabled() (uint32, Return) { +func (device nvmlDevice) GpmQueryIfStreamingEnabled() (uint32, error) { var state uint32 ret := nvmlGpmQueryIfStreamingEnabled(device, &state) - return state, ret + return state, ret.error() } // nvml.GpmSetStreamingEnabled() -func (l *library) GpmSetStreamingEnabled(device Device, state uint32) Return { +func (l *library) GpmSetStreamingEnabled(device Device, state uint32) error { return device.GpmSetStreamingEnabled(state) } -func (device nvmlDevice) GpmSetStreamingEnabled(state uint32) Return { - return nvmlGpmSetStreamingEnabled(device, state) +func (device nvmlDevice) GpmSetStreamingEnabled(state uint32) error { + return nvmlGpmSetStreamingEnabled(device, state).error() } diff --git a/pkg/nvml/gpm_test.go b/pkg/nvml/gpm_test.go index 24368d7..7c66c63 100644 --- a/pkg/nvml/gpm_test.go +++ b/pkg/nvml/gpm_test.go @@ -30,7 +30,7 @@ func TestGpmMetricsGet(t *testing.T) { } defer setNvmlGpmMetricsGetStubForTest(func(metricsGet *nvmlGpmMetricsGetType) Return { metricsGet.Metrics = overrideMetrics - return SUCCESS + return nvmlSUCCESS })() metrics := GpmMetricsGetType{ @@ -53,7 +53,7 @@ func TestGpmMetricsGetV(t *testing.T) { } defer setNvmlGpmMetricsGetStubForTest(func(metricsGet *nvmlGpmMetricsGetType) Return { metricsGet.Metrics = overrideMetrics - return SUCCESS + return nvmlSUCCESS })() metrics := GpmMetricsGetType{ diff --git a/pkg/nvml/init.go b/pkg/nvml/init.go index 06e6444..bded433 100644 --- a/pkg/nvml/init.go +++ b/pkg/nvml/init.go @@ -17,26 +17,26 @@ package nvml import "C" // nvml.Init() -func (l *library) Init() Return { +func (l *library) Init() error { if err := l.load(); err != nil { return ERROR_LIBRARY_NOT_FOUND } - return nvmlInit() + return nvmlInit().error() } // nvml.InitWithFlags() -func (l *library) InitWithFlags(flags uint32) Return { +func (l *library) InitWithFlags(flags uint32) error { if err := l.load(); err != nil { return ERROR_LIBRARY_NOT_FOUND } - return nvmlInitWithFlags(flags) + return nvmlInitWithFlags(flags).error() } // nvml.Shutdown() -func (l *library) Shutdown() Return { +func (l *library) Shutdown() error { ret := nvmlShutdown() - if ret != SUCCESS { - return ret + if ret != nvmlSUCCESS { + return ret.error() } err := l.close() @@ -44,5 +44,5 @@ func (l *library) Shutdown() Return { return ERROR_UNKNOWN } - return ret + return ret.error() } diff --git a/pkg/nvml/mock/computeinstance.go b/pkg/nvml/mock/computeinstance.go index 784fa11..3ccd9e7 100644 --- a/pkg/nvml/mock/computeinstance.go +++ b/pkg/nvml/mock/computeinstance.go @@ -18,10 +18,10 @@ var _ nvml.ComputeInstance = &ComputeInstance{} // // // make and configure a mocked nvml.ComputeInstance // mockedComputeInstance := &ComputeInstance{ -// DestroyFunc: func() nvml.Return { +// DestroyFunc: func() error { // panic("mock out the Destroy method") // }, -// GetInfoFunc: func() (nvml.ComputeInstanceInfo, nvml.Return) { +// GetInfoFunc: func() (nvml.ComputeInstanceInfo, error) { // panic("mock out the GetInfo method") // }, // } @@ -32,10 +32,10 @@ var _ nvml.ComputeInstance = &ComputeInstance{} // } type ComputeInstance struct { // DestroyFunc mocks the Destroy method. - DestroyFunc func() nvml.Return + DestroyFunc func() error // GetInfoFunc mocks the GetInfo method. - GetInfoFunc func() (nvml.ComputeInstanceInfo, nvml.Return) + GetInfoFunc func() (nvml.ComputeInstanceInfo, error) // calls tracks calls to the methods. calls struct { @@ -51,7 +51,7 @@ type ComputeInstance struct { } // Destroy calls DestroyFunc. -func (mock *ComputeInstance) Destroy() nvml.Return { +func (mock *ComputeInstance) Destroy() error { if mock.DestroyFunc == nil { panic("ComputeInstance.DestroyFunc: method is nil but ComputeInstance.Destroy was just called") } @@ -78,7 +78,7 @@ func (mock *ComputeInstance) DestroyCalls() []struct { } // GetInfo calls GetInfoFunc. -func (mock *ComputeInstance) GetInfo() (nvml.ComputeInstanceInfo, nvml.Return) { +func (mock *ComputeInstance) GetInfo() (nvml.ComputeInstanceInfo, error) { if mock.GetInfoFunc == nil { panic("ComputeInstance.GetInfoFunc: method is nil but ComputeInstance.GetInfo was just called") } diff --git a/pkg/nvml/mock/device.go b/pkg/nvml/mock/device.go index a1164ba..ee62327 100644 --- a/pkg/nvml/mock/device.go +++ b/pkg/nvml/mock/device.go @@ -18,685 +18,685 @@ var _ nvml.Device = &Device{} // // // make and configure a mocked nvml.Device // mockedDevice := &Device{ -// ClearAccountingPidsFunc: func() nvml.Return { +// ClearAccountingPidsFunc: func() error { // panic("mock out the ClearAccountingPids method") // }, -// ClearCpuAffinityFunc: func() nvml.Return { +// ClearCpuAffinityFunc: func() error { // panic("mock out the ClearCpuAffinity method") // }, -// ClearEccErrorCountsFunc: func(eccCounterType nvml.EccCounterType) nvml.Return { +// ClearEccErrorCountsFunc: func(eccCounterType nvml.EccCounterType) error { // panic("mock out the ClearEccErrorCounts method") // }, -// ClearFieldValuesFunc: func(fieldValues []nvml.FieldValue) nvml.Return { +// ClearFieldValuesFunc: func(fieldValues []nvml.FieldValue) error { // panic("mock out the ClearFieldValues method") // }, -// CreateGpuInstanceFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { +// CreateGpuInstanceFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, error) { // panic("mock out the CreateGpuInstance method") // }, -// CreateGpuInstanceWithPlacementFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { +// CreateGpuInstanceWithPlacementFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, error) { // panic("mock out the CreateGpuInstanceWithPlacement method") // }, -// FreezeNvLinkUtilizationCounterFunc: func(n1 int, n2 int, enableState nvml.EnableState) nvml.Return { +// FreezeNvLinkUtilizationCounterFunc: func(n1 int, n2 int, enableState nvml.EnableState) error { // panic("mock out the FreezeNvLinkUtilizationCounter method") // }, -// GetAPIRestrictionFunc: func(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { +// GetAPIRestrictionFunc: func(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, error) { // panic("mock out the GetAPIRestriction method") // }, -// GetAccountingBufferSizeFunc: func() (int, nvml.Return) { +// GetAccountingBufferSizeFunc: func() (int, error) { // panic("mock out the GetAccountingBufferSize method") // }, -// GetAccountingModeFunc: func() (nvml.EnableState, nvml.Return) { +// GetAccountingModeFunc: func() (nvml.EnableState, error) { // panic("mock out the GetAccountingMode method") // }, -// GetAccountingPidsFunc: func() ([]int, nvml.Return) { +// GetAccountingPidsFunc: func() ([]int, error) { // panic("mock out the GetAccountingPids method") // }, -// GetAccountingStatsFunc: func(v uint32) (nvml.AccountingStats, nvml.Return) { +// GetAccountingStatsFunc: func(v uint32) (nvml.AccountingStats, error) { // panic("mock out the GetAccountingStats method") // }, -// GetActiveVgpusFunc: func() ([]nvml.VgpuInstance, nvml.Return) { +// GetActiveVgpusFunc: func() ([]nvml.VgpuInstance, error) { // panic("mock out the GetActiveVgpus method") // }, -// GetAdaptiveClockInfoStatusFunc: func() (uint32, nvml.Return) { +// GetAdaptiveClockInfoStatusFunc: func() (uint32, error) { // panic("mock out the GetAdaptiveClockInfoStatus method") // }, -// GetApplicationsClockFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { +// GetApplicationsClockFunc: func(clockType nvml.ClockType) (uint32, error) { // panic("mock out the GetApplicationsClock method") // }, -// GetArchitectureFunc: func() (nvml.DeviceArchitecture, nvml.Return) { +// GetArchitectureFunc: func() (nvml.DeviceArchitecture, error) { // panic("mock out the GetArchitecture method") // }, -// GetAttributesFunc: func() (nvml.DeviceAttributes, nvml.Return) { +// GetAttributesFunc: func() (nvml.DeviceAttributes, error) { // panic("mock out the GetAttributes method") // }, -// GetAutoBoostedClocksEnabledFunc: func() (nvml.EnableState, nvml.EnableState, nvml.Return) { +// GetAutoBoostedClocksEnabledFunc: func() (nvml.EnableState, nvml.EnableState, error) { // panic("mock out the GetAutoBoostedClocksEnabled method") // }, -// GetBAR1MemoryInfoFunc: func() (nvml.BAR1Memory, nvml.Return) { +// GetBAR1MemoryInfoFunc: func() (nvml.BAR1Memory, error) { // panic("mock out the GetBAR1MemoryInfo method") // }, -// GetBoardIdFunc: func() (uint32, nvml.Return) { +// GetBoardIdFunc: func() (uint32, error) { // panic("mock out the GetBoardId method") // }, -// GetBoardPartNumberFunc: func() (string, nvml.Return) { +// GetBoardPartNumberFunc: func() (string, error) { // panic("mock out the GetBoardPartNumber method") // }, -// GetBrandFunc: func() (nvml.BrandType, nvml.Return) { +// GetBrandFunc: func() (nvml.BrandType, error) { // panic("mock out the GetBrand method") // }, -// GetBridgeChipInfoFunc: func() (nvml.BridgeChipHierarchy, nvml.Return) { +// GetBridgeChipInfoFunc: func() (nvml.BridgeChipHierarchy, error) { // panic("mock out the GetBridgeChipInfo method") // }, -// GetBusTypeFunc: func() (nvml.BusType, nvml.Return) { +// GetBusTypeFunc: func() (nvml.BusType, error) { // panic("mock out the GetBusType method") // }, // GetC2cModeInfoVFunc: func() nvml.C2cModeInfoHandler { // panic("mock out the GetC2cModeInfoV method") // }, -// GetClkMonStatusFunc: func() (nvml.ClkMonStatus, nvml.Return) { +// GetClkMonStatusFunc: func() (nvml.ClkMonStatus, error) { // panic("mock out the GetClkMonStatus method") // }, -// GetClockFunc: func(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { +// GetClockFunc: func(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, error) { // panic("mock out the GetClock method") // }, -// GetClockInfoFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { +// GetClockInfoFunc: func(clockType nvml.ClockType) (uint32, error) { // panic("mock out the GetClockInfo method") // }, -// GetComputeInstanceIdFunc: func() (int, nvml.Return) { +// GetComputeInstanceIdFunc: func() (int, error) { // panic("mock out the GetComputeInstanceId method") // }, -// GetComputeModeFunc: func() (nvml.ComputeMode, nvml.Return) { +// GetComputeModeFunc: func() (nvml.ComputeMode, error) { // panic("mock out the GetComputeMode method") // }, -// GetComputeRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { +// GetComputeRunningProcessesFunc: func() ([]nvml.ProcessInfo, error) { // panic("mock out the GetComputeRunningProcesses method") // }, -// GetConfComputeGpuAttestationReportFunc: func() (nvml.ConfComputeGpuAttestationReport, nvml.Return) { +// GetConfComputeGpuAttestationReportFunc: func() (nvml.ConfComputeGpuAttestationReport, error) { // panic("mock out the GetConfComputeGpuAttestationReport method") // }, -// GetConfComputeGpuCertificateFunc: func() (nvml.ConfComputeGpuCertificate, nvml.Return) { +// GetConfComputeGpuCertificateFunc: func() (nvml.ConfComputeGpuCertificate, error) { // panic("mock out the GetConfComputeGpuCertificate method") // }, -// GetConfComputeMemSizeInfoFunc: func() (nvml.ConfComputeMemSizeInfo, nvml.Return) { +// GetConfComputeMemSizeInfoFunc: func() (nvml.ConfComputeMemSizeInfo, error) { // panic("mock out the GetConfComputeMemSizeInfo method") // }, -// GetConfComputeProtectedMemoryUsageFunc: func() (nvml.Memory, nvml.Return) { +// GetConfComputeProtectedMemoryUsageFunc: func() (nvml.Memory, error) { // panic("mock out the GetConfComputeProtectedMemoryUsage method") // }, -// GetCpuAffinityFunc: func(n int) ([]uint, nvml.Return) { +// GetCpuAffinityFunc: func(n int) ([]uint, error) { // panic("mock out the GetCpuAffinity method") // }, -// GetCpuAffinityWithinScopeFunc: func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +// GetCpuAffinityWithinScopeFunc: func(n int, affinityScope nvml.AffinityScope) ([]uint, error) { // panic("mock out the GetCpuAffinityWithinScope method") // }, -// GetCreatableVgpusFunc: func() ([]nvml.VgpuTypeId, nvml.Return) { +// GetCreatableVgpusFunc: func() ([]nvml.VgpuTypeId, error) { // panic("mock out the GetCreatableVgpus method") // }, -// GetCudaComputeCapabilityFunc: func() (int, int, nvml.Return) { +// GetCudaComputeCapabilityFunc: func() (int, int, error) { // panic("mock out the GetCudaComputeCapability method") // }, -// GetCurrPcieLinkGenerationFunc: func() (int, nvml.Return) { +// GetCurrPcieLinkGenerationFunc: func() (int, error) { // panic("mock out the GetCurrPcieLinkGeneration method") // }, -// GetCurrPcieLinkWidthFunc: func() (int, nvml.Return) { +// GetCurrPcieLinkWidthFunc: func() (int, error) { // panic("mock out the GetCurrPcieLinkWidth method") // }, -// GetCurrentClocksEventReasonsFunc: func() (uint64, nvml.Return) { +// GetCurrentClocksEventReasonsFunc: func() (uint64, error) { // panic("mock out the GetCurrentClocksEventReasons method") // }, -// GetCurrentClocksThrottleReasonsFunc: func() (uint64, nvml.Return) { +// GetCurrentClocksThrottleReasonsFunc: func() (uint64, error) { // panic("mock out the GetCurrentClocksThrottleReasons method") // }, -// GetDecoderUtilizationFunc: func() (uint32, uint32, nvml.Return) { +// GetDecoderUtilizationFunc: func() (uint32, uint32, error) { // panic("mock out the GetDecoderUtilization method") // }, -// GetDefaultApplicationsClockFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { +// GetDefaultApplicationsClockFunc: func(clockType nvml.ClockType) (uint32, error) { // panic("mock out the GetDefaultApplicationsClock method") // }, -// GetDefaultEccModeFunc: func() (nvml.EnableState, nvml.Return) { +// GetDefaultEccModeFunc: func() (nvml.EnableState, error) { // panic("mock out the GetDefaultEccMode method") // }, -// GetDetailedEccErrorsFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { +// GetDetailedEccErrorsFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, error) { // panic("mock out the GetDetailedEccErrors method") // }, -// GetDeviceHandleFromMigDeviceHandleFunc: func() (nvml.Device, nvml.Return) { +// GetDeviceHandleFromMigDeviceHandleFunc: func() (nvml.Device, error) { // panic("mock out the GetDeviceHandleFromMigDeviceHandle method") // }, -// GetDisplayActiveFunc: func() (nvml.EnableState, nvml.Return) { +// GetDisplayActiveFunc: func() (nvml.EnableState, error) { // panic("mock out the GetDisplayActive method") // }, -// GetDisplayModeFunc: func() (nvml.EnableState, nvml.Return) { +// GetDisplayModeFunc: func() (nvml.EnableState, error) { // panic("mock out the GetDisplayMode method") // }, -// GetDriverModelFunc: func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { +// GetDriverModelFunc: func() (nvml.DriverModel, nvml.DriverModel, error) { // panic("mock out the GetDriverModel method") // }, -// GetDynamicPstatesInfoFunc: func() (nvml.GpuDynamicPstatesInfo, nvml.Return) { +// GetDynamicPstatesInfoFunc: func() (nvml.GpuDynamicPstatesInfo, error) { // panic("mock out the GetDynamicPstatesInfo method") // }, -// GetEccModeFunc: func() (nvml.EnableState, nvml.EnableState, nvml.Return) { +// GetEccModeFunc: func() (nvml.EnableState, nvml.EnableState, error) { // panic("mock out the GetEccMode method") // }, -// GetEncoderCapacityFunc: func(encoderType nvml.EncoderType) (int, nvml.Return) { +// GetEncoderCapacityFunc: func(encoderType nvml.EncoderType) (int, error) { // panic("mock out the GetEncoderCapacity method") // }, -// GetEncoderSessionsFunc: func() ([]nvml.EncoderSessionInfo, nvml.Return) { +// GetEncoderSessionsFunc: func() ([]nvml.EncoderSessionInfo, error) { // panic("mock out the GetEncoderSessions method") // }, -// GetEncoderStatsFunc: func() (int, uint32, uint32, nvml.Return) { +// GetEncoderStatsFunc: func() (int, uint32, uint32, error) { // panic("mock out the GetEncoderStats method") // }, -// GetEncoderUtilizationFunc: func() (uint32, uint32, nvml.Return) { +// GetEncoderUtilizationFunc: func() (uint32, uint32, error) { // panic("mock out the GetEncoderUtilization method") // }, -// GetEnforcedPowerLimitFunc: func() (uint32, nvml.Return) { +// GetEnforcedPowerLimitFunc: func() (uint32, error) { // panic("mock out the GetEnforcedPowerLimit method") // }, -// GetFBCSessionsFunc: func() ([]nvml.FBCSessionInfo, nvml.Return) { +// GetFBCSessionsFunc: func() ([]nvml.FBCSessionInfo, error) { // panic("mock out the GetFBCSessions method") // }, -// GetFBCStatsFunc: func() (nvml.FBCStats, nvml.Return) { +// GetFBCStatsFunc: func() (nvml.FBCStats, error) { // panic("mock out the GetFBCStats method") // }, -// GetFanControlPolicy_v2Func: func(n int) (nvml.FanControlPolicy, nvml.Return) { +// GetFanControlPolicy_v2Func: func(n int) (nvml.FanControlPolicy, error) { // panic("mock out the GetFanControlPolicy_v2 method") // }, -// GetFanSpeedFunc: func() (uint32, nvml.Return) { +// GetFanSpeedFunc: func() (uint32, error) { // panic("mock out the GetFanSpeed method") // }, -// GetFanSpeed_v2Func: func(n int) (uint32, nvml.Return) { +// GetFanSpeed_v2Func: func(n int) (uint32, error) { // panic("mock out the GetFanSpeed_v2 method") // }, -// GetFieldValuesFunc: func(fieldValues []nvml.FieldValue) nvml.Return { +// GetFieldValuesFunc: func(fieldValues []nvml.FieldValue) error { // panic("mock out the GetFieldValues method") // }, -// GetGpcClkMinMaxVfOffsetFunc: func() (int, int, nvml.Return) { +// GetGpcClkMinMaxVfOffsetFunc: func() (int, int, error) { // panic("mock out the GetGpcClkMinMaxVfOffset method") // }, -// GetGpcClkVfOffsetFunc: func() (int, nvml.Return) { +// GetGpcClkVfOffsetFunc: func() (int, error) { // panic("mock out the GetGpcClkVfOffset method") // }, -// GetGpuFabricInfoFunc: func() (nvml.GpuFabricInfo, nvml.Return) { +// GetGpuFabricInfoFunc: func() (nvml.GpuFabricInfo, error) { // panic("mock out the GetGpuFabricInfo method") // }, // GetGpuFabricInfoVFunc: func() nvml.GpuFabricInfoHandler { // panic("mock out the GetGpuFabricInfoV method") // }, -// GetGpuInstanceByIdFunc: func(n int) (nvml.GpuInstance, nvml.Return) { +// GetGpuInstanceByIdFunc: func(n int) (nvml.GpuInstance, error) { // panic("mock out the GetGpuInstanceById method") // }, -// GetGpuInstanceIdFunc: func() (int, nvml.Return) { +// GetGpuInstanceIdFunc: func() (int, error) { // panic("mock out the GetGpuInstanceId method") // }, -// GetGpuInstancePossiblePlacementsFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { +// GetGpuInstancePossiblePlacementsFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, error) { // panic("mock out the GetGpuInstancePossiblePlacements method") // }, -// GetGpuInstanceProfileInfoFunc: func(n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { +// GetGpuInstanceProfileInfoFunc: func(n int) (nvml.GpuInstanceProfileInfo, error) { // panic("mock out the GetGpuInstanceProfileInfo method") // }, // GetGpuInstanceProfileInfoVFunc: func(n int) nvml.GpuInstanceProfileInfoHandler { // panic("mock out the GetGpuInstanceProfileInfoV method") // }, -// GetGpuInstanceRemainingCapacityFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) { +// GetGpuInstanceRemainingCapacityFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, error) { // panic("mock out the GetGpuInstanceRemainingCapacity method") // }, -// GetGpuInstancesFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { +// GetGpuInstancesFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, error) { // panic("mock out the GetGpuInstances method") // }, -// GetGpuMaxPcieLinkGenerationFunc: func() (int, nvml.Return) { +// GetGpuMaxPcieLinkGenerationFunc: func() (int, error) { // panic("mock out the GetGpuMaxPcieLinkGeneration method") // }, -// GetGpuOperationModeFunc: func() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { +// GetGpuOperationModeFunc: func() (nvml.GpuOperationMode, nvml.GpuOperationMode, error) { // panic("mock out the GetGpuOperationMode method") // }, -// GetGraphicsRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { +// GetGraphicsRunningProcessesFunc: func() ([]nvml.ProcessInfo, error) { // panic("mock out the GetGraphicsRunningProcesses method") // }, -// GetGridLicensableFeaturesFunc: func() (nvml.GridLicensableFeatures, nvml.Return) { +// GetGridLicensableFeaturesFunc: func() (nvml.GridLicensableFeatures, error) { // panic("mock out the GetGridLicensableFeatures method") // }, -// GetGspFirmwareModeFunc: func() (bool, bool, nvml.Return) { +// GetGspFirmwareModeFunc: func() (bool, bool, error) { // panic("mock out the GetGspFirmwareMode method") // }, -// GetGspFirmwareVersionFunc: func() (string, nvml.Return) { +// GetGspFirmwareVersionFunc: func() (string, error) { // panic("mock out the GetGspFirmwareVersion method") // }, -// GetHostVgpuModeFunc: func() (nvml.HostVgpuMode, nvml.Return) { +// GetHostVgpuModeFunc: func() (nvml.HostVgpuMode, error) { // panic("mock out the GetHostVgpuMode method") // }, -// GetIndexFunc: func() (int, nvml.Return) { +// GetIndexFunc: func() (int, error) { // panic("mock out the GetIndex method") // }, -// GetInforomConfigurationChecksumFunc: func() (uint32, nvml.Return) { +// GetInforomConfigurationChecksumFunc: func() (uint32, error) { // panic("mock out the GetInforomConfigurationChecksum method") // }, -// GetInforomImageVersionFunc: func() (string, nvml.Return) { +// GetInforomImageVersionFunc: func() (string, error) { // panic("mock out the GetInforomImageVersion method") // }, -// GetInforomVersionFunc: func(inforomObject nvml.InforomObject) (string, nvml.Return) { +// GetInforomVersionFunc: func(inforomObject nvml.InforomObject) (string, error) { // panic("mock out the GetInforomVersion method") // }, -// GetIrqNumFunc: func() (int, nvml.Return) { +// GetIrqNumFunc: func() (int, error) { // panic("mock out the GetIrqNum method") // }, -// GetJpgUtilizationFunc: func() (uint32, uint32, nvml.Return) { +// GetJpgUtilizationFunc: func() (uint32, uint32, error) { // panic("mock out the GetJpgUtilization method") // }, -// GetLastBBXFlushTimeFunc: func() (uint64, uint, nvml.Return) { +// GetLastBBXFlushTimeFunc: func() (uint64, uint, error) { // panic("mock out the GetLastBBXFlushTime method") // }, -// GetMPSComputeRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { +// GetMPSComputeRunningProcessesFunc: func() ([]nvml.ProcessInfo, error) { // panic("mock out the GetMPSComputeRunningProcesses method") // }, -// GetMaxClockInfoFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { +// GetMaxClockInfoFunc: func(clockType nvml.ClockType) (uint32, error) { // panic("mock out the GetMaxClockInfo method") // }, -// GetMaxCustomerBoostClockFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { +// GetMaxCustomerBoostClockFunc: func(clockType nvml.ClockType) (uint32, error) { // panic("mock out the GetMaxCustomerBoostClock method") // }, -// GetMaxMigDeviceCountFunc: func() (int, nvml.Return) { +// GetMaxMigDeviceCountFunc: func() (int, error) { // panic("mock out the GetMaxMigDeviceCount method") // }, -// GetMaxPcieLinkGenerationFunc: func() (int, nvml.Return) { +// GetMaxPcieLinkGenerationFunc: func() (int, error) { // panic("mock out the GetMaxPcieLinkGeneration method") // }, -// GetMaxPcieLinkWidthFunc: func() (int, nvml.Return) { +// GetMaxPcieLinkWidthFunc: func() (int, error) { // panic("mock out the GetMaxPcieLinkWidth method") // }, -// GetMemClkMinMaxVfOffsetFunc: func() (int, int, nvml.Return) { +// GetMemClkMinMaxVfOffsetFunc: func() (int, int, error) { // panic("mock out the GetMemClkMinMaxVfOffset method") // }, -// GetMemClkVfOffsetFunc: func() (int, nvml.Return) { +// GetMemClkVfOffsetFunc: func() (int, error) { // panic("mock out the GetMemClkVfOffset method") // }, -// GetMemoryAffinityFunc: func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +// GetMemoryAffinityFunc: func(n int, affinityScope nvml.AffinityScope) ([]uint, error) { // panic("mock out the GetMemoryAffinity method") // }, -// GetMemoryBusWidthFunc: func() (uint32, nvml.Return) { +// GetMemoryBusWidthFunc: func() (uint32, error) { // panic("mock out the GetMemoryBusWidth method") // }, -// GetMemoryErrorCounterFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { +// GetMemoryErrorCounterFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, error) { // panic("mock out the GetMemoryErrorCounter method") // }, -// GetMemoryInfoFunc: func() (nvml.Memory, nvml.Return) { +// GetMemoryInfoFunc: func() (nvml.Memory, error) { // panic("mock out the GetMemoryInfo method") // }, -// GetMemoryInfo_v2Func: func() (nvml.Memory_v2, nvml.Return) { +// GetMemoryInfo_v2Func: func() (nvml.Memory_v2, error) { // panic("mock out the GetMemoryInfo_v2 method") // }, -// GetMigDeviceHandleByIndexFunc: func(n int) (nvml.Device, nvml.Return) { +// GetMigDeviceHandleByIndexFunc: func(n int) (nvml.Device, error) { // panic("mock out the GetMigDeviceHandleByIndex method") // }, -// GetMigModeFunc: func() (int, int, nvml.Return) { +// GetMigModeFunc: func() (int, int, error) { // panic("mock out the GetMigMode method") // }, -// GetMinMaxClockOfPStateFunc: func(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { +// GetMinMaxClockOfPStateFunc: func(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, error) { // panic("mock out the GetMinMaxClockOfPState method") // }, -// GetMinMaxFanSpeedFunc: func() (int, int, nvml.Return) { +// GetMinMaxFanSpeedFunc: func() (int, int, error) { // panic("mock out the GetMinMaxFanSpeed method") // }, -// GetMinorNumberFunc: func() (int, nvml.Return) { +// GetMinorNumberFunc: func() (int, error) { // panic("mock out the GetMinorNumber method") // }, -// GetModuleIdFunc: func() (int, nvml.Return) { +// GetModuleIdFunc: func() (int, error) { // panic("mock out the GetModuleId method") // }, -// GetMultiGpuBoardFunc: func() (int, nvml.Return) { +// GetMultiGpuBoardFunc: func() (int, error) { // panic("mock out the GetMultiGpuBoard method") // }, -// GetNameFunc: func() (string, nvml.Return) { +// GetNameFunc: func() (string, error) { // panic("mock out the GetName method") // }, -// GetNumFansFunc: func() (int, nvml.Return) { +// GetNumFansFunc: func() (int, error) { // panic("mock out the GetNumFans method") // }, -// GetNumGpuCoresFunc: func() (int, nvml.Return) { +// GetNumGpuCoresFunc: func() (int, error) { // panic("mock out the GetNumGpuCores method") // }, -// GetNumaNodeIdFunc: func() (int, nvml.Return) { +// GetNumaNodeIdFunc: func() (int, error) { // panic("mock out the GetNumaNodeId method") // }, -// GetNvLinkCapabilityFunc: func(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { +// GetNvLinkCapabilityFunc: func(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, error) { // panic("mock out the GetNvLinkCapability method") // }, -// GetNvLinkErrorCounterFunc: func(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { +// GetNvLinkErrorCounterFunc: func(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, error) { // panic("mock out the GetNvLinkErrorCounter method") // }, -// GetNvLinkRemoteDeviceTypeFunc: func(n int) (nvml.IntNvLinkDeviceType, nvml.Return) { +// GetNvLinkRemoteDeviceTypeFunc: func(n int) (nvml.IntNvLinkDeviceType, error) { // panic("mock out the GetNvLinkRemoteDeviceType method") // }, -// GetNvLinkRemotePciInfoFunc: func(n int) (nvml.PciInfo, nvml.Return) { +// GetNvLinkRemotePciInfoFunc: func(n int) (nvml.PciInfo, error) { // panic("mock out the GetNvLinkRemotePciInfo method") // }, -// GetNvLinkStateFunc: func(n int) (nvml.EnableState, nvml.Return) { +// GetNvLinkStateFunc: func(n int) (nvml.EnableState, error) { // panic("mock out the GetNvLinkState method") // }, -// GetNvLinkUtilizationControlFunc: func(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { +// GetNvLinkUtilizationControlFunc: func(n1 int, n2 int) (nvml.NvLinkUtilizationControl, error) { // panic("mock out the GetNvLinkUtilizationControl method") // }, -// GetNvLinkUtilizationCounterFunc: func(n1 int, n2 int) (uint64, uint64, nvml.Return) { +// GetNvLinkUtilizationCounterFunc: func(n1 int, n2 int) (uint64, uint64, error) { // panic("mock out the GetNvLinkUtilizationCounter method") // }, -// GetNvLinkVersionFunc: func(n int) (uint32, nvml.Return) { +// GetNvLinkVersionFunc: func(n int) (uint32, error) { // panic("mock out the GetNvLinkVersion method") // }, -// GetOfaUtilizationFunc: func() (uint32, uint32, nvml.Return) { +// GetOfaUtilizationFunc: func() (uint32, uint32, error) { // panic("mock out the GetOfaUtilization method") // }, -// GetP2PStatusFunc: func(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { +// GetP2PStatusFunc: func(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, error) { // panic("mock out the GetP2PStatus method") // }, -// GetPciInfoFunc: func() (nvml.PciInfo, nvml.Return) { +// GetPciInfoFunc: func() (nvml.PciInfo, error) { // panic("mock out the GetPciInfo method") // }, -// GetPciInfoExtFunc: func() (nvml.PciInfoExt, nvml.Return) { +// GetPciInfoExtFunc: func() (nvml.PciInfoExt, error) { // panic("mock out the GetPciInfoExt method") // }, -// GetPcieLinkMaxSpeedFunc: func() (uint32, nvml.Return) { +// GetPcieLinkMaxSpeedFunc: func() (uint32, error) { // panic("mock out the GetPcieLinkMaxSpeed method") // }, -// GetPcieReplayCounterFunc: func() (int, nvml.Return) { +// GetPcieReplayCounterFunc: func() (int, error) { // panic("mock out the GetPcieReplayCounter method") // }, -// GetPcieSpeedFunc: func() (int, nvml.Return) { +// GetPcieSpeedFunc: func() (int, error) { // panic("mock out the GetPcieSpeed method") // }, -// GetPcieThroughputFunc: func(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { +// GetPcieThroughputFunc: func(pcieUtilCounter nvml.PcieUtilCounter) (uint32, error) { // panic("mock out the GetPcieThroughput method") // }, -// GetPerformanceStateFunc: func() (nvml.Pstates, nvml.Return) { +// GetPerformanceStateFunc: func() (nvml.Pstates, error) { // panic("mock out the GetPerformanceState method") // }, -// GetPersistenceModeFunc: func() (nvml.EnableState, nvml.Return) { +// GetPersistenceModeFunc: func() (nvml.EnableState, error) { // panic("mock out the GetPersistenceMode method") // }, -// GetPgpuMetadataStringFunc: func() (string, nvml.Return) { +// GetPgpuMetadataStringFunc: func() (string, error) { // panic("mock out the GetPgpuMetadataString method") // }, -// GetPowerManagementDefaultLimitFunc: func() (uint32, nvml.Return) { +// GetPowerManagementDefaultLimitFunc: func() (uint32, error) { // panic("mock out the GetPowerManagementDefaultLimit method") // }, -// GetPowerManagementLimitFunc: func() (uint32, nvml.Return) { +// GetPowerManagementLimitFunc: func() (uint32, error) { // panic("mock out the GetPowerManagementLimit method") // }, -// GetPowerManagementLimitConstraintsFunc: func() (uint32, uint32, nvml.Return) { +// GetPowerManagementLimitConstraintsFunc: func() (uint32, uint32, error) { // panic("mock out the GetPowerManagementLimitConstraints method") // }, -// GetPowerManagementModeFunc: func() (nvml.EnableState, nvml.Return) { +// GetPowerManagementModeFunc: func() (nvml.EnableState, error) { // panic("mock out the GetPowerManagementMode method") // }, -// GetPowerSourceFunc: func() (nvml.PowerSource, nvml.Return) { +// GetPowerSourceFunc: func() (nvml.PowerSource, error) { // panic("mock out the GetPowerSource method") // }, -// GetPowerStateFunc: func() (nvml.Pstates, nvml.Return) { +// GetPowerStateFunc: func() (nvml.Pstates, error) { // panic("mock out the GetPowerState method") // }, -// GetPowerUsageFunc: func() (uint32, nvml.Return) { +// GetPowerUsageFunc: func() (uint32, error) { // panic("mock out the GetPowerUsage method") // }, -// GetProcessUtilizationFunc: func(v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { +// GetProcessUtilizationFunc: func(v uint64) ([]nvml.ProcessUtilizationSample, error) { // panic("mock out the GetProcessUtilization method") // }, -// GetProcessesUtilizationInfoFunc: func() (nvml.ProcessesUtilizationInfo, nvml.Return) { +// GetProcessesUtilizationInfoFunc: func() (nvml.ProcessesUtilizationInfo, error) { // panic("mock out the GetProcessesUtilizationInfo method") // }, -// GetRemappedRowsFunc: func() (int, int, bool, bool, nvml.Return) { +// GetRemappedRowsFunc: func() (int, int, bool, bool, error) { // panic("mock out the GetRemappedRows method") // }, -// GetRetiredPagesFunc: func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { +// GetRetiredPagesFunc: func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, error) { // panic("mock out the GetRetiredPages method") // }, -// GetRetiredPagesPendingStatusFunc: func() (nvml.EnableState, nvml.Return) { +// GetRetiredPagesPendingStatusFunc: func() (nvml.EnableState, error) { // panic("mock out the GetRetiredPagesPendingStatus method") // }, -// GetRetiredPages_v2Func: func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { +// GetRetiredPages_v2Func: func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, error) { // panic("mock out the GetRetiredPages_v2 method") // }, -// GetRowRemapperHistogramFunc: func() (nvml.RowRemapperHistogramValues, nvml.Return) { +// GetRowRemapperHistogramFunc: func() (nvml.RowRemapperHistogramValues, error) { // panic("mock out the GetRowRemapperHistogram method") // }, -// GetRunningProcessDetailListFunc: func() (nvml.ProcessDetailList, nvml.Return) { +// GetRunningProcessDetailListFunc: func() (nvml.ProcessDetailList, error) { // panic("mock out the GetRunningProcessDetailList method") // }, -// GetSamplesFunc: func(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { +// GetSamplesFunc: func(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, error) { // panic("mock out the GetSamples method") // }, -// GetSerialFunc: func() (string, nvml.Return) { +// GetSerialFunc: func() (string, error) { // panic("mock out the GetSerial method") // }, -// GetSramEccErrorStatusFunc: func() (nvml.EccSramErrorStatus, nvml.Return) { +// GetSramEccErrorStatusFunc: func() (nvml.EccSramErrorStatus, error) { // panic("mock out the GetSramEccErrorStatus method") // }, -// GetSupportedClocksEventReasonsFunc: func() (uint64, nvml.Return) { +// GetSupportedClocksEventReasonsFunc: func() (uint64, error) { // panic("mock out the GetSupportedClocksEventReasons method") // }, -// GetSupportedClocksThrottleReasonsFunc: func() (uint64, nvml.Return) { +// GetSupportedClocksThrottleReasonsFunc: func() (uint64, error) { // panic("mock out the GetSupportedClocksThrottleReasons method") // }, -// GetSupportedEventTypesFunc: func() (uint64, nvml.Return) { +// GetSupportedEventTypesFunc: func() (uint64, error) { // panic("mock out the GetSupportedEventTypes method") // }, -// GetSupportedGraphicsClocksFunc: func(n int) (int, uint32, nvml.Return) { +// GetSupportedGraphicsClocksFunc: func(n int) (int, uint32, error) { // panic("mock out the GetSupportedGraphicsClocks method") // }, -// GetSupportedMemoryClocksFunc: func() (int, uint32, nvml.Return) { +// GetSupportedMemoryClocksFunc: func() (int, uint32, error) { // panic("mock out the GetSupportedMemoryClocks method") // }, -// GetSupportedPerformanceStatesFunc: func() ([]nvml.Pstates, nvml.Return) { +// GetSupportedPerformanceStatesFunc: func() ([]nvml.Pstates, error) { // panic("mock out the GetSupportedPerformanceStates method") // }, -// GetSupportedVgpusFunc: func() ([]nvml.VgpuTypeId, nvml.Return) { +// GetSupportedVgpusFunc: func() ([]nvml.VgpuTypeId, error) { // panic("mock out the GetSupportedVgpus method") // }, -// GetTargetFanSpeedFunc: func(n int) (int, nvml.Return) { +// GetTargetFanSpeedFunc: func(n int) (int, error) { // panic("mock out the GetTargetFanSpeed method") // }, -// GetTemperatureFunc: func(temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { +// GetTemperatureFunc: func(temperatureSensors nvml.TemperatureSensors) (uint32, error) { // panic("mock out the GetTemperature method") // }, -// GetTemperatureThresholdFunc: func(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { +// GetTemperatureThresholdFunc: func(temperatureThresholds nvml.TemperatureThresholds) (uint32, error) { // panic("mock out the GetTemperatureThreshold method") // }, -// GetThermalSettingsFunc: func(v uint32) (nvml.GpuThermalSettings, nvml.Return) { +// GetThermalSettingsFunc: func(v uint32) (nvml.GpuThermalSettings, error) { // panic("mock out the GetThermalSettings method") // }, -// GetTopologyCommonAncestorFunc: func(device nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { +// GetTopologyCommonAncestorFunc: func(device nvml.Device) (nvml.GpuTopologyLevel, error) { // panic("mock out the GetTopologyCommonAncestor method") // }, -// GetTopologyNearestGpusFunc: func(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { +// GetTopologyNearestGpusFunc: func(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, error) { // panic("mock out the GetTopologyNearestGpus method") // }, -// GetTotalEccErrorsFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { +// GetTotalEccErrorsFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, error) { // panic("mock out the GetTotalEccErrors method") // }, -// GetTotalEnergyConsumptionFunc: func() (uint64, nvml.Return) { +// GetTotalEnergyConsumptionFunc: func() (uint64, error) { // panic("mock out the GetTotalEnergyConsumption method") // }, -// GetUUIDFunc: func() (string, nvml.Return) { +// GetUUIDFunc: func() (string, error) { // panic("mock out the GetUUID method") // }, -// GetUtilizationRatesFunc: func() (nvml.Utilization, nvml.Return) { +// GetUtilizationRatesFunc: func() (nvml.Utilization, error) { // panic("mock out the GetUtilizationRates method") // }, -// GetVbiosVersionFunc: func() (string, nvml.Return) { +// GetVbiosVersionFunc: func() (string, error) { // panic("mock out the GetVbiosVersion method") // }, -// GetVgpuCapabilitiesFunc: func(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { +// GetVgpuCapabilitiesFunc: func(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, error) { // panic("mock out the GetVgpuCapabilities method") // }, -// GetVgpuHeterogeneousModeFunc: func() (nvml.VgpuHeterogeneousMode, nvml.Return) { +// GetVgpuHeterogeneousModeFunc: func() (nvml.VgpuHeterogeneousMode, error) { // panic("mock out the GetVgpuHeterogeneousMode method") // }, -// GetVgpuInstancesUtilizationInfoFunc: func() (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { +// GetVgpuInstancesUtilizationInfoFunc: func() (nvml.VgpuInstancesUtilizationInfo, error) { // panic("mock out the GetVgpuInstancesUtilizationInfo method") // }, -// GetVgpuMetadataFunc: func() (nvml.VgpuPgpuMetadata, nvml.Return) { +// GetVgpuMetadataFunc: func() (nvml.VgpuPgpuMetadata, error) { // panic("mock out the GetVgpuMetadata method") // }, -// GetVgpuProcessUtilizationFunc: func(v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { +// GetVgpuProcessUtilizationFunc: func(v uint64) ([]nvml.VgpuProcessUtilizationSample, error) { // panic("mock out the GetVgpuProcessUtilization method") // }, -// GetVgpuProcessesUtilizationInfoFunc: func() (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { +// GetVgpuProcessesUtilizationInfoFunc: func() (nvml.VgpuProcessesUtilizationInfo, error) { // panic("mock out the GetVgpuProcessesUtilizationInfo method") // }, -// GetVgpuSchedulerCapabilitiesFunc: func() (nvml.VgpuSchedulerCapabilities, nvml.Return) { +// GetVgpuSchedulerCapabilitiesFunc: func() (nvml.VgpuSchedulerCapabilities, error) { // panic("mock out the GetVgpuSchedulerCapabilities method") // }, -// GetVgpuSchedulerLogFunc: func() (nvml.VgpuSchedulerLog, nvml.Return) { +// GetVgpuSchedulerLogFunc: func() (nvml.VgpuSchedulerLog, error) { // panic("mock out the GetVgpuSchedulerLog method") // }, -// GetVgpuSchedulerStateFunc: func() (nvml.VgpuSchedulerGetState, nvml.Return) { +// GetVgpuSchedulerStateFunc: func() (nvml.VgpuSchedulerGetState, error) { // panic("mock out the GetVgpuSchedulerState method") // }, -// GetVgpuTypeCreatablePlacementsFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +// GetVgpuTypeCreatablePlacementsFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) { // panic("mock out the GetVgpuTypeCreatablePlacements method") // }, -// GetVgpuTypeSupportedPlacementsFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +// GetVgpuTypeSupportedPlacementsFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) { // panic("mock out the GetVgpuTypeSupportedPlacements method") // }, -// GetVgpuUtilizationFunc: func(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { +// GetVgpuUtilizationFunc: func(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, error) { // panic("mock out the GetVgpuUtilization method") // }, -// GetViolationStatusFunc: func(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { +// GetViolationStatusFunc: func(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, error) { // panic("mock out the GetViolationStatus method") // }, -// GetVirtualizationModeFunc: func() (nvml.GpuVirtualizationMode, nvml.Return) { +// GetVirtualizationModeFunc: func() (nvml.GpuVirtualizationMode, error) { // panic("mock out the GetVirtualizationMode method") // }, -// GpmMigSampleGetFunc: func(n int, gpmSample nvml.GpmSample) nvml.Return { +// GpmMigSampleGetFunc: func(n int, gpmSample nvml.GpmSample) error { // panic("mock out the GpmMigSampleGet method") // }, -// GpmQueryDeviceSupportFunc: func() (nvml.GpmSupport, nvml.Return) { +// GpmQueryDeviceSupportFunc: func() (nvml.GpmSupport, error) { // panic("mock out the GpmQueryDeviceSupport method") // }, // GpmQueryDeviceSupportVFunc: func() nvml.GpmSupportV { // panic("mock out the GpmQueryDeviceSupportV method") // }, -// GpmQueryIfStreamingEnabledFunc: func() (uint32, nvml.Return) { +// GpmQueryIfStreamingEnabledFunc: func() (uint32, error) { // panic("mock out the GpmQueryIfStreamingEnabled method") // }, -// GpmSampleGetFunc: func(gpmSample nvml.GpmSample) nvml.Return { +// GpmSampleGetFunc: func(gpmSample nvml.GpmSample) error { // panic("mock out the GpmSampleGet method") // }, -// GpmSetStreamingEnabledFunc: func(v uint32) nvml.Return { +// GpmSetStreamingEnabledFunc: func(v uint32) error { // panic("mock out the GpmSetStreamingEnabled method") // }, -// IsMigDeviceHandleFunc: func() (bool, nvml.Return) { +// IsMigDeviceHandleFunc: func() (bool, error) { // panic("mock out the IsMigDeviceHandle method") // }, -// OnSameBoardFunc: func(device nvml.Device) (int, nvml.Return) { +// OnSameBoardFunc: func(device nvml.Device) (int, error) { // panic("mock out the OnSameBoard method") // }, -// RegisterEventsFunc: func(v uint64, eventSet nvml.EventSet) nvml.Return { +// RegisterEventsFunc: func(v uint64, eventSet nvml.EventSet) error { // panic("mock out the RegisterEvents method") // }, -// ResetApplicationsClocksFunc: func() nvml.Return { +// ResetApplicationsClocksFunc: func() error { // panic("mock out the ResetApplicationsClocks method") // }, -// ResetGpuLockedClocksFunc: func() nvml.Return { +// ResetGpuLockedClocksFunc: func() error { // panic("mock out the ResetGpuLockedClocks method") // }, -// ResetMemoryLockedClocksFunc: func() nvml.Return { +// ResetMemoryLockedClocksFunc: func() error { // panic("mock out the ResetMemoryLockedClocks method") // }, -// ResetNvLinkErrorCountersFunc: func(n int) nvml.Return { +// ResetNvLinkErrorCountersFunc: func(n int) error { // panic("mock out the ResetNvLinkErrorCounters method") // }, -// ResetNvLinkUtilizationCounterFunc: func(n1 int, n2 int) nvml.Return { +// ResetNvLinkUtilizationCounterFunc: func(n1 int, n2 int) error { // panic("mock out the ResetNvLinkUtilizationCounter method") // }, -// SetAPIRestrictionFunc: func(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { +// SetAPIRestrictionFunc: func(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) error { // panic("mock out the SetAPIRestriction method") // }, -// SetAccountingModeFunc: func(enableState nvml.EnableState) nvml.Return { +// SetAccountingModeFunc: func(enableState nvml.EnableState) error { // panic("mock out the SetAccountingMode method") // }, -// SetApplicationsClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { +// SetApplicationsClocksFunc: func(v1 uint32, v2 uint32) error { // panic("mock out the SetApplicationsClocks method") // }, -// SetAutoBoostedClocksEnabledFunc: func(enableState nvml.EnableState) nvml.Return { +// SetAutoBoostedClocksEnabledFunc: func(enableState nvml.EnableState) error { // panic("mock out the SetAutoBoostedClocksEnabled method") // }, -// SetComputeModeFunc: func(computeMode nvml.ComputeMode) nvml.Return { +// SetComputeModeFunc: func(computeMode nvml.ComputeMode) error { // panic("mock out the SetComputeMode method") // }, -// SetConfComputeUnprotectedMemSizeFunc: func(v uint64) nvml.Return { +// SetConfComputeUnprotectedMemSizeFunc: func(v uint64) error { // panic("mock out the SetConfComputeUnprotectedMemSize method") // }, -// SetCpuAffinityFunc: func() nvml.Return { +// SetCpuAffinityFunc: func() error { // panic("mock out the SetCpuAffinity method") // }, -// SetDefaultAutoBoostedClocksEnabledFunc: func(enableState nvml.EnableState, v uint32) nvml.Return { +// SetDefaultAutoBoostedClocksEnabledFunc: func(enableState nvml.EnableState, v uint32) error { // panic("mock out the SetDefaultAutoBoostedClocksEnabled method") // }, -// SetDefaultFanSpeed_v2Func: func(n int) nvml.Return { +// SetDefaultFanSpeed_v2Func: func(n int) error { // panic("mock out the SetDefaultFanSpeed_v2 method") // }, -// SetDriverModelFunc: func(driverModel nvml.DriverModel, v uint32) nvml.Return { +// SetDriverModelFunc: func(driverModel nvml.DriverModel, v uint32) error { // panic("mock out the SetDriverModel method") // }, -// SetEccModeFunc: func(enableState nvml.EnableState) nvml.Return { +// SetEccModeFunc: func(enableState nvml.EnableState) error { // panic("mock out the SetEccMode method") // }, -// SetFanControlPolicyFunc: func(n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { +// SetFanControlPolicyFunc: func(n int, fanControlPolicy nvml.FanControlPolicy) error { // panic("mock out the SetFanControlPolicy method") // }, -// SetFanSpeed_v2Func: func(n1 int, n2 int) nvml.Return { +// SetFanSpeed_v2Func: func(n1 int, n2 int) error { // panic("mock out the SetFanSpeed_v2 method") // }, -// SetGpcClkVfOffsetFunc: func(n int) nvml.Return { +// SetGpcClkVfOffsetFunc: func(n int) error { // panic("mock out the SetGpcClkVfOffset method") // }, -// SetGpuLockedClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { +// SetGpuLockedClocksFunc: func(v1 uint32, v2 uint32) error { // panic("mock out the SetGpuLockedClocks method") // }, -// SetGpuOperationModeFunc: func(gpuOperationMode nvml.GpuOperationMode) nvml.Return { +// SetGpuOperationModeFunc: func(gpuOperationMode nvml.GpuOperationMode) error { // panic("mock out the SetGpuOperationMode method") // }, -// SetMemClkVfOffsetFunc: func(n int) nvml.Return { +// SetMemClkVfOffsetFunc: func(n int) error { // panic("mock out the SetMemClkVfOffset method") // }, -// SetMemoryLockedClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { +// SetMemoryLockedClocksFunc: func(v1 uint32, v2 uint32) error { // panic("mock out the SetMemoryLockedClocks method") // }, -// SetMigModeFunc: func(n int) (nvml.Return, nvml.Return) { +// SetMigModeFunc: func(n int) (error, error) { // panic("mock out the SetMigMode method") // }, -// SetNvLinkDeviceLowPowerThresholdFunc: func(nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { +// SetNvLinkDeviceLowPowerThresholdFunc: func(nvLinkPowerThres *nvml.NvLinkPowerThres) error { // panic("mock out the SetNvLinkDeviceLowPowerThreshold method") // }, -// SetNvLinkUtilizationControlFunc: func(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { +// SetNvLinkUtilizationControlFunc: func(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) error { // panic("mock out the SetNvLinkUtilizationControl method") // }, -// SetPersistenceModeFunc: func(enableState nvml.EnableState) nvml.Return { +// SetPersistenceModeFunc: func(enableState nvml.EnableState) error { // panic("mock out the SetPersistenceMode method") // }, -// SetPowerManagementLimitFunc: func(v uint32) nvml.Return { +// SetPowerManagementLimitFunc: func(v uint32) error { // panic("mock out the SetPowerManagementLimit method") // }, -// SetPowerManagementLimit_v2Func: func(powerValue_v2 *nvml.PowerValue_v2) nvml.Return { +// SetPowerManagementLimit_v2Func: func(powerValue_v2 *nvml.PowerValue_v2) error { // panic("mock out the SetPowerManagementLimit_v2 method") // }, -// SetTemperatureThresholdFunc: func(temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { +// SetTemperatureThresholdFunc: func(temperatureThresholds nvml.TemperatureThresholds, n int) error { // panic("mock out the SetTemperatureThreshold method") // }, -// SetVgpuCapabilitiesFunc: func(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { +// SetVgpuCapabilitiesFunc: func(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) error { // panic("mock out the SetVgpuCapabilities method") // }, -// SetVgpuHeterogeneousModeFunc: func(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { +// SetVgpuHeterogeneousModeFunc: func(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) error { // panic("mock out the SetVgpuHeterogeneousMode method") // }, -// SetVgpuSchedulerStateFunc: func(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { +// SetVgpuSchedulerStateFunc: func(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) error { // panic("mock out the SetVgpuSchedulerState method") // }, -// SetVirtualizationModeFunc: func(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { +// SetVirtualizationModeFunc: func(gpuVirtualizationMode nvml.GpuVirtualizationMode) error { // panic("mock out the SetVirtualizationMode method") // }, -// ValidateInforomFunc: func() nvml.Return { +// ValidateInforomFunc: func() error { // panic("mock out the ValidateInforom method") // }, -// VgpuTypeGetMaxInstancesFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +// VgpuTypeGetMaxInstancesFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, error) { // panic("mock out the VgpuTypeGetMaxInstances method") // }, // } @@ -707,685 +707,685 @@ var _ nvml.Device = &Device{} // } type Device struct { // ClearAccountingPidsFunc mocks the ClearAccountingPids method. - ClearAccountingPidsFunc func() nvml.Return + ClearAccountingPidsFunc func() error // ClearCpuAffinityFunc mocks the ClearCpuAffinity method. - ClearCpuAffinityFunc func() nvml.Return + ClearCpuAffinityFunc func() error // ClearEccErrorCountsFunc mocks the ClearEccErrorCounts method. - ClearEccErrorCountsFunc func(eccCounterType nvml.EccCounterType) nvml.Return + ClearEccErrorCountsFunc func(eccCounterType nvml.EccCounterType) error // ClearFieldValuesFunc mocks the ClearFieldValues method. - ClearFieldValuesFunc func(fieldValues []nvml.FieldValue) nvml.Return + ClearFieldValuesFunc func(fieldValues []nvml.FieldValue) error // CreateGpuInstanceFunc mocks the CreateGpuInstance method. - CreateGpuInstanceFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) + CreateGpuInstanceFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, error) // CreateGpuInstanceWithPlacementFunc mocks the CreateGpuInstanceWithPlacement method. - CreateGpuInstanceWithPlacementFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) + CreateGpuInstanceWithPlacementFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, error) // FreezeNvLinkUtilizationCounterFunc mocks the FreezeNvLinkUtilizationCounter method. - FreezeNvLinkUtilizationCounterFunc func(n1 int, n2 int, enableState nvml.EnableState) nvml.Return + FreezeNvLinkUtilizationCounterFunc func(n1 int, n2 int, enableState nvml.EnableState) error // GetAPIRestrictionFunc mocks the GetAPIRestriction method. - GetAPIRestrictionFunc func(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) + GetAPIRestrictionFunc func(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, error) // GetAccountingBufferSizeFunc mocks the GetAccountingBufferSize method. - GetAccountingBufferSizeFunc func() (int, nvml.Return) + GetAccountingBufferSizeFunc func() (int, error) // GetAccountingModeFunc mocks the GetAccountingMode method. - GetAccountingModeFunc func() (nvml.EnableState, nvml.Return) + GetAccountingModeFunc func() (nvml.EnableState, error) // GetAccountingPidsFunc mocks the GetAccountingPids method. - GetAccountingPidsFunc func() ([]int, nvml.Return) + GetAccountingPidsFunc func() ([]int, error) // GetAccountingStatsFunc mocks the GetAccountingStats method. - GetAccountingStatsFunc func(v uint32) (nvml.AccountingStats, nvml.Return) + GetAccountingStatsFunc func(v uint32) (nvml.AccountingStats, error) // GetActiveVgpusFunc mocks the GetActiveVgpus method. - GetActiveVgpusFunc func() ([]nvml.VgpuInstance, nvml.Return) + GetActiveVgpusFunc func() ([]nvml.VgpuInstance, error) // GetAdaptiveClockInfoStatusFunc mocks the GetAdaptiveClockInfoStatus method. - GetAdaptiveClockInfoStatusFunc func() (uint32, nvml.Return) + GetAdaptiveClockInfoStatusFunc func() (uint32, error) // GetApplicationsClockFunc mocks the GetApplicationsClock method. - GetApplicationsClockFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + GetApplicationsClockFunc func(clockType nvml.ClockType) (uint32, error) // GetArchitectureFunc mocks the GetArchitecture method. - GetArchitectureFunc func() (nvml.DeviceArchitecture, nvml.Return) + GetArchitectureFunc func() (nvml.DeviceArchitecture, error) // GetAttributesFunc mocks the GetAttributes method. - GetAttributesFunc func() (nvml.DeviceAttributes, nvml.Return) + GetAttributesFunc func() (nvml.DeviceAttributes, error) // GetAutoBoostedClocksEnabledFunc mocks the GetAutoBoostedClocksEnabled method. - GetAutoBoostedClocksEnabledFunc func() (nvml.EnableState, nvml.EnableState, nvml.Return) + GetAutoBoostedClocksEnabledFunc func() (nvml.EnableState, nvml.EnableState, error) // GetBAR1MemoryInfoFunc mocks the GetBAR1MemoryInfo method. - GetBAR1MemoryInfoFunc func() (nvml.BAR1Memory, nvml.Return) + GetBAR1MemoryInfoFunc func() (nvml.BAR1Memory, error) // GetBoardIdFunc mocks the GetBoardId method. - GetBoardIdFunc func() (uint32, nvml.Return) + GetBoardIdFunc func() (uint32, error) // GetBoardPartNumberFunc mocks the GetBoardPartNumber method. - GetBoardPartNumberFunc func() (string, nvml.Return) + GetBoardPartNumberFunc func() (string, error) // GetBrandFunc mocks the GetBrand method. - GetBrandFunc func() (nvml.BrandType, nvml.Return) + GetBrandFunc func() (nvml.BrandType, error) // GetBridgeChipInfoFunc mocks the GetBridgeChipInfo method. - GetBridgeChipInfoFunc func() (nvml.BridgeChipHierarchy, nvml.Return) + GetBridgeChipInfoFunc func() (nvml.BridgeChipHierarchy, error) // GetBusTypeFunc mocks the GetBusType method. - GetBusTypeFunc func() (nvml.BusType, nvml.Return) + GetBusTypeFunc func() (nvml.BusType, error) // GetC2cModeInfoVFunc mocks the GetC2cModeInfoV method. GetC2cModeInfoVFunc func() nvml.C2cModeInfoHandler // GetClkMonStatusFunc mocks the GetClkMonStatus method. - GetClkMonStatusFunc func() (nvml.ClkMonStatus, nvml.Return) + GetClkMonStatusFunc func() (nvml.ClkMonStatus, error) // GetClockFunc mocks the GetClock method. - GetClockFunc func(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) + GetClockFunc func(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, error) // GetClockInfoFunc mocks the GetClockInfo method. - GetClockInfoFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + GetClockInfoFunc func(clockType nvml.ClockType) (uint32, error) // GetComputeInstanceIdFunc mocks the GetComputeInstanceId method. - GetComputeInstanceIdFunc func() (int, nvml.Return) + GetComputeInstanceIdFunc func() (int, error) // GetComputeModeFunc mocks the GetComputeMode method. - GetComputeModeFunc func() (nvml.ComputeMode, nvml.Return) + GetComputeModeFunc func() (nvml.ComputeMode, error) // GetComputeRunningProcessesFunc mocks the GetComputeRunningProcesses method. - GetComputeRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) + GetComputeRunningProcessesFunc func() ([]nvml.ProcessInfo, error) // GetConfComputeGpuAttestationReportFunc mocks the GetConfComputeGpuAttestationReport method. - GetConfComputeGpuAttestationReportFunc func() (nvml.ConfComputeGpuAttestationReport, nvml.Return) + GetConfComputeGpuAttestationReportFunc func() (nvml.ConfComputeGpuAttestationReport, error) // GetConfComputeGpuCertificateFunc mocks the GetConfComputeGpuCertificate method. - GetConfComputeGpuCertificateFunc func() (nvml.ConfComputeGpuCertificate, nvml.Return) + GetConfComputeGpuCertificateFunc func() (nvml.ConfComputeGpuCertificate, error) // GetConfComputeMemSizeInfoFunc mocks the GetConfComputeMemSizeInfo method. - GetConfComputeMemSizeInfoFunc func() (nvml.ConfComputeMemSizeInfo, nvml.Return) + GetConfComputeMemSizeInfoFunc func() (nvml.ConfComputeMemSizeInfo, error) // GetConfComputeProtectedMemoryUsageFunc mocks the GetConfComputeProtectedMemoryUsage method. - GetConfComputeProtectedMemoryUsageFunc func() (nvml.Memory, nvml.Return) + GetConfComputeProtectedMemoryUsageFunc func() (nvml.Memory, error) // GetCpuAffinityFunc mocks the GetCpuAffinity method. - GetCpuAffinityFunc func(n int) ([]uint, nvml.Return) + GetCpuAffinityFunc func(n int) ([]uint, error) // GetCpuAffinityWithinScopeFunc mocks the GetCpuAffinityWithinScope method. - GetCpuAffinityWithinScopeFunc func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) + GetCpuAffinityWithinScopeFunc func(n int, affinityScope nvml.AffinityScope) ([]uint, error) // GetCreatableVgpusFunc mocks the GetCreatableVgpus method. - GetCreatableVgpusFunc func() ([]nvml.VgpuTypeId, nvml.Return) + GetCreatableVgpusFunc func() ([]nvml.VgpuTypeId, error) // GetCudaComputeCapabilityFunc mocks the GetCudaComputeCapability method. - GetCudaComputeCapabilityFunc func() (int, int, nvml.Return) + GetCudaComputeCapabilityFunc func() (int, int, error) // GetCurrPcieLinkGenerationFunc mocks the GetCurrPcieLinkGeneration method. - GetCurrPcieLinkGenerationFunc func() (int, nvml.Return) + GetCurrPcieLinkGenerationFunc func() (int, error) // GetCurrPcieLinkWidthFunc mocks the GetCurrPcieLinkWidth method. - GetCurrPcieLinkWidthFunc func() (int, nvml.Return) + GetCurrPcieLinkWidthFunc func() (int, error) // GetCurrentClocksEventReasonsFunc mocks the GetCurrentClocksEventReasons method. - GetCurrentClocksEventReasonsFunc func() (uint64, nvml.Return) + GetCurrentClocksEventReasonsFunc func() (uint64, error) // GetCurrentClocksThrottleReasonsFunc mocks the GetCurrentClocksThrottleReasons method. - GetCurrentClocksThrottleReasonsFunc func() (uint64, nvml.Return) + GetCurrentClocksThrottleReasonsFunc func() (uint64, error) // GetDecoderUtilizationFunc mocks the GetDecoderUtilization method. - GetDecoderUtilizationFunc func() (uint32, uint32, nvml.Return) + GetDecoderUtilizationFunc func() (uint32, uint32, error) // GetDefaultApplicationsClockFunc mocks the GetDefaultApplicationsClock method. - GetDefaultApplicationsClockFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + GetDefaultApplicationsClockFunc func(clockType nvml.ClockType) (uint32, error) // GetDefaultEccModeFunc mocks the GetDefaultEccMode method. - GetDefaultEccModeFunc func() (nvml.EnableState, nvml.Return) + GetDefaultEccModeFunc func() (nvml.EnableState, error) // GetDetailedEccErrorsFunc mocks the GetDetailedEccErrors method. - GetDetailedEccErrorsFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) + GetDetailedEccErrorsFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, error) // GetDeviceHandleFromMigDeviceHandleFunc mocks the GetDeviceHandleFromMigDeviceHandle method. - GetDeviceHandleFromMigDeviceHandleFunc func() (nvml.Device, nvml.Return) + GetDeviceHandleFromMigDeviceHandleFunc func() (nvml.Device, error) // GetDisplayActiveFunc mocks the GetDisplayActive method. - GetDisplayActiveFunc func() (nvml.EnableState, nvml.Return) + GetDisplayActiveFunc func() (nvml.EnableState, error) // GetDisplayModeFunc mocks the GetDisplayMode method. - GetDisplayModeFunc func() (nvml.EnableState, nvml.Return) + GetDisplayModeFunc func() (nvml.EnableState, error) // GetDriverModelFunc mocks the GetDriverModel method. - GetDriverModelFunc func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) + GetDriverModelFunc func() (nvml.DriverModel, nvml.DriverModel, error) // GetDynamicPstatesInfoFunc mocks the GetDynamicPstatesInfo method. - GetDynamicPstatesInfoFunc func() (nvml.GpuDynamicPstatesInfo, nvml.Return) + GetDynamicPstatesInfoFunc func() (nvml.GpuDynamicPstatesInfo, error) // GetEccModeFunc mocks the GetEccMode method. - GetEccModeFunc func() (nvml.EnableState, nvml.EnableState, nvml.Return) + GetEccModeFunc func() (nvml.EnableState, nvml.EnableState, error) // GetEncoderCapacityFunc mocks the GetEncoderCapacity method. - GetEncoderCapacityFunc func(encoderType nvml.EncoderType) (int, nvml.Return) + GetEncoderCapacityFunc func(encoderType nvml.EncoderType) (int, error) // GetEncoderSessionsFunc mocks the GetEncoderSessions method. - GetEncoderSessionsFunc func() ([]nvml.EncoderSessionInfo, nvml.Return) + GetEncoderSessionsFunc func() ([]nvml.EncoderSessionInfo, error) // GetEncoderStatsFunc mocks the GetEncoderStats method. - GetEncoderStatsFunc func() (int, uint32, uint32, nvml.Return) + GetEncoderStatsFunc func() (int, uint32, uint32, error) // GetEncoderUtilizationFunc mocks the GetEncoderUtilization method. - GetEncoderUtilizationFunc func() (uint32, uint32, nvml.Return) + GetEncoderUtilizationFunc func() (uint32, uint32, error) // GetEnforcedPowerLimitFunc mocks the GetEnforcedPowerLimit method. - GetEnforcedPowerLimitFunc func() (uint32, nvml.Return) + GetEnforcedPowerLimitFunc func() (uint32, error) // GetFBCSessionsFunc mocks the GetFBCSessions method. - GetFBCSessionsFunc func() ([]nvml.FBCSessionInfo, nvml.Return) + GetFBCSessionsFunc func() ([]nvml.FBCSessionInfo, error) // GetFBCStatsFunc mocks the GetFBCStats method. - GetFBCStatsFunc func() (nvml.FBCStats, nvml.Return) + GetFBCStatsFunc func() (nvml.FBCStats, error) // GetFanControlPolicy_v2Func mocks the GetFanControlPolicy_v2 method. - GetFanControlPolicy_v2Func func(n int) (nvml.FanControlPolicy, nvml.Return) + GetFanControlPolicy_v2Func func(n int) (nvml.FanControlPolicy, error) // GetFanSpeedFunc mocks the GetFanSpeed method. - GetFanSpeedFunc func() (uint32, nvml.Return) + GetFanSpeedFunc func() (uint32, error) // GetFanSpeed_v2Func mocks the GetFanSpeed_v2 method. - GetFanSpeed_v2Func func(n int) (uint32, nvml.Return) + GetFanSpeed_v2Func func(n int) (uint32, error) // GetFieldValuesFunc mocks the GetFieldValues method. - GetFieldValuesFunc func(fieldValues []nvml.FieldValue) nvml.Return + GetFieldValuesFunc func(fieldValues []nvml.FieldValue) error // GetGpcClkMinMaxVfOffsetFunc mocks the GetGpcClkMinMaxVfOffset method. - GetGpcClkMinMaxVfOffsetFunc func() (int, int, nvml.Return) + GetGpcClkMinMaxVfOffsetFunc func() (int, int, error) // GetGpcClkVfOffsetFunc mocks the GetGpcClkVfOffset method. - GetGpcClkVfOffsetFunc func() (int, nvml.Return) + GetGpcClkVfOffsetFunc func() (int, error) // GetGpuFabricInfoFunc mocks the GetGpuFabricInfo method. - GetGpuFabricInfoFunc func() (nvml.GpuFabricInfo, nvml.Return) + GetGpuFabricInfoFunc func() (nvml.GpuFabricInfo, error) // GetGpuFabricInfoVFunc mocks the GetGpuFabricInfoV method. GetGpuFabricInfoVFunc func() nvml.GpuFabricInfoHandler // GetGpuInstanceByIdFunc mocks the GetGpuInstanceById method. - GetGpuInstanceByIdFunc func(n int) (nvml.GpuInstance, nvml.Return) + GetGpuInstanceByIdFunc func(n int) (nvml.GpuInstance, error) // GetGpuInstanceIdFunc mocks the GetGpuInstanceId method. - GetGpuInstanceIdFunc func() (int, nvml.Return) + GetGpuInstanceIdFunc func() (int, error) // GetGpuInstancePossiblePlacementsFunc mocks the GetGpuInstancePossiblePlacements method. - GetGpuInstancePossiblePlacementsFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) + GetGpuInstancePossiblePlacementsFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, error) // GetGpuInstanceProfileInfoFunc mocks the GetGpuInstanceProfileInfo method. - GetGpuInstanceProfileInfoFunc func(n int) (nvml.GpuInstanceProfileInfo, nvml.Return) + GetGpuInstanceProfileInfoFunc func(n int) (nvml.GpuInstanceProfileInfo, error) // GetGpuInstanceProfileInfoVFunc mocks the GetGpuInstanceProfileInfoV method. GetGpuInstanceProfileInfoVFunc func(n int) nvml.GpuInstanceProfileInfoHandler // GetGpuInstanceRemainingCapacityFunc mocks the GetGpuInstanceRemainingCapacity method. - GetGpuInstanceRemainingCapacityFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) + GetGpuInstanceRemainingCapacityFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, error) // GetGpuInstancesFunc mocks the GetGpuInstances method. - GetGpuInstancesFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) + GetGpuInstancesFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, error) // GetGpuMaxPcieLinkGenerationFunc mocks the GetGpuMaxPcieLinkGeneration method. - GetGpuMaxPcieLinkGenerationFunc func() (int, nvml.Return) + GetGpuMaxPcieLinkGenerationFunc func() (int, error) // GetGpuOperationModeFunc mocks the GetGpuOperationMode method. - GetGpuOperationModeFunc func() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) + GetGpuOperationModeFunc func() (nvml.GpuOperationMode, nvml.GpuOperationMode, error) // GetGraphicsRunningProcessesFunc mocks the GetGraphicsRunningProcesses method. - GetGraphicsRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) + GetGraphicsRunningProcessesFunc func() ([]nvml.ProcessInfo, error) // GetGridLicensableFeaturesFunc mocks the GetGridLicensableFeatures method. - GetGridLicensableFeaturesFunc func() (nvml.GridLicensableFeatures, nvml.Return) + GetGridLicensableFeaturesFunc func() (nvml.GridLicensableFeatures, error) // GetGspFirmwareModeFunc mocks the GetGspFirmwareMode method. - GetGspFirmwareModeFunc func() (bool, bool, nvml.Return) + GetGspFirmwareModeFunc func() (bool, bool, error) // GetGspFirmwareVersionFunc mocks the GetGspFirmwareVersion method. - GetGspFirmwareVersionFunc func() (string, nvml.Return) + GetGspFirmwareVersionFunc func() (string, error) // GetHostVgpuModeFunc mocks the GetHostVgpuMode method. - GetHostVgpuModeFunc func() (nvml.HostVgpuMode, nvml.Return) + GetHostVgpuModeFunc func() (nvml.HostVgpuMode, error) // GetIndexFunc mocks the GetIndex method. - GetIndexFunc func() (int, nvml.Return) + GetIndexFunc func() (int, error) // GetInforomConfigurationChecksumFunc mocks the GetInforomConfigurationChecksum method. - GetInforomConfigurationChecksumFunc func() (uint32, nvml.Return) + GetInforomConfigurationChecksumFunc func() (uint32, error) // GetInforomImageVersionFunc mocks the GetInforomImageVersion method. - GetInforomImageVersionFunc func() (string, nvml.Return) + GetInforomImageVersionFunc func() (string, error) // GetInforomVersionFunc mocks the GetInforomVersion method. - GetInforomVersionFunc func(inforomObject nvml.InforomObject) (string, nvml.Return) + GetInforomVersionFunc func(inforomObject nvml.InforomObject) (string, error) // GetIrqNumFunc mocks the GetIrqNum method. - GetIrqNumFunc func() (int, nvml.Return) + GetIrqNumFunc func() (int, error) // GetJpgUtilizationFunc mocks the GetJpgUtilization method. - GetJpgUtilizationFunc func() (uint32, uint32, nvml.Return) + GetJpgUtilizationFunc func() (uint32, uint32, error) // GetLastBBXFlushTimeFunc mocks the GetLastBBXFlushTime method. - GetLastBBXFlushTimeFunc func() (uint64, uint, nvml.Return) + GetLastBBXFlushTimeFunc func() (uint64, uint, error) // GetMPSComputeRunningProcessesFunc mocks the GetMPSComputeRunningProcesses method. - GetMPSComputeRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) + GetMPSComputeRunningProcessesFunc func() ([]nvml.ProcessInfo, error) // GetMaxClockInfoFunc mocks the GetMaxClockInfo method. - GetMaxClockInfoFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + GetMaxClockInfoFunc func(clockType nvml.ClockType) (uint32, error) // GetMaxCustomerBoostClockFunc mocks the GetMaxCustomerBoostClock method. - GetMaxCustomerBoostClockFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + GetMaxCustomerBoostClockFunc func(clockType nvml.ClockType) (uint32, error) // GetMaxMigDeviceCountFunc mocks the GetMaxMigDeviceCount method. - GetMaxMigDeviceCountFunc func() (int, nvml.Return) + GetMaxMigDeviceCountFunc func() (int, error) // GetMaxPcieLinkGenerationFunc mocks the GetMaxPcieLinkGeneration method. - GetMaxPcieLinkGenerationFunc func() (int, nvml.Return) + GetMaxPcieLinkGenerationFunc func() (int, error) // GetMaxPcieLinkWidthFunc mocks the GetMaxPcieLinkWidth method. - GetMaxPcieLinkWidthFunc func() (int, nvml.Return) + GetMaxPcieLinkWidthFunc func() (int, error) // GetMemClkMinMaxVfOffsetFunc mocks the GetMemClkMinMaxVfOffset method. - GetMemClkMinMaxVfOffsetFunc func() (int, int, nvml.Return) + GetMemClkMinMaxVfOffsetFunc func() (int, int, error) // GetMemClkVfOffsetFunc mocks the GetMemClkVfOffset method. - GetMemClkVfOffsetFunc func() (int, nvml.Return) + GetMemClkVfOffsetFunc func() (int, error) // GetMemoryAffinityFunc mocks the GetMemoryAffinity method. - GetMemoryAffinityFunc func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) + GetMemoryAffinityFunc func(n int, affinityScope nvml.AffinityScope) ([]uint, error) // GetMemoryBusWidthFunc mocks the GetMemoryBusWidth method. - GetMemoryBusWidthFunc func() (uint32, nvml.Return) + GetMemoryBusWidthFunc func() (uint32, error) // GetMemoryErrorCounterFunc mocks the GetMemoryErrorCounter method. - GetMemoryErrorCounterFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) + GetMemoryErrorCounterFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, error) // GetMemoryInfoFunc mocks the GetMemoryInfo method. - GetMemoryInfoFunc func() (nvml.Memory, nvml.Return) + GetMemoryInfoFunc func() (nvml.Memory, error) // GetMemoryInfo_v2Func mocks the GetMemoryInfo_v2 method. - GetMemoryInfo_v2Func func() (nvml.Memory_v2, nvml.Return) + GetMemoryInfo_v2Func func() (nvml.Memory_v2, error) // GetMigDeviceHandleByIndexFunc mocks the GetMigDeviceHandleByIndex method. - GetMigDeviceHandleByIndexFunc func(n int) (nvml.Device, nvml.Return) + GetMigDeviceHandleByIndexFunc func(n int) (nvml.Device, error) // GetMigModeFunc mocks the GetMigMode method. - GetMigModeFunc func() (int, int, nvml.Return) + GetMigModeFunc func() (int, int, error) // GetMinMaxClockOfPStateFunc mocks the GetMinMaxClockOfPState method. - GetMinMaxClockOfPStateFunc func(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) + GetMinMaxClockOfPStateFunc func(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, error) // GetMinMaxFanSpeedFunc mocks the GetMinMaxFanSpeed method. - GetMinMaxFanSpeedFunc func() (int, int, nvml.Return) + GetMinMaxFanSpeedFunc func() (int, int, error) // GetMinorNumberFunc mocks the GetMinorNumber method. - GetMinorNumberFunc func() (int, nvml.Return) + GetMinorNumberFunc func() (int, error) // GetModuleIdFunc mocks the GetModuleId method. - GetModuleIdFunc func() (int, nvml.Return) + GetModuleIdFunc func() (int, error) // GetMultiGpuBoardFunc mocks the GetMultiGpuBoard method. - GetMultiGpuBoardFunc func() (int, nvml.Return) + GetMultiGpuBoardFunc func() (int, error) // GetNameFunc mocks the GetName method. - GetNameFunc func() (string, nvml.Return) + GetNameFunc func() (string, error) // GetNumFansFunc mocks the GetNumFans method. - GetNumFansFunc func() (int, nvml.Return) + GetNumFansFunc func() (int, error) // GetNumGpuCoresFunc mocks the GetNumGpuCores method. - GetNumGpuCoresFunc func() (int, nvml.Return) + GetNumGpuCoresFunc func() (int, error) // GetNumaNodeIdFunc mocks the GetNumaNodeId method. - GetNumaNodeIdFunc func() (int, nvml.Return) + GetNumaNodeIdFunc func() (int, error) // GetNvLinkCapabilityFunc mocks the GetNvLinkCapability method. - GetNvLinkCapabilityFunc func(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) + GetNvLinkCapabilityFunc func(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, error) // GetNvLinkErrorCounterFunc mocks the GetNvLinkErrorCounter method. - GetNvLinkErrorCounterFunc func(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) + GetNvLinkErrorCounterFunc func(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, error) // GetNvLinkRemoteDeviceTypeFunc mocks the GetNvLinkRemoteDeviceType method. - GetNvLinkRemoteDeviceTypeFunc func(n int) (nvml.IntNvLinkDeviceType, nvml.Return) + GetNvLinkRemoteDeviceTypeFunc func(n int) (nvml.IntNvLinkDeviceType, error) // GetNvLinkRemotePciInfoFunc mocks the GetNvLinkRemotePciInfo method. - GetNvLinkRemotePciInfoFunc func(n int) (nvml.PciInfo, nvml.Return) + GetNvLinkRemotePciInfoFunc func(n int) (nvml.PciInfo, error) // GetNvLinkStateFunc mocks the GetNvLinkState method. - GetNvLinkStateFunc func(n int) (nvml.EnableState, nvml.Return) + GetNvLinkStateFunc func(n int) (nvml.EnableState, error) // GetNvLinkUtilizationControlFunc mocks the GetNvLinkUtilizationControl method. - GetNvLinkUtilizationControlFunc func(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) + GetNvLinkUtilizationControlFunc func(n1 int, n2 int) (nvml.NvLinkUtilizationControl, error) // GetNvLinkUtilizationCounterFunc mocks the GetNvLinkUtilizationCounter method. - GetNvLinkUtilizationCounterFunc func(n1 int, n2 int) (uint64, uint64, nvml.Return) + GetNvLinkUtilizationCounterFunc func(n1 int, n2 int) (uint64, uint64, error) // GetNvLinkVersionFunc mocks the GetNvLinkVersion method. - GetNvLinkVersionFunc func(n int) (uint32, nvml.Return) + GetNvLinkVersionFunc func(n int) (uint32, error) // GetOfaUtilizationFunc mocks the GetOfaUtilization method. - GetOfaUtilizationFunc func() (uint32, uint32, nvml.Return) + GetOfaUtilizationFunc func() (uint32, uint32, error) // GetP2PStatusFunc mocks the GetP2PStatus method. - GetP2PStatusFunc func(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) + GetP2PStatusFunc func(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, error) // GetPciInfoFunc mocks the GetPciInfo method. - GetPciInfoFunc func() (nvml.PciInfo, nvml.Return) + GetPciInfoFunc func() (nvml.PciInfo, error) // GetPciInfoExtFunc mocks the GetPciInfoExt method. - GetPciInfoExtFunc func() (nvml.PciInfoExt, nvml.Return) + GetPciInfoExtFunc func() (nvml.PciInfoExt, error) // GetPcieLinkMaxSpeedFunc mocks the GetPcieLinkMaxSpeed method. - GetPcieLinkMaxSpeedFunc func() (uint32, nvml.Return) + GetPcieLinkMaxSpeedFunc func() (uint32, error) // GetPcieReplayCounterFunc mocks the GetPcieReplayCounter method. - GetPcieReplayCounterFunc func() (int, nvml.Return) + GetPcieReplayCounterFunc func() (int, error) // GetPcieSpeedFunc mocks the GetPcieSpeed method. - GetPcieSpeedFunc func() (int, nvml.Return) + GetPcieSpeedFunc func() (int, error) // GetPcieThroughputFunc mocks the GetPcieThroughput method. - GetPcieThroughputFunc func(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) + GetPcieThroughputFunc func(pcieUtilCounter nvml.PcieUtilCounter) (uint32, error) // GetPerformanceStateFunc mocks the GetPerformanceState method. - GetPerformanceStateFunc func() (nvml.Pstates, nvml.Return) + GetPerformanceStateFunc func() (nvml.Pstates, error) // GetPersistenceModeFunc mocks the GetPersistenceMode method. - GetPersistenceModeFunc func() (nvml.EnableState, nvml.Return) + GetPersistenceModeFunc func() (nvml.EnableState, error) // GetPgpuMetadataStringFunc mocks the GetPgpuMetadataString method. - GetPgpuMetadataStringFunc func() (string, nvml.Return) + GetPgpuMetadataStringFunc func() (string, error) // GetPowerManagementDefaultLimitFunc mocks the GetPowerManagementDefaultLimit method. - GetPowerManagementDefaultLimitFunc func() (uint32, nvml.Return) + GetPowerManagementDefaultLimitFunc func() (uint32, error) // GetPowerManagementLimitFunc mocks the GetPowerManagementLimit method. - GetPowerManagementLimitFunc func() (uint32, nvml.Return) + GetPowerManagementLimitFunc func() (uint32, error) // GetPowerManagementLimitConstraintsFunc mocks the GetPowerManagementLimitConstraints method. - GetPowerManagementLimitConstraintsFunc func() (uint32, uint32, nvml.Return) + GetPowerManagementLimitConstraintsFunc func() (uint32, uint32, error) // GetPowerManagementModeFunc mocks the GetPowerManagementMode method. - GetPowerManagementModeFunc func() (nvml.EnableState, nvml.Return) + GetPowerManagementModeFunc func() (nvml.EnableState, error) // GetPowerSourceFunc mocks the GetPowerSource method. - GetPowerSourceFunc func() (nvml.PowerSource, nvml.Return) + GetPowerSourceFunc func() (nvml.PowerSource, error) // GetPowerStateFunc mocks the GetPowerState method. - GetPowerStateFunc func() (nvml.Pstates, nvml.Return) + GetPowerStateFunc func() (nvml.Pstates, error) // GetPowerUsageFunc mocks the GetPowerUsage method. - GetPowerUsageFunc func() (uint32, nvml.Return) + GetPowerUsageFunc func() (uint32, error) // GetProcessUtilizationFunc mocks the GetProcessUtilization method. - GetProcessUtilizationFunc func(v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) + GetProcessUtilizationFunc func(v uint64) ([]nvml.ProcessUtilizationSample, error) // GetProcessesUtilizationInfoFunc mocks the GetProcessesUtilizationInfo method. - GetProcessesUtilizationInfoFunc func() (nvml.ProcessesUtilizationInfo, nvml.Return) + GetProcessesUtilizationInfoFunc func() (nvml.ProcessesUtilizationInfo, error) // GetRemappedRowsFunc mocks the GetRemappedRows method. - GetRemappedRowsFunc func() (int, int, bool, bool, nvml.Return) + GetRemappedRowsFunc func() (int, int, bool, bool, error) // GetRetiredPagesFunc mocks the GetRetiredPages method. - GetRetiredPagesFunc func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) + GetRetiredPagesFunc func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, error) // GetRetiredPagesPendingStatusFunc mocks the GetRetiredPagesPendingStatus method. - GetRetiredPagesPendingStatusFunc func() (nvml.EnableState, nvml.Return) + GetRetiredPagesPendingStatusFunc func() (nvml.EnableState, error) // GetRetiredPages_v2Func mocks the GetRetiredPages_v2 method. - GetRetiredPages_v2Func func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) + GetRetiredPages_v2Func func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, error) // GetRowRemapperHistogramFunc mocks the GetRowRemapperHistogram method. - GetRowRemapperHistogramFunc func() (nvml.RowRemapperHistogramValues, nvml.Return) + GetRowRemapperHistogramFunc func() (nvml.RowRemapperHistogramValues, error) // GetRunningProcessDetailListFunc mocks the GetRunningProcessDetailList method. - GetRunningProcessDetailListFunc func() (nvml.ProcessDetailList, nvml.Return) + GetRunningProcessDetailListFunc func() (nvml.ProcessDetailList, error) // GetSamplesFunc mocks the GetSamples method. - GetSamplesFunc func(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) + GetSamplesFunc func(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, error) // GetSerialFunc mocks the GetSerial method. - GetSerialFunc func() (string, nvml.Return) + GetSerialFunc func() (string, error) // GetSramEccErrorStatusFunc mocks the GetSramEccErrorStatus method. - GetSramEccErrorStatusFunc func() (nvml.EccSramErrorStatus, nvml.Return) + GetSramEccErrorStatusFunc func() (nvml.EccSramErrorStatus, error) // GetSupportedClocksEventReasonsFunc mocks the GetSupportedClocksEventReasons method. - GetSupportedClocksEventReasonsFunc func() (uint64, nvml.Return) + GetSupportedClocksEventReasonsFunc func() (uint64, error) // GetSupportedClocksThrottleReasonsFunc mocks the GetSupportedClocksThrottleReasons method. - GetSupportedClocksThrottleReasonsFunc func() (uint64, nvml.Return) + GetSupportedClocksThrottleReasonsFunc func() (uint64, error) // GetSupportedEventTypesFunc mocks the GetSupportedEventTypes method. - GetSupportedEventTypesFunc func() (uint64, nvml.Return) + GetSupportedEventTypesFunc func() (uint64, error) // GetSupportedGraphicsClocksFunc mocks the GetSupportedGraphicsClocks method. - GetSupportedGraphicsClocksFunc func(n int) (int, uint32, nvml.Return) + GetSupportedGraphicsClocksFunc func(n int) (int, uint32, error) // GetSupportedMemoryClocksFunc mocks the GetSupportedMemoryClocks method. - GetSupportedMemoryClocksFunc func() (int, uint32, nvml.Return) + GetSupportedMemoryClocksFunc func() (int, uint32, error) // GetSupportedPerformanceStatesFunc mocks the GetSupportedPerformanceStates method. - GetSupportedPerformanceStatesFunc func() ([]nvml.Pstates, nvml.Return) + GetSupportedPerformanceStatesFunc func() ([]nvml.Pstates, error) // GetSupportedVgpusFunc mocks the GetSupportedVgpus method. - GetSupportedVgpusFunc func() ([]nvml.VgpuTypeId, nvml.Return) + GetSupportedVgpusFunc func() ([]nvml.VgpuTypeId, error) // GetTargetFanSpeedFunc mocks the GetTargetFanSpeed method. - GetTargetFanSpeedFunc func(n int) (int, nvml.Return) + GetTargetFanSpeedFunc func(n int) (int, error) // GetTemperatureFunc mocks the GetTemperature method. - GetTemperatureFunc func(temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) + GetTemperatureFunc func(temperatureSensors nvml.TemperatureSensors) (uint32, error) // GetTemperatureThresholdFunc mocks the GetTemperatureThreshold method. - GetTemperatureThresholdFunc func(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) + GetTemperatureThresholdFunc func(temperatureThresholds nvml.TemperatureThresholds) (uint32, error) // GetThermalSettingsFunc mocks the GetThermalSettings method. - GetThermalSettingsFunc func(v uint32) (nvml.GpuThermalSettings, nvml.Return) + GetThermalSettingsFunc func(v uint32) (nvml.GpuThermalSettings, error) // GetTopologyCommonAncestorFunc mocks the GetTopologyCommonAncestor method. - GetTopologyCommonAncestorFunc func(device nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) + GetTopologyCommonAncestorFunc func(device nvml.Device) (nvml.GpuTopologyLevel, error) // GetTopologyNearestGpusFunc mocks the GetTopologyNearestGpus method. - GetTopologyNearestGpusFunc func(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) + GetTopologyNearestGpusFunc func(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, error) // GetTotalEccErrorsFunc mocks the GetTotalEccErrors method. - GetTotalEccErrorsFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) + GetTotalEccErrorsFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, error) // GetTotalEnergyConsumptionFunc mocks the GetTotalEnergyConsumption method. - GetTotalEnergyConsumptionFunc func() (uint64, nvml.Return) + GetTotalEnergyConsumptionFunc func() (uint64, error) // GetUUIDFunc mocks the GetUUID method. - GetUUIDFunc func() (string, nvml.Return) + GetUUIDFunc func() (string, error) // GetUtilizationRatesFunc mocks the GetUtilizationRates method. - GetUtilizationRatesFunc func() (nvml.Utilization, nvml.Return) + GetUtilizationRatesFunc func() (nvml.Utilization, error) // GetVbiosVersionFunc mocks the GetVbiosVersion method. - GetVbiosVersionFunc func() (string, nvml.Return) + GetVbiosVersionFunc func() (string, error) // GetVgpuCapabilitiesFunc mocks the GetVgpuCapabilities method. - GetVgpuCapabilitiesFunc func(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) + GetVgpuCapabilitiesFunc func(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, error) // GetVgpuHeterogeneousModeFunc mocks the GetVgpuHeterogeneousMode method. - GetVgpuHeterogeneousModeFunc func() (nvml.VgpuHeterogeneousMode, nvml.Return) + GetVgpuHeterogeneousModeFunc func() (nvml.VgpuHeterogeneousMode, error) // GetVgpuInstancesUtilizationInfoFunc mocks the GetVgpuInstancesUtilizationInfo method. - GetVgpuInstancesUtilizationInfoFunc func() (nvml.VgpuInstancesUtilizationInfo, nvml.Return) + GetVgpuInstancesUtilizationInfoFunc func() (nvml.VgpuInstancesUtilizationInfo, error) // GetVgpuMetadataFunc mocks the GetVgpuMetadata method. - GetVgpuMetadataFunc func() (nvml.VgpuPgpuMetadata, nvml.Return) + GetVgpuMetadataFunc func() (nvml.VgpuPgpuMetadata, error) // GetVgpuProcessUtilizationFunc mocks the GetVgpuProcessUtilization method. - GetVgpuProcessUtilizationFunc func(v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) + GetVgpuProcessUtilizationFunc func(v uint64) ([]nvml.VgpuProcessUtilizationSample, error) // GetVgpuProcessesUtilizationInfoFunc mocks the GetVgpuProcessesUtilizationInfo method. - GetVgpuProcessesUtilizationInfoFunc func() (nvml.VgpuProcessesUtilizationInfo, nvml.Return) + GetVgpuProcessesUtilizationInfoFunc func() (nvml.VgpuProcessesUtilizationInfo, error) // GetVgpuSchedulerCapabilitiesFunc mocks the GetVgpuSchedulerCapabilities method. - GetVgpuSchedulerCapabilitiesFunc func() (nvml.VgpuSchedulerCapabilities, nvml.Return) + GetVgpuSchedulerCapabilitiesFunc func() (nvml.VgpuSchedulerCapabilities, error) // GetVgpuSchedulerLogFunc mocks the GetVgpuSchedulerLog method. - GetVgpuSchedulerLogFunc func() (nvml.VgpuSchedulerLog, nvml.Return) + GetVgpuSchedulerLogFunc func() (nvml.VgpuSchedulerLog, error) // GetVgpuSchedulerStateFunc mocks the GetVgpuSchedulerState method. - GetVgpuSchedulerStateFunc func() (nvml.VgpuSchedulerGetState, nvml.Return) + GetVgpuSchedulerStateFunc func() (nvml.VgpuSchedulerGetState, error) // GetVgpuTypeCreatablePlacementsFunc mocks the GetVgpuTypeCreatablePlacements method. - GetVgpuTypeCreatablePlacementsFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) + GetVgpuTypeCreatablePlacementsFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) // GetVgpuTypeSupportedPlacementsFunc mocks the GetVgpuTypeSupportedPlacements method. - GetVgpuTypeSupportedPlacementsFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) + GetVgpuTypeSupportedPlacementsFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) // GetVgpuUtilizationFunc mocks the GetVgpuUtilization method. - GetVgpuUtilizationFunc func(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) + GetVgpuUtilizationFunc func(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, error) // GetViolationStatusFunc mocks the GetViolationStatus method. - GetViolationStatusFunc func(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) + GetViolationStatusFunc func(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, error) // GetVirtualizationModeFunc mocks the GetVirtualizationMode method. - GetVirtualizationModeFunc func() (nvml.GpuVirtualizationMode, nvml.Return) + GetVirtualizationModeFunc func() (nvml.GpuVirtualizationMode, error) // GpmMigSampleGetFunc mocks the GpmMigSampleGet method. - GpmMigSampleGetFunc func(n int, gpmSample nvml.GpmSample) nvml.Return + GpmMigSampleGetFunc func(n int, gpmSample nvml.GpmSample) error // GpmQueryDeviceSupportFunc mocks the GpmQueryDeviceSupport method. - GpmQueryDeviceSupportFunc func() (nvml.GpmSupport, nvml.Return) + GpmQueryDeviceSupportFunc func() (nvml.GpmSupport, error) // GpmQueryDeviceSupportVFunc mocks the GpmQueryDeviceSupportV method. GpmQueryDeviceSupportVFunc func() nvml.GpmSupportV // GpmQueryIfStreamingEnabledFunc mocks the GpmQueryIfStreamingEnabled method. - GpmQueryIfStreamingEnabledFunc func() (uint32, nvml.Return) + GpmQueryIfStreamingEnabledFunc func() (uint32, error) // GpmSampleGetFunc mocks the GpmSampleGet method. - GpmSampleGetFunc func(gpmSample nvml.GpmSample) nvml.Return + GpmSampleGetFunc func(gpmSample nvml.GpmSample) error // GpmSetStreamingEnabledFunc mocks the GpmSetStreamingEnabled method. - GpmSetStreamingEnabledFunc func(v uint32) nvml.Return + GpmSetStreamingEnabledFunc func(v uint32) error // IsMigDeviceHandleFunc mocks the IsMigDeviceHandle method. - IsMigDeviceHandleFunc func() (bool, nvml.Return) + IsMigDeviceHandleFunc func() (bool, error) // OnSameBoardFunc mocks the OnSameBoard method. - OnSameBoardFunc func(device nvml.Device) (int, nvml.Return) + OnSameBoardFunc func(device nvml.Device) (int, error) // RegisterEventsFunc mocks the RegisterEvents method. - RegisterEventsFunc func(v uint64, eventSet nvml.EventSet) nvml.Return + RegisterEventsFunc func(v uint64, eventSet nvml.EventSet) error // ResetApplicationsClocksFunc mocks the ResetApplicationsClocks method. - ResetApplicationsClocksFunc func() nvml.Return + ResetApplicationsClocksFunc func() error // ResetGpuLockedClocksFunc mocks the ResetGpuLockedClocks method. - ResetGpuLockedClocksFunc func() nvml.Return + ResetGpuLockedClocksFunc func() error // ResetMemoryLockedClocksFunc mocks the ResetMemoryLockedClocks method. - ResetMemoryLockedClocksFunc func() nvml.Return + ResetMemoryLockedClocksFunc func() error // ResetNvLinkErrorCountersFunc mocks the ResetNvLinkErrorCounters method. - ResetNvLinkErrorCountersFunc func(n int) nvml.Return + ResetNvLinkErrorCountersFunc func(n int) error // ResetNvLinkUtilizationCounterFunc mocks the ResetNvLinkUtilizationCounter method. - ResetNvLinkUtilizationCounterFunc func(n1 int, n2 int) nvml.Return + ResetNvLinkUtilizationCounterFunc func(n1 int, n2 int) error // SetAPIRestrictionFunc mocks the SetAPIRestriction method. - SetAPIRestrictionFunc func(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return + SetAPIRestrictionFunc func(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) error // SetAccountingModeFunc mocks the SetAccountingMode method. - SetAccountingModeFunc func(enableState nvml.EnableState) nvml.Return + SetAccountingModeFunc func(enableState nvml.EnableState) error // SetApplicationsClocksFunc mocks the SetApplicationsClocks method. - SetApplicationsClocksFunc func(v1 uint32, v2 uint32) nvml.Return + SetApplicationsClocksFunc func(v1 uint32, v2 uint32) error // SetAutoBoostedClocksEnabledFunc mocks the SetAutoBoostedClocksEnabled method. - SetAutoBoostedClocksEnabledFunc func(enableState nvml.EnableState) nvml.Return + SetAutoBoostedClocksEnabledFunc func(enableState nvml.EnableState) error // SetComputeModeFunc mocks the SetComputeMode method. - SetComputeModeFunc func(computeMode nvml.ComputeMode) nvml.Return + SetComputeModeFunc func(computeMode nvml.ComputeMode) error // SetConfComputeUnprotectedMemSizeFunc mocks the SetConfComputeUnprotectedMemSize method. - SetConfComputeUnprotectedMemSizeFunc func(v uint64) nvml.Return + SetConfComputeUnprotectedMemSizeFunc func(v uint64) error // SetCpuAffinityFunc mocks the SetCpuAffinity method. - SetCpuAffinityFunc func() nvml.Return + SetCpuAffinityFunc func() error // SetDefaultAutoBoostedClocksEnabledFunc mocks the SetDefaultAutoBoostedClocksEnabled method. - SetDefaultAutoBoostedClocksEnabledFunc func(enableState nvml.EnableState, v uint32) nvml.Return + SetDefaultAutoBoostedClocksEnabledFunc func(enableState nvml.EnableState, v uint32) error // SetDefaultFanSpeed_v2Func mocks the SetDefaultFanSpeed_v2 method. - SetDefaultFanSpeed_v2Func func(n int) nvml.Return + SetDefaultFanSpeed_v2Func func(n int) error // SetDriverModelFunc mocks the SetDriverModel method. - SetDriverModelFunc func(driverModel nvml.DriverModel, v uint32) nvml.Return + SetDriverModelFunc func(driverModel nvml.DriverModel, v uint32) error // SetEccModeFunc mocks the SetEccMode method. - SetEccModeFunc func(enableState nvml.EnableState) nvml.Return + SetEccModeFunc func(enableState nvml.EnableState) error // SetFanControlPolicyFunc mocks the SetFanControlPolicy method. - SetFanControlPolicyFunc func(n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return + SetFanControlPolicyFunc func(n int, fanControlPolicy nvml.FanControlPolicy) error // SetFanSpeed_v2Func mocks the SetFanSpeed_v2 method. - SetFanSpeed_v2Func func(n1 int, n2 int) nvml.Return + SetFanSpeed_v2Func func(n1 int, n2 int) error // SetGpcClkVfOffsetFunc mocks the SetGpcClkVfOffset method. - SetGpcClkVfOffsetFunc func(n int) nvml.Return + SetGpcClkVfOffsetFunc func(n int) error // SetGpuLockedClocksFunc mocks the SetGpuLockedClocks method. - SetGpuLockedClocksFunc func(v1 uint32, v2 uint32) nvml.Return + SetGpuLockedClocksFunc func(v1 uint32, v2 uint32) error // SetGpuOperationModeFunc mocks the SetGpuOperationMode method. - SetGpuOperationModeFunc func(gpuOperationMode nvml.GpuOperationMode) nvml.Return + SetGpuOperationModeFunc func(gpuOperationMode nvml.GpuOperationMode) error // SetMemClkVfOffsetFunc mocks the SetMemClkVfOffset method. - SetMemClkVfOffsetFunc func(n int) nvml.Return + SetMemClkVfOffsetFunc func(n int) error // SetMemoryLockedClocksFunc mocks the SetMemoryLockedClocks method. - SetMemoryLockedClocksFunc func(v1 uint32, v2 uint32) nvml.Return + SetMemoryLockedClocksFunc func(v1 uint32, v2 uint32) error // SetMigModeFunc mocks the SetMigMode method. - SetMigModeFunc func(n int) (nvml.Return, nvml.Return) + SetMigModeFunc func(n int) (error, error) // SetNvLinkDeviceLowPowerThresholdFunc mocks the SetNvLinkDeviceLowPowerThreshold method. - SetNvLinkDeviceLowPowerThresholdFunc func(nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return + SetNvLinkDeviceLowPowerThresholdFunc func(nvLinkPowerThres *nvml.NvLinkPowerThres) error // SetNvLinkUtilizationControlFunc mocks the SetNvLinkUtilizationControl method. - SetNvLinkUtilizationControlFunc func(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return + SetNvLinkUtilizationControlFunc func(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) error // SetPersistenceModeFunc mocks the SetPersistenceMode method. - SetPersistenceModeFunc func(enableState nvml.EnableState) nvml.Return + SetPersistenceModeFunc func(enableState nvml.EnableState) error // SetPowerManagementLimitFunc mocks the SetPowerManagementLimit method. - SetPowerManagementLimitFunc func(v uint32) nvml.Return + SetPowerManagementLimitFunc func(v uint32) error // SetPowerManagementLimit_v2Func mocks the SetPowerManagementLimit_v2 method. - SetPowerManagementLimit_v2Func func(powerValue_v2 *nvml.PowerValue_v2) nvml.Return + SetPowerManagementLimit_v2Func func(powerValue_v2 *nvml.PowerValue_v2) error // SetTemperatureThresholdFunc mocks the SetTemperatureThreshold method. - SetTemperatureThresholdFunc func(temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return + SetTemperatureThresholdFunc func(temperatureThresholds nvml.TemperatureThresholds, n int) error // SetVgpuCapabilitiesFunc mocks the SetVgpuCapabilities method. - SetVgpuCapabilitiesFunc func(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return + SetVgpuCapabilitiesFunc func(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) error // SetVgpuHeterogeneousModeFunc mocks the SetVgpuHeterogeneousMode method. - SetVgpuHeterogeneousModeFunc func(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return + SetVgpuHeterogeneousModeFunc func(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) error // SetVgpuSchedulerStateFunc mocks the SetVgpuSchedulerState method. - SetVgpuSchedulerStateFunc func(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return + SetVgpuSchedulerStateFunc func(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) error // SetVirtualizationModeFunc mocks the SetVirtualizationMode method. - SetVirtualizationModeFunc func(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return + SetVirtualizationModeFunc func(gpuVirtualizationMode nvml.GpuVirtualizationMode) error // ValidateInforomFunc mocks the ValidateInforom method. - ValidateInforomFunc func() nvml.Return + ValidateInforomFunc func() error // VgpuTypeGetMaxInstancesFunc mocks the VgpuTypeGetMaxInstances method. - VgpuTypeGetMaxInstancesFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) + VgpuTypeGetMaxInstancesFunc func(vgpuTypeId nvml.VgpuTypeId) (int, error) // calls tracks calls to the methods. calls struct { @@ -2557,7 +2557,7 @@ type Device struct { } // ClearAccountingPids calls ClearAccountingPidsFunc. -func (mock *Device) ClearAccountingPids() nvml.Return { +func (mock *Device) ClearAccountingPids() error { if mock.ClearAccountingPidsFunc == nil { panic("Device.ClearAccountingPidsFunc: method is nil but Device.ClearAccountingPids was just called") } @@ -2584,7 +2584,7 @@ func (mock *Device) ClearAccountingPidsCalls() []struct { } // ClearCpuAffinity calls ClearCpuAffinityFunc. -func (mock *Device) ClearCpuAffinity() nvml.Return { +func (mock *Device) ClearCpuAffinity() error { if mock.ClearCpuAffinityFunc == nil { panic("Device.ClearCpuAffinityFunc: method is nil but Device.ClearCpuAffinity was just called") } @@ -2611,7 +2611,7 @@ func (mock *Device) ClearCpuAffinityCalls() []struct { } // ClearEccErrorCounts calls ClearEccErrorCountsFunc. -func (mock *Device) ClearEccErrorCounts(eccCounterType nvml.EccCounterType) nvml.Return { +func (mock *Device) ClearEccErrorCounts(eccCounterType nvml.EccCounterType) error { if mock.ClearEccErrorCountsFunc == nil { panic("Device.ClearEccErrorCountsFunc: method is nil but Device.ClearEccErrorCounts was just called") } @@ -2643,7 +2643,7 @@ func (mock *Device) ClearEccErrorCountsCalls() []struct { } // ClearFieldValues calls ClearFieldValuesFunc. -func (mock *Device) ClearFieldValues(fieldValues []nvml.FieldValue) nvml.Return { +func (mock *Device) ClearFieldValues(fieldValues []nvml.FieldValue) error { if mock.ClearFieldValuesFunc == nil { panic("Device.ClearFieldValuesFunc: method is nil but Device.ClearFieldValues was just called") } @@ -2675,7 +2675,7 @@ func (mock *Device) ClearFieldValuesCalls() []struct { } // CreateGpuInstance calls CreateGpuInstanceFunc. -func (mock *Device) CreateGpuInstance(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { +func (mock *Device) CreateGpuInstance(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, error) { if mock.CreateGpuInstanceFunc == nil { panic("Device.CreateGpuInstanceFunc: method is nil but Device.CreateGpuInstance was just called") } @@ -2707,7 +2707,7 @@ func (mock *Device) CreateGpuInstanceCalls() []struct { } // CreateGpuInstanceWithPlacement calls CreateGpuInstanceWithPlacementFunc. -func (mock *Device) CreateGpuInstanceWithPlacement(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { +func (mock *Device) CreateGpuInstanceWithPlacement(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, error) { if mock.CreateGpuInstanceWithPlacementFunc == nil { panic("Device.CreateGpuInstanceWithPlacementFunc: method is nil but Device.CreateGpuInstanceWithPlacement was just called") } @@ -2743,7 +2743,7 @@ func (mock *Device) CreateGpuInstanceWithPlacementCalls() []struct { } // FreezeNvLinkUtilizationCounter calls FreezeNvLinkUtilizationCounterFunc. -func (mock *Device) FreezeNvLinkUtilizationCounter(n1 int, n2 int, enableState nvml.EnableState) nvml.Return { +func (mock *Device) FreezeNvLinkUtilizationCounter(n1 int, n2 int, enableState nvml.EnableState) error { if mock.FreezeNvLinkUtilizationCounterFunc == nil { panic("Device.FreezeNvLinkUtilizationCounterFunc: method is nil but Device.FreezeNvLinkUtilizationCounter was just called") } @@ -2783,7 +2783,7 @@ func (mock *Device) FreezeNvLinkUtilizationCounterCalls() []struct { } // GetAPIRestriction calls GetAPIRestrictionFunc. -func (mock *Device) GetAPIRestriction(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { +func (mock *Device) GetAPIRestriction(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, error) { if mock.GetAPIRestrictionFunc == nil { panic("Device.GetAPIRestrictionFunc: method is nil but Device.GetAPIRestriction was just called") } @@ -2815,7 +2815,7 @@ func (mock *Device) GetAPIRestrictionCalls() []struct { } // GetAccountingBufferSize calls GetAccountingBufferSizeFunc. -func (mock *Device) GetAccountingBufferSize() (int, nvml.Return) { +func (mock *Device) GetAccountingBufferSize() (int, error) { if mock.GetAccountingBufferSizeFunc == nil { panic("Device.GetAccountingBufferSizeFunc: method is nil but Device.GetAccountingBufferSize was just called") } @@ -2842,7 +2842,7 @@ func (mock *Device) GetAccountingBufferSizeCalls() []struct { } // GetAccountingMode calls GetAccountingModeFunc. -func (mock *Device) GetAccountingMode() (nvml.EnableState, nvml.Return) { +func (mock *Device) GetAccountingMode() (nvml.EnableState, error) { if mock.GetAccountingModeFunc == nil { panic("Device.GetAccountingModeFunc: method is nil but Device.GetAccountingMode was just called") } @@ -2869,7 +2869,7 @@ func (mock *Device) GetAccountingModeCalls() []struct { } // GetAccountingPids calls GetAccountingPidsFunc. -func (mock *Device) GetAccountingPids() ([]int, nvml.Return) { +func (mock *Device) GetAccountingPids() ([]int, error) { if mock.GetAccountingPidsFunc == nil { panic("Device.GetAccountingPidsFunc: method is nil but Device.GetAccountingPids was just called") } @@ -2896,7 +2896,7 @@ func (mock *Device) GetAccountingPidsCalls() []struct { } // GetAccountingStats calls GetAccountingStatsFunc. -func (mock *Device) GetAccountingStats(v uint32) (nvml.AccountingStats, nvml.Return) { +func (mock *Device) GetAccountingStats(v uint32) (nvml.AccountingStats, error) { if mock.GetAccountingStatsFunc == nil { panic("Device.GetAccountingStatsFunc: method is nil but Device.GetAccountingStats was just called") } @@ -2928,7 +2928,7 @@ func (mock *Device) GetAccountingStatsCalls() []struct { } // GetActiveVgpus calls GetActiveVgpusFunc. -func (mock *Device) GetActiveVgpus() ([]nvml.VgpuInstance, nvml.Return) { +func (mock *Device) GetActiveVgpus() ([]nvml.VgpuInstance, error) { if mock.GetActiveVgpusFunc == nil { panic("Device.GetActiveVgpusFunc: method is nil but Device.GetActiveVgpus was just called") } @@ -2955,7 +2955,7 @@ func (mock *Device) GetActiveVgpusCalls() []struct { } // GetAdaptiveClockInfoStatus calls GetAdaptiveClockInfoStatusFunc. -func (mock *Device) GetAdaptiveClockInfoStatus() (uint32, nvml.Return) { +func (mock *Device) GetAdaptiveClockInfoStatus() (uint32, error) { if mock.GetAdaptiveClockInfoStatusFunc == nil { panic("Device.GetAdaptiveClockInfoStatusFunc: method is nil but Device.GetAdaptiveClockInfoStatus was just called") } @@ -2982,7 +2982,7 @@ func (mock *Device) GetAdaptiveClockInfoStatusCalls() []struct { } // GetApplicationsClock calls GetApplicationsClockFunc. -func (mock *Device) GetApplicationsClock(clockType nvml.ClockType) (uint32, nvml.Return) { +func (mock *Device) GetApplicationsClock(clockType nvml.ClockType) (uint32, error) { if mock.GetApplicationsClockFunc == nil { panic("Device.GetApplicationsClockFunc: method is nil but Device.GetApplicationsClock was just called") } @@ -3014,7 +3014,7 @@ func (mock *Device) GetApplicationsClockCalls() []struct { } // GetArchitecture calls GetArchitectureFunc. -func (mock *Device) GetArchitecture() (nvml.DeviceArchitecture, nvml.Return) { +func (mock *Device) GetArchitecture() (nvml.DeviceArchitecture, error) { if mock.GetArchitectureFunc == nil { panic("Device.GetArchitectureFunc: method is nil but Device.GetArchitecture was just called") } @@ -3041,7 +3041,7 @@ func (mock *Device) GetArchitectureCalls() []struct { } // GetAttributes calls GetAttributesFunc. -func (mock *Device) GetAttributes() (nvml.DeviceAttributes, nvml.Return) { +func (mock *Device) GetAttributes() (nvml.DeviceAttributes, error) { if mock.GetAttributesFunc == nil { panic("Device.GetAttributesFunc: method is nil but Device.GetAttributes was just called") } @@ -3068,7 +3068,7 @@ func (mock *Device) GetAttributesCalls() []struct { } // GetAutoBoostedClocksEnabled calls GetAutoBoostedClocksEnabledFunc. -func (mock *Device) GetAutoBoostedClocksEnabled() (nvml.EnableState, nvml.EnableState, nvml.Return) { +func (mock *Device) GetAutoBoostedClocksEnabled() (nvml.EnableState, nvml.EnableState, error) { if mock.GetAutoBoostedClocksEnabledFunc == nil { panic("Device.GetAutoBoostedClocksEnabledFunc: method is nil but Device.GetAutoBoostedClocksEnabled was just called") } @@ -3095,7 +3095,7 @@ func (mock *Device) GetAutoBoostedClocksEnabledCalls() []struct { } // GetBAR1MemoryInfo calls GetBAR1MemoryInfoFunc. -func (mock *Device) GetBAR1MemoryInfo() (nvml.BAR1Memory, nvml.Return) { +func (mock *Device) GetBAR1MemoryInfo() (nvml.BAR1Memory, error) { if mock.GetBAR1MemoryInfoFunc == nil { panic("Device.GetBAR1MemoryInfoFunc: method is nil but Device.GetBAR1MemoryInfo was just called") } @@ -3122,7 +3122,7 @@ func (mock *Device) GetBAR1MemoryInfoCalls() []struct { } // GetBoardId calls GetBoardIdFunc. -func (mock *Device) GetBoardId() (uint32, nvml.Return) { +func (mock *Device) GetBoardId() (uint32, error) { if mock.GetBoardIdFunc == nil { panic("Device.GetBoardIdFunc: method is nil but Device.GetBoardId was just called") } @@ -3149,7 +3149,7 @@ func (mock *Device) GetBoardIdCalls() []struct { } // GetBoardPartNumber calls GetBoardPartNumberFunc. -func (mock *Device) GetBoardPartNumber() (string, nvml.Return) { +func (mock *Device) GetBoardPartNumber() (string, error) { if mock.GetBoardPartNumberFunc == nil { panic("Device.GetBoardPartNumberFunc: method is nil but Device.GetBoardPartNumber was just called") } @@ -3176,7 +3176,7 @@ func (mock *Device) GetBoardPartNumberCalls() []struct { } // GetBrand calls GetBrandFunc. -func (mock *Device) GetBrand() (nvml.BrandType, nvml.Return) { +func (mock *Device) GetBrand() (nvml.BrandType, error) { if mock.GetBrandFunc == nil { panic("Device.GetBrandFunc: method is nil but Device.GetBrand was just called") } @@ -3203,7 +3203,7 @@ func (mock *Device) GetBrandCalls() []struct { } // GetBridgeChipInfo calls GetBridgeChipInfoFunc. -func (mock *Device) GetBridgeChipInfo() (nvml.BridgeChipHierarchy, nvml.Return) { +func (mock *Device) GetBridgeChipInfo() (nvml.BridgeChipHierarchy, error) { if mock.GetBridgeChipInfoFunc == nil { panic("Device.GetBridgeChipInfoFunc: method is nil but Device.GetBridgeChipInfo was just called") } @@ -3230,7 +3230,7 @@ func (mock *Device) GetBridgeChipInfoCalls() []struct { } // GetBusType calls GetBusTypeFunc. -func (mock *Device) GetBusType() (nvml.BusType, nvml.Return) { +func (mock *Device) GetBusType() (nvml.BusType, error) { if mock.GetBusTypeFunc == nil { panic("Device.GetBusTypeFunc: method is nil but Device.GetBusType was just called") } @@ -3284,7 +3284,7 @@ func (mock *Device) GetC2cModeInfoVCalls() []struct { } // GetClkMonStatus calls GetClkMonStatusFunc. -func (mock *Device) GetClkMonStatus() (nvml.ClkMonStatus, nvml.Return) { +func (mock *Device) GetClkMonStatus() (nvml.ClkMonStatus, error) { if mock.GetClkMonStatusFunc == nil { panic("Device.GetClkMonStatusFunc: method is nil but Device.GetClkMonStatus was just called") } @@ -3311,7 +3311,7 @@ func (mock *Device) GetClkMonStatusCalls() []struct { } // GetClock calls GetClockFunc. -func (mock *Device) GetClock(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { +func (mock *Device) GetClock(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, error) { if mock.GetClockFunc == nil { panic("Device.GetClockFunc: method is nil but Device.GetClock was just called") } @@ -3347,7 +3347,7 @@ func (mock *Device) GetClockCalls() []struct { } // GetClockInfo calls GetClockInfoFunc. -func (mock *Device) GetClockInfo(clockType nvml.ClockType) (uint32, nvml.Return) { +func (mock *Device) GetClockInfo(clockType nvml.ClockType) (uint32, error) { if mock.GetClockInfoFunc == nil { panic("Device.GetClockInfoFunc: method is nil but Device.GetClockInfo was just called") } @@ -3379,7 +3379,7 @@ func (mock *Device) GetClockInfoCalls() []struct { } // GetComputeInstanceId calls GetComputeInstanceIdFunc. -func (mock *Device) GetComputeInstanceId() (int, nvml.Return) { +func (mock *Device) GetComputeInstanceId() (int, error) { if mock.GetComputeInstanceIdFunc == nil { panic("Device.GetComputeInstanceIdFunc: method is nil but Device.GetComputeInstanceId was just called") } @@ -3406,7 +3406,7 @@ func (mock *Device) GetComputeInstanceIdCalls() []struct { } // GetComputeMode calls GetComputeModeFunc. -func (mock *Device) GetComputeMode() (nvml.ComputeMode, nvml.Return) { +func (mock *Device) GetComputeMode() (nvml.ComputeMode, error) { if mock.GetComputeModeFunc == nil { panic("Device.GetComputeModeFunc: method is nil but Device.GetComputeMode was just called") } @@ -3433,7 +3433,7 @@ func (mock *Device) GetComputeModeCalls() []struct { } // GetComputeRunningProcesses calls GetComputeRunningProcessesFunc. -func (mock *Device) GetComputeRunningProcesses() ([]nvml.ProcessInfo, nvml.Return) { +func (mock *Device) GetComputeRunningProcesses() ([]nvml.ProcessInfo, error) { if mock.GetComputeRunningProcessesFunc == nil { panic("Device.GetComputeRunningProcessesFunc: method is nil but Device.GetComputeRunningProcesses was just called") } @@ -3460,7 +3460,7 @@ func (mock *Device) GetComputeRunningProcessesCalls() []struct { } // GetConfComputeGpuAttestationReport calls GetConfComputeGpuAttestationReportFunc. -func (mock *Device) GetConfComputeGpuAttestationReport() (nvml.ConfComputeGpuAttestationReport, nvml.Return) { +func (mock *Device) GetConfComputeGpuAttestationReport() (nvml.ConfComputeGpuAttestationReport, error) { if mock.GetConfComputeGpuAttestationReportFunc == nil { panic("Device.GetConfComputeGpuAttestationReportFunc: method is nil but Device.GetConfComputeGpuAttestationReport was just called") } @@ -3487,7 +3487,7 @@ func (mock *Device) GetConfComputeGpuAttestationReportCalls() []struct { } // GetConfComputeGpuCertificate calls GetConfComputeGpuCertificateFunc. -func (mock *Device) GetConfComputeGpuCertificate() (nvml.ConfComputeGpuCertificate, nvml.Return) { +func (mock *Device) GetConfComputeGpuCertificate() (nvml.ConfComputeGpuCertificate, error) { if mock.GetConfComputeGpuCertificateFunc == nil { panic("Device.GetConfComputeGpuCertificateFunc: method is nil but Device.GetConfComputeGpuCertificate was just called") } @@ -3514,7 +3514,7 @@ func (mock *Device) GetConfComputeGpuCertificateCalls() []struct { } // GetConfComputeMemSizeInfo calls GetConfComputeMemSizeInfoFunc. -func (mock *Device) GetConfComputeMemSizeInfo() (nvml.ConfComputeMemSizeInfo, nvml.Return) { +func (mock *Device) GetConfComputeMemSizeInfo() (nvml.ConfComputeMemSizeInfo, error) { if mock.GetConfComputeMemSizeInfoFunc == nil { panic("Device.GetConfComputeMemSizeInfoFunc: method is nil but Device.GetConfComputeMemSizeInfo was just called") } @@ -3541,7 +3541,7 @@ func (mock *Device) GetConfComputeMemSizeInfoCalls() []struct { } // GetConfComputeProtectedMemoryUsage calls GetConfComputeProtectedMemoryUsageFunc. -func (mock *Device) GetConfComputeProtectedMemoryUsage() (nvml.Memory, nvml.Return) { +func (mock *Device) GetConfComputeProtectedMemoryUsage() (nvml.Memory, error) { if mock.GetConfComputeProtectedMemoryUsageFunc == nil { panic("Device.GetConfComputeProtectedMemoryUsageFunc: method is nil but Device.GetConfComputeProtectedMemoryUsage was just called") } @@ -3568,7 +3568,7 @@ func (mock *Device) GetConfComputeProtectedMemoryUsageCalls() []struct { } // GetCpuAffinity calls GetCpuAffinityFunc. -func (mock *Device) GetCpuAffinity(n int) ([]uint, nvml.Return) { +func (mock *Device) GetCpuAffinity(n int) ([]uint, error) { if mock.GetCpuAffinityFunc == nil { panic("Device.GetCpuAffinityFunc: method is nil but Device.GetCpuAffinity was just called") } @@ -3600,7 +3600,7 @@ func (mock *Device) GetCpuAffinityCalls() []struct { } // GetCpuAffinityWithinScope calls GetCpuAffinityWithinScopeFunc. -func (mock *Device) GetCpuAffinityWithinScope(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +func (mock *Device) GetCpuAffinityWithinScope(n int, affinityScope nvml.AffinityScope) ([]uint, error) { if mock.GetCpuAffinityWithinScopeFunc == nil { panic("Device.GetCpuAffinityWithinScopeFunc: method is nil but Device.GetCpuAffinityWithinScope was just called") } @@ -3636,7 +3636,7 @@ func (mock *Device) GetCpuAffinityWithinScopeCalls() []struct { } // GetCreatableVgpus calls GetCreatableVgpusFunc. -func (mock *Device) GetCreatableVgpus() ([]nvml.VgpuTypeId, nvml.Return) { +func (mock *Device) GetCreatableVgpus() ([]nvml.VgpuTypeId, error) { if mock.GetCreatableVgpusFunc == nil { panic("Device.GetCreatableVgpusFunc: method is nil but Device.GetCreatableVgpus was just called") } @@ -3663,7 +3663,7 @@ func (mock *Device) GetCreatableVgpusCalls() []struct { } // GetCudaComputeCapability calls GetCudaComputeCapabilityFunc. -func (mock *Device) GetCudaComputeCapability() (int, int, nvml.Return) { +func (mock *Device) GetCudaComputeCapability() (int, int, error) { if mock.GetCudaComputeCapabilityFunc == nil { panic("Device.GetCudaComputeCapabilityFunc: method is nil but Device.GetCudaComputeCapability was just called") } @@ -3690,7 +3690,7 @@ func (mock *Device) GetCudaComputeCapabilityCalls() []struct { } // GetCurrPcieLinkGeneration calls GetCurrPcieLinkGenerationFunc. -func (mock *Device) GetCurrPcieLinkGeneration() (int, nvml.Return) { +func (mock *Device) GetCurrPcieLinkGeneration() (int, error) { if mock.GetCurrPcieLinkGenerationFunc == nil { panic("Device.GetCurrPcieLinkGenerationFunc: method is nil but Device.GetCurrPcieLinkGeneration was just called") } @@ -3717,7 +3717,7 @@ func (mock *Device) GetCurrPcieLinkGenerationCalls() []struct { } // GetCurrPcieLinkWidth calls GetCurrPcieLinkWidthFunc. -func (mock *Device) GetCurrPcieLinkWidth() (int, nvml.Return) { +func (mock *Device) GetCurrPcieLinkWidth() (int, error) { if mock.GetCurrPcieLinkWidthFunc == nil { panic("Device.GetCurrPcieLinkWidthFunc: method is nil but Device.GetCurrPcieLinkWidth was just called") } @@ -3744,7 +3744,7 @@ func (mock *Device) GetCurrPcieLinkWidthCalls() []struct { } // GetCurrentClocksEventReasons calls GetCurrentClocksEventReasonsFunc. -func (mock *Device) GetCurrentClocksEventReasons() (uint64, nvml.Return) { +func (mock *Device) GetCurrentClocksEventReasons() (uint64, error) { if mock.GetCurrentClocksEventReasonsFunc == nil { panic("Device.GetCurrentClocksEventReasonsFunc: method is nil but Device.GetCurrentClocksEventReasons was just called") } @@ -3771,7 +3771,7 @@ func (mock *Device) GetCurrentClocksEventReasonsCalls() []struct { } // GetCurrentClocksThrottleReasons calls GetCurrentClocksThrottleReasonsFunc. -func (mock *Device) GetCurrentClocksThrottleReasons() (uint64, nvml.Return) { +func (mock *Device) GetCurrentClocksThrottleReasons() (uint64, error) { if mock.GetCurrentClocksThrottleReasonsFunc == nil { panic("Device.GetCurrentClocksThrottleReasonsFunc: method is nil but Device.GetCurrentClocksThrottleReasons was just called") } @@ -3798,7 +3798,7 @@ func (mock *Device) GetCurrentClocksThrottleReasonsCalls() []struct { } // GetDecoderUtilization calls GetDecoderUtilizationFunc. -func (mock *Device) GetDecoderUtilization() (uint32, uint32, nvml.Return) { +func (mock *Device) GetDecoderUtilization() (uint32, uint32, error) { if mock.GetDecoderUtilizationFunc == nil { panic("Device.GetDecoderUtilizationFunc: method is nil but Device.GetDecoderUtilization was just called") } @@ -3825,7 +3825,7 @@ func (mock *Device) GetDecoderUtilizationCalls() []struct { } // GetDefaultApplicationsClock calls GetDefaultApplicationsClockFunc. -func (mock *Device) GetDefaultApplicationsClock(clockType nvml.ClockType) (uint32, nvml.Return) { +func (mock *Device) GetDefaultApplicationsClock(clockType nvml.ClockType) (uint32, error) { if mock.GetDefaultApplicationsClockFunc == nil { panic("Device.GetDefaultApplicationsClockFunc: method is nil but Device.GetDefaultApplicationsClock was just called") } @@ -3857,7 +3857,7 @@ func (mock *Device) GetDefaultApplicationsClockCalls() []struct { } // GetDefaultEccMode calls GetDefaultEccModeFunc. -func (mock *Device) GetDefaultEccMode() (nvml.EnableState, nvml.Return) { +func (mock *Device) GetDefaultEccMode() (nvml.EnableState, error) { if mock.GetDefaultEccModeFunc == nil { panic("Device.GetDefaultEccModeFunc: method is nil but Device.GetDefaultEccMode was just called") } @@ -3884,7 +3884,7 @@ func (mock *Device) GetDefaultEccModeCalls() []struct { } // GetDetailedEccErrors calls GetDetailedEccErrorsFunc. -func (mock *Device) GetDetailedEccErrors(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { +func (mock *Device) GetDetailedEccErrors(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, error) { if mock.GetDetailedEccErrorsFunc == nil { panic("Device.GetDetailedEccErrorsFunc: method is nil but Device.GetDetailedEccErrors was just called") } @@ -3920,7 +3920,7 @@ func (mock *Device) GetDetailedEccErrorsCalls() []struct { } // GetDeviceHandleFromMigDeviceHandle calls GetDeviceHandleFromMigDeviceHandleFunc. -func (mock *Device) GetDeviceHandleFromMigDeviceHandle() (nvml.Device, nvml.Return) { +func (mock *Device) GetDeviceHandleFromMigDeviceHandle() (nvml.Device, error) { if mock.GetDeviceHandleFromMigDeviceHandleFunc == nil { panic("Device.GetDeviceHandleFromMigDeviceHandleFunc: method is nil but Device.GetDeviceHandleFromMigDeviceHandle was just called") } @@ -3947,7 +3947,7 @@ func (mock *Device) GetDeviceHandleFromMigDeviceHandleCalls() []struct { } // GetDisplayActive calls GetDisplayActiveFunc. -func (mock *Device) GetDisplayActive() (nvml.EnableState, nvml.Return) { +func (mock *Device) GetDisplayActive() (nvml.EnableState, error) { if mock.GetDisplayActiveFunc == nil { panic("Device.GetDisplayActiveFunc: method is nil but Device.GetDisplayActive was just called") } @@ -3974,7 +3974,7 @@ func (mock *Device) GetDisplayActiveCalls() []struct { } // GetDisplayMode calls GetDisplayModeFunc. -func (mock *Device) GetDisplayMode() (nvml.EnableState, nvml.Return) { +func (mock *Device) GetDisplayMode() (nvml.EnableState, error) { if mock.GetDisplayModeFunc == nil { panic("Device.GetDisplayModeFunc: method is nil but Device.GetDisplayMode was just called") } @@ -4001,7 +4001,7 @@ func (mock *Device) GetDisplayModeCalls() []struct { } // GetDriverModel calls GetDriverModelFunc. -func (mock *Device) GetDriverModel() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { +func (mock *Device) GetDriverModel() (nvml.DriverModel, nvml.DriverModel, error) { if mock.GetDriverModelFunc == nil { panic("Device.GetDriverModelFunc: method is nil but Device.GetDriverModel was just called") } @@ -4028,7 +4028,7 @@ func (mock *Device) GetDriverModelCalls() []struct { } // GetDynamicPstatesInfo calls GetDynamicPstatesInfoFunc. -func (mock *Device) GetDynamicPstatesInfo() (nvml.GpuDynamicPstatesInfo, nvml.Return) { +func (mock *Device) GetDynamicPstatesInfo() (nvml.GpuDynamicPstatesInfo, error) { if mock.GetDynamicPstatesInfoFunc == nil { panic("Device.GetDynamicPstatesInfoFunc: method is nil but Device.GetDynamicPstatesInfo was just called") } @@ -4055,7 +4055,7 @@ func (mock *Device) GetDynamicPstatesInfoCalls() []struct { } // GetEccMode calls GetEccModeFunc. -func (mock *Device) GetEccMode() (nvml.EnableState, nvml.EnableState, nvml.Return) { +func (mock *Device) GetEccMode() (nvml.EnableState, nvml.EnableState, error) { if mock.GetEccModeFunc == nil { panic("Device.GetEccModeFunc: method is nil but Device.GetEccMode was just called") } @@ -4082,7 +4082,7 @@ func (mock *Device) GetEccModeCalls() []struct { } // GetEncoderCapacity calls GetEncoderCapacityFunc. -func (mock *Device) GetEncoderCapacity(encoderType nvml.EncoderType) (int, nvml.Return) { +func (mock *Device) GetEncoderCapacity(encoderType nvml.EncoderType) (int, error) { if mock.GetEncoderCapacityFunc == nil { panic("Device.GetEncoderCapacityFunc: method is nil but Device.GetEncoderCapacity was just called") } @@ -4114,7 +4114,7 @@ func (mock *Device) GetEncoderCapacityCalls() []struct { } // GetEncoderSessions calls GetEncoderSessionsFunc. -func (mock *Device) GetEncoderSessions() ([]nvml.EncoderSessionInfo, nvml.Return) { +func (mock *Device) GetEncoderSessions() ([]nvml.EncoderSessionInfo, error) { if mock.GetEncoderSessionsFunc == nil { panic("Device.GetEncoderSessionsFunc: method is nil but Device.GetEncoderSessions was just called") } @@ -4141,7 +4141,7 @@ func (mock *Device) GetEncoderSessionsCalls() []struct { } // GetEncoderStats calls GetEncoderStatsFunc. -func (mock *Device) GetEncoderStats() (int, uint32, uint32, nvml.Return) { +func (mock *Device) GetEncoderStats() (int, uint32, uint32, error) { if mock.GetEncoderStatsFunc == nil { panic("Device.GetEncoderStatsFunc: method is nil but Device.GetEncoderStats was just called") } @@ -4168,7 +4168,7 @@ func (mock *Device) GetEncoderStatsCalls() []struct { } // GetEncoderUtilization calls GetEncoderUtilizationFunc. -func (mock *Device) GetEncoderUtilization() (uint32, uint32, nvml.Return) { +func (mock *Device) GetEncoderUtilization() (uint32, uint32, error) { if mock.GetEncoderUtilizationFunc == nil { panic("Device.GetEncoderUtilizationFunc: method is nil but Device.GetEncoderUtilization was just called") } @@ -4195,7 +4195,7 @@ func (mock *Device) GetEncoderUtilizationCalls() []struct { } // GetEnforcedPowerLimit calls GetEnforcedPowerLimitFunc. -func (mock *Device) GetEnforcedPowerLimit() (uint32, nvml.Return) { +func (mock *Device) GetEnforcedPowerLimit() (uint32, error) { if mock.GetEnforcedPowerLimitFunc == nil { panic("Device.GetEnforcedPowerLimitFunc: method is nil but Device.GetEnforcedPowerLimit was just called") } @@ -4222,7 +4222,7 @@ func (mock *Device) GetEnforcedPowerLimitCalls() []struct { } // GetFBCSessions calls GetFBCSessionsFunc. -func (mock *Device) GetFBCSessions() ([]nvml.FBCSessionInfo, nvml.Return) { +func (mock *Device) GetFBCSessions() ([]nvml.FBCSessionInfo, error) { if mock.GetFBCSessionsFunc == nil { panic("Device.GetFBCSessionsFunc: method is nil but Device.GetFBCSessions was just called") } @@ -4249,7 +4249,7 @@ func (mock *Device) GetFBCSessionsCalls() []struct { } // GetFBCStats calls GetFBCStatsFunc. -func (mock *Device) GetFBCStats() (nvml.FBCStats, nvml.Return) { +func (mock *Device) GetFBCStats() (nvml.FBCStats, error) { if mock.GetFBCStatsFunc == nil { panic("Device.GetFBCStatsFunc: method is nil but Device.GetFBCStats was just called") } @@ -4276,7 +4276,7 @@ func (mock *Device) GetFBCStatsCalls() []struct { } // GetFanControlPolicy_v2 calls GetFanControlPolicy_v2Func. -func (mock *Device) GetFanControlPolicy_v2(n int) (nvml.FanControlPolicy, nvml.Return) { +func (mock *Device) GetFanControlPolicy_v2(n int) (nvml.FanControlPolicy, error) { if mock.GetFanControlPolicy_v2Func == nil { panic("Device.GetFanControlPolicy_v2Func: method is nil but Device.GetFanControlPolicy_v2 was just called") } @@ -4308,7 +4308,7 @@ func (mock *Device) GetFanControlPolicy_v2Calls() []struct { } // GetFanSpeed calls GetFanSpeedFunc. -func (mock *Device) GetFanSpeed() (uint32, nvml.Return) { +func (mock *Device) GetFanSpeed() (uint32, error) { if mock.GetFanSpeedFunc == nil { panic("Device.GetFanSpeedFunc: method is nil but Device.GetFanSpeed was just called") } @@ -4335,7 +4335,7 @@ func (mock *Device) GetFanSpeedCalls() []struct { } // GetFanSpeed_v2 calls GetFanSpeed_v2Func. -func (mock *Device) GetFanSpeed_v2(n int) (uint32, nvml.Return) { +func (mock *Device) GetFanSpeed_v2(n int) (uint32, error) { if mock.GetFanSpeed_v2Func == nil { panic("Device.GetFanSpeed_v2Func: method is nil but Device.GetFanSpeed_v2 was just called") } @@ -4367,7 +4367,7 @@ func (mock *Device) GetFanSpeed_v2Calls() []struct { } // GetFieldValues calls GetFieldValuesFunc. -func (mock *Device) GetFieldValues(fieldValues []nvml.FieldValue) nvml.Return { +func (mock *Device) GetFieldValues(fieldValues []nvml.FieldValue) error { if mock.GetFieldValuesFunc == nil { panic("Device.GetFieldValuesFunc: method is nil but Device.GetFieldValues was just called") } @@ -4399,7 +4399,7 @@ func (mock *Device) GetFieldValuesCalls() []struct { } // GetGpcClkMinMaxVfOffset calls GetGpcClkMinMaxVfOffsetFunc. -func (mock *Device) GetGpcClkMinMaxVfOffset() (int, int, nvml.Return) { +func (mock *Device) GetGpcClkMinMaxVfOffset() (int, int, error) { if mock.GetGpcClkMinMaxVfOffsetFunc == nil { panic("Device.GetGpcClkMinMaxVfOffsetFunc: method is nil but Device.GetGpcClkMinMaxVfOffset was just called") } @@ -4426,7 +4426,7 @@ func (mock *Device) GetGpcClkMinMaxVfOffsetCalls() []struct { } // GetGpcClkVfOffset calls GetGpcClkVfOffsetFunc. -func (mock *Device) GetGpcClkVfOffset() (int, nvml.Return) { +func (mock *Device) GetGpcClkVfOffset() (int, error) { if mock.GetGpcClkVfOffsetFunc == nil { panic("Device.GetGpcClkVfOffsetFunc: method is nil but Device.GetGpcClkVfOffset was just called") } @@ -4453,7 +4453,7 @@ func (mock *Device) GetGpcClkVfOffsetCalls() []struct { } // GetGpuFabricInfo calls GetGpuFabricInfoFunc. -func (mock *Device) GetGpuFabricInfo() (nvml.GpuFabricInfo, nvml.Return) { +func (mock *Device) GetGpuFabricInfo() (nvml.GpuFabricInfo, error) { if mock.GetGpuFabricInfoFunc == nil { panic("Device.GetGpuFabricInfoFunc: method is nil but Device.GetGpuFabricInfo was just called") } @@ -4507,7 +4507,7 @@ func (mock *Device) GetGpuFabricInfoVCalls() []struct { } // GetGpuInstanceById calls GetGpuInstanceByIdFunc. -func (mock *Device) GetGpuInstanceById(n int) (nvml.GpuInstance, nvml.Return) { +func (mock *Device) GetGpuInstanceById(n int) (nvml.GpuInstance, error) { if mock.GetGpuInstanceByIdFunc == nil { panic("Device.GetGpuInstanceByIdFunc: method is nil but Device.GetGpuInstanceById was just called") } @@ -4539,7 +4539,7 @@ func (mock *Device) GetGpuInstanceByIdCalls() []struct { } // GetGpuInstanceId calls GetGpuInstanceIdFunc. -func (mock *Device) GetGpuInstanceId() (int, nvml.Return) { +func (mock *Device) GetGpuInstanceId() (int, error) { if mock.GetGpuInstanceIdFunc == nil { panic("Device.GetGpuInstanceIdFunc: method is nil but Device.GetGpuInstanceId was just called") } @@ -4566,7 +4566,7 @@ func (mock *Device) GetGpuInstanceIdCalls() []struct { } // GetGpuInstancePossiblePlacements calls GetGpuInstancePossiblePlacementsFunc. -func (mock *Device) GetGpuInstancePossiblePlacements(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { +func (mock *Device) GetGpuInstancePossiblePlacements(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, error) { if mock.GetGpuInstancePossiblePlacementsFunc == nil { panic("Device.GetGpuInstancePossiblePlacementsFunc: method is nil but Device.GetGpuInstancePossiblePlacements was just called") } @@ -4598,7 +4598,7 @@ func (mock *Device) GetGpuInstancePossiblePlacementsCalls() []struct { } // GetGpuInstanceProfileInfo calls GetGpuInstanceProfileInfoFunc. -func (mock *Device) GetGpuInstanceProfileInfo(n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { +func (mock *Device) GetGpuInstanceProfileInfo(n int) (nvml.GpuInstanceProfileInfo, error) { if mock.GetGpuInstanceProfileInfoFunc == nil { panic("Device.GetGpuInstanceProfileInfoFunc: method is nil but Device.GetGpuInstanceProfileInfo was just called") } @@ -4662,7 +4662,7 @@ func (mock *Device) GetGpuInstanceProfileInfoVCalls() []struct { } // GetGpuInstanceRemainingCapacity calls GetGpuInstanceRemainingCapacityFunc. -func (mock *Device) GetGpuInstanceRemainingCapacity(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) { +func (mock *Device) GetGpuInstanceRemainingCapacity(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, error) { if mock.GetGpuInstanceRemainingCapacityFunc == nil { panic("Device.GetGpuInstanceRemainingCapacityFunc: method is nil but Device.GetGpuInstanceRemainingCapacity was just called") } @@ -4694,7 +4694,7 @@ func (mock *Device) GetGpuInstanceRemainingCapacityCalls() []struct { } // GetGpuInstances calls GetGpuInstancesFunc. -func (mock *Device) GetGpuInstances(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { +func (mock *Device) GetGpuInstances(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, error) { if mock.GetGpuInstancesFunc == nil { panic("Device.GetGpuInstancesFunc: method is nil but Device.GetGpuInstances was just called") } @@ -4726,7 +4726,7 @@ func (mock *Device) GetGpuInstancesCalls() []struct { } // GetGpuMaxPcieLinkGeneration calls GetGpuMaxPcieLinkGenerationFunc. -func (mock *Device) GetGpuMaxPcieLinkGeneration() (int, nvml.Return) { +func (mock *Device) GetGpuMaxPcieLinkGeneration() (int, error) { if mock.GetGpuMaxPcieLinkGenerationFunc == nil { panic("Device.GetGpuMaxPcieLinkGenerationFunc: method is nil but Device.GetGpuMaxPcieLinkGeneration was just called") } @@ -4753,7 +4753,7 @@ func (mock *Device) GetGpuMaxPcieLinkGenerationCalls() []struct { } // GetGpuOperationMode calls GetGpuOperationModeFunc. -func (mock *Device) GetGpuOperationMode() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { +func (mock *Device) GetGpuOperationMode() (nvml.GpuOperationMode, nvml.GpuOperationMode, error) { if mock.GetGpuOperationModeFunc == nil { panic("Device.GetGpuOperationModeFunc: method is nil but Device.GetGpuOperationMode was just called") } @@ -4780,7 +4780,7 @@ func (mock *Device) GetGpuOperationModeCalls() []struct { } // GetGraphicsRunningProcesses calls GetGraphicsRunningProcessesFunc. -func (mock *Device) GetGraphicsRunningProcesses() ([]nvml.ProcessInfo, nvml.Return) { +func (mock *Device) GetGraphicsRunningProcesses() ([]nvml.ProcessInfo, error) { if mock.GetGraphicsRunningProcessesFunc == nil { panic("Device.GetGraphicsRunningProcessesFunc: method is nil but Device.GetGraphicsRunningProcesses was just called") } @@ -4807,7 +4807,7 @@ func (mock *Device) GetGraphicsRunningProcessesCalls() []struct { } // GetGridLicensableFeatures calls GetGridLicensableFeaturesFunc. -func (mock *Device) GetGridLicensableFeatures() (nvml.GridLicensableFeatures, nvml.Return) { +func (mock *Device) GetGridLicensableFeatures() (nvml.GridLicensableFeatures, error) { if mock.GetGridLicensableFeaturesFunc == nil { panic("Device.GetGridLicensableFeaturesFunc: method is nil but Device.GetGridLicensableFeatures was just called") } @@ -4834,7 +4834,7 @@ func (mock *Device) GetGridLicensableFeaturesCalls() []struct { } // GetGspFirmwareMode calls GetGspFirmwareModeFunc. -func (mock *Device) GetGspFirmwareMode() (bool, bool, nvml.Return) { +func (mock *Device) GetGspFirmwareMode() (bool, bool, error) { if mock.GetGspFirmwareModeFunc == nil { panic("Device.GetGspFirmwareModeFunc: method is nil but Device.GetGspFirmwareMode was just called") } @@ -4861,7 +4861,7 @@ func (mock *Device) GetGspFirmwareModeCalls() []struct { } // GetGspFirmwareVersion calls GetGspFirmwareVersionFunc. -func (mock *Device) GetGspFirmwareVersion() (string, nvml.Return) { +func (mock *Device) GetGspFirmwareVersion() (string, error) { if mock.GetGspFirmwareVersionFunc == nil { panic("Device.GetGspFirmwareVersionFunc: method is nil but Device.GetGspFirmwareVersion was just called") } @@ -4888,7 +4888,7 @@ func (mock *Device) GetGspFirmwareVersionCalls() []struct { } // GetHostVgpuMode calls GetHostVgpuModeFunc. -func (mock *Device) GetHostVgpuMode() (nvml.HostVgpuMode, nvml.Return) { +func (mock *Device) GetHostVgpuMode() (nvml.HostVgpuMode, error) { if mock.GetHostVgpuModeFunc == nil { panic("Device.GetHostVgpuModeFunc: method is nil but Device.GetHostVgpuMode was just called") } @@ -4915,7 +4915,7 @@ func (mock *Device) GetHostVgpuModeCalls() []struct { } // GetIndex calls GetIndexFunc. -func (mock *Device) GetIndex() (int, nvml.Return) { +func (mock *Device) GetIndex() (int, error) { if mock.GetIndexFunc == nil { panic("Device.GetIndexFunc: method is nil but Device.GetIndex was just called") } @@ -4942,7 +4942,7 @@ func (mock *Device) GetIndexCalls() []struct { } // GetInforomConfigurationChecksum calls GetInforomConfigurationChecksumFunc. -func (mock *Device) GetInforomConfigurationChecksum() (uint32, nvml.Return) { +func (mock *Device) GetInforomConfigurationChecksum() (uint32, error) { if mock.GetInforomConfigurationChecksumFunc == nil { panic("Device.GetInforomConfigurationChecksumFunc: method is nil but Device.GetInforomConfigurationChecksum was just called") } @@ -4969,7 +4969,7 @@ func (mock *Device) GetInforomConfigurationChecksumCalls() []struct { } // GetInforomImageVersion calls GetInforomImageVersionFunc. -func (mock *Device) GetInforomImageVersion() (string, nvml.Return) { +func (mock *Device) GetInforomImageVersion() (string, error) { if mock.GetInforomImageVersionFunc == nil { panic("Device.GetInforomImageVersionFunc: method is nil but Device.GetInforomImageVersion was just called") } @@ -4996,7 +4996,7 @@ func (mock *Device) GetInforomImageVersionCalls() []struct { } // GetInforomVersion calls GetInforomVersionFunc. -func (mock *Device) GetInforomVersion(inforomObject nvml.InforomObject) (string, nvml.Return) { +func (mock *Device) GetInforomVersion(inforomObject nvml.InforomObject) (string, error) { if mock.GetInforomVersionFunc == nil { panic("Device.GetInforomVersionFunc: method is nil but Device.GetInforomVersion was just called") } @@ -5028,7 +5028,7 @@ func (mock *Device) GetInforomVersionCalls() []struct { } // GetIrqNum calls GetIrqNumFunc. -func (mock *Device) GetIrqNum() (int, nvml.Return) { +func (mock *Device) GetIrqNum() (int, error) { if mock.GetIrqNumFunc == nil { panic("Device.GetIrqNumFunc: method is nil but Device.GetIrqNum was just called") } @@ -5055,7 +5055,7 @@ func (mock *Device) GetIrqNumCalls() []struct { } // GetJpgUtilization calls GetJpgUtilizationFunc. -func (mock *Device) GetJpgUtilization() (uint32, uint32, nvml.Return) { +func (mock *Device) GetJpgUtilization() (uint32, uint32, error) { if mock.GetJpgUtilizationFunc == nil { panic("Device.GetJpgUtilizationFunc: method is nil but Device.GetJpgUtilization was just called") } @@ -5082,7 +5082,7 @@ func (mock *Device) GetJpgUtilizationCalls() []struct { } // GetLastBBXFlushTime calls GetLastBBXFlushTimeFunc. -func (mock *Device) GetLastBBXFlushTime() (uint64, uint, nvml.Return) { +func (mock *Device) GetLastBBXFlushTime() (uint64, uint, error) { if mock.GetLastBBXFlushTimeFunc == nil { panic("Device.GetLastBBXFlushTimeFunc: method is nil but Device.GetLastBBXFlushTime was just called") } @@ -5109,7 +5109,7 @@ func (mock *Device) GetLastBBXFlushTimeCalls() []struct { } // GetMPSComputeRunningProcesses calls GetMPSComputeRunningProcessesFunc. -func (mock *Device) GetMPSComputeRunningProcesses() ([]nvml.ProcessInfo, nvml.Return) { +func (mock *Device) GetMPSComputeRunningProcesses() ([]nvml.ProcessInfo, error) { if mock.GetMPSComputeRunningProcessesFunc == nil { panic("Device.GetMPSComputeRunningProcessesFunc: method is nil but Device.GetMPSComputeRunningProcesses was just called") } @@ -5136,7 +5136,7 @@ func (mock *Device) GetMPSComputeRunningProcessesCalls() []struct { } // GetMaxClockInfo calls GetMaxClockInfoFunc. -func (mock *Device) GetMaxClockInfo(clockType nvml.ClockType) (uint32, nvml.Return) { +func (mock *Device) GetMaxClockInfo(clockType nvml.ClockType) (uint32, error) { if mock.GetMaxClockInfoFunc == nil { panic("Device.GetMaxClockInfoFunc: method is nil but Device.GetMaxClockInfo was just called") } @@ -5168,7 +5168,7 @@ func (mock *Device) GetMaxClockInfoCalls() []struct { } // GetMaxCustomerBoostClock calls GetMaxCustomerBoostClockFunc. -func (mock *Device) GetMaxCustomerBoostClock(clockType nvml.ClockType) (uint32, nvml.Return) { +func (mock *Device) GetMaxCustomerBoostClock(clockType nvml.ClockType) (uint32, error) { if mock.GetMaxCustomerBoostClockFunc == nil { panic("Device.GetMaxCustomerBoostClockFunc: method is nil but Device.GetMaxCustomerBoostClock was just called") } @@ -5200,7 +5200,7 @@ func (mock *Device) GetMaxCustomerBoostClockCalls() []struct { } // GetMaxMigDeviceCount calls GetMaxMigDeviceCountFunc. -func (mock *Device) GetMaxMigDeviceCount() (int, nvml.Return) { +func (mock *Device) GetMaxMigDeviceCount() (int, error) { if mock.GetMaxMigDeviceCountFunc == nil { panic("Device.GetMaxMigDeviceCountFunc: method is nil but Device.GetMaxMigDeviceCount was just called") } @@ -5227,7 +5227,7 @@ func (mock *Device) GetMaxMigDeviceCountCalls() []struct { } // GetMaxPcieLinkGeneration calls GetMaxPcieLinkGenerationFunc. -func (mock *Device) GetMaxPcieLinkGeneration() (int, nvml.Return) { +func (mock *Device) GetMaxPcieLinkGeneration() (int, error) { if mock.GetMaxPcieLinkGenerationFunc == nil { panic("Device.GetMaxPcieLinkGenerationFunc: method is nil but Device.GetMaxPcieLinkGeneration was just called") } @@ -5254,7 +5254,7 @@ func (mock *Device) GetMaxPcieLinkGenerationCalls() []struct { } // GetMaxPcieLinkWidth calls GetMaxPcieLinkWidthFunc. -func (mock *Device) GetMaxPcieLinkWidth() (int, nvml.Return) { +func (mock *Device) GetMaxPcieLinkWidth() (int, error) { if mock.GetMaxPcieLinkWidthFunc == nil { panic("Device.GetMaxPcieLinkWidthFunc: method is nil but Device.GetMaxPcieLinkWidth was just called") } @@ -5281,7 +5281,7 @@ func (mock *Device) GetMaxPcieLinkWidthCalls() []struct { } // GetMemClkMinMaxVfOffset calls GetMemClkMinMaxVfOffsetFunc. -func (mock *Device) GetMemClkMinMaxVfOffset() (int, int, nvml.Return) { +func (mock *Device) GetMemClkMinMaxVfOffset() (int, int, error) { if mock.GetMemClkMinMaxVfOffsetFunc == nil { panic("Device.GetMemClkMinMaxVfOffsetFunc: method is nil but Device.GetMemClkMinMaxVfOffset was just called") } @@ -5308,7 +5308,7 @@ func (mock *Device) GetMemClkMinMaxVfOffsetCalls() []struct { } // GetMemClkVfOffset calls GetMemClkVfOffsetFunc. -func (mock *Device) GetMemClkVfOffset() (int, nvml.Return) { +func (mock *Device) GetMemClkVfOffset() (int, error) { if mock.GetMemClkVfOffsetFunc == nil { panic("Device.GetMemClkVfOffsetFunc: method is nil but Device.GetMemClkVfOffset was just called") } @@ -5335,7 +5335,7 @@ func (mock *Device) GetMemClkVfOffsetCalls() []struct { } // GetMemoryAffinity calls GetMemoryAffinityFunc. -func (mock *Device) GetMemoryAffinity(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +func (mock *Device) GetMemoryAffinity(n int, affinityScope nvml.AffinityScope) ([]uint, error) { if mock.GetMemoryAffinityFunc == nil { panic("Device.GetMemoryAffinityFunc: method is nil but Device.GetMemoryAffinity was just called") } @@ -5371,7 +5371,7 @@ func (mock *Device) GetMemoryAffinityCalls() []struct { } // GetMemoryBusWidth calls GetMemoryBusWidthFunc. -func (mock *Device) GetMemoryBusWidth() (uint32, nvml.Return) { +func (mock *Device) GetMemoryBusWidth() (uint32, error) { if mock.GetMemoryBusWidthFunc == nil { panic("Device.GetMemoryBusWidthFunc: method is nil but Device.GetMemoryBusWidth was just called") } @@ -5398,7 +5398,7 @@ func (mock *Device) GetMemoryBusWidthCalls() []struct { } // GetMemoryErrorCounter calls GetMemoryErrorCounterFunc. -func (mock *Device) GetMemoryErrorCounter(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { +func (mock *Device) GetMemoryErrorCounter(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, error) { if mock.GetMemoryErrorCounterFunc == nil { panic("Device.GetMemoryErrorCounterFunc: method is nil but Device.GetMemoryErrorCounter was just called") } @@ -5438,7 +5438,7 @@ func (mock *Device) GetMemoryErrorCounterCalls() []struct { } // GetMemoryInfo calls GetMemoryInfoFunc. -func (mock *Device) GetMemoryInfo() (nvml.Memory, nvml.Return) { +func (mock *Device) GetMemoryInfo() (nvml.Memory, error) { if mock.GetMemoryInfoFunc == nil { panic("Device.GetMemoryInfoFunc: method is nil but Device.GetMemoryInfo was just called") } @@ -5465,7 +5465,7 @@ func (mock *Device) GetMemoryInfoCalls() []struct { } // GetMemoryInfo_v2 calls GetMemoryInfo_v2Func. -func (mock *Device) GetMemoryInfo_v2() (nvml.Memory_v2, nvml.Return) { +func (mock *Device) GetMemoryInfo_v2() (nvml.Memory_v2, error) { if mock.GetMemoryInfo_v2Func == nil { panic("Device.GetMemoryInfo_v2Func: method is nil but Device.GetMemoryInfo_v2 was just called") } @@ -5492,7 +5492,7 @@ func (mock *Device) GetMemoryInfo_v2Calls() []struct { } // GetMigDeviceHandleByIndex calls GetMigDeviceHandleByIndexFunc. -func (mock *Device) GetMigDeviceHandleByIndex(n int) (nvml.Device, nvml.Return) { +func (mock *Device) GetMigDeviceHandleByIndex(n int) (nvml.Device, error) { if mock.GetMigDeviceHandleByIndexFunc == nil { panic("Device.GetMigDeviceHandleByIndexFunc: method is nil but Device.GetMigDeviceHandleByIndex was just called") } @@ -5524,7 +5524,7 @@ func (mock *Device) GetMigDeviceHandleByIndexCalls() []struct { } // GetMigMode calls GetMigModeFunc. -func (mock *Device) GetMigMode() (int, int, nvml.Return) { +func (mock *Device) GetMigMode() (int, int, error) { if mock.GetMigModeFunc == nil { panic("Device.GetMigModeFunc: method is nil but Device.GetMigMode was just called") } @@ -5551,7 +5551,7 @@ func (mock *Device) GetMigModeCalls() []struct { } // GetMinMaxClockOfPState calls GetMinMaxClockOfPStateFunc. -func (mock *Device) GetMinMaxClockOfPState(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { +func (mock *Device) GetMinMaxClockOfPState(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, error) { if mock.GetMinMaxClockOfPStateFunc == nil { panic("Device.GetMinMaxClockOfPStateFunc: method is nil but Device.GetMinMaxClockOfPState was just called") } @@ -5587,7 +5587,7 @@ func (mock *Device) GetMinMaxClockOfPStateCalls() []struct { } // GetMinMaxFanSpeed calls GetMinMaxFanSpeedFunc. -func (mock *Device) GetMinMaxFanSpeed() (int, int, nvml.Return) { +func (mock *Device) GetMinMaxFanSpeed() (int, int, error) { if mock.GetMinMaxFanSpeedFunc == nil { panic("Device.GetMinMaxFanSpeedFunc: method is nil but Device.GetMinMaxFanSpeed was just called") } @@ -5614,7 +5614,7 @@ func (mock *Device) GetMinMaxFanSpeedCalls() []struct { } // GetMinorNumber calls GetMinorNumberFunc. -func (mock *Device) GetMinorNumber() (int, nvml.Return) { +func (mock *Device) GetMinorNumber() (int, error) { if mock.GetMinorNumberFunc == nil { panic("Device.GetMinorNumberFunc: method is nil but Device.GetMinorNumber was just called") } @@ -5641,7 +5641,7 @@ func (mock *Device) GetMinorNumberCalls() []struct { } // GetModuleId calls GetModuleIdFunc. -func (mock *Device) GetModuleId() (int, nvml.Return) { +func (mock *Device) GetModuleId() (int, error) { if mock.GetModuleIdFunc == nil { panic("Device.GetModuleIdFunc: method is nil but Device.GetModuleId was just called") } @@ -5668,7 +5668,7 @@ func (mock *Device) GetModuleIdCalls() []struct { } // GetMultiGpuBoard calls GetMultiGpuBoardFunc. -func (mock *Device) GetMultiGpuBoard() (int, nvml.Return) { +func (mock *Device) GetMultiGpuBoard() (int, error) { if mock.GetMultiGpuBoardFunc == nil { panic("Device.GetMultiGpuBoardFunc: method is nil but Device.GetMultiGpuBoard was just called") } @@ -5695,7 +5695,7 @@ func (mock *Device) GetMultiGpuBoardCalls() []struct { } // GetName calls GetNameFunc. -func (mock *Device) GetName() (string, nvml.Return) { +func (mock *Device) GetName() (string, error) { if mock.GetNameFunc == nil { panic("Device.GetNameFunc: method is nil but Device.GetName was just called") } @@ -5722,7 +5722,7 @@ func (mock *Device) GetNameCalls() []struct { } // GetNumFans calls GetNumFansFunc. -func (mock *Device) GetNumFans() (int, nvml.Return) { +func (mock *Device) GetNumFans() (int, error) { if mock.GetNumFansFunc == nil { panic("Device.GetNumFansFunc: method is nil but Device.GetNumFans was just called") } @@ -5749,7 +5749,7 @@ func (mock *Device) GetNumFansCalls() []struct { } // GetNumGpuCores calls GetNumGpuCoresFunc. -func (mock *Device) GetNumGpuCores() (int, nvml.Return) { +func (mock *Device) GetNumGpuCores() (int, error) { if mock.GetNumGpuCoresFunc == nil { panic("Device.GetNumGpuCoresFunc: method is nil but Device.GetNumGpuCores was just called") } @@ -5776,7 +5776,7 @@ func (mock *Device) GetNumGpuCoresCalls() []struct { } // GetNumaNodeId calls GetNumaNodeIdFunc. -func (mock *Device) GetNumaNodeId() (int, nvml.Return) { +func (mock *Device) GetNumaNodeId() (int, error) { if mock.GetNumaNodeIdFunc == nil { panic("Device.GetNumaNodeIdFunc: method is nil but Device.GetNumaNodeId was just called") } @@ -5803,7 +5803,7 @@ func (mock *Device) GetNumaNodeIdCalls() []struct { } // GetNvLinkCapability calls GetNvLinkCapabilityFunc. -func (mock *Device) GetNvLinkCapability(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { +func (mock *Device) GetNvLinkCapability(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, error) { if mock.GetNvLinkCapabilityFunc == nil { panic("Device.GetNvLinkCapabilityFunc: method is nil but Device.GetNvLinkCapability was just called") } @@ -5839,7 +5839,7 @@ func (mock *Device) GetNvLinkCapabilityCalls() []struct { } // GetNvLinkErrorCounter calls GetNvLinkErrorCounterFunc. -func (mock *Device) GetNvLinkErrorCounter(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { +func (mock *Device) GetNvLinkErrorCounter(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, error) { if mock.GetNvLinkErrorCounterFunc == nil { panic("Device.GetNvLinkErrorCounterFunc: method is nil but Device.GetNvLinkErrorCounter was just called") } @@ -5875,7 +5875,7 @@ func (mock *Device) GetNvLinkErrorCounterCalls() []struct { } // GetNvLinkRemoteDeviceType calls GetNvLinkRemoteDeviceTypeFunc. -func (mock *Device) GetNvLinkRemoteDeviceType(n int) (nvml.IntNvLinkDeviceType, nvml.Return) { +func (mock *Device) GetNvLinkRemoteDeviceType(n int) (nvml.IntNvLinkDeviceType, error) { if mock.GetNvLinkRemoteDeviceTypeFunc == nil { panic("Device.GetNvLinkRemoteDeviceTypeFunc: method is nil but Device.GetNvLinkRemoteDeviceType was just called") } @@ -5907,7 +5907,7 @@ func (mock *Device) GetNvLinkRemoteDeviceTypeCalls() []struct { } // GetNvLinkRemotePciInfo calls GetNvLinkRemotePciInfoFunc. -func (mock *Device) GetNvLinkRemotePciInfo(n int) (nvml.PciInfo, nvml.Return) { +func (mock *Device) GetNvLinkRemotePciInfo(n int) (nvml.PciInfo, error) { if mock.GetNvLinkRemotePciInfoFunc == nil { panic("Device.GetNvLinkRemotePciInfoFunc: method is nil but Device.GetNvLinkRemotePciInfo was just called") } @@ -5939,7 +5939,7 @@ func (mock *Device) GetNvLinkRemotePciInfoCalls() []struct { } // GetNvLinkState calls GetNvLinkStateFunc. -func (mock *Device) GetNvLinkState(n int) (nvml.EnableState, nvml.Return) { +func (mock *Device) GetNvLinkState(n int) (nvml.EnableState, error) { if mock.GetNvLinkStateFunc == nil { panic("Device.GetNvLinkStateFunc: method is nil but Device.GetNvLinkState was just called") } @@ -5971,7 +5971,7 @@ func (mock *Device) GetNvLinkStateCalls() []struct { } // GetNvLinkUtilizationControl calls GetNvLinkUtilizationControlFunc. -func (mock *Device) GetNvLinkUtilizationControl(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { +func (mock *Device) GetNvLinkUtilizationControl(n1 int, n2 int) (nvml.NvLinkUtilizationControl, error) { if mock.GetNvLinkUtilizationControlFunc == nil { panic("Device.GetNvLinkUtilizationControlFunc: method is nil but Device.GetNvLinkUtilizationControl was just called") } @@ -6007,7 +6007,7 @@ func (mock *Device) GetNvLinkUtilizationControlCalls() []struct { } // GetNvLinkUtilizationCounter calls GetNvLinkUtilizationCounterFunc. -func (mock *Device) GetNvLinkUtilizationCounter(n1 int, n2 int) (uint64, uint64, nvml.Return) { +func (mock *Device) GetNvLinkUtilizationCounter(n1 int, n2 int) (uint64, uint64, error) { if mock.GetNvLinkUtilizationCounterFunc == nil { panic("Device.GetNvLinkUtilizationCounterFunc: method is nil but Device.GetNvLinkUtilizationCounter was just called") } @@ -6043,7 +6043,7 @@ func (mock *Device) GetNvLinkUtilizationCounterCalls() []struct { } // GetNvLinkVersion calls GetNvLinkVersionFunc. -func (mock *Device) GetNvLinkVersion(n int) (uint32, nvml.Return) { +func (mock *Device) GetNvLinkVersion(n int) (uint32, error) { if mock.GetNvLinkVersionFunc == nil { panic("Device.GetNvLinkVersionFunc: method is nil but Device.GetNvLinkVersion was just called") } @@ -6075,7 +6075,7 @@ func (mock *Device) GetNvLinkVersionCalls() []struct { } // GetOfaUtilization calls GetOfaUtilizationFunc. -func (mock *Device) GetOfaUtilization() (uint32, uint32, nvml.Return) { +func (mock *Device) GetOfaUtilization() (uint32, uint32, error) { if mock.GetOfaUtilizationFunc == nil { panic("Device.GetOfaUtilizationFunc: method is nil but Device.GetOfaUtilization was just called") } @@ -6102,7 +6102,7 @@ func (mock *Device) GetOfaUtilizationCalls() []struct { } // GetP2PStatus calls GetP2PStatusFunc. -func (mock *Device) GetP2PStatus(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { +func (mock *Device) GetP2PStatus(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, error) { if mock.GetP2PStatusFunc == nil { panic("Device.GetP2PStatusFunc: method is nil but Device.GetP2PStatus was just called") } @@ -6138,7 +6138,7 @@ func (mock *Device) GetP2PStatusCalls() []struct { } // GetPciInfo calls GetPciInfoFunc. -func (mock *Device) GetPciInfo() (nvml.PciInfo, nvml.Return) { +func (mock *Device) GetPciInfo() (nvml.PciInfo, error) { if mock.GetPciInfoFunc == nil { panic("Device.GetPciInfoFunc: method is nil but Device.GetPciInfo was just called") } @@ -6165,7 +6165,7 @@ func (mock *Device) GetPciInfoCalls() []struct { } // GetPciInfoExt calls GetPciInfoExtFunc. -func (mock *Device) GetPciInfoExt() (nvml.PciInfoExt, nvml.Return) { +func (mock *Device) GetPciInfoExt() (nvml.PciInfoExt, error) { if mock.GetPciInfoExtFunc == nil { panic("Device.GetPciInfoExtFunc: method is nil but Device.GetPciInfoExt was just called") } @@ -6192,7 +6192,7 @@ func (mock *Device) GetPciInfoExtCalls() []struct { } // GetPcieLinkMaxSpeed calls GetPcieLinkMaxSpeedFunc. -func (mock *Device) GetPcieLinkMaxSpeed() (uint32, nvml.Return) { +func (mock *Device) GetPcieLinkMaxSpeed() (uint32, error) { if mock.GetPcieLinkMaxSpeedFunc == nil { panic("Device.GetPcieLinkMaxSpeedFunc: method is nil but Device.GetPcieLinkMaxSpeed was just called") } @@ -6219,7 +6219,7 @@ func (mock *Device) GetPcieLinkMaxSpeedCalls() []struct { } // GetPcieReplayCounter calls GetPcieReplayCounterFunc. -func (mock *Device) GetPcieReplayCounter() (int, nvml.Return) { +func (mock *Device) GetPcieReplayCounter() (int, error) { if mock.GetPcieReplayCounterFunc == nil { panic("Device.GetPcieReplayCounterFunc: method is nil but Device.GetPcieReplayCounter was just called") } @@ -6246,7 +6246,7 @@ func (mock *Device) GetPcieReplayCounterCalls() []struct { } // GetPcieSpeed calls GetPcieSpeedFunc. -func (mock *Device) GetPcieSpeed() (int, nvml.Return) { +func (mock *Device) GetPcieSpeed() (int, error) { if mock.GetPcieSpeedFunc == nil { panic("Device.GetPcieSpeedFunc: method is nil but Device.GetPcieSpeed was just called") } @@ -6273,7 +6273,7 @@ func (mock *Device) GetPcieSpeedCalls() []struct { } // GetPcieThroughput calls GetPcieThroughputFunc. -func (mock *Device) GetPcieThroughput(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { +func (mock *Device) GetPcieThroughput(pcieUtilCounter nvml.PcieUtilCounter) (uint32, error) { if mock.GetPcieThroughputFunc == nil { panic("Device.GetPcieThroughputFunc: method is nil but Device.GetPcieThroughput was just called") } @@ -6305,7 +6305,7 @@ func (mock *Device) GetPcieThroughputCalls() []struct { } // GetPerformanceState calls GetPerformanceStateFunc. -func (mock *Device) GetPerformanceState() (nvml.Pstates, nvml.Return) { +func (mock *Device) GetPerformanceState() (nvml.Pstates, error) { if mock.GetPerformanceStateFunc == nil { panic("Device.GetPerformanceStateFunc: method is nil but Device.GetPerformanceState was just called") } @@ -6332,7 +6332,7 @@ func (mock *Device) GetPerformanceStateCalls() []struct { } // GetPersistenceMode calls GetPersistenceModeFunc. -func (mock *Device) GetPersistenceMode() (nvml.EnableState, nvml.Return) { +func (mock *Device) GetPersistenceMode() (nvml.EnableState, error) { if mock.GetPersistenceModeFunc == nil { panic("Device.GetPersistenceModeFunc: method is nil but Device.GetPersistenceMode was just called") } @@ -6359,7 +6359,7 @@ func (mock *Device) GetPersistenceModeCalls() []struct { } // GetPgpuMetadataString calls GetPgpuMetadataStringFunc. -func (mock *Device) GetPgpuMetadataString() (string, nvml.Return) { +func (mock *Device) GetPgpuMetadataString() (string, error) { if mock.GetPgpuMetadataStringFunc == nil { panic("Device.GetPgpuMetadataStringFunc: method is nil but Device.GetPgpuMetadataString was just called") } @@ -6386,7 +6386,7 @@ func (mock *Device) GetPgpuMetadataStringCalls() []struct { } // GetPowerManagementDefaultLimit calls GetPowerManagementDefaultLimitFunc. -func (mock *Device) GetPowerManagementDefaultLimit() (uint32, nvml.Return) { +func (mock *Device) GetPowerManagementDefaultLimit() (uint32, error) { if mock.GetPowerManagementDefaultLimitFunc == nil { panic("Device.GetPowerManagementDefaultLimitFunc: method is nil but Device.GetPowerManagementDefaultLimit was just called") } @@ -6413,7 +6413,7 @@ func (mock *Device) GetPowerManagementDefaultLimitCalls() []struct { } // GetPowerManagementLimit calls GetPowerManagementLimitFunc. -func (mock *Device) GetPowerManagementLimit() (uint32, nvml.Return) { +func (mock *Device) GetPowerManagementLimit() (uint32, error) { if mock.GetPowerManagementLimitFunc == nil { panic("Device.GetPowerManagementLimitFunc: method is nil but Device.GetPowerManagementLimit was just called") } @@ -6440,7 +6440,7 @@ func (mock *Device) GetPowerManagementLimitCalls() []struct { } // GetPowerManagementLimitConstraints calls GetPowerManagementLimitConstraintsFunc. -func (mock *Device) GetPowerManagementLimitConstraints() (uint32, uint32, nvml.Return) { +func (mock *Device) GetPowerManagementLimitConstraints() (uint32, uint32, error) { if mock.GetPowerManagementLimitConstraintsFunc == nil { panic("Device.GetPowerManagementLimitConstraintsFunc: method is nil but Device.GetPowerManagementLimitConstraints was just called") } @@ -6467,7 +6467,7 @@ func (mock *Device) GetPowerManagementLimitConstraintsCalls() []struct { } // GetPowerManagementMode calls GetPowerManagementModeFunc. -func (mock *Device) GetPowerManagementMode() (nvml.EnableState, nvml.Return) { +func (mock *Device) GetPowerManagementMode() (nvml.EnableState, error) { if mock.GetPowerManagementModeFunc == nil { panic("Device.GetPowerManagementModeFunc: method is nil but Device.GetPowerManagementMode was just called") } @@ -6494,7 +6494,7 @@ func (mock *Device) GetPowerManagementModeCalls() []struct { } // GetPowerSource calls GetPowerSourceFunc. -func (mock *Device) GetPowerSource() (nvml.PowerSource, nvml.Return) { +func (mock *Device) GetPowerSource() (nvml.PowerSource, error) { if mock.GetPowerSourceFunc == nil { panic("Device.GetPowerSourceFunc: method is nil but Device.GetPowerSource was just called") } @@ -6521,7 +6521,7 @@ func (mock *Device) GetPowerSourceCalls() []struct { } // GetPowerState calls GetPowerStateFunc. -func (mock *Device) GetPowerState() (nvml.Pstates, nvml.Return) { +func (mock *Device) GetPowerState() (nvml.Pstates, error) { if mock.GetPowerStateFunc == nil { panic("Device.GetPowerStateFunc: method is nil but Device.GetPowerState was just called") } @@ -6548,7 +6548,7 @@ func (mock *Device) GetPowerStateCalls() []struct { } // GetPowerUsage calls GetPowerUsageFunc. -func (mock *Device) GetPowerUsage() (uint32, nvml.Return) { +func (mock *Device) GetPowerUsage() (uint32, error) { if mock.GetPowerUsageFunc == nil { panic("Device.GetPowerUsageFunc: method is nil but Device.GetPowerUsage was just called") } @@ -6575,7 +6575,7 @@ func (mock *Device) GetPowerUsageCalls() []struct { } // GetProcessUtilization calls GetProcessUtilizationFunc. -func (mock *Device) GetProcessUtilization(v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { +func (mock *Device) GetProcessUtilization(v uint64) ([]nvml.ProcessUtilizationSample, error) { if mock.GetProcessUtilizationFunc == nil { panic("Device.GetProcessUtilizationFunc: method is nil but Device.GetProcessUtilization was just called") } @@ -6607,7 +6607,7 @@ func (mock *Device) GetProcessUtilizationCalls() []struct { } // GetProcessesUtilizationInfo calls GetProcessesUtilizationInfoFunc. -func (mock *Device) GetProcessesUtilizationInfo() (nvml.ProcessesUtilizationInfo, nvml.Return) { +func (mock *Device) GetProcessesUtilizationInfo() (nvml.ProcessesUtilizationInfo, error) { if mock.GetProcessesUtilizationInfoFunc == nil { panic("Device.GetProcessesUtilizationInfoFunc: method is nil but Device.GetProcessesUtilizationInfo was just called") } @@ -6634,7 +6634,7 @@ func (mock *Device) GetProcessesUtilizationInfoCalls() []struct { } // GetRemappedRows calls GetRemappedRowsFunc. -func (mock *Device) GetRemappedRows() (int, int, bool, bool, nvml.Return) { +func (mock *Device) GetRemappedRows() (int, int, bool, bool, error) { if mock.GetRemappedRowsFunc == nil { panic("Device.GetRemappedRowsFunc: method is nil but Device.GetRemappedRows was just called") } @@ -6661,7 +6661,7 @@ func (mock *Device) GetRemappedRowsCalls() []struct { } // GetRetiredPages calls GetRetiredPagesFunc. -func (mock *Device) GetRetiredPages(pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { +func (mock *Device) GetRetiredPages(pageRetirementCause nvml.PageRetirementCause) ([]uint64, error) { if mock.GetRetiredPagesFunc == nil { panic("Device.GetRetiredPagesFunc: method is nil but Device.GetRetiredPages was just called") } @@ -6693,7 +6693,7 @@ func (mock *Device) GetRetiredPagesCalls() []struct { } // GetRetiredPagesPendingStatus calls GetRetiredPagesPendingStatusFunc. -func (mock *Device) GetRetiredPagesPendingStatus() (nvml.EnableState, nvml.Return) { +func (mock *Device) GetRetiredPagesPendingStatus() (nvml.EnableState, error) { if mock.GetRetiredPagesPendingStatusFunc == nil { panic("Device.GetRetiredPagesPendingStatusFunc: method is nil but Device.GetRetiredPagesPendingStatus was just called") } @@ -6720,7 +6720,7 @@ func (mock *Device) GetRetiredPagesPendingStatusCalls() []struct { } // GetRetiredPages_v2 calls GetRetiredPages_v2Func. -func (mock *Device) GetRetiredPages_v2(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { +func (mock *Device) GetRetiredPages_v2(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, error) { if mock.GetRetiredPages_v2Func == nil { panic("Device.GetRetiredPages_v2Func: method is nil but Device.GetRetiredPages_v2 was just called") } @@ -6752,7 +6752,7 @@ func (mock *Device) GetRetiredPages_v2Calls() []struct { } // GetRowRemapperHistogram calls GetRowRemapperHistogramFunc. -func (mock *Device) GetRowRemapperHistogram() (nvml.RowRemapperHistogramValues, nvml.Return) { +func (mock *Device) GetRowRemapperHistogram() (nvml.RowRemapperHistogramValues, error) { if mock.GetRowRemapperHistogramFunc == nil { panic("Device.GetRowRemapperHistogramFunc: method is nil but Device.GetRowRemapperHistogram was just called") } @@ -6779,7 +6779,7 @@ func (mock *Device) GetRowRemapperHistogramCalls() []struct { } // GetRunningProcessDetailList calls GetRunningProcessDetailListFunc. -func (mock *Device) GetRunningProcessDetailList() (nvml.ProcessDetailList, nvml.Return) { +func (mock *Device) GetRunningProcessDetailList() (nvml.ProcessDetailList, error) { if mock.GetRunningProcessDetailListFunc == nil { panic("Device.GetRunningProcessDetailListFunc: method is nil but Device.GetRunningProcessDetailList was just called") } @@ -6806,7 +6806,7 @@ func (mock *Device) GetRunningProcessDetailListCalls() []struct { } // GetSamples calls GetSamplesFunc. -func (mock *Device) GetSamples(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { +func (mock *Device) GetSamples(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, error) { if mock.GetSamplesFunc == nil { panic("Device.GetSamplesFunc: method is nil but Device.GetSamples was just called") } @@ -6842,7 +6842,7 @@ func (mock *Device) GetSamplesCalls() []struct { } // GetSerial calls GetSerialFunc. -func (mock *Device) GetSerial() (string, nvml.Return) { +func (mock *Device) GetSerial() (string, error) { if mock.GetSerialFunc == nil { panic("Device.GetSerialFunc: method is nil but Device.GetSerial was just called") } @@ -6869,7 +6869,7 @@ func (mock *Device) GetSerialCalls() []struct { } // GetSramEccErrorStatus calls GetSramEccErrorStatusFunc. -func (mock *Device) GetSramEccErrorStatus() (nvml.EccSramErrorStatus, nvml.Return) { +func (mock *Device) GetSramEccErrorStatus() (nvml.EccSramErrorStatus, error) { if mock.GetSramEccErrorStatusFunc == nil { panic("Device.GetSramEccErrorStatusFunc: method is nil but Device.GetSramEccErrorStatus was just called") } @@ -6896,7 +6896,7 @@ func (mock *Device) GetSramEccErrorStatusCalls() []struct { } // GetSupportedClocksEventReasons calls GetSupportedClocksEventReasonsFunc. -func (mock *Device) GetSupportedClocksEventReasons() (uint64, nvml.Return) { +func (mock *Device) GetSupportedClocksEventReasons() (uint64, error) { if mock.GetSupportedClocksEventReasonsFunc == nil { panic("Device.GetSupportedClocksEventReasonsFunc: method is nil but Device.GetSupportedClocksEventReasons was just called") } @@ -6923,7 +6923,7 @@ func (mock *Device) GetSupportedClocksEventReasonsCalls() []struct { } // GetSupportedClocksThrottleReasons calls GetSupportedClocksThrottleReasonsFunc. -func (mock *Device) GetSupportedClocksThrottleReasons() (uint64, nvml.Return) { +func (mock *Device) GetSupportedClocksThrottleReasons() (uint64, error) { if mock.GetSupportedClocksThrottleReasonsFunc == nil { panic("Device.GetSupportedClocksThrottleReasonsFunc: method is nil but Device.GetSupportedClocksThrottleReasons was just called") } @@ -6950,7 +6950,7 @@ func (mock *Device) GetSupportedClocksThrottleReasonsCalls() []struct { } // GetSupportedEventTypes calls GetSupportedEventTypesFunc. -func (mock *Device) GetSupportedEventTypes() (uint64, nvml.Return) { +func (mock *Device) GetSupportedEventTypes() (uint64, error) { if mock.GetSupportedEventTypesFunc == nil { panic("Device.GetSupportedEventTypesFunc: method is nil but Device.GetSupportedEventTypes was just called") } @@ -6977,7 +6977,7 @@ func (mock *Device) GetSupportedEventTypesCalls() []struct { } // GetSupportedGraphicsClocks calls GetSupportedGraphicsClocksFunc. -func (mock *Device) GetSupportedGraphicsClocks(n int) (int, uint32, nvml.Return) { +func (mock *Device) GetSupportedGraphicsClocks(n int) (int, uint32, error) { if mock.GetSupportedGraphicsClocksFunc == nil { panic("Device.GetSupportedGraphicsClocksFunc: method is nil but Device.GetSupportedGraphicsClocks was just called") } @@ -7009,7 +7009,7 @@ func (mock *Device) GetSupportedGraphicsClocksCalls() []struct { } // GetSupportedMemoryClocks calls GetSupportedMemoryClocksFunc. -func (mock *Device) GetSupportedMemoryClocks() (int, uint32, nvml.Return) { +func (mock *Device) GetSupportedMemoryClocks() (int, uint32, error) { if mock.GetSupportedMemoryClocksFunc == nil { panic("Device.GetSupportedMemoryClocksFunc: method is nil but Device.GetSupportedMemoryClocks was just called") } @@ -7036,7 +7036,7 @@ func (mock *Device) GetSupportedMemoryClocksCalls() []struct { } // GetSupportedPerformanceStates calls GetSupportedPerformanceStatesFunc. -func (mock *Device) GetSupportedPerformanceStates() ([]nvml.Pstates, nvml.Return) { +func (mock *Device) GetSupportedPerformanceStates() ([]nvml.Pstates, error) { if mock.GetSupportedPerformanceStatesFunc == nil { panic("Device.GetSupportedPerformanceStatesFunc: method is nil but Device.GetSupportedPerformanceStates was just called") } @@ -7063,7 +7063,7 @@ func (mock *Device) GetSupportedPerformanceStatesCalls() []struct { } // GetSupportedVgpus calls GetSupportedVgpusFunc. -func (mock *Device) GetSupportedVgpus() ([]nvml.VgpuTypeId, nvml.Return) { +func (mock *Device) GetSupportedVgpus() ([]nvml.VgpuTypeId, error) { if mock.GetSupportedVgpusFunc == nil { panic("Device.GetSupportedVgpusFunc: method is nil but Device.GetSupportedVgpus was just called") } @@ -7090,7 +7090,7 @@ func (mock *Device) GetSupportedVgpusCalls() []struct { } // GetTargetFanSpeed calls GetTargetFanSpeedFunc. -func (mock *Device) GetTargetFanSpeed(n int) (int, nvml.Return) { +func (mock *Device) GetTargetFanSpeed(n int) (int, error) { if mock.GetTargetFanSpeedFunc == nil { panic("Device.GetTargetFanSpeedFunc: method is nil but Device.GetTargetFanSpeed was just called") } @@ -7122,7 +7122,7 @@ func (mock *Device) GetTargetFanSpeedCalls() []struct { } // GetTemperature calls GetTemperatureFunc. -func (mock *Device) GetTemperature(temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { +func (mock *Device) GetTemperature(temperatureSensors nvml.TemperatureSensors) (uint32, error) { if mock.GetTemperatureFunc == nil { panic("Device.GetTemperatureFunc: method is nil but Device.GetTemperature was just called") } @@ -7154,7 +7154,7 @@ func (mock *Device) GetTemperatureCalls() []struct { } // GetTemperatureThreshold calls GetTemperatureThresholdFunc. -func (mock *Device) GetTemperatureThreshold(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { +func (mock *Device) GetTemperatureThreshold(temperatureThresholds nvml.TemperatureThresholds) (uint32, error) { if mock.GetTemperatureThresholdFunc == nil { panic("Device.GetTemperatureThresholdFunc: method is nil but Device.GetTemperatureThreshold was just called") } @@ -7186,7 +7186,7 @@ func (mock *Device) GetTemperatureThresholdCalls() []struct { } // GetThermalSettings calls GetThermalSettingsFunc. -func (mock *Device) GetThermalSettings(v uint32) (nvml.GpuThermalSettings, nvml.Return) { +func (mock *Device) GetThermalSettings(v uint32) (nvml.GpuThermalSettings, error) { if mock.GetThermalSettingsFunc == nil { panic("Device.GetThermalSettingsFunc: method is nil but Device.GetThermalSettings was just called") } @@ -7218,7 +7218,7 @@ func (mock *Device) GetThermalSettingsCalls() []struct { } // GetTopologyCommonAncestor calls GetTopologyCommonAncestorFunc. -func (mock *Device) GetTopologyCommonAncestor(device nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { +func (mock *Device) GetTopologyCommonAncestor(device nvml.Device) (nvml.GpuTopologyLevel, error) { if mock.GetTopologyCommonAncestorFunc == nil { panic("Device.GetTopologyCommonAncestorFunc: method is nil but Device.GetTopologyCommonAncestor was just called") } @@ -7250,7 +7250,7 @@ func (mock *Device) GetTopologyCommonAncestorCalls() []struct { } // GetTopologyNearestGpus calls GetTopologyNearestGpusFunc. -func (mock *Device) GetTopologyNearestGpus(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { +func (mock *Device) GetTopologyNearestGpus(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, error) { if mock.GetTopologyNearestGpusFunc == nil { panic("Device.GetTopologyNearestGpusFunc: method is nil but Device.GetTopologyNearestGpus was just called") } @@ -7282,7 +7282,7 @@ func (mock *Device) GetTopologyNearestGpusCalls() []struct { } // GetTotalEccErrors calls GetTotalEccErrorsFunc. -func (mock *Device) GetTotalEccErrors(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { +func (mock *Device) GetTotalEccErrors(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, error) { if mock.GetTotalEccErrorsFunc == nil { panic("Device.GetTotalEccErrorsFunc: method is nil but Device.GetTotalEccErrors was just called") } @@ -7318,7 +7318,7 @@ func (mock *Device) GetTotalEccErrorsCalls() []struct { } // GetTotalEnergyConsumption calls GetTotalEnergyConsumptionFunc. -func (mock *Device) GetTotalEnergyConsumption() (uint64, nvml.Return) { +func (mock *Device) GetTotalEnergyConsumption() (uint64, error) { if mock.GetTotalEnergyConsumptionFunc == nil { panic("Device.GetTotalEnergyConsumptionFunc: method is nil but Device.GetTotalEnergyConsumption was just called") } @@ -7345,7 +7345,7 @@ func (mock *Device) GetTotalEnergyConsumptionCalls() []struct { } // GetUUID calls GetUUIDFunc. -func (mock *Device) GetUUID() (string, nvml.Return) { +func (mock *Device) GetUUID() (string, error) { if mock.GetUUIDFunc == nil { panic("Device.GetUUIDFunc: method is nil but Device.GetUUID was just called") } @@ -7372,7 +7372,7 @@ func (mock *Device) GetUUIDCalls() []struct { } // GetUtilizationRates calls GetUtilizationRatesFunc. -func (mock *Device) GetUtilizationRates() (nvml.Utilization, nvml.Return) { +func (mock *Device) GetUtilizationRates() (nvml.Utilization, error) { if mock.GetUtilizationRatesFunc == nil { panic("Device.GetUtilizationRatesFunc: method is nil but Device.GetUtilizationRates was just called") } @@ -7399,7 +7399,7 @@ func (mock *Device) GetUtilizationRatesCalls() []struct { } // GetVbiosVersion calls GetVbiosVersionFunc. -func (mock *Device) GetVbiosVersion() (string, nvml.Return) { +func (mock *Device) GetVbiosVersion() (string, error) { if mock.GetVbiosVersionFunc == nil { panic("Device.GetVbiosVersionFunc: method is nil but Device.GetVbiosVersion was just called") } @@ -7426,7 +7426,7 @@ func (mock *Device) GetVbiosVersionCalls() []struct { } // GetVgpuCapabilities calls GetVgpuCapabilitiesFunc. -func (mock *Device) GetVgpuCapabilities(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { +func (mock *Device) GetVgpuCapabilities(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, error) { if mock.GetVgpuCapabilitiesFunc == nil { panic("Device.GetVgpuCapabilitiesFunc: method is nil but Device.GetVgpuCapabilities was just called") } @@ -7458,7 +7458,7 @@ func (mock *Device) GetVgpuCapabilitiesCalls() []struct { } // GetVgpuHeterogeneousMode calls GetVgpuHeterogeneousModeFunc. -func (mock *Device) GetVgpuHeterogeneousMode() (nvml.VgpuHeterogeneousMode, nvml.Return) { +func (mock *Device) GetVgpuHeterogeneousMode() (nvml.VgpuHeterogeneousMode, error) { if mock.GetVgpuHeterogeneousModeFunc == nil { panic("Device.GetVgpuHeterogeneousModeFunc: method is nil but Device.GetVgpuHeterogeneousMode was just called") } @@ -7485,7 +7485,7 @@ func (mock *Device) GetVgpuHeterogeneousModeCalls() []struct { } // GetVgpuInstancesUtilizationInfo calls GetVgpuInstancesUtilizationInfoFunc. -func (mock *Device) GetVgpuInstancesUtilizationInfo() (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { +func (mock *Device) GetVgpuInstancesUtilizationInfo() (nvml.VgpuInstancesUtilizationInfo, error) { if mock.GetVgpuInstancesUtilizationInfoFunc == nil { panic("Device.GetVgpuInstancesUtilizationInfoFunc: method is nil but Device.GetVgpuInstancesUtilizationInfo was just called") } @@ -7512,7 +7512,7 @@ func (mock *Device) GetVgpuInstancesUtilizationInfoCalls() []struct { } // GetVgpuMetadata calls GetVgpuMetadataFunc. -func (mock *Device) GetVgpuMetadata() (nvml.VgpuPgpuMetadata, nvml.Return) { +func (mock *Device) GetVgpuMetadata() (nvml.VgpuPgpuMetadata, error) { if mock.GetVgpuMetadataFunc == nil { panic("Device.GetVgpuMetadataFunc: method is nil but Device.GetVgpuMetadata was just called") } @@ -7539,7 +7539,7 @@ func (mock *Device) GetVgpuMetadataCalls() []struct { } // GetVgpuProcessUtilization calls GetVgpuProcessUtilizationFunc. -func (mock *Device) GetVgpuProcessUtilization(v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { +func (mock *Device) GetVgpuProcessUtilization(v uint64) ([]nvml.VgpuProcessUtilizationSample, error) { if mock.GetVgpuProcessUtilizationFunc == nil { panic("Device.GetVgpuProcessUtilizationFunc: method is nil but Device.GetVgpuProcessUtilization was just called") } @@ -7571,7 +7571,7 @@ func (mock *Device) GetVgpuProcessUtilizationCalls() []struct { } // GetVgpuProcessesUtilizationInfo calls GetVgpuProcessesUtilizationInfoFunc. -func (mock *Device) GetVgpuProcessesUtilizationInfo() (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { +func (mock *Device) GetVgpuProcessesUtilizationInfo() (nvml.VgpuProcessesUtilizationInfo, error) { if mock.GetVgpuProcessesUtilizationInfoFunc == nil { panic("Device.GetVgpuProcessesUtilizationInfoFunc: method is nil but Device.GetVgpuProcessesUtilizationInfo was just called") } @@ -7598,7 +7598,7 @@ func (mock *Device) GetVgpuProcessesUtilizationInfoCalls() []struct { } // GetVgpuSchedulerCapabilities calls GetVgpuSchedulerCapabilitiesFunc. -func (mock *Device) GetVgpuSchedulerCapabilities() (nvml.VgpuSchedulerCapabilities, nvml.Return) { +func (mock *Device) GetVgpuSchedulerCapabilities() (nvml.VgpuSchedulerCapabilities, error) { if mock.GetVgpuSchedulerCapabilitiesFunc == nil { panic("Device.GetVgpuSchedulerCapabilitiesFunc: method is nil but Device.GetVgpuSchedulerCapabilities was just called") } @@ -7625,7 +7625,7 @@ func (mock *Device) GetVgpuSchedulerCapabilitiesCalls() []struct { } // GetVgpuSchedulerLog calls GetVgpuSchedulerLogFunc. -func (mock *Device) GetVgpuSchedulerLog() (nvml.VgpuSchedulerLog, nvml.Return) { +func (mock *Device) GetVgpuSchedulerLog() (nvml.VgpuSchedulerLog, error) { if mock.GetVgpuSchedulerLogFunc == nil { panic("Device.GetVgpuSchedulerLogFunc: method is nil but Device.GetVgpuSchedulerLog was just called") } @@ -7652,7 +7652,7 @@ func (mock *Device) GetVgpuSchedulerLogCalls() []struct { } // GetVgpuSchedulerState calls GetVgpuSchedulerStateFunc. -func (mock *Device) GetVgpuSchedulerState() (nvml.VgpuSchedulerGetState, nvml.Return) { +func (mock *Device) GetVgpuSchedulerState() (nvml.VgpuSchedulerGetState, error) { if mock.GetVgpuSchedulerStateFunc == nil { panic("Device.GetVgpuSchedulerStateFunc: method is nil but Device.GetVgpuSchedulerState was just called") } @@ -7679,7 +7679,7 @@ func (mock *Device) GetVgpuSchedulerStateCalls() []struct { } // GetVgpuTypeCreatablePlacements calls GetVgpuTypeCreatablePlacementsFunc. -func (mock *Device) GetVgpuTypeCreatablePlacements(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +func (mock *Device) GetVgpuTypeCreatablePlacements(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) { if mock.GetVgpuTypeCreatablePlacementsFunc == nil { panic("Device.GetVgpuTypeCreatablePlacementsFunc: method is nil but Device.GetVgpuTypeCreatablePlacements was just called") } @@ -7711,7 +7711,7 @@ func (mock *Device) GetVgpuTypeCreatablePlacementsCalls() []struct { } // GetVgpuTypeSupportedPlacements calls GetVgpuTypeSupportedPlacementsFunc. -func (mock *Device) GetVgpuTypeSupportedPlacements(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +func (mock *Device) GetVgpuTypeSupportedPlacements(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) { if mock.GetVgpuTypeSupportedPlacementsFunc == nil { panic("Device.GetVgpuTypeSupportedPlacementsFunc: method is nil but Device.GetVgpuTypeSupportedPlacements was just called") } @@ -7743,7 +7743,7 @@ func (mock *Device) GetVgpuTypeSupportedPlacementsCalls() []struct { } // GetVgpuUtilization calls GetVgpuUtilizationFunc. -func (mock *Device) GetVgpuUtilization(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { +func (mock *Device) GetVgpuUtilization(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, error) { if mock.GetVgpuUtilizationFunc == nil { panic("Device.GetVgpuUtilizationFunc: method is nil but Device.GetVgpuUtilization was just called") } @@ -7775,7 +7775,7 @@ func (mock *Device) GetVgpuUtilizationCalls() []struct { } // GetViolationStatus calls GetViolationStatusFunc. -func (mock *Device) GetViolationStatus(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { +func (mock *Device) GetViolationStatus(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, error) { if mock.GetViolationStatusFunc == nil { panic("Device.GetViolationStatusFunc: method is nil but Device.GetViolationStatus was just called") } @@ -7807,7 +7807,7 @@ func (mock *Device) GetViolationStatusCalls() []struct { } // GetVirtualizationMode calls GetVirtualizationModeFunc. -func (mock *Device) GetVirtualizationMode() (nvml.GpuVirtualizationMode, nvml.Return) { +func (mock *Device) GetVirtualizationMode() (nvml.GpuVirtualizationMode, error) { if mock.GetVirtualizationModeFunc == nil { panic("Device.GetVirtualizationModeFunc: method is nil but Device.GetVirtualizationMode was just called") } @@ -7834,7 +7834,7 @@ func (mock *Device) GetVirtualizationModeCalls() []struct { } // GpmMigSampleGet calls GpmMigSampleGetFunc. -func (mock *Device) GpmMigSampleGet(n int, gpmSample nvml.GpmSample) nvml.Return { +func (mock *Device) GpmMigSampleGet(n int, gpmSample nvml.GpmSample) error { if mock.GpmMigSampleGetFunc == nil { panic("Device.GpmMigSampleGetFunc: method is nil but Device.GpmMigSampleGet was just called") } @@ -7870,7 +7870,7 @@ func (mock *Device) GpmMigSampleGetCalls() []struct { } // GpmQueryDeviceSupport calls GpmQueryDeviceSupportFunc. -func (mock *Device) GpmQueryDeviceSupport() (nvml.GpmSupport, nvml.Return) { +func (mock *Device) GpmQueryDeviceSupport() (nvml.GpmSupport, error) { if mock.GpmQueryDeviceSupportFunc == nil { panic("Device.GpmQueryDeviceSupportFunc: method is nil but Device.GpmQueryDeviceSupport was just called") } @@ -7924,7 +7924,7 @@ func (mock *Device) GpmQueryDeviceSupportVCalls() []struct { } // GpmQueryIfStreamingEnabled calls GpmQueryIfStreamingEnabledFunc. -func (mock *Device) GpmQueryIfStreamingEnabled() (uint32, nvml.Return) { +func (mock *Device) GpmQueryIfStreamingEnabled() (uint32, error) { if mock.GpmQueryIfStreamingEnabledFunc == nil { panic("Device.GpmQueryIfStreamingEnabledFunc: method is nil but Device.GpmQueryIfStreamingEnabled was just called") } @@ -7951,7 +7951,7 @@ func (mock *Device) GpmQueryIfStreamingEnabledCalls() []struct { } // GpmSampleGet calls GpmSampleGetFunc. -func (mock *Device) GpmSampleGet(gpmSample nvml.GpmSample) nvml.Return { +func (mock *Device) GpmSampleGet(gpmSample nvml.GpmSample) error { if mock.GpmSampleGetFunc == nil { panic("Device.GpmSampleGetFunc: method is nil but Device.GpmSampleGet was just called") } @@ -7983,7 +7983,7 @@ func (mock *Device) GpmSampleGetCalls() []struct { } // GpmSetStreamingEnabled calls GpmSetStreamingEnabledFunc. -func (mock *Device) GpmSetStreamingEnabled(v uint32) nvml.Return { +func (mock *Device) GpmSetStreamingEnabled(v uint32) error { if mock.GpmSetStreamingEnabledFunc == nil { panic("Device.GpmSetStreamingEnabledFunc: method is nil but Device.GpmSetStreamingEnabled was just called") } @@ -8015,7 +8015,7 @@ func (mock *Device) GpmSetStreamingEnabledCalls() []struct { } // IsMigDeviceHandle calls IsMigDeviceHandleFunc. -func (mock *Device) IsMigDeviceHandle() (bool, nvml.Return) { +func (mock *Device) IsMigDeviceHandle() (bool, error) { if mock.IsMigDeviceHandleFunc == nil { panic("Device.IsMigDeviceHandleFunc: method is nil but Device.IsMigDeviceHandle was just called") } @@ -8042,7 +8042,7 @@ func (mock *Device) IsMigDeviceHandleCalls() []struct { } // OnSameBoard calls OnSameBoardFunc. -func (mock *Device) OnSameBoard(device nvml.Device) (int, nvml.Return) { +func (mock *Device) OnSameBoard(device nvml.Device) (int, error) { if mock.OnSameBoardFunc == nil { panic("Device.OnSameBoardFunc: method is nil but Device.OnSameBoard was just called") } @@ -8074,7 +8074,7 @@ func (mock *Device) OnSameBoardCalls() []struct { } // RegisterEvents calls RegisterEventsFunc. -func (mock *Device) RegisterEvents(v uint64, eventSet nvml.EventSet) nvml.Return { +func (mock *Device) RegisterEvents(v uint64, eventSet nvml.EventSet) error { if mock.RegisterEventsFunc == nil { panic("Device.RegisterEventsFunc: method is nil but Device.RegisterEvents was just called") } @@ -8110,7 +8110,7 @@ func (mock *Device) RegisterEventsCalls() []struct { } // ResetApplicationsClocks calls ResetApplicationsClocksFunc. -func (mock *Device) ResetApplicationsClocks() nvml.Return { +func (mock *Device) ResetApplicationsClocks() error { if mock.ResetApplicationsClocksFunc == nil { panic("Device.ResetApplicationsClocksFunc: method is nil but Device.ResetApplicationsClocks was just called") } @@ -8137,7 +8137,7 @@ func (mock *Device) ResetApplicationsClocksCalls() []struct { } // ResetGpuLockedClocks calls ResetGpuLockedClocksFunc. -func (mock *Device) ResetGpuLockedClocks() nvml.Return { +func (mock *Device) ResetGpuLockedClocks() error { if mock.ResetGpuLockedClocksFunc == nil { panic("Device.ResetGpuLockedClocksFunc: method is nil but Device.ResetGpuLockedClocks was just called") } @@ -8164,7 +8164,7 @@ func (mock *Device) ResetGpuLockedClocksCalls() []struct { } // ResetMemoryLockedClocks calls ResetMemoryLockedClocksFunc. -func (mock *Device) ResetMemoryLockedClocks() nvml.Return { +func (mock *Device) ResetMemoryLockedClocks() error { if mock.ResetMemoryLockedClocksFunc == nil { panic("Device.ResetMemoryLockedClocksFunc: method is nil but Device.ResetMemoryLockedClocks was just called") } @@ -8191,7 +8191,7 @@ func (mock *Device) ResetMemoryLockedClocksCalls() []struct { } // ResetNvLinkErrorCounters calls ResetNvLinkErrorCountersFunc. -func (mock *Device) ResetNvLinkErrorCounters(n int) nvml.Return { +func (mock *Device) ResetNvLinkErrorCounters(n int) error { if mock.ResetNvLinkErrorCountersFunc == nil { panic("Device.ResetNvLinkErrorCountersFunc: method is nil but Device.ResetNvLinkErrorCounters was just called") } @@ -8223,7 +8223,7 @@ func (mock *Device) ResetNvLinkErrorCountersCalls() []struct { } // ResetNvLinkUtilizationCounter calls ResetNvLinkUtilizationCounterFunc. -func (mock *Device) ResetNvLinkUtilizationCounter(n1 int, n2 int) nvml.Return { +func (mock *Device) ResetNvLinkUtilizationCounter(n1 int, n2 int) error { if mock.ResetNvLinkUtilizationCounterFunc == nil { panic("Device.ResetNvLinkUtilizationCounterFunc: method is nil but Device.ResetNvLinkUtilizationCounter was just called") } @@ -8259,7 +8259,7 @@ func (mock *Device) ResetNvLinkUtilizationCounterCalls() []struct { } // SetAPIRestriction calls SetAPIRestrictionFunc. -func (mock *Device) SetAPIRestriction(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { +func (mock *Device) SetAPIRestriction(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) error { if mock.SetAPIRestrictionFunc == nil { panic("Device.SetAPIRestrictionFunc: method is nil but Device.SetAPIRestriction was just called") } @@ -8295,7 +8295,7 @@ func (mock *Device) SetAPIRestrictionCalls() []struct { } // SetAccountingMode calls SetAccountingModeFunc. -func (mock *Device) SetAccountingMode(enableState nvml.EnableState) nvml.Return { +func (mock *Device) SetAccountingMode(enableState nvml.EnableState) error { if mock.SetAccountingModeFunc == nil { panic("Device.SetAccountingModeFunc: method is nil but Device.SetAccountingMode was just called") } @@ -8327,7 +8327,7 @@ func (mock *Device) SetAccountingModeCalls() []struct { } // SetApplicationsClocks calls SetApplicationsClocksFunc. -func (mock *Device) SetApplicationsClocks(v1 uint32, v2 uint32) nvml.Return { +func (mock *Device) SetApplicationsClocks(v1 uint32, v2 uint32) error { if mock.SetApplicationsClocksFunc == nil { panic("Device.SetApplicationsClocksFunc: method is nil but Device.SetApplicationsClocks was just called") } @@ -8363,7 +8363,7 @@ func (mock *Device) SetApplicationsClocksCalls() []struct { } // SetAutoBoostedClocksEnabled calls SetAutoBoostedClocksEnabledFunc. -func (mock *Device) SetAutoBoostedClocksEnabled(enableState nvml.EnableState) nvml.Return { +func (mock *Device) SetAutoBoostedClocksEnabled(enableState nvml.EnableState) error { if mock.SetAutoBoostedClocksEnabledFunc == nil { panic("Device.SetAutoBoostedClocksEnabledFunc: method is nil but Device.SetAutoBoostedClocksEnabled was just called") } @@ -8395,7 +8395,7 @@ func (mock *Device) SetAutoBoostedClocksEnabledCalls() []struct { } // SetComputeMode calls SetComputeModeFunc. -func (mock *Device) SetComputeMode(computeMode nvml.ComputeMode) nvml.Return { +func (mock *Device) SetComputeMode(computeMode nvml.ComputeMode) error { if mock.SetComputeModeFunc == nil { panic("Device.SetComputeModeFunc: method is nil but Device.SetComputeMode was just called") } @@ -8427,7 +8427,7 @@ func (mock *Device) SetComputeModeCalls() []struct { } // SetConfComputeUnprotectedMemSize calls SetConfComputeUnprotectedMemSizeFunc. -func (mock *Device) SetConfComputeUnprotectedMemSize(v uint64) nvml.Return { +func (mock *Device) SetConfComputeUnprotectedMemSize(v uint64) error { if mock.SetConfComputeUnprotectedMemSizeFunc == nil { panic("Device.SetConfComputeUnprotectedMemSizeFunc: method is nil but Device.SetConfComputeUnprotectedMemSize was just called") } @@ -8459,7 +8459,7 @@ func (mock *Device) SetConfComputeUnprotectedMemSizeCalls() []struct { } // SetCpuAffinity calls SetCpuAffinityFunc. -func (mock *Device) SetCpuAffinity() nvml.Return { +func (mock *Device) SetCpuAffinity() error { if mock.SetCpuAffinityFunc == nil { panic("Device.SetCpuAffinityFunc: method is nil but Device.SetCpuAffinity was just called") } @@ -8486,7 +8486,7 @@ func (mock *Device) SetCpuAffinityCalls() []struct { } // SetDefaultAutoBoostedClocksEnabled calls SetDefaultAutoBoostedClocksEnabledFunc. -func (mock *Device) SetDefaultAutoBoostedClocksEnabled(enableState nvml.EnableState, v uint32) nvml.Return { +func (mock *Device) SetDefaultAutoBoostedClocksEnabled(enableState nvml.EnableState, v uint32) error { if mock.SetDefaultAutoBoostedClocksEnabledFunc == nil { panic("Device.SetDefaultAutoBoostedClocksEnabledFunc: method is nil but Device.SetDefaultAutoBoostedClocksEnabled was just called") } @@ -8522,7 +8522,7 @@ func (mock *Device) SetDefaultAutoBoostedClocksEnabledCalls() []struct { } // SetDefaultFanSpeed_v2 calls SetDefaultFanSpeed_v2Func. -func (mock *Device) SetDefaultFanSpeed_v2(n int) nvml.Return { +func (mock *Device) SetDefaultFanSpeed_v2(n int) error { if mock.SetDefaultFanSpeed_v2Func == nil { panic("Device.SetDefaultFanSpeed_v2Func: method is nil but Device.SetDefaultFanSpeed_v2 was just called") } @@ -8554,7 +8554,7 @@ func (mock *Device) SetDefaultFanSpeed_v2Calls() []struct { } // SetDriverModel calls SetDriverModelFunc. -func (mock *Device) SetDriverModel(driverModel nvml.DriverModel, v uint32) nvml.Return { +func (mock *Device) SetDriverModel(driverModel nvml.DriverModel, v uint32) error { if mock.SetDriverModelFunc == nil { panic("Device.SetDriverModelFunc: method is nil but Device.SetDriverModel was just called") } @@ -8590,7 +8590,7 @@ func (mock *Device) SetDriverModelCalls() []struct { } // SetEccMode calls SetEccModeFunc. -func (mock *Device) SetEccMode(enableState nvml.EnableState) nvml.Return { +func (mock *Device) SetEccMode(enableState nvml.EnableState) error { if mock.SetEccModeFunc == nil { panic("Device.SetEccModeFunc: method is nil but Device.SetEccMode was just called") } @@ -8622,7 +8622,7 @@ func (mock *Device) SetEccModeCalls() []struct { } // SetFanControlPolicy calls SetFanControlPolicyFunc. -func (mock *Device) SetFanControlPolicy(n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { +func (mock *Device) SetFanControlPolicy(n int, fanControlPolicy nvml.FanControlPolicy) error { if mock.SetFanControlPolicyFunc == nil { panic("Device.SetFanControlPolicyFunc: method is nil but Device.SetFanControlPolicy was just called") } @@ -8658,7 +8658,7 @@ func (mock *Device) SetFanControlPolicyCalls() []struct { } // SetFanSpeed_v2 calls SetFanSpeed_v2Func. -func (mock *Device) SetFanSpeed_v2(n1 int, n2 int) nvml.Return { +func (mock *Device) SetFanSpeed_v2(n1 int, n2 int) error { if mock.SetFanSpeed_v2Func == nil { panic("Device.SetFanSpeed_v2Func: method is nil but Device.SetFanSpeed_v2 was just called") } @@ -8694,7 +8694,7 @@ func (mock *Device) SetFanSpeed_v2Calls() []struct { } // SetGpcClkVfOffset calls SetGpcClkVfOffsetFunc. -func (mock *Device) SetGpcClkVfOffset(n int) nvml.Return { +func (mock *Device) SetGpcClkVfOffset(n int) error { if mock.SetGpcClkVfOffsetFunc == nil { panic("Device.SetGpcClkVfOffsetFunc: method is nil but Device.SetGpcClkVfOffset was just called") } @@ -8726,7 +8726,7 @@ func (mock *Device) SetGpcClkVfOffsetCalls() []struct { } // SetGpuLockedClocks calls SetGpuLockedClocksFunc. -func (mock *Device) SetGpuLockedClocks(v1 uint32, v2 uint32) nvml.Return { +func (mock *Device) SetGpuLockedClocks(v1 uint32, v2 uint32) error { if mock.SetGpuLockedClocksFunc == nil { panic("Device.SetGpuLockedClocksFunc: method is nil but Device.SetGpuLockedClocks was just called") } @@ -8762,7 +8762,7 @@ func (mock *Device) SetGpuLockedClocksCalls() []struct { } // SetGpuOperationMode calls SetGpuOperationModeFunc. -func (mock *Device) SetGpuOperationMode(gpuOperationMode nvml.GpuOperationMode) nvml.Return { +func (mock *Device) SetGpuOperationMode(gpuOperationMode nvml.GpuOperationMode) error { if mock.SetGpuOperationModeFunc == nil { panic("Device.SetGpuOperationModeFunc: method is nil but Device.SetGpuOperationMode was just called") } @@ -8794,7 +8794,7 @@ func (mock *Device) SetGpuOperationModeCalls() []struct { } // SetMemClkVfOffset calls SetMemClkVfOffsetFunc. -func (mock *Device) SetMemClkVfOffset(n int) nvml.Return { +func (mock *Device) SetMemClkVfOffset(n int) error { if mock.SetMemClkVfOffsetFunc == nil { panic("Device.SetMemClkVfOffsetFunc: method is nil but Device.SetMemClkVfOffset was just called") } @@ -8826,7 +8826,7 @@ func (mock *Device) SetMemClkVfOffsetCalls() []struct { } // SetMemoryLockedClocks calls SetMemoryLockedClocksFunc. -func (mock *Device) SetMemoryLockedClocks(v1 uint32, v2 uint32) nvml.Return { +func (mock *Device) SetMemoryLockedClocks(v1 uint32, v2 uint32) error { if mock.SetMemoryLockedClocksFunc == nil { panic("Device.SetMemoryLockedClocksFunc: method is nil but Device.SetMemoryLockedClocks was just called") } @@ -8862,7 +8862,7 @@ func (mock *Device) SetMemoryLockedClocksCalls() []struct { } // SetMigMode calls SetMigModeFunc. -func (mock *Device) SetMigMode(n int) (nvml.Return, nvml.Return) { +func (mock *Device) SetMigMode(n int) (error, error) { if mock.SetMigModeFunc == nil { panic("Device.SetMigModeFunc: method is nil but Device.SetMigMode was just called") } @@ -8894,7 +8894,7 @@ func (mock *Device) SetMigModeCalls() []struct { } // SetNvLinkDeviceLowPowerThreshold calls SetNvLinkDeviceLowPowerThresholdFunc. -func (mock *Device) SetNvLinkDeviceLowPowerThreshold(nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { +func (mock *Device) SetNvLinkDeviceLowPowerThreshold(nvLinkPowerThres *nvml.NvLinkPowerThres) error { if mock.SetNvLinkDeviceLowPowerThresholdFunc == nil { panic("Device.SetNvLinkDeviceLowPowerThresholdFunc: method is nil but Device.SetNvLinkDeviceLowPowerThreshold was just called") } @@ -8926,7 +8926,7 @@ func (mock *Device) SetNvLinkDeviceLowPowerThresholdCalls() []struct { } // SetNvLinkUtilizationControl calls SetNvLinkUtilizationControlFunc. -func (mock *Device) SetNvLinkUtilizationControl(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { +func (mock *Device) SetNvLinkUtilizationControl(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) error { if mock.SetNvLinkUtilizationControlFunc == nil { panic("Device.SetNvLinkUtilizationControlFunc: method is nil but Device.SetNvLinkUtilizationControl was just called") } @@ -8970,7 +8970,7 @@ func (mock *Device) SetNvLinkUtilizationControlCalls() []struct { } // SetPersistenceMode calls SetPersistenceModeFunc. -func (mock *Device) SetPersistenceMode(enableState nvml.EnableState) nvml.Return { +func (mock *Device) SetPersistenceMode(enableState nvml.EnableState) error { if mock.SetPersistenceModeFunc == nil { panic("Device.SetPersistenceModeFunc: method is nil but Device.SetPersistenceMode was just called") } @@ -9002,7 +9002,7 @@ func (mock *Device) SetPersistenceModeCalls() []struct { } // SetPowerManagementLimit calls SetPowerManagementLimitFunc. -func (mock *Device) SetPowerManagementLimit(v uint32) nvml.Return { +func (mock *Device) SetPowerManagementLimit(v uint32) error { if mock.SetPowerManagementLimitFunc == nil { panic("Device.SetPowerManagementLimitFunc: method is nil but Device.SetPowerManagementLimit was just called") } @@ -9034,7 +9034,7 @@ func (mock *Device) SetPowerManagementLimitCalls() []struct { } // SetPowerManagementLimit_v2 calls SetPowerManagementLimit_v2Func. -func (mock *Device) SetPowerManagementLimit_v2(powerValue_v2 *nvml.PowerValue_v2) nvml.Return { +func (mock *Device) SetPowerManagementLimit_v2(powerValue_v2 *nvml.PowerValue_v2) error { if mock.SetPowerManagementLimit_v2Func == nil { panic("Device.SetPowerManagementLimit_v2Func: method is nil but Device.SetPowerManagementLimit_v2 was just called") } @@ -9066,7 +9066,7 @@ func (mock *Device) SetPowerManagementLimit_v2Calls() []struct { } // SetTemperatureThreshold calls SetTemperatureThresholdFunc. -func (mock *Device) SetTemperatureThreshold(temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { +func (mock *Device) SetTemperatureThreshold(temperatureThresholds nvml.TemperatureThresholds, n int) error { if mock.SetTemperatureThresholdFunc == nil { panic("Device.SetTemperatureThresholdFunc: method is nil but Device.SetTemperatureThreshold was just called") } @@ -9102,7 +9102,7 @@ func (mock *Device) SetTemperatureThresholdCalls() []struct { } // SetVgpuCapabilities calls SetVgpuCapabilitiesFunc. -func (mock *Device) SetVgpuCapabilities(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { +func (mock *Device) SetVgpuCapabilities(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) error { if mock.SetVgpuCapabilitiesFunc == nil { panic("Device.SetVgpuCapabilitiesFunc: method is nil but Device.SetVgpuCapabilities was just called") } @@ -9138,7 +9138,7 @@ func (mock *Device) SetVgpuCapabilitiesCalls() []struct { } // SetVgpuHeterogeneousMode calls SetVgpuHeterogeneousModeFunc. -func (mock *Device) SetVgpuHeterogeneousMode(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { +func (mock *Device) SetVgpuHeterogeneousMode(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) error { if mock.SetVgpuHeterogeneousModeFunc == nil { panic("Device.SetVgpuHeterogeneousModeFunc: method is nil but Device.SetVgpuHeterogeneousMode was just called") } @@ -9170,7 +9170,7 @@ func (mock *Device) SetVgpuHeterogeneousModeCalls() []struct { } // SetVgpuSchedulerState calls SetVgpuSchedulerStateFunc. -func (mock *Device) SetVgpuSchedulerState(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { +func (mock *Device) SetVgpuSchedulerState(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) error { if mock.SetVgpuSchedulerStateFunc == nil { panic("Device.SetVgpuSchedulerStateFunc: method is nil but Device.SetVgpuSchedulerState was just called") } @@ -9202,7 +9202,7 @@ func (mock *Device) SetVgpuSchedulerStateCalls() []struct { } // SetVirtualizationMode calls SetVirtualizationModeFunc. -func (mock *Device) SetVirtualizationMode(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { +func (mock *Device) SetVirtualizationMode(gpuVirtualizationMode nvml.GpuVirtualizationMode) error { if mock.SetVirtualizationModeFunc == nil { panic("Device.SetVirtualizationModeFunc: method is nil but Device.SetVirtualizationMode was just called") } @@ -9234,7 +9234,7 @@ func (mock *Device) SetVirtualizationModeCalls() []struct { } // ValidateInforom calls ValidateInforomFunc. -func (mock *Device) ValidateInforom() nvml.Return { +func (mock *Device) ValidateInforom() error { if mock.ValidateInforomFunc == nil { panic("Device.ValidateInforomFunc: method is nil but Device.ValidateInforom was just called") } @@ -9261,7 +9261,7 @@ func (mock *Device) ValidateInforomCalls() []struct { } // VgpuTypeGetMaxInstances calls VgpuTypeGetMaxInstancesFunc. -func (mock *Device) VgpuTypeGetMaxInstances(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +func (mock *Device) VgpuTypeGetMaxInstances(vgpuTypeId nvml.VgpuTypeId) (int, error) { if mock.VgpuTypeGetMaxInstancesFunc == nil { panic("Device.VgpuTypeGetMaxInstancesFunc: method is nil but Device.VgpuTypeGetMaxInstances was just called") } diff --git a/pkg/nvml/mock/dgxa100/dgxa100.go b/pkg/nvml/mock/dgxa100/dgxa100.go index 7654dc7..8d64cbe 100644 --- a/pkg/nvml/mock/dgxa100/dgxa100.go +++ b/pkg/nvml/mock/dgxa100/dgxa100.go @@ -20,9 +20,10 @@ import ( "fmt" "sync" + "github.com/google/uuid" + "github.com/NVIDIA/go-nvml/pkg/nvml" "github.com/NVIDIA/go-nvml/pkg/nvml/mock" - "github.com/google/uuid" ) type Server struct { @@ -108,7 +109,11 @@ func NewDevice(index int) *Device { }, GpuInstances: make(map[*GpuInstance]struct{}), GpuInstanceCounter: 0, - MemoryInfo: nvml.Memory{42949672960, 0, 0}, + MemoryInfo: nvml.Memory{ + Total: 42949672960, + Free: 0, + Used: 0, + }, } device.setMockFuncs() return device @@ -141,38 +146,38 @@ func (s *Server) setMockFuncs() { return nil } - s.InitFunc = func() nvml.Return { + s.InitFunc = func() error { return nvml.SUCCESS } - s.ShutdownFunc = func() nvml.Return { + s.ShutdownFunc = func() error { return nvml.SUCCESS } - s.SystemGetDriverVersionFunc = func() (string, nvml.Return) { + s.SystemGetDriverVersionFunc = func() (string, error) { return s.DriverVersion, nvml.SUCCESS } - s.SystemGetNVMLVersionFunc = func() (string, nvml.Return) { + s.SystemGetNVMLVersionFunc = func() (string, error) { return s.NvmlVersion, nvml.SUCCESS } - s.SystemGetCudaDriverVersionFunc = func() (int, nvml.Return) { + s.SystemGetCudaDriverVersionFunc = func() (int, error) { return s.CudaDriverVersion, nvml.SUCCESS } - s.DeviceGetCountFunc = func() (int, nvml.Return) { + s.DeviceGetCountFunc = func() (int, error) { return len(s.Devices), nvml.SUCCESS } - s.DeviceGetHandleByIndexFunc = func(index int) (nvml.Device, nvml.Return) { + s.DeviceGetHandleByIndexFunc = func(index int) (nvml.Device, error) { if index < 0 || index >= len(s.Devices) { return nil, nvml.ERROR_INVALID_ARGUMENT } return s.Devices[index], nvml.SUCCESS } - s.DeviceGetHandleByUUIDFunc = func(uuid string) (nvml.Device, nvml.Return) { + s.DeviceGetHandleByUUIDFunc = func(uuid string) (nvml.Device, error) { for _, d := range s.Devices { if uuid == d.(*Device).UUID { return d, nvml.SUCCESS @@ -181,7 +186,7 @@ func (s *Server) setMockFuncs() { return nil, nvml.ERROR_INVALID_ARGUMENT } - s.DeviceGetHandleByPciBusIdFunc = func(busID string) (nvml.Device, nvml.Return) { + s.DeviceGetHandleByPciBusIdFunc = func(busID string) (nvml.Device, error) { for _, d := range s.Devices { if busID == d.(*Device).PciBusID { return d, nvml.SUCCESS @@ -192,55 +197,55 @@ func (s *Server) setMockFuncs() { } func (d *Device) setMockFuncs() { - d.GetMinorNumberFunc = func() (int, nvml.Return) { + d.GetMinorNumberFunc = func() (int, error) { return d.Minor, nvml.SUCCESS } - d.GetIndexFunc = func() (int, nvml.Return) { + d.GetIndexFunc = func() (int, error) { return d.Index, nvml.SUCCESS } - d.GetCudaComputeCapabilityFunc = func() (int, int, nvml.Return) { + d.GetCudaComputeCapabilityFunc = func() (int, int, error) { return d.CudaComputeCapability.Major, d.CudaComputeCapability.Minor, nvml.SUCCESS } - d.GetUUIDFunc = func() (string, nvml.Return) { + d.GetUUIDFunc = func() (string, error) { return d.UUID, nvml.SUCCESS } - d.GetNameFunc = func() (string, nvml.Return) { + d.GetNameFunc = func() (string, error) { return d.Name, nvml.SUCCESS } - d.GetBrandFunc = func() (nvml.BrandType, nvml.Return) { + d.GetBrandFunc = func() (nvml.BrandType, error) { return d.Brand, nvml.SUCCESS } - d.GetArchitectureFunc = func() (nvml.DeviceArchitecture, nvml.Return) { + d.GetArchitectureFunc = func() (nvml.DeviceArchitecture, error) { return d.Architecture, nvml.SUCCESS } - d.GetMemoryInfoFunc = func() (nvml.Memory, nvml.Return) { + d.GetMemoryInfoFunc = func() (nvml.Memory, error) { return d.MemoryInfo, nvml.SUCCESS } - d.GetPciInfoFunc = func() (nvml.PciInfo, nvml.Return) { + d.GetPciInfoFunc = func() (nvml.PciInfo, error) { p := nvml.PciInfo{ PciDeviceId: 0x20B010DE, } return p, nvml.SUCCESS } - d.SetMigModeFunc = func(mode int) (nvml.Return, nvml.Return) { + d.SetMigModeFunc = func(mode int) (error, error) { d.MigMode = mode return nvml.SUCCESS, nvml.SUCCESS } - d.GetMigModeFunc = func() (int, int, nvml.Return) { + d.GetMigModeFunc = func() (int, int, error) { return d.MigMode, d.MigMode, nvml.SUCCESS } - d.GetGpuInstanceProfileInfoFunc = func(giProfileId int) (nvml.GpuInstanceProfileInfo, nvml.Return) { + d.GetGpuInstanceProfileInfoFunc = func(giProfileId int) (nvml.GpuInstanceProfileInfo, error) { if giProfileId < 0 || giProfileId >= nvml.GPU_INSTANCE_PROFILE_COUNT { return nvml.GpuInstanceProfileInfo{}, nvml.ERROR_INVALID_ARGUMENT } @@ -252,11 +257,11 @@ func (d *Device) setMockFuncs() { return MIGProfiles.GpuInstanceProfiles[giProfileId], nvml.SUCCESS } - d.GetGpuInstancePossiblePlacementsFunc = func(info *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { + d.GetGpuInstancePossiblePlacementsFunc = func(info *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, error) { return MIGPlacements.GpuInstancePossiblePlacements[int(info.Id)], nvml.SUCCESS } - d.CreateGpuInstanceFunc = func(info *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { + d.CreateGpuInstanceFunc = func(info *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, error) { d.Lock() defer d.Unlock() giInfo := nvml.GpuInstanceInfo{ @@ -270,7 +275,7 @@ func (d *Device) setMockFuncs() { return gi, nvml.SUCCESS } - d.CreateGpuInstanceWithPlacementFunc = func(info *nvml.GpuInstanceProfileInfo, placement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { + d.CreateGpuInstanceWithPlacementFunc = func(info *nvml.GpuInstanceProfileInfo, placement *nvml.GpuInstancePlacement) (nvml.GpuInstance, error) { d.Lock() defer d.Unlock() giInfo := nvml.GpuInstanceInfo{ @@ -285,7 +290,7 @@ func (d *Device) setMockFuncs() { return gi, nvml.SUCCESS } - d.GetGpuInstancesFunc = func(info *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { + d.GetGpuInstancesFunc = func(info *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, error) { d.RLock() defer d.RUnlock() var gis []nvml.GpuInstance @@ -299,11 +304,11 @@ func (d *Device) setMockFuncs() { } func (gi *GpuInstance) setMockFuncs() { - gi.GetInfoFunc = func() (nvml.GpuInstanceInfo, nvml.Return) { + gi.GetInfoFunc = func() (nvml.GpuInstanceInfo, error) { return gi.Info, nvml.SUCCESS } - gi.GetComputeInstanceProfileInfoFunc = func(ciProfileId int, ciEngProfileId int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { + gi.GetComputeInstanceProfileInfoFunc = func(ciProfileId int, ciEngProfileId int) (nvml.ComputeInstanceProfileInfo, error) { if ciProfileId < 0 || ciProfileId >= nvml.COMPUTE_INSTANCE_PROFILE_COUNT { return nvml.ComputeInstanceProfileInfo{}, nvml.ERROR_INVALID_ARGUMENT } @@ -325,11 +330,11 @@ func (gi *GpuInstance) setMockFuncs() { return MIGProfiles.ComputeInstanceProfiles[giProfileId][ciProfileId], nvml.SUCCESS } - gi.GetComputeInstancePossiblePlacementsFunc = func(info *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { + gi.GetComputeInstancePossiblePlacementsFunc = func(info *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, error) { return MIGPlacements.ComputeInstancePossiblePlacements[int(gi.Info.Id)][int(info.Id)], nvml.SUCCESS } - gi.CreateComputeInstanceFunc = func(info *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { + gi.CreateComputeInstanceFunc = func(info *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, error) { gi.Lock() defer gi.Unlock() ciInfo := nvml.ComputeInstanceInfo{ @@ -344,7 +349,7 @@ func (gi *GpuInstance) setMockFuncs() { return ci, nvml.SUCCESS } - gi.GetComputeInstancesFunc = func(info *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { + gi.GetComputeInstancesFunc = func(info *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, error) { gi.RLock() defer gi.RUnlock() var cis []nvml.ComputeInstance @@ -356,7 +361,7 @@ func (gi *GpuInstance) setMockFuncs() { return cis, nvml.SUCCESS } - gi.DestroyFunc = func() nvml.Return { + gi.DestroyFunc = func() error { d := gi.Info.Device.(*Device) d.Lock() defer d.Unlock() @@ -366,11 +371,11 @@ func (gi *GpuInstance) setMockFuncs() { } func (ci *ComputeInstance) setMockFuncs() { - ci.GetInfoFunc = func() (nvml.ComputeInstanceInfo, nvml.Return) { + ci.GetInfoFunc = func() (nvml.ComputeInstanceInfo, error) { return ci.Info, nvml.SUCCESS } - ci.DestroyFunc = func() nvml.Return { + ci.DestroyFunc = func() error { gi := ci.Info.GpuInstance.(*GpuInstance) gi.Lock() defer gi.Unlock() diff --git a/pkg/nvml/mock/eventset.go b/pkg/nvml/mock/eventset.go index d452c4d..a07c1cb 100644 --- a/pkg/nvml/mock/eventset.go +++ b/pkg/nvml/mock/eventset.go @@ -18,10 +18,10 @@ var _ nvml.EventSet = &EventSet{} // // // make and configure a mocked nvml.EventSet // mockedEventSet := &EventSet{ -// FreeFunc: func() nvml.Return { +// FreeFunc: func() error { // panic("mock out the Free method") // }, -// WaitFunc: func(v uint32) (nvml.EventData, nvml.Return) { +// WaitFunc: func(v uint32) (nvml.EventData, error) { // panic("mock out the Wait method") // }, // } @@ -32,10 +32,10 @@ var _ nvml.EventSet = &EventSet{} // } type EventSet struct { // FreeFunc mocks the Free method. - FreeFunc func() nvml.Return + FreeFunc func() error // WaitFunc mocks the Wait method. - WaitFunc func(v uint32) (nvml.EventData, nvml.Return) + WaitFunc func(v uint32) (nvml.EventData, error) // calls tracks calls to the methods. calls struct { @@ -53,7 +53,7 @@ type EventSet struct { } // Free calls FreeFunc. -func (mock *EventSet) Free() nvml.Return { +func (mock *EventSet) Free() error { if mock.FreeFunc == nil { panic("EventSet.FreeFunc: method is nil but EventSet.Free was just called") } @@ -80,7 +80,7 @@ func (mock *EventSet) FreeCalls() []struct { } // Wait calls WaitFunc. -func (mock *EventSet) Wait(v uint32) (nvml.EventData, nvml.Return) { +func (mock *EventSet) Wait(v uint32) (nvml.EventData, error) { if mock.WaitFunc == nil { panic("EventSet.WaitFunc: method is nil but EventSet.Wait was just called") } diff --git a/pkg/nvml/mock/gpmsample.go b/pkg/nvml/mock/gpmsample.go index 1023c34..3cb25f7 100644 --- a/pkg/nvml/mock/gpmsample.go +++ b/pkg/nvml/mock/gpmsample.go @@ -18,13 +18,13 @@ var _ nvml.GpmSample = &GpmSample{} // // // make and configure a mocked nvml.GpmSample // mockedGpmSample := &GpmSample{ -// FreeFunc: func() nvml.Return { +// FreeFunc: func() error { // panic("mock out the Free method") // }, -// GetFunc: func(device nvml.Device) nvml.Return { +// GetFunc: func(device nvml.Device) error { // panic("mock out the Get method") // }, -// MigGetFunc: func(device nvml.Device, n int) nvml.Return { +// MigGetFunc: func(device nvml.Device, n int) error { // panic("mock out the MigGet method") // }, // } @@ -35,13 +35,13 @@ var _ nvml.GpmSample = &GpmSample{} // } type GpmSample struct { // FreeFunc mocks the Free method. - FreeFunc func() nvml.Return + FreeFunc func() error // GetFunc mocks the Get method. - GetFunc func(device nvml.Device) nvml.Return + GetFunc func(device nvml.Device) error // MigGetFunc mocks the MigGet method. - MigGetFunc func(device nvml.Device, n int) nvml.Return + MigGetFunc func(device nvml.Device, n int) error // calls tracks calls to the methods. calls struct { @@ -67,7 +67,7 @@ type GpmSample struct { } // Free calls FreeFunc. -func (mock *GpmSample) Free() nvml.Return { +func (mock *GpmSample) Free() error { if mock.FreeFunc == nil { panic("GpmSample.FreeFunc: method is nil but GpmSample.Free was just called") } @@ -94,7 +94,7 @@ func (mock *GpmSample) FreeCalls() []struct { } // Get calls GetFunc. -func (mock *GpmSample) Get(device nvml.Device) nvml.Return { +func (mock *GpmSample) Get(device nvml.Device) error { if mock.GetFunc == nil { panic("GpmSample.GetFunc: method is nil but GpmSample.Get was just called") } @@ -126,7 +126,7 @@ func (mock *GpmSample) GetCalls() []struct { } // MigGet calls MigGetFunc. -func (mock *GpmSample) MigGet(device nvml.Device, n int) nvml.Return { +func (mock *GpmSample) MigGet(device nvml.Device, n int) error { if mock.MigGetFunc == nil { panic("GpmSample.MigGetFunc: method is nil but GpmSample.MigGet was just called") } diff --git a/pkg/nvml/mock/gpuinstance.go b/pkg/nvml/mock/gpuinstance.go index 63ba683..3e19695 100644 --- a/pkg/nvml/mock/gpuinstance.go +++ b/pkg/nvml/mock/gpuinstance.go @@ -18,34 +18,34 @@ var _ nvml.GpuInstance = &GpuInstance{} // // // make and configure a mocked nvml.GpuInstance // mockedGpuInstance := &GpuInstance{ -// CreateComputeInstanceFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { +// CreateComputeInstanceFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, error) { // panic("mock out the CreateComputeInstance method") // }, -// CreateComputeInstanceWithPlacementFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { +// CreateComputeInstanceWithPlacementFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, error) { // panic("mock out the CreateComputeInstanceWithPlacement method") // }, -// DestroyFunc: func() nvml.Return { +// DestroyFunc: func() error { // panic("mock out the Destroy method") // }, -// GetComputeInstanceByIdFunc: func(n int) (nvml.ComputeInstance, nvml.Return) { +// GetComputeInstanceByIdFunc: func(n int) (nvml.ComputeInstance, error) { // panic("mock out the GetComputeInstanceById method") // }, -// GetComputeInstancePossiblePlacementsFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { +// GetComputeInstancePossiblePlacementsFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, error) { // panic("mock out the GetComputeInstancePossiblePlacements method") // }, -// GetComputeInstanceProfileInfoFunc: func(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { +// GetComputeInstanceProfileInfoFunc: func(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, error) { // panic("mock out the GetComputeInstanceProfileInfo method") // }, // GetComputeInstanceProfileInfoVFunc: func(n1 int, n2 int) nvml.ComputeInstanceProfileInfoHandler { // panic("mock out the GetComputeInstanceProfileInfoV method") // }, -// GetComputeInstanceRemainingCapacityFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, nvml.Return) { +// GetComputeInstanceRemainingCapacityFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, error) { // panic("mock out the GetComputeInstanceRemainingCapacity method") // }, -// GetComputeInstancesFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { +// GetComputeInstancesFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, error) { // panic("mock out the GetComputeInstances method") // }, -// GetInfoFunc: func() (nvml.GpuInstanceInfo, nvml.Return) { +// GetInfoFunc: func() (nvml.GpuInstanceInfo, error) { // panic("mock out the GetInfo method") // }, // } @@ -56,34 +56,34 @@ var _ nvml.GpuInstance = &GpuInstance{} // } type GpuInstance struct { // CreateComputeInstanceFunc mocks the CreateComputeInstance method. - CreateComputeInstanceFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) + CreateComputeInstanceFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, error) // CreateComputeInstanceWithPlacementFunc mocks the CreateComputeInstanceWithPlacement method. - CreateComputeInstanceWithPlacementFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) + CreateComputeInstanceWithPlacementFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, error) // DestroyFunc mocks the Destroy method. - DestroyFunc func() nvml.Return + DestroyFunc func() error // GetComputeInstanceByIdFunc mocks the GetComputeInstanceById method. - GetComputeInstanceByIdFunc func(n int) (nvml.ComputeInstance, nvml.Return) + GetComputeInstanceByIdFunc func(n int) (nvml.ComputeInstance, error) // GetComputeInstancePossiblePlacementsFunc mocks the GetComputeInstancePossiblePlacements method. - GetComputeInstancePossiblePlacementsFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) + GetComputeInstancePossiblePlacementsFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, error) // GetComputeInstanceProfileInfoFunc mocks the GetComputeInstanceProfileInfo method. - GetComputeInstanceProfileInfoFunc func(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) + GetComputeInstanceProfileInfoFunc func(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, error) // GetComputeInstanceProfileInfoVFunc mocks the GetComputeInstanceProfileInfoV method. GetComputeInstanceProfileInfoVFunc func(n1 int, n2 int) nvml.ComputeInstanceProfileInfoHandler // GetComputeInstanceRemainingCapacityFunc mocks the GetComputeInstanceRemainingCapacity method. - GetComputeInstanceRemainingCapacityFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, nvml.Return) + GetComputeInstanceRemainingCapacityFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, error) // GetComputeInstancesFunc mocks the GetComputeInstances method. - GetComputeInstancesFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) + GetComputeInstancesFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, error) // GetInfoFunc mocks the GetInfo method. - GetInfoFunc func() (nvml.GpuInstanceInfo, nvml.Return) + GetInfoFunc func() (nvml.GpuInstanceInfo, error) // calls tracks calls to the methods. calls struct { @@ -153,7 +153,7 @@ type GpuInstance struct { } // CreateComputeInstance calls CreateComputeInstanceFunc. -func (mock *GpuInstance) CreateComputeInstance(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { +func (mock *GpuInstance) CreateComputeInstance(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, error) { if mock.CreateComputeInstanceFunc == nil { panic("GpuInstance.CreateComputeInstanceFunc: method is nil but GpuInstance.CreateComputeInstance was just called") } @@ -185,7 +185,7 @@ func (mock *GpuInstance) CreateComputeInstanceCalls() []struct { } // CreateComputeInstanceWithPlacement calls CreateComputeInstanceWithPlacementFunc. -func (mock *GpuInstance) CreateComputeInstanceWithPlacement(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { +func (mock *GpuInstance) CreateComputeInstanceWithPlacement(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, error) { if mock.CreateComputeInstanceWithPlacementFunc == nil { panic("GpuInstance.CreateComputeInstanceWithPlacementFunc: method is nil but GpuInstance.CreateComputeInstanceWithPlacement was just called") } @@ -221,7 +221,7 @@ func (mock *GpuInstance) CreateComputeInstanceWithPlacementCalls() []struct { } // Destroy calls DestroyFunc. -func (mock *GpuInstance) Destroy() nvml.Return { +func (mock *GpuInstance) Destroy() error { if mock.DestroyFunc == nil { panic("GpuInstance.DestroyFunc: method is nil but GpuInstance.Destroy was just called") } @@ -248,7 +248,7 @@ func (mock *GpuInstance) DestroyCalls() []struct { } // GetComputeInstanceById calls GetComputeInstanceByIdFunc. -func (mock *GpuInstance) GetComputeInstanceById(n int) (nvml.ComputeInstance, nvml.Return) { +func (mock *GpuInstance) GetComputeInstanceById(n int) (nvml.ComputeInstance, error) { if mock.GetComputeInstanceByIdFunc == nil { panic("GpuInstance.GetComputeInstanceByIdFunc: method is nil but GpuInstance.GetComputeInstanceById was just called") } @@ -280,7 +280,7 @@ func (mock *GpuInstance) GetComputeInstanceByIdCalls() []struct { } // GetComputeInstancePossiblePlacements calls GetComputeInstancePossiblePlacementsFunc. -func (mock *GpuInstance) GetComputeInstancePossiblePlacements(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { +func (mock *GpuInstance) GetComputeInstancePossiblePlacements(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, error) { if mock.GetComputeInstancePossiblePlacementsFunc == nil { panic("GpuInstance.GetComputeInstancePossiblePlacementsFunc: method is nil but GpuInstance.GetComputeInstancePossiblePlacements was just called") } @@ -312,7 +312,7 @@ func (mock *GpuInstance) GetComputeInstancePossiblePlacementsCalls() []struct { } // GetComputeInstanceProfileInfo calls GetComputeInstanceProfileInfoFunc. -func (mock *GpuInstance) GetComputeInstanceProfileInfo(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { +func (mock *GpuInstance) GetComputeInstanceProfileInfo(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, error) { if mock.GetComputeInstanceProfileInfoFunc == nil { panic("GpuInstance.GetComputeInstanceProfileInfoFunc: method is nil but GpuInstance.GetComputeInstanceProfileInfo was just called") } @@ -384,7 +384,7 @@ func (mock *GpuInstance) GetComputeInstanceProfileInfoVCalls() []struct { } // GetComputeInstanceRemainingCapacity calls GetComputeInstanceRemainingCapacityFunc. -func (mock *GpuInstance) GetComputeInstanceRemainingCapacity(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, nvml.Return) { +func (mock *GpuInstance) GetComputeInstanceRemainingCapacity(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, error) { if mock.GetComputeInstanceRemainingCapacityFunc == nil { panic("GpuInstance.GetComputeInstanceRemainingCapacityFunc: method is nil but GpuInstance.GetComputeInstanceRemainingCapacity was just called") } @@ -416,7 +416,7 @@ func (mock *GpuInstance) GetComputeInstanceRemainingCapacityCalls() []struct { } // GetComputeInstances calls GetComputeInstancesFunc. -func (mock *GpuInstance) GetComputeInstances(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { +func (mock *GpuInstance) GetComputeInstances(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, error) { if mock.GetComputeInstancesFunc == nil { panic("GpuInstance.GetComputeInstancesFunc: method is nil but GpuInstance.GetComputeInstances was just called") } @@ -448,7 +448,7 @@ func (mock *GpuInstance) GetComputeInstancesCalls() []struct { } // GetInfo calls GetInfoFunc. -func (mock *GpuInstance) GetInfo() (nvml.GpuInstanceInfo, nvml.Return) { +func (mock *GpuInstance) GetInfo() (nvml.GpuInstanceInfo, error) { if mock.GetInfoFunc == nil { panic("GpuInstance.GetInfoFunc: method is nil but GpuInstance.GetInfo was just called") } diff --git a/pkg/nvml/mock/interface.go b/pkg/nvml/mock/interface.go index c39a16e..0184424 100644 --- a/pkg/nvml/mock/interface.go +++ b/pkg/nvml/mock/interface.go @@ -18,967 +18,967 @@ var _ nvml.Interface = &Interface{} // // // make and configure a mocked nvml.Interface // mockedInterface := &Interface{ -// ComputeInstanceDestroyFunc: func(computeInstance nvml.ComputeInstance) nvml.Return { +// ComputeInstanceDestroyFunc: func(computeInstance nvml.ComputeInstance) error { // panic("mock out the ComputeInstanceDestroy method") // }, -// ComputeInstanceGetInfoFunc: func(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, nvml.Return) { +// ComputeInstanceGetInfoFunc: func(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, error) { // panic("mock out the ComputeInstanceGetInfo method") // }, -// DeviceClearAccountingPidsFunc: func(device nvml.Device) nvml.Return { +// DeviceClearAccountingPidsFunc: func(device nvml.Device) error { // panic("mock out the DeviceClearAccountingPids method") // }, -// DeviceClearCpuAffinityFunc: func(device nvml.Device) nvml.Return { +// DeviceClearCpuAffinityFunc: func(device nvml.Device) error { // panic("mock out the DeviceClearCpuAffinity method") // }, -// DeviceClearEccErrorCountsFunc: func(device nvml.Device, eccCounterType nvml.EccCounterType) nvml.Return { +// DeviceClearEccErrorCountsFunc: func(device nvml.Device, eccCounterType nvml.EccCounterType) error { // panic("mock out the DeviceClearEccErrorCounts method") // }, -// DeviceClearFieldValuesFunc: func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { +// DeviceClearFieldValuesFunc: func(device nvml.Device, fieldValues []nvml.FieldValue) error { // panic("mock out the DeviceClearFieldValues method") // }, -// DeviceCreateGpuInstanceFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { +// DeviceCreateGpuInstanceFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, error) { // panic("mock out the DeviceCreateGpuInstance method") // }, -// DeviceCreateGpuInstanceWithPlacementFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { +// DeviceCreateGpuInstanceWithPlacementFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, error) { // panic("mock out the DeviceCreateGpuInstanceWithPlacement method") // }, -// DeviceDiscoverGpusFunc: func() (nvml.PciInfo, nvml.Return) { +// DeviceDiscoverGpusFunc: func() (nvml.PciInfo, error) { // panic("mock out the DeviceDiscoverGpus method") // }, -// DeviceFreezeNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) nvml.Return { +// DeviceFreezeNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) error { // panic("mock out the DeviceFreezeNvLinkUtilizationCounter method") // }, -// DeviceGetAPIRestrictionFunc: func(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { +// DeviceGetAPIRestrictionFunc: func(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, error) { // panic("mock out the DeviceGetAPIRestriction method") // }, -// DeviceGetAccountingBufferSizeFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetAccountingBufferSizeFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetAccountingBufferSize method") // }, -// DeviceGetAccountingModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// DeviceGetAccountingModeFunc: func(device nvml.Device) (nvml.EnableState, error) { // panic("mock out the DeviceGetAccountingMode method") // }, -// DeviceGetAccountingPidsFunc: func(device nvml.Device) ([]int, nvml.Return) { +// DeviceGetAccountingPidsFunc: func(device nvml.Device) ([]int, error) { // panic("mock out the DeviceGetAccountingPids method") // }, -// DeviceGetAccountingStatsFunc: func(device nvml.Device, v uint32) (nvml.AccountingStats, nvml.Return) { +// DeviceGetAccountingStatsFunc: func(device nvml.Device, v uint32) (nvml.AccountingStats, error) { // panic("mock out the DeviceGetAccountingStats method") // }, -// DeviceGetActiveVgpusFunc: func(device nvml.Device) ([]nvml.VgpuInstance, nvml.Return) { +// DeviceGetActiveVgpusFunc: func(device nvml.Device) ([]nvml.VgpuInstance, error) { // panic("mock out the DeviceGetActiveVgpus method") // }, -// DeviceGetAdaptiveClockInfoStatusFunc: func(device nvml.Device) (uint32, nvml.Return) { +// DeviceGetAdaptiveClockInfoStatusFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the DeviceGetAdaptiveClockInfoStatus method") // }, -// DeviceGetApplicationsClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +// DeviceGetApplicationsClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, error) { // panic("mock out the DeviceGetApplicationsClock method") // }, -// DeviceGetArchitectureFunc: func(device nvml.Device) (nvml.DeviceArchitecture, nvml.Return) { +// DeviceGetArchitectureFunc: func(device nvml.Device) (nvml.DeviceArchitecture, error) { // panic("mock out the DeviceGetArchitecture method") // }, -// DeviceGetAttributesFunc: func(device nvml.Device) (nvml.DeviceAttributes, nvml.Return) { +// DeviceGetAttributesFunc: func(device nvml.Device) (nvml.DeviceAttributes, error) { // panic("mock out the DeviceGetAttributes method") // }, -// DeviceGetAutoBoostedClocksEnabledFunc: func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { +// DeviceGetAutoBoostedClocksEnabledFunc: func(device nvml.Device) (nvml.EnableState, nvml.EnableState, error) { // panic("mock out the DeviceGetAutoBoostedClocksEnabled method") // }, -// DeviceGetBAR1MemoryInfoFunc: func(device nvml.Device) (nvml.BAR1Memory, nvml.Return) { +// DeviceGetBAR1MemoryInfoFunc: func(device nvml.Device) (nvml.BAR1Memory, error) { // panic("mock out the DeviceGetBAR1MemoryInfo method") // }, -// DeviceGetBoardIdFunc: func(device nvml.Device) (uint32, nvml.Return) { +// DeviceGetBoardIdFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the DeviceGetBoardId method") // }, -// DeviceGetBoardPartNumberFunc: func(device nvml.Device) (string, nvml.Return) { +// DeviceGetBoardPartNumberFunc: func(device nvml.Device) (string, error) { // panic("mock out the DeviceGetBoardPartNumber method") // }, -// DeviceGetBrandFunc: func(device nvml.Device) (nvml.BrandType, nvml.Return) { +// DeviceGetBrandFunc: func(device nvml.Device) (nvml.BrandType, error) { // panic("mock out the DeviceGetBrand method") // }, -// DeviceGetBridgeChipInfoFunc: func(device nvml.Device) (nvml.BridgeChipHierarchy, nvml.Return) { +// DeviceGetBridgeChipInfoFunc: func(device nvml.Device) (nvml.BridgeChipHierarchy, error) { // panic("mock out the DeviceGetBridgeChipInfo method") // }, -// DeviceGetBusTypeFunc: func(device nvml.Device) (nvml.BusType, nvml.Return) { +// DeviceGetBusTypeFunc: func(device nvml.Device) (nvml.BusType, error) { // panic("mock out the DeviceGetBusType method") // }, // DeviceGetC2cModeInfoVFunc: func(device nvml.Device) nvml.C2cModeInfoHandler { // panic("mock out the DeviceGetC2cModeInfoV method") // }, -// DeviceGetClkMonStatusFunc: func(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) { +// DeviceGetClkMonStatusFunc: func(device nvml.Device) (nvml.ClkMonStatus, error) { // panic("mock out the DeviceGetClkMonStatus method") // }, -// DeviceGetClockFunc: func(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { +// DeviceGetClockFunc: func(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, error) { // panic("mock out the DeviceGetClock method") // }, -// DeviceGetClockInfoFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +// DeviceGetClockInfoFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, error) { // panic("mock out the DeviceGetClockInfo method") // }, -// DeviceGetComputeInstanceIdFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetComputeInstanceIdFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetComputeInstanceId method") // }, -// DeviceGetComputeModeFunc: func(device nvml.Device) (nvml.ComputeMode, nvml.Return) { +// DeviceGetComputeModeFunc: func(device nvml.Device) (nvml.ComputeMode, error) { // panic("mock out the DeviceGetComputeMode method") // }, -// DeviceGetComputeRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { +// DeviceGetComputeRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, error) { // panic("mock out the DeviceGetComputeRunningProcesses method") // }, -// DeviceGetConfComputeGpuAttestationReportFunc: func(device nvml.Device) (nvml.ConfComputeGpuAttestationReport, nvml.Return) { +// DeviceGetConfComputeGpuAttestationReportFunc: func(device nvml.Device) (nvml.ConfComputeGpuAttestationReport, error) { // panic("mock out the DeviceGetConfComputeGpuAttestationReport method") // }, -// DeviceGetConfComputeGpuCertificateFunc: func(device nvml.Device) (nvml.ConfComputeGpuCertificate, nvml.Return) { +// DeviceGetConfComputeGpuCertificateFunc: func(device nvml.Device) (nvml.ConfComputeGpuCertificate, error) { // panic("mock out the DeviceGetConfComputeGpuCertificate method") // }, -// DeviceGetConfComputeMemSizeInfoFunc: func(device nvml.Device) (nvml.ConfComputeMemSizeInfo, nvml.Return) { +// DeviceGetConfComputeMemSizeInfoFunc: func(device nvml.Device) (nvml.ConfComputeMemSizeInfo, error) { // panic("mock out the DeviceGetConfComputeMemSizeInfo method") // }, -// DeviceGetConfComputeProtectedMemoryUsageFunc: func(device nvml.Device) (nvml.Memory, nvml.Return) { +// DeviceGetConfComputeProtectedMemoryUsageFunc: func(device nvml.Device) (nvml.Memory, error) { // panic("mock out the DeviceGetConfComputeProtectedMemoryUsage method") // }, -// DeviceGetCountFunc: func() (int, nvml.Return) { +// DeviceGetCountFunc: func() (int, error) { // panic("mock out the DeviceGetCount method") // }, -// DeviceGetCpuAffinityFunc: func(device nvml.Device, n int) ([]uint, nvml.Return) { +// DeviceGetCpuAffinityFunc: func(device nvml.Device, n int) ([]uint, error) { // panic("mock out the DeviceGetCpuAffinity method") // }, -// DeviceGetCpuAffinityWithinScopeFunc: func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +// DeviceGetCpuAffinityWithinScopeFunc: func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, error) { // panic("mock out the DeviceGetCpuAffinityWithinScope method") // }, -// DeviceGetCreatableVgpusFunc: func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { +// DeviceGetCreatableVgpusFunc: func(device nvml.Device) ([]nvml.VgpuTypeId, error) { // panic("mock out the DeviceGetCreatableVgpus method") // }, -// DeviceGetCudaComputeCapabilityFunc: func(device nvml.Device) (int, int, nvml.Return) { +// DeviceGetCudaComputeCapabilityFunc: func(device nvml.Device) (int, int, error) { // panic("mock out the DeviceGetCudaComputeCapability method") // }, -// DeviceGetCurrPcieLinkGenerationFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetCurrPcieLinkGenerationFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetCurrPcieLinkGeneration method") // }, -// DeviceGetCurrPcieLinkWidthFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetCurrPcieLinkWidthFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetCurrPcieLinkWidth method") // }, -// DeviceGetCurrentClocksEventReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { +// DeviceGetCurrentClocksEventReasonsFunc: func(device nvml.Device) (uint64, error) { // panic("mock out the DeviceGetCurrentClocksEventReasons method") // }, -// DeviceGetCurrentClocksThrottleReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { +// DeviceGetCurrentClocksThrottleReasonsFunc: func(device nvml.Device) (uint64, error) { // panic("mock out the DeviceGetCurrentClocksThrottleReasons method") // }, -// DeviceGetDecoderUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { +// DeviceGetDecoderUtilizationFunc: func(device nvml.Device) (uint32, uint32, error) { // panic("mock out the DeviceGetDecoderUtilization method") // }, -// DeviceGetDefaultApplicationsClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +// DeviceGetDefaultApplicationsClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, error) { // panic("mock out the DeviceGetDefaultApplicationsClock method") // }, -// DeviceGetDefaultEccModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// DeviceGetDefaultEccModeFunc: func(device nvml.Device) (nvml.EnableState, error) { // panic("mock out the DeviceGetDefaultEccMode method") // }, -// DeviceGetDetailedEccErrorsFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { +// DeviceGetDetailedEccErrorsFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, error) { // panic("mock out the DeviceGetDetailedEccErrors method") // }, -// DeviceGetDeviceHandleFromMigDeviceHandleFunc: func(device nvml.Device) (nvml.Device, nvml.Return) { +// DeviceGetDeviceHandleFromMigDeviceHandleFunc: func(device nvml.Device) (nvml.Device, error) { // panic("mock out the DeviceGetDeviceHandleFromMigDeviceHandle method") // }, -// DeviceGetDisplayActiveFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// DeviceGetDisplayActiveFunc: func(device nvml.Device) (nvml.EnableState, error) { // panic("mock out the DeviceGetDisplayActive method") // }, -// DeviceGetDisplayModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// DeviceGetDisplayModeFunc: func(device nvml.Device) (nvml.EnableState, error) { // panic("mock out the DeviceGetDisplayMode method") // }, -// DeviceGetDriverModelFunc: func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { +// DeviceGetDriverModelFunc: func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, error) { // panic("mock out the DeviceGetDriverModel method") // }, -// DeviceGetDynamicPstatesInfoFunc: func(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) { +// DeviceGetDynamicPstatesInfoFunc: func(device nvml.Device) (nvml.GpuDynamicPstatesInfo, error) { // panic("mock out the DeviceGetDynamicPstatesInfo method") // }, -// DeviceGetEccModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { +// DeviceGetEccModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.EnableState, error) { // panic("mock out the DeviceGetEccMode method") // }, -// DeviceGetEncoderCapacityFunc: func(device nvml.Device, encoderType nvml.EncoderType) (int, nvml.Return) { +// DeviceGetEncoderCapacityFunc: func(device nvml.Device, encoderType nvml.EncoderType) (int, error) { // panic("mock out the DeviceGetEncoderCapacity method") // }, -// DeviceGetEncoderSessionsFunc: func(device nvml.Device) ([]nvml.EncoderSessionInfo, nvml.Return) { +// DeviceGetEncoderSessionsFunc: func(device nvml.Device) ([]nvml.EncoderSessionInfo, error) { // panic("mock out the DeviceGetEncoderSessions method") // }, -// DeviceGetEncoderStatsFunc: func(device nvml.Device) (int, uint32, uint32, nvml.Return) { +// DeviceGetEncoderStatsFunc: func(device nvml.Device) (int, uint32, uint32, error) { // panic("mock out the DeviceGetEncoderStats method") // }, -// DeviceGetEncoderUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { +// DeviceGetEncoderUtilizationFunc: func(device nvml.Device) (uint32, uint32, error) { // panic("mock out the DeviceGetEncoderUtilization method") // }, -// DeviceGetEnforcedPowerLimitFunc: func(device nvml.Device) (uint32, nvml.Return) { +// DeviceGetEnforcedPowerLimitFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the DeviceGetEnforcedPowerLimit method") // }, -// DeviceGetFBCSessionsFunc: func(device nvml.Device) ([]nvml.FBCSessionInfo, nvml.Return) { +// DeviceGetFBCSessionsFunc: func(device nvml.Device) ([]nvml.FBCSessionInfo, error) { // panic("mock out the DeviceGetFBCSessions method") // }, -// DeviceGetFBCStatsFunc: func(device nvml.Device) (nvml.FBCStats, nvml.Return) { +// DeviceGetFBCStatsFunc: func(device nvml.Device) (nvml.FBCStats, error) { // panic("mock out the DeviceGetFBCStats method") // }, -// DeviceGetFanControlPolicy_v2Func: func(device nvml.Device, n int) (nvml.FanControlPolicy, nvml.Return) { +// DeviceGetFanControlPolicy_v2Func: func(device nvml.Device, n int) (nvml.FanControlPolicy, error) { // panic("mock out the DeviceGetFanControlPolicy_v2 method") // }, -// DeviceGetFanSpeedFunc: func(device nvml.Device) (uint32, nvml.Return) { +// DeviceGetFanSpeedFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the DeviceGetFanSpeed method") // }, -// DeviceGetFanSpeed_v2Func: func(device nvml.Device, n int) (uint32, nvml.Return) { +// DeviceGetFanSpeed_v2Func: func(device nvml.Device, n int) (uint32, error) { // panic("mock out the DeviceGetFanSpeed_v2 method") // }, -// DeviceGetFieldValuesFunc: func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { +// DeviceGetFieldValuesFunc: func(device nvml.Device, fieldValues []nvml.FieldValue) error { // panic("mock out the DeviceGetFieldValues method") // }, -// DeviceGetGpcClkMinMaxVfOffsetFunc: func(device nvml.Device) (int, int, nvml.Return) { +// DeviceGetGpcClkMinMaxVfOffsetFunc: func(device nvml.Device) (int, int, error) { // panic("mock out the DeviceGetGpcClkMinMaxVfOffset method") // }, -// DeviceGetGpcClkVfOffsetFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetGpcClkVfOffsetFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetGpcClkVfOffset method") // }, -// DeviceGetGpuFabricInfoFunc: func(device nvml.Device) (nvml.GpuFabricInfo, nvml.Return) { +// DeviceGetGpuFabricInfoFunc: func(device nvml.Device) (nvml.GpuFabricInfo, error) { // panic("mock out the DeviceGetGpuFabricInfo method") // }, // DeviceGetGpuFabricInfoVFunc: func(device nvml.Device) nvml.GpuFabricInfoHandler { // panic("mock out the DeviceGetGpuFabricInfoV method") // }, -// DeviceGetGpuInstanceByIdFunc: func(device nvml.Device, n int) (nvml.GpuInstance, nvml.Return) { +// DeviceGetGpuInstanceByIdFunc: func(device nvml.Device, n int) (nvml.GpuInstance, error) { // panic("mock out the DeviceGetGpuInstanceById method") // }, -// DeviceGetGpuInstanceIdFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetGpuInstanceIdFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetGpuInstanceId method") // }, -// DeviceGetGpuInstancePossiblePlacementsFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { +// DeviceGetGpuInstancePossiblePlacementsFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, error) { // panic("mock out the DeviceGetGpuInstancePossiblePlacements method") // }, -// DeviceGetGpuInstanceProfileInfoFunc: func(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { +// DeviceGetGpuInstanceProfileInfoFunc: func(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, error) { // panic("mock out the DeviceGetGpuInstanceProfileInfo method") // }, // DeviceGetGpuInstanceProfileInfoVFunc: func(device nvml.Device, n int) nvml.GpuInstanceProfileInfoHandler { // panic("mock out the DeviceGetGpuInstanceProfileInfoV method") // }, -// DeviceGetGpuInstanceRemainingCapacityFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) { +// DeviceGetGpuInstanceRemainingCapacityFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, error) { // panic("mock out the DeviceGetGpuInstanceRemainingCapacity method") // }, -// DeviceGetGpuInstancesFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { +// DeviceGetGpuInstancesFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, error) { // panic("mock out the DeviceGetGpuInstances method") // }, -// DeviceGetGpuMaxPcieLinkGenerationFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetGpuMaxPcieLinkGenerationFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetGpuMaxPcieLinkGeneration method") // }, -// DeviceGetGpuOperationModeFunc: func(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { +// DeviceGetGpuOperationModeFunc: func(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, error) { // panic("mock out the DeviceGetGpuOperationMode method") // }, -// DeviceGetGraphicsRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { +// DeviceGetGraphicsRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, error) { // panic("mock out the DeviceGetGraphicsRunningProcesses method") // }, -// DeviceGetGridLicensableFeaturesFunc: func(device nvml.Device) (nvml.GridLicensableFeatures, nvml.Return) { +// DeviceGetGridLicensableFeaturesFunc: func(device nvml.Device) (nvml.GridLicensableFeatures, error) { // panic("mock out the DeviceGetGridLicensableFeatures method") // }, -// DeviceGetGspFirmwareModeFunc: func(device nvml.Device) (bool, bool, nvml.Return) { +// DeviceGetGspFirmwareModeFunc: func(device nvml.Device) (bool, bool, error) { // panic("mock out the DeviceGetGspFirmwareMode method") // }, -// DeviceGetGspFirmwareVersionFunc: func(device nvml.Device) (string, nvml.Return) { +// DeviceGetGspFirmwareVersionFunc: func(device nvml.Device) (string, error) { // panic("mock out the DeviceGetGspFirmwareVersion method") // }, -// DeviceGetHandleByIndexFunc: func(n int) (nvml.Device, nvml.Return) { +// DeviceGetHandleByIndexFunc: func(n int) (nvml.Device, error) { // panic("mock out the DeviceGetHandleByIndex method") // }, -// DeviceGetHandleByPciBusIdFunc: func(s string) (nvml.Device, nvml.Return) { +// DeviceGetHandleByPciBusIdFunc: func(s string) (nvml.Device, error) { // panic("mock out the DeviceGetHandleByPciBusId method") // }, -// DeviceGetHandleBySerialFunc: func(s string) (nvml.Device, nvml.Return) { +// DeviceGetHandleBySerialFunc: func(s string) (nvml.Device, error) { // panic("mock out the DeviceGetHandleBySerial method") // }, -// DeviceGetHandleByUUIDFunc: func(s string) (nvml.Device, nvml.Return) { +// DeviceGetHandleByUUIDFunc: func(s string) (nvml.Device, error) { // panic("mock out the DeviceGetHandleByUUID method") // }, -// DeviceGetHostVgpuModeFunc: func(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) { +// DeviceGetHostVgpuModeFunc: func(device nvml.Device) (nvml.HostVgpuMode, error) { // panic("mock out the DeviceGetHostVgpuMode method") // }, -// DeviceGetIndexFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetIndexFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetIndex method") // }, -// DeviceGetInforomConfigurationChecksumFunc: func(device nvml.Device) (uint32, nvml.Return) { +// DeviceGetInforomConfigurationChecksumFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the DeviceGetInforomConfigurationChecksum method") // }, -// DeviceGetInforomImageVersionFunc: func(device nvml.Device) (string, nvml.Return) { +// DeviceGetInforomImageVersionFunc: func(device nvml.Device) (string, error) { // panic("mock out the DeviceGetInforomImageVersion method") // }, -// DeviceGetInforomVersionFunc: func(device nvml.Device, inforomObject nvml.InforomObject) (string, nvml.Return) { +// DeviceGetInforomVersionFunc: func(device nvml.Device, inforomObject nvml.InforomObject) (string, error) { // panic("mock out the DeviceGetInforomVersion method") // }, -// DeviceGetIrqNumFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetIrqNumFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetIrqNum method") // }, -// DeviceGetJpgUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { +// DeviceGetJpgUtilizationFunc: func(device nvml.Device) (uint32, uint32, error) { // panic("mock out the DeviceGetJpgUtilization method") // }, -// DeviceGetLastBBXFlushTimeFunc: func(device nvml.Device) (uint64, uint, nvml.Return) { +// DeviceGetLastBBXFlushTimeFunc: func(device nvml.Device) (uint64, uint, error) { // panic("mock out the DeviceGetLastBBXFlushTime method") // }, -// DeviceGetMPSComputeRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { +// DeviceGetMPSComputeRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, error) { // panic("mock out the DeviceGetMPSComputeRunningProcesses method") // }, -// DeviceGetMaxClockInfoFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +// DeviceGetMaxClockInfoFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, error) { // panic("mock out the DeviceGetMaxClockInfo method") // }, -// DeviceGetMaxCustomerBoostClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +// DeviceGetMaxCustomerBoostClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, error) { // panic("mock out the DeviceGetMaxCustomerBoostClock method") // }, -// DeviceGetMaxMigDeviceCountFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetMaxMigDeviceCountFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetMaxMigDeviceCount method") // }, -// DeviceGetMaxPcieLinkGenerationFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetMaxPcieLinkGenerationFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetMaxPcieLinkGeneration method") // }, -// DeviceGetMaxPcieLinkWidthFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetMaxPcieLinkWidthFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetMaxPcieLinkWidth method") // }, -// DeviceGetMemClkMinMaxVfOffsetFunc: func(device nvml.Device) (int, int, nvml.Return) { +// DeviceGetMemClkMinMaxVfOffsetFunc: func(device nvml.Device) (int, int, error) { // panic("mock out the DeviceGetMemClkMinMaxVfOffset method") // }, -// DeviceGetMemClkVfOffsetFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetMemClkVfOffsetFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetMemClkVfOffset method") // }, -// DeviceGetMemoryAffinityFunc: func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +// DeviceGetMemoryAffinityFunc: func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, error) { // panic("mock out the DeviceGetMemoryAffinity method") // }, -// DeviceGetMemoryBusWidthFunc: func(device nvml.Device) (uint32, nvml.Return) { +// DeviceGetMemoryBusWidthFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the DeviceGetMemoryBusWidth method") // }, -// DeviceGetMemoryErrorCounterFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { +// DeviceGetMemoryErrorCounterFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, error) { // panic("mock out the DeviceGetMemoryErrorCounter method") // }, -// DeviceGetMemoryInfoFunc: func(device nvml.Device) (nvml.Memory, nvml.Return) { +// DeviceGetMemoryInfoFunc: func(device nvml.Device) (nvml.Memory, error) { // panic("mock out the DeviceGetMemoryInfo method") // }, -// DeviceGetMemoryInfo_v2Func: func(device nvml.Device) (nvml.Memory_v2, nvml.Return) { +// DeviceGetMemoryInfo_v2Func: func(device nvml.Device) (nvml.Memory_v2, error) { // panic("mock out the DeviceGetMemoryInfo_v2 method") // }, -// DeviceGetMigDeviceHandleByIndexFunc: func(device nvml.Device, n int) (nvml.Device, nvml.Return) { +// DeviceGetMigDeviceHandleByIndexFunc: func(device nvml.Device, n int) (nvml.Device, error) { // panic("mock out the DeviceGetMigDeviceHandleByIndex method") // }, -// DeviceGetMigModeFunc: func(device nvml.Device) (int, int, nvml.Return) { +// DeviceGetMigModeFunc: func(device nvml.Device) (int, int, error) { // panic("mock out the DeviceGetMigMode method") // }, -// DeviceGetMinMaxClockOfPStateFunc: func(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { +// DeviceGetMinMaxClockOfPStateFunc: func(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, error) { // panic("mock out the DeviceGetMinMaxClockOfPState method") // }, -// DeviceGetMinMaxFanSpeedFunc: func(device nvml.Device) (int, int, nvml.Return) { +// DeviceGetMinMaxFanSpeedFunc: func(device nvml.Device) (int, int, error) { // panic("mock out the DeviceGetMinMaxFanSpeed method") // }, -// DeviceGetMinorNumberFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetMinorNumberFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetMinorNumber method") // }, -// DeviceGetModuleIdFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetModuleIdFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetModuleId method") // }, -// DeviceGetMultiGpuBoardFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetMultiGpuBoardFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetMultiGpuBoard method") // }, -// DeviceGetNameFunc: func(device nvml.Device) (string, nvml.Return) { +// DeviceGetNameFunc: func(device nvml.Device) (string, error) { // panic("mock out the DeviceGetName method") // }, -// DeviceGetNumFansFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetNumFansFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetNumFans method") // }, -// DeviceGetNumGpuCoresFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetNumGpuCoresFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetNumGpuCores method") // }, -// DeviceGetNumaNodeIdFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetNumaNodeIdFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetNumaNodeId method") // }, -// DeviceGetNvLinkCapabilityFunc: func(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { +// DeviceGetNvLinkCapabilityFunc: func(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, error) { // panic("mock out the DeviceGetNvLinkCapability method") // }, -// DeviceGetNvLinkErrorCounterFunc: func(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { +// DeviceGetNvLinkErrorCounterFunc: func(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, error) { // panic("mock out the DeviceGetNvLinkErrorCounter method") // }, -// DeviceGetNvLinkRemoteDeviceTypeFunc: func(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) { +// DeviceGetNvLinkRemoteDeviceTypeFunc: func(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, error) { // panic("mock out the DeviceGetNvLinkRemoteDeviceType method") // }, -// DeviceGetNvLinkRemotePciInfoFunc: func(device nvml.Device, n int) (nvml.PciInfo, nvml.Return) { +// DeviceGetNvLinkRemotePciInfoFunc: func(device nvml.Device, n int) (nvml.PciInfo, error) { // panic("mock out the DeviceGetNvLinkRemotePciInfo method") // }, -// DeviceGetNvLinkStateFunc: func(device nvml.Device, n int) (nvml.EnableState, nvml.Return) { +// DeviceGetNvLinkStateFunc: func(device nvml.Device, n int) (nvml.EnableState, error) { // panic("mock out the DeviceGetNvLinkState method") // }, -// DeviceGetNvLinkUtilizationControlFunc: func(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { +// DeviceGetNvLinkUtilizationControlFunc: func(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, error) { // panic("mock out the DeviceGetNvLinkUtilizationControl method") // }, -// DeviceGetNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int) (uint64, uint64, nvml.Return) { +// DeviceGetNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int) (uint64, uint64, error) { // panic("mock out the DeviceGetNvLinkUtilizationCounter method") // }, -// DeviceGetNvLinkVersionFunc: func(device nvml.Device, n int) (uint32, nvml.Return) { +// DeviceGetNvLinkVersionFunc: func(device nvml.Device, n int) (uint32, error) { // panic("mock out the DeviceGetNvLinkVersion method") // }, -// DeviceGetOfaUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { +// DeviceGetOfaUtilizationFunc: func(device nvml.Device) (uint32, uint32, error) { // panic("mock out the DeviceGetOfaUtilization method") // }, -// DeviceGetP2PStatusFunc: func(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { +// DeviceGetP2PStatusFunc: func(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, error) { // panic("mock out the DeviceGetP2PStatus method") // }, -// DeviceGetPciInfoFunc: func(device nvml.Device) (nvml.PciInfo, nvml.Return) { +// DeviceGetPciInfoFunc: func(device nvml.Device) (nvml.PciInfo, error) { // panic("mock out the DeviceGetPciInfo method") // }, -// DeviceGetPciInfoExtFunc: func(device nvml.Device) (nvml.PciInfoExt, nvml.Return) { +// DeviceGetPciInfoExtFunc: func(device nvml.Device) (nvml.PciInfoExt, error) { // panic("mock out the DeviceGetPciInfoExt method") // }, -// DeviceGetPcieLinkMaxSpeedFunc: func(device nvml.Device) (uint32, nvml.Return) { +// DeviceGetPcieLinkMaxSpeedFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the DeviceGetPcieLinkMaxSpeed method") // }, -// DeviceGetPcieReplayCounterFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetPcieReplayCounterFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetPcieReplayCounter method") // }, -// DeviceGetPcieSpeedFunc: func(device nvml.Device) (int, nvml.Return) { +// DeviceGetPcieSpeedFunc: func(device nvml.Device) (int, error) { // panic("mock out the DeviceGetPcieSpeed method") // }, -// DeviceGetPcieThroughputFunc: func(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { +// DeviceGetPcieThroughputFunc: func(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, error) { // panic("mock out the DeviceGetPcieThroughput method") // }, -// DeviceGetPerformanceStateFunc: func(device nvml.Device) (nvml.Pstates, nvml.Return) { +// DeviceGetPerformanceStateFunc: func(device nvml.Device) (nvml.Pstates, error) { // panic("mock out the DeviceGetPerformanceState method") // }, -// DeviceGetPersistenceModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// DeviceGetPersistenceModeFunc: func(device nvml.Device) (nvml.EnableState, error) { // panic("mock out the DeviceGetPersistenceMode method") // }, -// DeviceGetPgpuMetadataStringFunc: func(device nvml.Device) (string, nvml.Return) { +// DeviceGetPgpuMetadataStringFunc: func(device nvml.Device) (string, error) { // panic("mock out the DeviceGetPgpuMetadataString method") // }, -// DeviceGetPowerManagementDefaultLimitFunc: func(device nvml.Device) (uint32, nvml.Return) { +// DeviceGetPowerManagementDefaultLimitFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the DeviceGetPowerManagementDefaultLimit method") // }, -// DeviceGetPowerManagementLimitFunc: func(device nvml.Device) (uint32, nvml.Return) { +// DeviceGetPowerManagementLimitFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the DeviceGetPowerManagementLimit method") // }, -// DeviceGetPowerManagementLimitConstraintsFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { +// DeviceGetPowerManagementLimitConstraintsFunc: func(device nvml.Device) (uint32, uint32, error) { // panic("mock out the DeviceGetPowerManagementLimitConstraints method") // }, -// DeviceGetPowerManagementModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// DeviceGetPowerManagementModeFunc: func(device nvml.Device) (nvml.EnableState, error) { // panic("mock out the DeviceGetPowerManagementMode method") // }, -// DeviceGetPowerSourceFunc: func(device nvml.Device) (nvml.PowerSource, nvml.Return) { +// DeviceGetPowerSourceFunc: func(device nvml.Device) (nvml.PowerSource, error) { // panic("mock out the DeviceGetPowerSource method") // }, -// DeviceGetPowerStateFunc: func(device nvml.Device) (nvml.Pstates, nvml.Return) { +// DeviceGetPowerStateFunc: func(device nvml.Device) (nvml.Pstates, error) { // panic("mock out the DeviceGetPowerState method") // }, -// DeviceGetPowerUsageFunc: func(device nvml.Device) (uint32, nvml.Return) { +// DeviceGetPowerUsageFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the DeviceGetPowerUsage method") // }, -// DeviceGetProcessUtilizationFunc: func(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { +// DeviceGetProcessUtilizationFunc: func(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, error) { // panic("mock out the DeviceGetProcessUtilization method") // }, -// DeviceGetProcessesUtilizationInfoFunc: func(device nvml.Device) (nvml.ProcessesUtilizationInfo, nvml.Return) { +// DeviceGetProcessesUtilizationInfoFunc: func(device nvml.Device) (nvml.ProcessesUtilizationInfo, error) { // panic("mock out the DeviceGetProcessesUtilizationInfo method") // }, -// DeviceGetRemappedRowsFunc: func(device nvml.Device) (int, int, bool, bool, nvml.Return) { +// DeviceGetRemappedRowsFunc: func(device nvml.Device) (int, int, bool, bool, error) { // panic("mock out the DeviceGetRemappedRows method") // }, -// DeviceGetRetiredPagesFunc: func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { +// DeviceGetRetiredPagesFunc: func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, error) { // panic("mock out the DeviceGetRetiredPages method") // }, -// DeviceGetRetiredPagesPendingStatusFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// DeviceGetRetiredPagesPendingStatusFunc: func(device nvml.Device) (nvml.EnableState, error) { // panic("mock out the DeviceGetRetiredPagesPendingStatus method") // }, -// DeviceGetRetiredPages_v2Func: func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { +// DeviceGetRetiredPages_v2Func: func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, error) { // panic("mock out the DeviceGetRetiredPages_v2 method") // }, -// DeviceGetRowRemapperHistogramFunc: func(device nvml.Device) (nvml.RowRemapperHistogramValues, nvml.Return) { +// DeviceGetRowRemapperHistogramFunc: func(device nvml.Device) (nvml.RowRemapperHistogramValues, error) { // panic("mock out the DeviceGetRowRemapperHistogram method") // }, -// DeviceGetRunningProcessDetailListFunc: func(device nvml.Device) (nvml.ProcessDetailList, nvml.Return) { +// DeviceGetRunningProcessDetailListFunc: func(device nvml.Device) (nvml.ProcessDetailList, error) { // panic("mock out the DeviceGetRunningProcessDetailList method") // }, -// DeviceGetSamplesFunc: func(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { +// DeviceGetSamplesFunc: func(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, error) { // panic("mock out the DeviceGetSamples method") // }, -// DeviceGetSerialFunc: func(device nvml.Device) (string, nvml.Return) { +// DeviceGetSerialFunc: func(device nvml.Device) (string, error) { // panic("mock out the DeviceGetSerial method") // }, -// DeviceGetSramEccErrorStatusFunc: func(device nvml.Device) (nvml.EccSramErrorStatus, nvml.Return) { +// DeviceGetSramEccErrorStatusFunc: func(device nvml.Device) (nvml.EccSramErrorStatus, error) { // panic("mock out the DeviceGetSramEccErrorStatus method") // }, -// DeviceGetSupportedClocksEventReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { +// DeviceGetSupportedClocksEventReasonsFunc: func(device nvml.Device) (uint64, error) { // panic("mock out the DeviceGetSupportedClocksEventReasons method") // }, -// DeviceGetSupportedClocksThrottleReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { +// DeviceGetSupportedClocksThrottleReasonsFunc: func(device nvml.Device) (uint64, error) { // panic("mock out the DeviceGetSupportedClocksThrottleReasons method") // }, -// DeviceGetSupportedEventTypesFunc: func(device nvml.Device) (uint64, nvml.Return) { +// DeviceGetSupportedEventTypesFunc: func(device nvml.Device) (uint64, error) { // panic("mock out the DeviceGetSupportedEventTypes method") // }, -// DeviceGetSupportedGraphicsClocksFunc: func(device nvml.Device, n int) (int, uint32, nvml.Return) { +// DeviceGetSupportedGraphicsClocksFunc: func(device nvml.Device, n int) (int, uint32, error) { // panic("mock out the DeviceGetSupportedGraphicsClocks method") // }, -// DeviceGetSupportedMemoryClocksFunc: func(device nvml.Device) (int, uint32, nvml.Return) { +// DeviceGetSupportedMemoryClocksFunc: func(device nvml.Device) (int, uint32, error) { // panic("mock out the DeviceGetSupportedMemoryClocks method") // }, -// DeviceGetSupportedPerformanceStatesFunc: func(device nvml.Device) ([]nvml.Pstates, nvml.Return) { +// DeviceGetSupportedPerformanceStatesFunc: func(device nvml.Device) ([]nvml.Pstates, error) { // panic("mock out the DeviceGetSupportedPerformanceStates method") // }, -// DeviceGetSupportedVgpusFunc: func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { +// DeviceGetSupportedVgpusFunc: func(device nvml.Device) ([]nvml.VgpuTypeId, error) { // panic("mock out the DeviceGetSupportedVgpus method") // }, -// DeviceGetTargetFanSpeedFunc: func(device nvml.Device, n int) (int, nvml.Return) { +// DeviceGetTargetFanSpeedFunc: func(device nvml.Device, n int) (int, error) { // panic("mock out the DeviceGetTargetFanSpeed method") // }, -// DeviceGetTemperatureFunc: func(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { +// DeviceGetTemperatureFunc: func(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, error) { // panic("mock out the DeviceGetTemperature method") // }, -// DeviceGetTemperatureThresholdFunc: func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { +// DeviceGetTemperatureThresholdFunc: func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, error) { // panic("mock out the DeviceGetTemperatureThreshold method") // }, -// DeviceGetThermalSettingsFunc: func(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) { +// DeviceGetThermalSettingsFunc: func(device nvml.Device, v uint32) (nvml.GpuThermalSettings, error) { // panic("mock out the DeviceGetThermalSettings method") // }, -// DeviceGetTopologyCommonAncestorFunc: func(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { +// DeviceGetTopologyCommonAncestorFunc: func(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, error) { // panic("mock out the DeviceGetTopologyCommonAncestor method") // }, -// DeviceGetTopologyNearestGpusFunc: func(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { +// DeviceGetTopologyNearestGpusFunc: func(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, error) { // panic("mock out the DeviceGetTopologyNearestGpus method") // }, -// DeviceGetTotalEccErrorsFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { +// DeviceGetTotalEccErrorsFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, error) { // panic("mock out the DeviceGetTotalEccErrors method") // }, -// DeviceGetTotalEnergyConsumptionFunc: func(device nvml.Device) (uint64, nvml.Return) { +// DeviceGetTotalEnergyConsumptionFunc: func(device nvml.Device) (uint64, error) { // panic("mock out the DeviceGetTotalEnergyConsumption method") // }, -// DeviceGetUUIDFunc: func(device nvml.Device) (string, nvml.Return) { +// DeviceGetUUIDFunc: func(device nvml.Device) (string, error) { // panic("mock out the DeviceGetUUID method") // }, -// DeviceGetUtilizationRatesFunc: func(device nvml.Device) (nvml.Utilization, nvml.Return) { +// DeviceGetUtilizationRatesFunc: func(device nvml.Device) (nvml.Utilization, error) { // panic("mock out the DeviceGetUtilizationRates method") // }, -// DeviceGetVbiosVersionFunc: func(device nvml.Device) (string, nvml.Return) { +// DeviceGetVbiosVersionFunc: func(device nvml.Device) (string, error) { // panic("mock out the DeviceGetVbiosVersion method") // }, -// DeviceGetVgpuCapabilitiesFunc: func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { +// DeviceGetVgpuCapabilitiesFunc: func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, error) { // panic("mock out the DeviceGetVgpuCapabilities method") // }, -// DeviceGetVgpuHeterogeneousModeFunc: func(device nvml.Device) (nvml.VgpuHeterogeneousMode, nvml.Return) { +// DeviceGetVgpuHeterogeneousModeFunc: func(device nvml.Device) (nvml.VgpuHeterogeneousMode, error) { // panic("mock out the DeviceGetVgpuHeterogeneousMode method") // }, -// DeviceGetVgpuInstancesUtilizationInfoFunc: func(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { +// DeviceGetVgpuInstancesUtilizationInfoFunc: func(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, error) { // panic("mock out the DeviceGetVgpuInstancesUtilizationInfo method") // }, -// DeviceGetVgpuMetadataFunc: func(device nvml.Device) (nvml.VgpuPgpuMetadata, nvml.Return) { +// DeviceGetVgpuMetadataFunc: func(device nvml.Device) (nvml.VgpuPgpuMetadata, error) { // panic("mock out the DeviceGetVgpuMetadata method") // }, -// DeviceGetVgpuProcessUtilizationFunc: func(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { +// DeviceGetVgpuProcessUtilizationFunc: func(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, error) { // panic("mock out the DeviceGetVgpuProcessUtilization method") // }, -// DeviceGetVgpuProcessesUtilizationInfoFunc: func(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { +// DeviceGetVgpuProcessesUtilizationInfoFunc: func(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, error) { // panic("mock out the DeviceGetVgpuProcessesUtilizationInfo method") // }, -// DeviceGetVgpuSchedulerCapabilitiesFunc: func(device nvml.Device) (nvml.VgpuSchedulerCapabilities, nvml.Return) { +// DeviceGetVgpuSchedulerCapabilitiesFunc: func(device nvml.Device) (nvml.VgpuSchedulerCapabilities, error) { // panic("mock out the DeviceGetVgpuSchedulerCapabilities method") // }, -// DeviceGetVgpuSchedulerLogFunc: func(device nvml.Device) (nvml.VgpuSchedulerLog, nvml.Return) { +// DeviceGetVgpuSchedulerLogFunc: func(device nvml.Device) (nvml.VgpuSchedulerLog, error) { // panic("mock out the DeviceGetVgpuSchedulerLog method") // }, -// DeviceGetVgpuSchedulerStateFunc: func(device nvml.Device) (nvml.VgpuSchedulerGetState, nvml.Return) { +// DeviceGetVgpuSchedulerStateFunc: func(device nvml.Device) (nvml.VgpuSchedulerGetState, error) { // panic("mock out the DeviceGetVgpuSchedulerState method") // }, -// DeviceGetVgpuTypeCreatablePlacementsFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +// DeviceGetVgpuTypeCreatablePlacementsFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) { // panic("mock out the DeviceGetVgpuTypeCreatablePlacements method") // }, -// DeviceGetVgpuTypeSupportedPlacementsFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +// DeviceGetVgpuTypeSupportedPlacementsFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) { // panic("mock out the DeviceGetVgpuTypeSupportedPlacements method") // }, -// DeviceGetVgpuUtilizationFunc: func(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { +// DeviceGetVgpuUtilizationFunc: func(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, error) { // panic("mock out the DeviceGetVgpuUtilization method") // }, -// DeviceGetViolationStatusFunc: func(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { +// DeviceGetViolationStatusFunc: func(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, error) { // panic("mock out the DeviceGetViolationStatus method") // }, -// DeviceGetVirtualizationModeFunc: func(device nvml.Device) (nvml.GpuVirtualizationMode, nvml.Return) { +// DeviceGetVirtualizationModeFunc: func(device nvml.Device) (nvml.GpuVirtualizationMode, error) { // panic("mock out the DeviceGetVirtualizationMode method") // }, -// DeviceIsMigDeviceHandleFunc: func(device nvml.Device) (bool, nvml.Return) { +// DeviceIsMigDeviceHandleFunc: func(device nvml.Device) (bool, error) { // panic("mock out the DeviceIsMigDeviceHandle method") // }, -// DeviceModifyDrainStateFunc: func(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return { +// DeviceModifyDrainStateFunc: func(pciInfo *nvml.PciInfo, enableState nvml.EnableState) error { // panic("mock out the DeviceModifyDrainState method") // }, -// DeviceOnSameBoardFunc: func(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) { +// DeviceOnSameBoardFunc: func(device1 nvml.Device, device2 nvml.Device) (int, error) { // panic("mock out the DeviceOnSameBoard method") // }, -// DeviceQueryDrainStateFunc: func(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) { +// DeviceQueryDrainStateFunc: func(pciInfo *nvml.PciInfo) (nvml.EnableState, error) { // panic("mock out the DeviceQueryDrainState method") // }, -// DeviceRegisterEventsFunc: func(device nvml.Device, v uint64, eventSet nvml.EventSet) nvml.Return { +// DeviceRegisterEventsFunc: func(device nvml.Device, v uint64, eventSet nvml.EventSet) error { // panic("mock out the DeviceRegisterEvents method") // }, -// DeviceRemoveGpuFunc: func(pciInfo *nvml.PciInfo) nvml.Return { +// DeviceRemoveGpuFunc: func(pciInfo *nvml.PciInfo) error { // panic("mock out the DeviceRemoveGpu method") // }, -// DeviceRemoveGpu_v2Func: func(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) nvml.Return { +// DeviceRemoveGpu_v2Func: func(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) error { // panic("mock out the DeviceRemoveGpu_v2 method") // }, -// DeviceResetApplicationsClocksFunc: func(device nvml.Device) nvml.Return { +// DeviceResetApplicationsClocksFunc: func(device nvml.Device) error { // panic("mock out the DeviceResetApplicationsClocks method") // }, -// DeviceResetGpuLockedClocksFunc: func(device nvml.Device) nvml.Return { +// DeviceResetGpuLockedClocksFunc: func(device nvml.Device) error { // panic("mock out the DeviceResetGpuLockedClocks method") // }, -// DeviceResetMemoryLockedClocksFunc: func(device nvml.Device) nvml.Return { +// DeviceResetMemoryLockedClocksFunc: func(device nvml.Device) error { // panic("mock out the DeviceResetMemoryLockedClocks method") // }, -// DeviceResetNvLinkErrorCountersFunc: func(device nvml.Device, n int) nvml.Return { +// DeviceResetNvLinkErrorCountersFunc: func(device nvml.Device, n int) error { // panic("mock out the DeviceResetNvLinkErrorCounters method") // }, -// DeviceResetNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int) nvml.Return { +// DeviceResetNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int) error { // panic("mock out the DeviceResetNvLinkUtilizationCounter method") // }, -// DeviceSetAPIRestrictionFunc: func(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { +// DeviceSetAPIRestrictionFunc: func(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) error { // panic("mock out the DeviceSetAPIRestriction method") // }, -// DeviceSetAccountingModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { +// DeviceSetAccountingModeFunc: func(device nvml.Device, enableState nvml.EnableState) error { // panic("mock out the DeviceSetAccountingMode method") // }, -// DeviceSetApplicationsClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { +// DeviceSetApplicationsClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) error { // panic("mock out the DeviceSetApplicationsClocks method") // }, -// DeviceSetAutoBoostedClocksEnabledFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { +// DeviceSetAutoBoostedClocksEnabledFunc: func(device nvml.Device, enableState nvml.EnableState) error { // panic("mock out the DeviceSetAutoBoostedClocksEnabled method") // }, -// DeviceSetComputeModeFunc: func(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return { +// DeviceSetComputeModeFunc: func(device nvml.Device, computeMode nvml.ComputeMode) error { // panic("mock out the DeviceSetComputeMode method") // }, -// DeviceSetConfComputeUnprotectedMemSizeFunc: func(device nvml.Device, v uint64) nvml.Return { +// DeviceSetConfComputeUnprotectedMemSizeFunc: func(device nvml.Device, v uint64) error { // panic("mock out the DeviceSetConfComputeUnprotectedMemSize method") // }, -// DeviceSetCpuAffinityFunc: func(device nvml.Device) nvml.Return { +// DeviceSetCpuAffinityFunc: func(device nvml.Device) error { // panic("mock out the DeviceSetCpuAffinity method") // }, -// DeviceSetDefaultAutoBoostedClocksEnabledFunc: func(device nvml.Device, enableState nvml.EnableState, v uint32) nvml.Return { +// DeviceSetDefaultAutoBoostedClocksEnabledFunc: func(device nvml.Device, enableState nvml.EnableState, v uint32) error { // panic("mock out the DeviceSetDefaultAutoBoostedClocksEnabled method") // }, -// DeviceSetDefaultFanSpeed_v2Func: func(device nvml.Device, n int) nvml.Return { +// DeviceSetDefaultFanSpeed_v2Func: func(device nvml.Device, n int) error { // panic("mock out the DeviceSetDefaultFanSpeed_v2 method") // }, -// DeviceSetDriverModelFunc: func(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return { +// DeviceSetDriverModelFunc: func(device nvml.Device, driverModel nvml.DriverModel, v uint32) error { // panic("mock out the DeviceSetDriverModel method") // }, -// DeviceSetEccModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { +// DeviceSetEccModeFunc: func(device nvml.Device, enableState nvml.EnableState) error { // panic("mock out the DeviceSetEccMode method") // }, -// DeviceSetFanControlPolicyFunc: func(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { +// DeviceSetFanControlPolicyFunc: func(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) error { // panic("mock out the DeviceSetFanControlPolicy method") // }, -// DeviceSetFanSpeed_v2Func: func(device nvml.Device, n1 int, n2 int) nvml.Return { +// DeviceSetFanSpeed_v2Func: func(device nvml.Device, n1 int, n2 int) error { // panic("mock out the DeviceSetFanSpeed_v2 method") // }, -// DeviceSetGpcClkVfOffsetFunc: func(device nvml.Device, n int) nvml.Return { +// DeviceSetGpcClkVfOffsetFunc: func(device nvml.Device, n int) error { // panic("mock out the DeviceSetGpcClkVfOffset method") // }, -// DeviceSetGpuLockedClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { +// DeviceSetGpuLockedClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) error { // panic("mock out the DeviceSetGpuLockedClocks method") // }, -// DeviceSetGpuOperationModeFunc: func(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) nvml.Return { +// DeviceSetGpuOperationModeFunc: func(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) error { // panic("mock out the DeviceSetGpuOperationMode method") // }, -// DeviceSetMemClkVfOffsetFunc: func(device nvml.Device, n int) nvml.Return { +// DeviceSetMemClkVfOffsetFunc: func(device nvml.Device, n int) error { // panic("mock out the DeviceSetMemClkVfOffset method") // }, -// DeviceSetMemoryLockedClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { +// DeviceSetMemoryLockedClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) error { // panic("mock out the DeviceSetMemoryLockedClocks method") // }, -// DeviceSetMigModeFunc: func(device nvml.Device, n int) (nvml.Return, nvml.Return) { +// DeviceSetMigModeFunc: func(device nvml.Device, n int) (error, error) { // panic("mock out the DeviceSetMigMode method") // }, -// DeviceSetNvLinkDeviceLowPowerThresholdFunc: func(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { +// DeviceSetNvLinkDeviceLowPowerThresholdFunc: func(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) error { // panic("mock out the DeviceSetNvLinkDeviceLowPowerThreshold method") // }, -// DeviceSetNvLinkUtilizationControlFunc: func(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { +// DeviceSetNvLinkUtilizationControlFunc: func(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) error { // panic("mock out the DeviceSetNvLinkUtilizationControl method") // }, -// DeviceSetPersistenceModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { +// DeviceSetPersistenceModeFunc: func(device nvml.Device, enableState nvml.EnableState) error { // panic("mock out the DeviceSetPersistenceMode method") // }, -// DeviceSetPowerManagementLimitFunc: func(device nvml.Device, v uint32) nvml.Return { +// DeviceSetPowerManagementLimitFunc: func(device nvml.Device, v uint32) error { // panic("mock out the DeviceSetPowerManagementLimit method") // }, -// DeviceSetPowerManagementLimit_v2Func: func(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) nvml.Return { +// DeviceSetPowerManagementLimit_v2Func: func(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) error { // panic("mock out the DeviceSetPowerManagementLimit_v2 method") // }, -// DeviceSetTemperatureThresholdFunc: func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { +// DeviceSetTemperatureThresholdFunc: func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) error { // panic("mock out the DeviceSetTemperatureThreshold method") // }, -// DeviceSetVgpuCapabilitiesFunc: func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { +// DeviceSetVgpuCapabilitiesFunc: func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) error { // panic("mock out the DeviceSetVgpuCapabilities method") // }, -// DeviceSetVgpuHeterogeneousModeFunc: func(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { +// DeviceSetVgpuHeterogeneousModeFunc: func(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) error { // panic("mock out the DeviceSetVgpuHeterogeneousMode method") // }, -// DeviceSetVgpuSchedulerStateFunc: func(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { +// DeviceSetVgpuSchedulerStateFunc: func(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) error { // panic("mock out the DeviceSetVgpuSchedulerState method") // }, -// DeviceSetVirtualizationModeFunc: func(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { +// DeviceSetVirtualizationModeFunc: func(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) error { // panic("mock out the DeviceSetVirtualizationMode method") // }, -// DeviceValidateInforomFunc: func(device nvml.Device) nvml.Return { +// DeviceValidateInforomFunc: func(device nvml.Device) error { // panic("mock out the DeviceValidateInforom method") // }, // ErrorStringFunc: func(returnMoqParam nvml.Return) string { // panic("mock out the ErrorString method") // }, -// EventSetCreateFunc: func() (nvml.EventSet, nvml.Return) { +// EventSetCreateFunc: func() (nvml.EventSet, error) { // panic("mock out the EventSetCreate method") // }, -// EventSetFreeFunc: func(eventSet nvml.EventSet) nvml.Return { +// EventSetFreeFunc: func(eventSet nvml.EventSet) error { // panic("mock out the EventSetFree method") // }, -// EventSetWaitFunc: func(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) { +// EventSetWaitFunc: func(eventSet nvml.EventSet, v uint32) (nvml.EventData, error) { // panic("mock out the EventSetWait method") // }, // ExtensionsFunc: func() nvml.ExtendedInterface { // panic("mock out the Extensions method") // }, -// GetExcludedDeviceCountFunc: func() (int, nvml.Return) { +// GetExcludedDeviceCountFunc: func() (int, error) { // panic("mock out the GetExcludedDeviceCount method") // }, -// GetExcludedDeviceInfoByIndexFunc: func(n int) (nvml.ExcludedDeviceInfo, nvml.Return) { +// GetExcludedDeviceInfoByIndexFunc: func(n int) (nvml.ExcludedDeviceInfo, error) { // panic("mock out the GetExcludedDeviceInfoByIndex method") // }, -// GetVgpuCompatibilityFunc: func(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, nvml.Return) { +// GetVgpuCompatibilityFunc: func(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, error) { // panic("mock out the GetVgpuCompatibility method") // }, -// GetVgpuDriverCapabilitiesFunc: func(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, nvml.Return) { +// GetVgpuDriverCapabilitiesFunc: func(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, error) { // panic("mock out the GetVgpuDriverCapabilities method") // }, -// GetVgpuVersionFunc: func() (nvml.VgpuVersion, nvml.VgpuVersion, nvml.Return) { +// GetVgpuVersionFunc: func() (nvml.VgpuVersion, nvml.VgpuVersion, error) { // panic("mock out the GetVgpuVersion method") // }, -// GpmMetricsGetFunc: func(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.Return { +// GpmMetricsGetFunc: func(gpmMetricsGetType *nvml.GpmMetricsGetType) error { // panic("mock out the GpmMetricsGet method") // }, // GpmMetricsGetVFunc: func(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.GpmMetricsGetVType { // panic("mock out the GpmMetricsGetV method") // }, -// GpmMigSampleGetFunc: func(device nvml.Device, n int, gpmSample nvml.GpmSample) nvml.Return { +// GpmMigSampleGetFunc: func(device nvml.Device, n int, gpmSample nvml.GpmSample) error { // panic("mock out the GpmMigSampleGet method") // }, -// GpmQueryDeviceSupportFunc: func(device nvml.Device) (nvml.GpmSupport, nvml.Return) { +// GpmQueryDeviceSupportFunc: func(device nvml.Device) (nvml.GpmSupport, error) { // panic("mock out the GpmQueryDeviceSupport method") // }, // GpmQueryDeviceSupportVFunc: func(device nvml.Device) nvml.GpmSupportV { // panic("mock out the GpmQueryDeviceSupportV method") // }, -// GpmQueryIfStreamingEnabledFunc: func(device nvml.Device) (uint32, nvml.Return) { +// GpmQueryIfStreamingEnabledFunc: func(device nvml.Device) (uint32, error) { // panic("mock out the GpmQueryIfStreamingEnabled method") // }, -// GpmSampleAllocFunc: func() (nvml.GpmSample, nvml.Return) { +// GpmSampleAllocFunc: func() (nvml.GpmSample, error) { // panic("mock out the GpmSampleAlloc method") // }, -// GpmSampleFreeFunc: func(gpmSample nvml.GpmSample) nvml.Return { +// GpmSampleFreeFunc: func(gpmSample nvml.GpmSample) error { // panic("mock out the GpmSampleFree method") // }, -// GpmSampleGetFunc: func(device nvml.Device, gpmSample nvml.GpmSample) nvml.Return { +// GpmSampleGetFunc: func(device nvml.Device, gpmSample nvml.GpmSample) error { // panic("mock out the GpmSampleGet method") // }, -// GpmSetStreamingEnabledFunc: func(device nvml.Device, v uint32) nvml.Return { +// GpmSetStreamingEnabledFunc: func(device nvml.Device, v uint32) error { // panic("mock out the GpmSetStreamingEnabled method") // }, -// GpuInstanceCreateComputeInstanceFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { +// GpuInstanceCreateComputeInstanceFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, error) { // panic("mock out the GpuInstanceCreateComputeInstance method") // }, -// GpuInstanceCreateComputeInstanceWithPlacementFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { +// GpuInstanceCreateComputeInstanceWithPlacementFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, error) { // panic("mock out the GpuInstanceCreateComputeInstanceWithPlacement method") // }, -// GpuInstanceDestroyFunc: func(gpuInstance nvml.GpuInstance) nvml.Return { +// GpuInstanceDestroyFunc: func(gpuInstance nvml.GpuInstance) error { // panic("mock out the GpuInstanceDestroy method") // }, -// GpuInstanceGetComputeInstanceByIdFunc: func(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) { +// GpuInstanceGetComputeInstanceByIdFunc: func(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, error) { // panic("mock out the GpuInstanceGetComputeInstanceById method") // }, -// GpuInstanceGetComputeInstancePossiblePlacementsFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { +// GpuInstanceGetComputeInstancePossiblePlacementsFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, error) { // panic("mock out the GpuInstanceGetComputeInstancePossiblePlacements method") // }, -// GpuInstanceGetComputeInstanceProfileInfoFunc: func(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { +// GpuInstanceGetComputeInstanceProfileInfoFunc: func(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, error) { // panic("mock out the GpuInstanceGetComputeInstanceProfileInfo method") // }, // GpuInstanceGetComputeInstanceProfileInfoVFunc: func(gpuInstance nvml.GpuInstance, n1 int, n2 int) nvml.ComputeInstanceProfileInfoHandler { // panic("mock out the GpuInstanceGetComputeInstanceProfileInfoV method") // }, -// GpuInstanceGetComputeInstanceRemainingCapacityFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, nvml.Return) { +// GpuInstanceGetComputeInstanceRemainingCapacityFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, error) { // panic("mock out the GpuInstanceGetComputeInstanceRemainingCapacity method") // }, -// GpuInstanceGetComputeInstancesFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { +// GpuInstanceGetComputeInstancesFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, error) { // panic("mock out the GpuInstanceGetComputeInstances method") // }, -// GpuInstanceGetInfoFunc: func(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) { +// GpuInstanceGetInfoFunc: func(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, error) { // panic("mock out the GpuInstanceGetInfo method") // }, -// InitFunc: func() nvml.Return { +// InitFunc: func() error { // panic("mock out the Init method") // }, -// InitWithFlagsFunc: func(v uint32) nvml.Return { +// InitWithFlagsFunc: func(v uint32) error { // panic("mock out the InitWithFlags method") // }, -// SetVgpuVersionFunc: func(vgpuVersion *nvml.VgpuVersion) nvml.Return { +// SetVgpuVersionFunc: func(vgpuVersion *nvml.VgpuVersion) error { // panic("mock out the SetVgpuVersion method") // }, -// ShutdownFunc: func() nvml.Return { +// ShutdownFunc: func() error { // panic("mock out the Shutdown method") // }, -// SystemGetConfComputeCapabilitiesFunc: func() (nvml.ConfComputeSystemCaps, nvml.Return) { +// SystemGetConfComputeCapabilitiesFunc: func() (nvml.ConfComputeSystemCaps, error) { // panic("mock out the SystemGetConfComputeCapabilities method") // }, -// SystemGetConfComputeKeyRotationThresholdInfoFunc: func() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) { +// SystemGetConfComputeKeyRotationThresholdInfoFunc: func() (nvml.ConfComputeGetKeyRotationThresholdInfo, error) { // panic("mock out the SystemGetConfComputeKeyRotationThresholdInfo method") // }, -// SystemGetConfComputeSettingsFunc: func() (nvml.SystemConfComputeSettings, nvml.Return) { +// SystemGetConfComputeSettingsFunc: func() (nvml.SystemConfComputeSettings, error) { // panic("mock out the SystemGetConfComputeSettings method") // }, -// SystemGetCudaDriverVersionFunc: func() (int, nvml.Return) { +// SystemGetCudaDriverVersionFunc: func() (int, error) { // panic("mock out the SystemGetCudaDriverVersion method") // }, -// SystemGetCudaDriverVersion_v2Func: func() (int, nvml.Return) { +// SystemGetCudaDriverVersion_v2Func: func() (int, error) { // panic("mock out the SystemGetCudaDriverVersion_v2 method") // }, -// SystemGetDriverVersionFunc: func() (string, nvml.Return) { +// SystemGetDriverVersionFunc: func() (string, error) { // panic("mock out the SystemGetDriverVersion method") // }, -// SystemGetHicVersionFunc: func() ([]nvml.HwbcEntry, nvml.Return) { +// SystemGetHicVersionFunc: func() ([]nvml.HwbcEntry, error) { // panic("mock out the SystemGetHicVersion method") // }, -// SystemGetNVMLVersionFunc: func() (string, nvml.Return) { +// SystemGetNVMLVersionFunc: func() (string, error) { // panic("mock out the SystemGetNVMLVersion method") // }, -// SystemGetProcessNameFunc: func(n int) (string, nvml.Return) { +// SystemGetProcessNameFunc: func(n int) (string, error) { // panic("mock out the SystemGetProcessName method") // }, -// SystemGetTopologyGpuSetFunc: func(n int) ([]nvml.Device, nvml.Return) { +// SystemGetTopologyGpuSetFunc: func(n int) ([]nvml.Device, error) { // panic("mock out the SystemGetTopologyGpuSet method") // }, -// SystemSetConfComputeKeyRotationThresholdInfoFunc: func(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return { +// SystemSetConfComputeKeyRotationThresholdInfoFunc: func(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) error { // panic("mock out the SystemSetConfComputeKeyRotationThresholdInfo method") // }, -// UnitGetCountFunc: func() (int, nvml.Return) { +// UnitGetCountFunc: func() (int, error) { // panic("mock out the UnitGetCount method") // }, -// UnitGetDevicesFunc: func(unit nvml.Unit) ([]nvml.Device, nvml.Return) { +// UnitGetDevicesFunc: func(unit nvml.Unit) ([]nvml.Device, error) { // panic("mock out the UnitGetDevices method") // }, -// UnitGetFanSpeedInfoFunc: func(unit nvml.Unit) (nvml.UnitFanSpeeds, nvml.Return) { +// UnitGetFanSpeedInfoFunc: func(unit nvml.Unit) (nvml.UnitFanSpeeds, error) { // panic("mock out the UnitGetFanSpeedInfo method") // }, -// UnitGetHandleByIndexFunc: func(n int) (nvml.Unit, nvml.Return) { +// UnitGetHandleByIndexFunc: func(n int) (nvml.Unit, error) { // panic("mock out the UnitGetHandleByIndex method") // }, -// UnitGetLedStateFunc: func(unit nvml.Unit) (nvml.LedState, nvml.Return) { +// UnitGetLedStateFunc: func(unit nvml.Unit) (nvml.LedState, error) { // panic("mock out the UnitGetLedState method") // }, -// UnitGetPsuInfoFunc: func(unit nvml.Unit) (nvml.PSUInfo, nvml.Return) { +// UnitGetPsuInfoFunc: func(unit nvml.Unit) (nvml.PSUInfo, error) { // panic("mock out the UnitGetPsuInfo method") // }, -// UnitGetTemperatureFunc: func(unit nvml.Unit, n int) (uint32, nvml.Return) { +// UnitGetTemperatureFunc: func(unit nvml.Unit, n int) (uint32, error) { // panic("mock out the UnitGetTemperature method") // }, -// UnitGetUnitInfoFunc: func(unit nvml.Unit) (nvml.UnitInfo, nvml.Return) { +// UnitGetUnitInfoFunc: func(unit nvml.Unit) (nvml.UnitInfo, error) { // panic("mock out the UnitGetUnitInfo method") // }, -// UnitSetLedStateFunc: func(unit nvml.Unit, ledColor nvml.LedColor) nvml.Return { +// UnitSetLedStateFunc: func(unit nvml.Unit, ledColor nvml.LedColor) error { // panic("mock out the UnitSetLedState method") // }, -// VgpuInstanceClearAccountingPidsFunc: func(vgpuInstance nvml.VgpuInstance) nvml.Return { +// VgpuInstanceClearAccountingPidsFunc: func(vgpuInstance nvml.VgpuInstance) error { // panic("mock out the VgpuInstanceClearAccountingPids method") // }, -// VgpuInstanceGetAccountingModeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { +// VgpuInstanceGetAccountingModeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, error) { // panic("mock out the VgpuInstanceGetAccountingMode method") // }, -// VgpuInstanceGetAccountingPidsFunc: func(vgpuInstance nvml.VgpuInstance) ([]int, nvml.Return) { +// VgpuInstanceGetAccountingPidsFunc: func(vgpuInstance nvml.VgpuInstance) ([]int, error) { // panic("mock out the VgpuInstanceGetAccountingPids method") // }, -// VgpuInstanceGetAccountingStatsFunc: func(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, nvml.Return) { +// VgpuInstanceGetAccountingStatsFunc: func(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, error) { // panic("mock out the VgpuInstanceGetAccountingStats method") // }, -// VgpuInstanceGetEccModeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { +// VgpuInstanceGetEccModeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, error) { // panic("mock out the VgpuInstanceGetEccMode method") // }, -// VgpuInstanceGetEncoderCapacityFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { +// VgpuInstanceGetEncoderCapacityFunc: func(vgpuInstance nvml.VgpuInstance) (int, error) { // panic("mock out the VgpuInstanceGetEncoderCapacity method") // }, -// VgpuInstanceGetEncoderSessionsFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, nvml.Return) { +// VgpuInstanceGetEncoderSessionsFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, error) { // panic("mock out the VgpuInstanceGetEncoderSessions method") // }, -// VgpuInstanceGetEncoderStatsFunc: func(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, nvml.Return) { +// VgpuInstanceGetEncoderStatsFunc: func(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, error) { // panic("mock out the VgpuInstanceGetEncoderStats method") // }, -// VgpuInstanceGetFBCSessionsFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, nvml.Return) { +// VgpuInstanceGetFBCSessionsFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, error) { // panic("mock out the VgpuInstanceGetFBCSessions method") // }, -// VgpuInstanceGetFBCStatsFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, nvml.Return) { +// VgpuInstanceGetFBCStatsFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, error) { // panic("mock out the VgpuInstanceGetFBCStats method") // }, -// VgpuInstanceGetFbUsageFunc: func(vgpuInstance nvml.VgpuInstance) (uint64, nvml.Return) { +// VgpuInstanceGetFbUsageFunc: func(vgpuInstance nvml.VgpuInstance) (uint64, error) { // panic("mock out the VgpuInstanceGetFbUsage method") // }, -// VgpuInstanceGetFrameRateLimitFunc: func(vgpuInstance nvml.VgpuInstance) (uint32, nvml.Return) { +// VgpuInstanceGetFrameRateLimitFunc: func(vgpuInstance nvml.VgpuInstance) (uint32, error) { // panic("mock out the VgpuInstanceGetFrameRateLimit method") // }, -// VgpuInstanceGetGpuInstanceIdFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { +// VgpuInstanceGetGpuInstanceIdFunc: func(vgpuInstance nvml.VgpuInstance) (int, error) { // panic("mock out the VgpuInstanceGetGpuInstanceId method") // }, -// VgpuInstanceGetGpuPciIdFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +// VgpuInstanceGetGpuPciIdFunc: func(vgpuInstance nvml.VgpuInstance) (string, error) { // panic("mock out the VgpuInstanceGetGpuPciId method") // }, -// VgpuInstanceGetLicenseInfoFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, nvml.Return) { +// VgpuInstanceGetLicenseInfoFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, error) { // panic("mock out the VgpuInstanceGetLicenseInfo method") // }, -// VgpuInstanceGetLicenseStatusFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { +// VgpuInstanceGetLicenseStatusFunc: func(vgpuInstance nvml.VgpuInstance) (int, error) { // panic("mock out the VgpuInstanceGetLicenseStatus method") // }, -// VgpuInstanceGetMdevUUIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +// VgpuInstanceGetMdevUUIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, error) { // panic("mock out the VgpuInstanceGetMdevUUID method") // }, -// VgpuInstanceGetMetadataFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) { +// VgpuInstanceGetMetadataFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, error) { // panic("mock out the VgpuInstanceGetMetadata method") // }, -// VgpuInstanceGetTypeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) { +// VgpuInstanceGetTypeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, error) { // panic("mock out the VgpuInstanceGetType method") // }, -// VgpuInstanceGetUUIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +// VgpuInstanceGetUUIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, error) { // panic("mock out the VgpuInstanceGetUUID method") // }, -// VgpuInstanceGetVmDriverVersionFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +// VgpuInstanceGetVmDriverVersionFunc: func(vgpuInstance nvml.VgpuInstance) (string, error) { // panic("mock out the VgpuInstanceGetVmDriverVersion method") // }, -// VgpuInstanceGetVmIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, nvml.Return) { +// VgpuInstanceGetVmIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, error) { // panic("mock out the VgpuInstanceGetVmID method") // }, -// VgpuInstanceSetEncoderCapacityFunc: func(vgpuInstance nvml.VgpuInstance, n int) nvml.Return { +// VgpuInstanceSetEncoderCapacityFunc: func(vgpuInstance nvml.VgpuInstance, n int) error { // panic("mock out the VgpuInstanceSetEncoderCapacity method") // }, -// VgpuTypeGetCapabilitiesFunc: func(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { +// VgpuTypeGetCapabilitiesFunc: func(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, error) { // panic("mock out the VgpuTypeGetCapabilities method") // }, -// VgpuTypeGetClassFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { +// VgpuTypeGetClassFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, error) { // panic("mock out the VgpuTypeGetClass method") // }, -// VgpuTypeGetDeviceIDFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, nvml.Return) { +// VgpuTypeGetDeviceIDFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, error) { // panic("mock out the VgpuTypeGetDeviceID method") // }, -// VgpuTypeGetFrameRateLimitFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { +// VgpuTypeGetFrameRateLimitFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint32, error) { // panic("mock out the VgpuTypeGetFrameRateLimit method") // }, -// VgpuTypeGetFramebufferSizeFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint64, nvml.Return) { +// VgpuTypeGetFramebufferSizeFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint64, error) { // panic("mock out the VgpuTypeGetFramebufferSize method") // }, -// VgpuTypeGetGpuInstanceProfileIdFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { +// VgpuTypeGetGpuInstanceProfileIdFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint32, error) { // panic("mock out the VgpuTypeGetGpuInstanceProfileId method") // }, -// VgpuTypeGetLicenseFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { +// VgpuTypeGetLicenseFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, error) { // panic("mock out the VgpuTypeGetLicense method") // }, -// VgpuTypeGetMaxInstancesFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +// VgpuTypeGetMaxInstancesFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, error) { // panic("mock out the VgpuTypeGetMaxInstances method") // }, -// VgpuTypeGetMaxInstancesPerVmFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +// VgpuTypeGetMaxInstancesPerVmFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, error) { // panic("mock out the VgpuTypeGetMaxInstancesPerVm method") // }, -// VgpuTypeGetNameFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { +// VgpuTypeGetNameFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, error) { // panic("mock out the VgpuTypeGetName method") // }, -// VgpuTypeGetNumDisplayHeadsFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +// VgpuTypeGetNumDisplayHeadsFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, error) { // panic("mock out the VgpuTypeGetNumDisplayHeads method") // }, -// VgpuTypeGetResolutionFunc: func(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, nvml.Return) { +// VgpuTypeGetResolutionFunc: func(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, error) { // panic("mock out the VgpuTypeGetResolution method") // }, // } @@ -989,967 +989,967 @@ var _ nvml.Interface = &Interface{} // } type Interface struct { // ComputeInstanceDestroyFunc mocks the ComputeInstanceDestroy method. - ComputeInstanceDestroyFunc func(computeInstance nvml.ComputeInstance) nvml.Return + ComputeInstanceDestroyFunc func(computeInstance nvml.ComputeInstance) error // ComputeInstanceGetInfoFunc mocks the ComputeInstanceGetInfo method. - ComputeInstanceGetInfoFunc func(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, nvml.Return) + ComputeInstanceGetInfoFunc func(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, error) // DeviceClearAccountingPidsFunc mocks the DeviceClearAccountingPids method. - DeviceClearAccountingPidsFunc func(device nvml.Device) nvml.Return + DeviceClearAccountingPidsFunc func(device nvml.Device) error // DeviceClearCpuAffinityFunc mocks the DeviceClearCpuAffinity method. - DeviceClearCpuAffinityFunc func(device nvml.Device) nvml.Return + DeviceClearCpuAffinityFunc func(device nvml.Device) error // DeviceClearEccErrorCountsFunc mocks the DeviceClearEccErrorCounts method. - DeviceClearEccErrorCountsFunc func(device nvml.Device, eccCounterType nvml.EccCounterType) nvml.Return + DeviceClearEccErrorCountsFunc func(device nvml.Device, eccCounterType nvml.EccCounterType) error // DeviceClearFieldValuesFunc mocks the DeviceClearFieldValues method. - DeviceClearFieldValuesFunc func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return + DeviceClearFieldValuesFunc func(device nvml.Device, fieldValues []nvml.FieldValue) error // DeviceCreateGpuInstanceFunc mocks the DeviceCreateGpuInstance method. - DeviceCreateGpuInstanceFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) + DeviceCreateGpuInstanceFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, error) // DeviceCreateGpuInstanceWithPlacementFunc mocks the DeviceCreateGpuInstanceWithPlacement method. - DeviceCreateGpuInstanceWithPlacementFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) + DeviceCreateGpuInstanceWithPlacementFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, error) // DeviceDiscoverGpusFunc mocks the DeviceDiscoverGpus method. - DeviceDiscoverGpusFunc func() (nvml.PciInfo, nvml.Return) + DeviceDiscoverGpusFunc func() (nvml.PciInfo, error) // DeviceFreezeNvLinkUtilizationCounterFunc mocks the DeviceFreezeNvLinkUtilizationCounter method. - DeviceFreezeNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) nvml.Return + DeviceFreezeNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) error // DeviceGetAPIRestrictionFunc mocks the DeviceGetAPIRestriction method. - DeviceGetAPIRestrictionFunc func(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) + DeviceGetAPIRestrictionFunc func(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, error) // DeviceGetAccountingBufferSizeFunc mocks the DeviceGetAccountingBufferSize method. - DeviceGetAccountingBufferSizeFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetAccountingBufferSizeFunc func(device nvml.Device) (int, error) // DeviceGetAccountingModeFunc mocks the DeviceGetAccountingMode method. - DeviceGetAccountingModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + DeviceGetAccountingModeFunc func(device nvml.Device) (nvml.EnableState, error) // DeviceGetAccountingPidsFunc mocks the DeviceGetAccountingPids method. - DeviceGetAccountingPidsFunc func(device nvml.Device) ([]int, nvml.Return) + DeviceGetAccountingPidsFunc func(device nvml.Device) ([]int, error) // DeviceGetAccountingStatsFunc mocks the DeviceGetAccountingStats method. - DeviceGetAccountingStatsFunc func(device nvml.Device, v uint32) (nvml.AccountingStats, nvml.Return) + DeviceGetAccountingStatsFunc func(device nvml.Device, v uint32) (nvml.AccountingStats, error) // DeviceGetActiveVgpusFunc mocks the DeviceGetActiveVgpus method. - DeviceGetActiveVgpusFunc func(device nvml.Device) ([]nvml.VgpuInstance, nvml.Return) + DeviceGetActiveVgpusFunc func(device nvml.Device) ([]nvml.VgpuInstance, error) // DeviceGetAdaptiveClockInfoStatusFunc mocks the DeviceGetAdaptiveClockInfoStatus method. - DeviceGetAdaptiveClockInfoStatusFunc func(device nvml.Device) (uint32, nvml.Return) + DeviceGetAdaptiveClockInfoStatusFunc func(device nvml.Device) (uint32, error) // DeviceGetApplicationsClockFunc mocks the DeviceGetApplicationsClock method. - DeviceGetApplicationsClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + DeviceGetApplicationsClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, error) // DeviceGetArchitectureFunc mocks the DeviceGetArchitecture method. - DeviceGetArchitectureFunc func(device nvml.Device) (nvml.DeviceArchitecture, nvml.Return) + DeviceGetArchitectureFunc func(device nvml.Device) (nvml.DeviceArchitecture, error) // DeviceGetAttributesFunc mocks the DeviceGetAttributes method. - DeviceGetAttributesFunc func(device nvml.Device) (nvml.DeviceAttributes, nvml.Return) + DeviceGetAttributesFunc func(device nvml.Device) (nvml.DeviceAttributes, error) // DeviceGetAutoBoostedClocksEnabledFunc mocks the DeviceGetAutoBoostedClocksEnabled method. - DeviceGetAutoBoostedClocksEnabledFunc func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) + DeviceGetAutoBoostedClocksEnabledFunc func(device nvml.Device) (nvml.EnableState, nvml.EnableState, error) // DeviceGetBAR1MemoryInfoFunc mocks the DeviceGetBAR1MemoryInfo method. - DeviceGetBAR1MemoryInfoFunc func(device nvml.Device) (nvml.BAR1Memory, nvml.Return) + DeviceGetBAR1MemoryInfoFunc func(device nvml.Device) (nvml.BAR1Memory, error) // DeviceGetBoardIdFunc mocks the DeviceGetBoardId method. - DeviceGetBoardIdFunc func(device nvml.Device) (uint32, nvml.Return) + DeviceGetBoardIdFunc func(device nvml.Device) (uint32, error) // DeviceGetBoardPartNumberFunc mocks the DeviceGetBoardPartNumber method. - DeviceGetBoardPartNumberFunc func(device nvml.Device) (string, nvml.Return) + DeviceGetBoardPartNumberFunc func(device nvml.Device) (string, error) // DeviceGetBrandFunc mocks the DeviceGetBrand method. - DeviceGetBrandFunc func(device nvml.Device) (nvml.BrandType, nvml.Return) + DeviceGetBrandFunc func(device nvml.Device) (nvml.BrandType, error) // DeviceGetBridgeChipInfoFunc mocks the DeviceGetBridgeChipInfo method. - DeviceGetBridgeChipInfoFunc func(device nvml.Device) (nvml.BridgeChipHierarchy, nvml.Return) + DeviceGetBridgeChipInfoFunc func(device nvml.Device) (nvml.BridgeChipHierarchy, error) // DeviceGetBusTypeFunc mocks the DeviceGetBusType method. - DeviceGetBusTypeFunc func(device nvml.Device) (nvml.BusType, nvml.Return) + DeviceGetBusTypeFunc func(device nvml.Device) (nvml.BusType, error) // DeviceGetC2cModeInfoVFunc mocks the DeviceGetC2cModeInfoV method. DeviceGetC2cModeInfoVFunc func(device nvml.Device) nvml.C2cModeInfoHandler // DeviceGetClkMonStatusFunc mocks the DeviceGetClkMonStatus method. - DeviceGetClkMonStatusFunc func(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) + DeviceGetClkMonStatusFunc func(device nvml.Device) (nvml.ClkMonStatus, error) // DeviceGetClockFunc mocks the DeviceGetClock method. - DeviceGetClockFunc func(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) + DeviceGetClockFunc func(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, error) // DeviceGetClockInfoFunc mocks the DeviceGetClockInfo method. - DeviceGetClockInfoFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + DeviceGetClockInfoFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, error) // DeviceGetComputeInstanceIdFunc mocks the DeviceGetComputeInstanceId method. - DeviceGetComputeInstanceIdFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetComputeInstanceIdFunc func(device nvml.Device) (int, error) // DeviceGetComputeModeFunc mocks the DeviceGetComputeMode method. - DeviceGetComputeModeFunc func(device nvml.Device) (nvml.ComputeMode, nvml.Return) + DeviceGetComputeModeFunc func(device nvml.Device) (nvml.ComputeMode, error) // DeviceGetComputeRunningProcessesFunc mocks the DeviceGetComputeRunningProcesses method. - DeviceGetComputeRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) + DeviceGetComputeRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, error) // DeviceGetConfComputeGpuAttestationReportFunc mocks the DeviceGetConfComputeGpuAttestationReport method. - DeviceGetConfComputeGpuAttestationReportFunc func(device nvml.Device) (nvml.ConfComputeGpuAttestationReport, nvml.Return) + DeviceGetConfComputeGpuAttestationReportFunc func(device nvml.Device) (nvml.ConfComputeGpuAttestationReport, error) // DeviceGetConfComputeGpuCertificateFunc mocks the DeviceGetConfComputeGpuCertificate method. - DeviceGetConfComputeGpuCertificateFunc func(device nvml.Device) (nvml.ConfComputeGpuCertificate, nvml.Return) + DeviceGetConfComputeGpuCertificateFunc func(device nvml.Device) (nvml.ConfComputeGpuCertificate, error) // DeviceGetConfComputeMemSizeInfoFunc mocks the DeviceGetConfComputeMemSizeInfo method. - DeviceGetConfComputeMemSizeInfoFunc func(device nvml.Device) (nvml.ConfComputeMemSizeInfo, nvml.Return) + DeviceGetConfComputeMemSizeInfoFunc func(device nvml.Device) (nvml.ConfComputeMemSizeInfo, error) // DeviceGetConfComputeProtectedMemoryUsageFunc mocks the DeviceGetConfComputeProtectedMemoryUsage method. - DeviceGetConfComputeProtectedMemoryUsageFunc func(device nvml.Device) (nvml.Memory, nvml.Return) + DeviceGetConfComputeProtectedMemoryUsageFunc func(device nvml.Device) (nvml.Memory, error) // DeviceGetCountFunc mocks the DeviceGetCount method. - DeviceGetCountFunc func() (int, nvml.Return) + DeviceGetCountFunc func() (int, error) // DeviceGetCpuAffinityFunc mocks the DeviceGetCpuAffinity method. - DeviceGetCpuAffinityFunc func(device nvml.Device, n int) ([]uint, nvml.Return) + DeviceGetCpuAffinityFunc func(device nvml.Device, n int) ([]uint, error) // DeviceGetCpuAffinityWithinScopeFunc mocks the DeviceGetCpuAffinityWithinScope method. - DeviceGetCpuAffinityWithinScopeFunc func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) + DeviceGetCpuAffinityWithinScopeFunc func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, error) // DeviceGetCreatableVgpusFunc mocks the DeviceGetCreatableVgpus method. - DeviceGetCreatableVgpusFunc func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) + DeviceGetCreatableVgpusFunc func(device nvml.Device) ([]nvml.VgpuTypeId, error) // DeviceGetCudaComputeCapabilityFunc mocks the DeviceGetCudaComputeCapability method. - DeviceGetCudaComputeCapabilityFunc func(device nvml.Device) (int, int, nvml.Return) + DeviceGetCudaComputeCapabilityFunc func(device nvml.Device) (int, int, error) // DeviceGetCurrPcieLinkGenerationFunc mocks the DeviceGetCurrPcieLinkGeneration method. - DeviceGetCurrPcieLinkGenerationFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetCurrPcieLinkGenerationFunc func(device nvml.Device) (int, error) // DeviceGetCurrPcieLinkWidthFunc mocks the DeviceGetCurrPcieLinkWidth method. - DeviceGetCurrPcieLinkWidthFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetCurrPcieLinkWidthFunc func(device nvml.Device) (int, error) // DeviceGetCurrentClocksEventReasonsFunc mocks the DeviceGetCurrentClocksEventReasons method. - DeviceGetCurrentClocksEventReasonsFunc func(device nvml.Device) (uint64, nvml.Return) + DeviceGetCurrentClocksEventReasonsFunc func(device nvml.Device) (uint64, error) // DeviceGetCurrentClocksThrottleReasonsFunc mocks the DeviceGetCurrentClocksThrottleReasons method. - DeviceGetCurrentClocksThrottleReasonsFunc func(device nvml.Device) (uint64, nvml.Return) + DeviceGetCurrentClocksThrottleReasonsFunc func(device nvml.Device) (uint64, error) // DeviceGetDecoderUtilizationFunc mocks the DeviceGetDecoderUtilization method. - DeviceGetDecoderUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) + DeviceGetDecoderUtilizationFunc func(device nvml.Device) (uint32, uint32, error) // DeviceGetDefaultApplicationsClockFunc mocks the DeviceGetDefaultApplicationsClock method. - DeviceGetDefaultApplicationsClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + DeviceGetDefaultApplicationsClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, error) // DeviceGetDefaultEccModeFunc mocks the DeviceGetDefaultEccMode method. - DeviceGetDefaultEccModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + DeviceGetDefaultEccModeFunc func(device nvml.Device) (nvml.EnableState, error) // DeviceGetDetailedEccErrorsFunc mocks the DeviceGetDetailedEccErrors method. - DeviceGetDetailedEccErrorsFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) + DeviceGetDetailedEccErrorsFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, error) // DeviceGetDeviceHandleFromMigDeviceHandleFunc mocks the DeviceGetDeviceHandleFromMigDeviceHandle method. - DeviceGetDeviceHandleFromMigDeviceHandleFunc func(device nvml.Device) (nvml.Device, nvml.Return) + DeviceGetDeviceHandleFromMigDeviceHandleFunc func(device nvml.Device) (nvml.Device, error) // DeviceGetDisplayActiveFunc mocks the DeviceGetDisplayActive method. - DeviceGetDisplayActiveFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + DeviceGetDisplayActiveFunc func(device nvml.Device) (nvml.EnableState, error) // DeviceGetDisplayModeFunc mocks the DeviceGetDisplayMode method. - DeviceGetDisplayModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + DeviceGetDisplayModeFunc func(device nvml.Device) (nvml.EnableState, error) // DeviceGetDriverModelFunc mocks the DeviceGetDriverModel method. - DeviceGetDriverModelFunc func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) + DeviceGetDriverModelFunc func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, error) // DeviceGetDynamicPstatesInfoFunc mocks the DeviceGetDynamicPstatesInfo method. - DeviceGetDynamicPstatesInfoFunc func(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) + DeviceGetDynamicPstatesInfoFunc func(device nvml.Device) (nvml.GpuDynamicPstatesInfo, error) // DeviceGetEccModeFunc mocks the DeviceGetEccMode method. - DeviceGetEccModeFunc func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) + DeviceGetEccModeFunc func(device nvml.Device) (nvml.EnableState, nvml.EnableState, error) // DeviceGetEncoderCapacityFunc mocks the DeviceGetEncoderCapacity method. - DeviceGetEncoderCapacityFunc func(device nvml.Device, encoderType nvml.EncoderType) (int, nvml.Return) + DeviceGetEncoderCapacityFunc func(device nvml.Device, encoderType nvml.EncoderType) (int, error) // DeviceGetEncoderSessionsFunc mocks the DeviceGetEncoderSessions method. - DeviceGetEncoderSessionsFunc func(device nvml.Device) ([]nvml.EncoderSessionInfo, nvml.Return) + DeviceGetEncoderSessionsFunc func(device nvml.Device) ([]nvml.EncoderSessionInfo, error) // DeviceGetEncoderStatsFunc mocks the DeviceGetEncoderStats method. - DeviceGetEncoderStatsFunc func(device nvml.Device) (int, uint32, uint32, nvml.Return) + DeviceGetEncoderStatsFunc func(device nvml.Device) (int, uint32, uint32, error) // DeviceGetEncoderUtilizationFunc mocks the DeviceGetEncoderUtilization method. - DeviceGetEncoderUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) + DeviceGetEncoderUtilizationFunc func(device nvml.Device) (uint32, uint32, error) // DeviceGetEnforcedPowerLimitFunc mocks the DeviceGetEnforcedPowerLimit method. - DeviceGetEnforcedPowerLimitFunc func(device nvml.Device) (uint32, nvml.Return) + DeviceGetEnforcedPowerLimitFunc func(device nvml.Device) (uint32, error) // DeviceGetFBCSessionsFunc mocks the DeviceGetFBCSessions method. - DeviceGetFBCSessionsFunc func(device nvml.Device) ([]nvml.FBCSessionInfo, nvml.Return) + DeviceGetFBCSessionsFunc func(device nvml.Device) ([]nvml.FBCSessionInfo, error) // DeviceGetFBCStatsFunc mocks the DeviceGetFBCStats method. - DeviceGetFBCStatsFunc func(device nvml.Device) (nvml.FBCStats, nvml.Return) + DeviceGetFBCStatsFunc func(device nvml.Device) (nvml.FBCStats, error) // DeviceGetFanControlPolicy_v2Func mocks the DeviceGetFanControlPolicy_v2 method. - DeviceGetFanControlPolicy_v2Func func(device nvml.Device, n int) (nvml.FanControlPolicy, nvml.Return) + DeviceGetFanControlPolicy_v2Func func(device nvml.Device, n int) (nvml.FanControlPolicy, error) // DeviceGetFanSpeedFunc mocks the DeviceGetFanSpeed method. - DeviceGetFanSpeedFunc func(device nvml.Device) (uint32, nvml.Return) + DeviceGetFanSpeedFunc func(device nvml.Device) (uint32, error) // DeviceGetFanSpeed_v2Func mocks the DeviceGetFanSpeed_v2 method. - DeviceGetFanSpeed_v2Func func(device nvml.Device, n int) (uint32, nvml.Return) + DeviceGetFanSpeed_v2Func func(device nvml.Device, n int) (uint32, error) // DeviceGetFieldValuesFunc mocks the DeviceGetFieldValues method. - DeviceGetFieldValuesFunc func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return + DeviceGetFieldValuesFunc func(device nvml.Device, fieldValues []nvml.FieldValue) error // DeviceGetGpcClkMinMaxVfOffsetFunc mocks the DeviceGetGpcClkMinMaxVfOffset method. - DeviceGetGpcClkMinMaxVfOffsetFunc func(device nvml.Device) (int, int, nvml.Return) + DeviceGetGpcClkMinMaxVfOffsetFunc func(device nvml.Device) (int, int, error) // DeviceGetGpcClkVfOffsetFunc mocks the DeviceGetGpcClkVfOffset method. - DeviceGetGpcClkVfOffsetFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetGpcClkVfOffsetFunc func(device nvml.Device) (int, error) // DeviceGetGpuFabricInfoFunc mocks the DeviceGetGpuFabricInfo method. - DeviceGetGpuFabricInfoFunc func(device nvml.Device) (nvml.GpuFabricInfo, nvml.Return) + DeviceGetGpuFabricInfoFunc func(device nvml.Device) (nvml.GpuFabricInfo, error) // DeviceGetGpuFabricInfoVFunc mocks the DeviceGetGpuFabricInfoV method. DeviceGetGpuFabricInfoVFunc func(device nvml.Device) nvml.GpuFabricInfoHandler // DeviceGetGpuInstanceByIdFunc mocks the DeviceGetGpuInstanceById method. - DeviceGetGpuInstanceByIdFunc func(device nvml.Device, n int) (nvml.GpuInstance, nvml.Return) + DeviceGetGpuInstanceByIdFunc func(device nvml.Device, n int) (nvml.GpuInstance, error) // DeviceGetGpuInstanceIdFunc mocks the DeviceGetGpuInstanceId method. - DeviceGetGpuInstanceIdFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetGpuInstanceIdFunc func(device nvml.Device) (int, error) // DeviceGetGpuInstancePossiblePlacementsFunc mocks the DeviceGetGpuInstancePossiblePlacements method. - DeviceGetGpuInstancePossiblePlacementsFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) + DeviceGetGpuInstancePossiblePlacementsFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, error) // DeviceGetGpuInstanceProfileInfoFunc mocks the DeviceGetGpuInstanceProfileInfo method. - DeviceGetGpuInstanceProfileInfoFunc func(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, nvml.Return) + DeviceGetGpuInstanceProfileInfoFunc func(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, error) // DeviceGetGpuInstanceProfileInfoVFunc mocks the DeviceGetGpuInstanceProfileInfoV method. DeviceGetGpuInstanceProfileInfoVFunc func(device nvml.Device, n int) nvml.GpuInstanceProfileInfoHandler // DeviceGetGpuInstanceRemainingCapacityFunc mocks the DeviceGetGpuInstanceRemainingCapacity method. - DeviceGetGpuInstanceRemainingCapacityFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) + DeviceGetGpuInstanceRemainingCapacityFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, error) // DeviceGetGpuInstancesFunc mocks the DeviceGetGpuInstances method. - DeviceGetGpuInstancesFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) + DeviceGetGpuInstancesFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, error) // DeviceGetGpuMaxPcieLinkGenerationFunc mocks the DeviceGetGpuMaxPcieLinkGeneration method. - DeviceGetGpuMaxPcieLinkGenerationFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetGpuMaxPcieLinkGenerationFunc func(device nvml.Device) (int, error) // DeviceGetGpuOperationModeFunc mocks the DeviceGetGpuOperationMode method. - DeviceGetGpuOperationModeFunc func(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) + DeviceGetGpuOperationModeFunc func(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, error) // DeviceGetGraphicsRunningProcessesFunc mocks the DeviceGetGraphicsRunningProcesses method. - DeviceGetGraphicsRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) + DeviceGetGraphicsRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, error) // DeviceGetGridLicensableFeaturesFunc mocks the DeviceGetGridLicensableFeatures method. - DeviceGetGridLicensableFeaturesFunc func(device nvml.Device) (nvml.GridLicensableFeatures, nvml.Return) + DeviceGetGridLicensableFeaturesFunc func(device nvml.Device) (nvml.GridLicensableFeatures, error) // DeviceGetGspFirmwareModeFunc mocks the DeviceGetGspFirmwareMode method. - DeviceGetGspFirmwareModeFunc func(device nvml.Device) (bool, bool, nvml.Return) + DeviceGetGspFirmwareModeFunc func(device nvml.Device) (bool, bool, error) // DeviceGetGspFirmwareVersionFunc mocks the DeviceGetGspFirmwareVersion method. - DeviceGetGspFirmwareVersionFunc func(device nvml.Device) (string, nvml.Return) + DeviceGetGspFirmwareVersionFunc func(device nvml.Device) (string, error) // DeviceGetHandleByIndexFunc mocks the DeviceGetHandleByIndex method. - DeviceGetHandleByIndexFunc func(n int) (nvml.Device, nvml.Return) + DeviceGetHandleByIndexFunc func(n int) (nvml.Device, error) // DeviceGetHandleByPciBusIdFunc mocks the DeviceGetHandleByPciBusId method. - DeviceGetHandleByPciBusIdFunc func(s string) (nvml.Device, nvml.Return) + DeviceGetHandleByPciBusIdFunc func(s string) (nvml.Device, error) // DeviceGetHandleBySerialFunc mocks the DeviceGetHandleBySerial method. - DeviceGetHandleBySerialFunc func(s string) (nvml.Device, nvml.Return) + DeviceGetHandleBySerialFunc func(s string) (nvml.Device, error) // DeviceGetHandleByUUIDFunc mocks the DeviceGetHandleByUUID method. - DeviceGetHandleByUUIDFunc func(s string) (nvml.Device, nvml.Return) + DeviceGetHandleByUUIDFunc func(s string) (nvml.Device, error) // DeviceGetHostVgpuModeFunc mocks the DeviceGetHostVgpuMode method. - DeviceGetHostVgpuModeFunc func(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) + DeviceGetHostVgpuModeFunc func(device nvml.Device) (nvml.HostVgpuMode, error) // DeviceGetIndexFunc mocks the DeviceGetIndex method. - DeviceGetIndexFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetIndexFunc func(device nvml.Device) (int, error) // DeviceGetInforomConfigurationChecksumFunc mocks the DeviceGetInforomConfigurationChecksum method. - DeviceGetInforomConfigurationChecksumFunc func(device nvml.Device) (uint32, nvml.Return) + DeviceGetInforomConfigurationChecksumFunc func(device nvml.Device) (uint32, error) // DeviceGetInforomImageVersionFunc mocks the DeviceGetInforomImageVersion method. - DeviceGetInforomImageVersionFunc func(device nvml.Device) (string, nvml.Return) + DeviceGetInforomImageVersionFunc func(device nvml.Device) (string, error) // DeviceGetInforomVersionFunc mocks the DeviceGetInforomVersion method. - DeviceGetInforomVersionFunc func(device nvml.Device, inforomObject nvml.InforomObject) (string, nvml.Return) + DeviceGetInforomVersionFunc func(device nvml.Device, inforomObject nvml.InforomObject) (string, error) // DeviceGetIrqNumFunc mocks the DeviceGetIrqNum method. - DeviceGetIrqNumFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetIrqNumFunc func(device nvml.Device) (int, error) // DeviceGetJpgUtilizationFunc mocks the DeviceGetJpgUtilization method. - DeviceGetJpgUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) + DeviceGetJpgUtilizationFunc func(device nvml.Device) (uint32, uint32, error) // DeviceGetLastBBXFlushTimeFunc mocks the DeviceGetLastBBXFlushTime method. - DeviceGetLastBBXFlushTimeFunc func(device nvml.Device) (uint64, uint, nvml.Return) + DeviceGetLastBBXFlushTimeFunc func(device nvml.Device) (uint64, uint, error) // DeviceGetMPSComputeRunningProcessesFunc mocks the DeviceGetMPSComputeRunningProcesses method. - DeviceGetMPSComputeRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) + DeviceGetMPSComputeRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, error) // DeviceGetMaxClockInfoFunc mocks the DeviceGetMaxClockInfo method. - DeviceGetMaxClockInfoFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + DeviceGetMaxClockInfoFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, error) // DeviceGetMaxCustomerBoostClockFunc mocks the DeviceGetMaxCustomerBoostClock method. - DeviceGetMaxCustomerBoostClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + DeviceGetMaxCustomerBoostClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, error) // DeviceGetMaxMigDeviceCountFunc mocks the DeviceGetMaxMigDeviceCount method. - DeviceGetMaxMigDeviceCountFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetMaxMigDeviceCountFunc func(device nvml.Device) (int, error) // DeviceGetMaxPcieLinkGenerationFunc mocks the DeviceGetMaxPcieLinkGeneration method. - DeviceGetMaxPcieLinkGenerationFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetMaxPcieLinkGenerationFunc func(device nvml.Device) (int, error) // DeviceGetMaxPcieLinkWidthFunc mocks the DeviceGetMaxPcieLinkWidth method. - DeviceGetMaxPcieLinkWidthFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetMaxPcieLinkWidthFunc func(device nvml.Device) (int, error) // DeviceGetMemClkMinMaxVfOffsetFunc mocks the DeviceGetMemClkMinMaxVfOffset method. - DeviceGetMemClkMinMaxVfOffsetFunc func(device nvml.Device) (int, int, nvml.Return) + DeviceGetMemClkMinMaxVfOffsetFunc func(device nvml.Device) (int, int, error) // DeviceGetMemClkVfOffsetFunc mocks the DeviceGetMemClkVfOffset method. - DeviceGetMemClkVfOffsetFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetMemClkVfOffsetFunc func(device nvml.Device) (int, error) // DeviceGetMemoryAffinityFunc mocks the DeviceGetMemoryAffinity method. - DeviceGetMemoryAffinityFunc func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) + DeviceGetMemoryAffinityFunc func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, error) // DeviceGetMemoryBusWidthFunc mocks the DeviceGetMemoryBusWidth method. - DeviceGetMemoryBusWidthFunc func(device nvml.Device) (uint32, nvml.Return) + DeviceGetMemoryBusWidthFunc func(device nvml.Device) (uint32, error) // DeviceGetMemoryErrorCounterFunc mocks the DeviceGetMemoryErrorCounter method. - DeviceGetMemoryErrorCounterFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) + DeviceGetMemoryErrorCounterFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, error) // DeviceGetMemoryInfoFunc mocks the DeviceGetMemoryInfo method. - DeviceGetMemoryInfoFunc func(device nvml.Device) (nvml.Memory, nvml.Return) + DeviceGetMemoryInfoFunc func(device nvml.Device) (nvml.Memory, error) // DeviceGetMemoryInfo_v2Func mocks the DeviceGetMemoryInfo_v2 method. - DeviceGetMemoryInfo_v2Func func(device nvml.Device) (nvml.Memory_v2, nvml.Return) + DeviceGetMemoryInfo_v2Func func(device nvml.Device) (nvml.Memory_v2, error) // DeviceGetMigDeviceHandleByIndexFunc mocks the DeviceGetMigDeviceHandleByIndex method. - DeviceGetMigDeviceHandleByIndexFunc func(device nvml.Device, n int) (nvml.Device, nvml.Return) + DeviceGetMigDeviceHandleByIndexFunc func(device nvml.Device, n int) (nvml.Device, error) // DeviceGetMigModeFunc mocks the DeviceGetMigMode method. - DeviceGetMigModeFunc func(device nvml.Device) (int, int, nvml.Return) + DeviceGetMigModeFunc func(device nvml.Device) (int, int, error) // DeviceGetMinMaxClockOfPStateFunc mocks the DeviceGetMinMaxClockOfPState method. - DeviceGetMinMaxClockOfPStateFunc func(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) + DeviceGetMinMaxClockOfPStateFunc func(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, error) // DeviceGetMinMaxFanSpeedFunc mocks the DeviceGetMinMaxFanSpeed method. - DeviceGetMinMaxFanSpeedFunc func(device nvml.Device) (int, int, nvml.Return) + DeviceGetMinMaxFanSpeedFunc func(device nvml.Device) (int, int, error) // DeviceGetMinorNumberFunc mocks the DeviceGetMinorNumber method. - DeviceGetMinorNumberFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetMinorNumberFunc func(device nvml.Device) (int, error) // DeviceGetModuleIdFunc mocks the DeviceGetModuleId method. - DeviceGetModuleIdFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetModuleIdFunc func(device nvml.Device) (int, error) // DeviceGetMultiGpuBoardFunc mocks the DeviceGetMultiGpuBoard method. - DeviceGetMultiGpuBoardFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetMultiGpuBoardFunc func(device nvml.Device) (int, error) // DeviceGetNameFunc mocks the DeviceGetName method. - DeviceGetNameFunc func(device nvml.Device) (string, nvml.Return) + DeviceGetNameFunc func(device nvml.Device) (string, error) // DeviceGetNumFansFunc mocks the DeviceGetNumFans method. - DeviceGetNumFansFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetNumFansFunc func(device nvml.Device) (int, error) // DeviceGetNumGpuCoresFunc mocks the DeviceGetNumGpuCores method. - DeviceGetNumGpuCoresFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetNumGpuCoresFunc func(device nvml.Device) (int, error) // DeviceGetNumaNodeIdFunc mocks the DeviceGetNumaNodeId method. - DeviceGetNumaNodeIdFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetNumaNodeIdFunc func(device nvml.Device) (int, error) // DeviceGetNvLinkCapabilityFunc mocks the DeviceGetNvLinkCapability method. - DeviceGetNvLinkCapabilityFunc func(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) + DeviceGetNvLinkCapabilityFunc func(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, error) // DeviceGetNvLinkErrorCounterFunc mocks the DeviceGetNvLinkErrorCounter method. - DeviceGetNvLinkErrorCounterFunc func(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) + DeviceGetNvLinkErrorCounterFunc func(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, error) // DeviceGetNvLinkRemoteDeviceTypeFunc mocks the DeviceGetNvLinkRemoteDeviceType method. - DeviceGetNvLinkRemoteDeviceTypeFunc func(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) + DeviceGetNvLinkRemoteDeviceTypeFunc func(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, error) // DeviceGetNvLinkRemotePciInfoFunc mocks the DeviceGetNvLinkRemotePciInfo method. - DeviceGetNvLinkRemotePciInfoFunc func(device nvml.Device, n int) (nvml.PciInfo, nvml.Return) + DeviceGetNvLinkRemotePciInfoFunc func(device nvml.Device, n int) (nvml.PciInfo, error) // DeviceGetNvLinkStateFunc mocks the DeviceGetNvLinkState method. - DeviceGetNvLinkStateFunc func(device nvml.Device, n int) (nvml.EnableState, nvml.Return) + DeviceGetNvLinkStateFunc func(device nvml.Device, n int) (nvml.EnableState, error) // DeviceGetNvLinkUtilizationControlFunc mocks the DeviceGetNvLinkUtilizationControl method. - DeviceGetNvLinkUtilizationControlFunc func(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) + DeviceGetNvLinkUtilizationControlFunc func(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, error) // DeviceGetNvLinkUtilizationCounterFunc mocks the DeviceGetNvLinkUtilizationCounter method. - DeviceGetNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int) (uint64, uint64, nvml.Return) + DeviceGetNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int) (uint64, uint64, error) // DeviceGetNvLinkVersionFunc mocks the DeviceGetNvLinkVersion method. - DeviceGetNvLinkVersionFunc func(device nvml.Device, n int) (uint32, nvml.Return) + DeviceGetNvLinkVersionFunc func(device nvml.Device, n int) (uint32, error) // DeviceGetOfaUtilizationFunc mocks the DeviceGetOfaUtilization method. - DeviceGetOfaUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) + DeviceGetOfaUtilizationFunc func(device nvml.Device) (uint32, uint32, error) // DeviceGetP2PStatusFunc mocks the DeviceGetP2PStatus method. - DeviceGetP2PStatusFunc func(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) + DeviceGetP2PStatusFunc func(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, error) // DeviceGetPciInfoFunc mocks the DeviceGetPciInfo method. - DeviceGetPciInfoFunc func(device nvml.Device) (nvml.PciInfo, nvml.Return) + DeviceGetPciInfoFunc func(device nvml.Device) (nvml.PciInfo, error) // DeviceGetPciInfoExtFunc mocks the DeviceGetPciInfoExt method. - DeviceGetPciInfoExtFunc func(device nvml.Device) (nvml.PciInfoExt, nvml.Return) + DeviceGetPciInfoExtFunc func(device nvml.Device) (nvml.PciInfoExt, error) // DeviceGetPcieLinkMaxSpeedFunc mocks the DeviceGetPcieLinkMaxSpeed method. - DeviceGetPcieLinkMaxSpeedFunc func(device nvml.Device) (uint32, nvml.Return) + DeviceGetPcieLinkMaxSpeedFunc func(device nvml.Device) (uint32, error) // DeviceGetPcieReplayCounterFunc mocks the DeviceGetPcieReplayCounter method. - DeviceGetPcieReplayCounterFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetPcieReplayCounterFunc func(device nvml.Device) (int, error) // DeviceGetPcieSpeedFunc mocks the DeviceGetPcieSpeed method. - DeviceGetPcieSpeedFunc func(device nvml.Device) (int, nvml.Return) + DeviceGetPcieSpeedFunc func(device nvml.Device) (int, error) // DeviceGetPcieThroughputFunc mocks the DeviceGetPcieThroughput method. - DeviceGetPcieThroughputFunc func(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) + DeviceGetPcieThroughputFunc func(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, error) // DeviceGetPerformanceStateFunc mocks the DeviceGetPerformanceState method. - DeviceGetPerformanceStateFunc func(device nvml.Device) (nvml.Pstates, nvml.Return) + DeviceGetPerformanceStateFunc func(device nvml.Device) (nvml.Pstates, error) // DeviceGetPersistenceModeFunc mocks the DeviceGetPersistenceMode method. - DeviceGetPersistenceModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + DeviceGetPersistenceModeFunc func(device nvml.Device) (nvml.EnableState, error) // DeviceGetPgpuMetadataStringFunc mocks the DeviceGetPgpuMetadataString method. - DeviceGetPgpuMetadataStringFunc func(device nvml.Device) (string, nvml.Return) + DeviceGetPgpuMetadataStringFunc func(device nvml.Device) (string, error) // DeviceGetPowerManagementDefaultLimitFunc mocks the DeviceGetPowerManagementDefaultLimit method. - DeviceGetPowerManagementDefaultLimitFunc func(device nvml.Device) (uint32, nvml.Return) + DeviceGetPowerManagementDefaultLimitFunc func(device nvml.Device) (uint32, error) // DeviceGetPowerManagementLimitFunc mocks the DeviceGetPowerManagementLimit method. - DeviceGetPowerManagementLimitFunc func(device nvml.Device) (uint32, nvml.Return) + DeviceGetPowerManagementLimitFunc func(device nvml.Device) (uint32, error) // DeviceGetPowerManagementLimitConstraintsFunc mocks the DeviceGetPowerManagementLimitConstraints method. - DeviceGetPowerManagementLimitConstraintsFunc func(device nvml.Device) (uint32, uint32, nvml.Return) + DeviceGetPowerManagementLimitConstraintsFunc func(device nvml.Device) (uint32, uint32, error) // DeviceGetPowerManagementModeFunc mocks the DeviceGetPowerManagementMode method. - DeviceGetPowerManagementModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + DeviceGetPowerManagementModeFunc func(device nvml.Device) (nvml.EnableState, error) // DeviceGetPowerSourceFunc mocks the DeviceGetPowerSource method. - DeviceGetPowerSourceFunc func(device nvml.Device) (nvml.PowerSource, nvml.Return) + DeviceGetPowerSourceFunc func(device nvml.Device) (nvml.PowerSource, error) // DeviceGetPowerStateFunc mocks the DeviceGetPowerState method. - DeviceGetPowerStateFunc func(device nvml.Device) (nvml.Pstates, nvml.Return) + DeviceGetPowerStateFunc func(device nvml.Device) (nvml.Pstates, error) // DeviceGetPowerUsageFunc mocks the DeviceGetPowerUsage method. - DeviceGetPowerUsageFunc func(device nvml.Device) (uint32, nvml.Return) + DeviceGetPowerUsageFunc func(device nvml.Device) (uint32, error) // DeviceGetProcessUtilizationFunc mocks the DeviceGetProcessUtilization method. - DeviceGetProcessUtilizationFunc func(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) + DeviceGetProcessUtilizationFunc func(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, error) // DeviceGetProcessesUtilizationInfoFunc mocks the DeviceGetProcessesUtilizationInfo method. - DeviceGetProcessesUtilizationInfoFunc func(device nvml.Device) (nvml.ProcessesUtilizationInfo, nvml.Return) + DeviceGetProcessesUtilizationInfoFunc func(device nvml.Device) (nvml.ProcessesUtilizationInfo, error) // DeviceGetRemappedRowsFunc mocks the DeviceGetRemappedRows method. - DeviceGetRemappedRowsFunc func(device nvml.Device) (int, int, bool, bool, nvml.Return) + DeviceGetRemappedRowsFunc func(device nvml.Device) (int, int, bool, bool, error) // DeviceGetRetiredPagesFunc mocks the DeviceGetRetiredPages method. - DeviceGetRetiredPagesFunc func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) + DeviceGetRetiredPagesFunc func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, error) // DeviceGetRetiredPagesPendingStatusFunc mocks the DeviceGetRetiredPagesPendingStatus method. - DeviceGetRetiredPagesPendingStatusFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + DeviceGetRetiredPagesPendingStatusFunc func(device nvml.Device) (nvml.EnableState, error) // DeviceGetRetiredPages_v2Func mocks the DeviceGetRetiredPages_v2 method. - DeviceGetRetiredPages_v2Func func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) + DeviceGetRetiredPages_v2Func func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, error) // DeviceGetRowRemapperHistogramFunc mocks the DeviceGetRowRemapperHistogram method. - DeviceGetRowRemapperHistogramFunc func(device nvml.Device) (nvml.RowRemapperHistogramValues, nvml.Return) + DeviceGetRowRemapperHistogramFunc func(device nvml.Device) (nvml.RowRemapperHistogramValues, error) // DeviceGetRunningProcessDetailListFunc mocks the DeviceGetRunningProcessDetailList method. - DeviceGetRunningProcessDetailListFunc func(device nvml.Device) (nvml.ProcessDetailList, nvml.Return) + DeviceGetRunningProcessDetailListFunc func(device nvml.Device) (nvml.ProcessDetailList, error) // DeviceGetSamplesFunc mocks the DeviceGetSamples method. - DeviceGetSamplesFunc func(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) + DeviceGetSamplesFunc func(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, error) // DeviceGetSerialFunc mocks the DeviceGetSerial method. - DeviceGetSerialFunc func(device nvml.Device) (string, nvml.Return) + DeviceGetSerialFunc func(device nvml.Device) (string, error) // DeviceGetSramEccErrorStatusFunc mocks the DeviceGetSramEccErrorStatus method. - DeviceGetSramEccErrorStatusFunc func(device nvml.Device) (nvml.EccSramErrorStatus, nvml.Return) + DeviceGetSramEccErrorStatusFunc func(device nvml.Device) (nvml.EccSramErrorStatus, error) // DeviceGetSupportedClocksEventReasonsFunc mocks the DeviceGetSupportedClocksEventReasons method. - DeviceGetSupportedClocksEventReasonsFunc func(device nvml.Device) (uint64, nvml.Return) + DeviceGetSupportedClocksEventReasonsFunc func(device nvml.Device) (uint64, error) // DeviceGetSupportedClocksThrottleReasonsFunc mocks the DeviceGetSupportedClocksThrottleReasons method. - DeviceGetSupportedClocksThrottleReasonsFunc func(device nvml.Device) (uint64, nvml.Return) + DeviceGetSupportedClocksThrottleReasonsFunc func(device nvml.Device) (uint64, error) // DeviceGetSupportedEventTypesFunc mocks the DeviceGetSupportedEventTypes method. - DeviceGetSupportedEventTypesFunc func(device nvml.Device) (uint64, nvml.Return) + DeviceGetSupportedEventTypesFunc func(device nvml.Device) (uint64, error) // DeviceGetSupportedGraphicsClocksFunc mocks the DeviceGetSupportedGraphicsClocks method. - DeviceGetSupportedGraphicsClocksFunc func(device nvml.Device, n int) (int, uint32, nvml.Return) + DeviceGetSupportedGraphicsClocksFunc func(device nvml.Device, n int) (int, uint32, error) // DeviceGetSupportedMemoryClocksFunc mocks the DeviceGetSupportedMemoryClocks method. - DeviceGetSupportedMemoryClocksFunc func(device nvml.Device) (int, uint32, nvml.Return) + DeviceGetSupportedMemoryClocksFunc func(device nvml.Device) (int, uint32, error) // DeviceGetSupportedPerformanceStatesFunc mocks the DeviceGetSupportedPerformanceStates method. - DeviceGetSupportedPerformanceStatesFunc func(device nvml.Device) ([]nvml.Pstates, nvml.Return) + DeviceGetSupportedPerformanceStatesFunc func(device nvml.Device) ([]nvml.Pstates, error) // DeviceGetSupportedVgpusFunc mocks the DeviceGetSupportedVgpus method. - DeviceGetSupportedVgpusFunc func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) + DeviceGetSupportedVgpusFunc func(device nvml.Device) ([]nvml.VgpuTypeId, error) // DeviceGetTargetFanSpeedFunc mocks the DeviceGetTargetFanSpeed method. - DeviceGetTargetFanSpeedFunc func(device nvml.Device, n int) (int, nvml.Return) + DeviceGetTargetFanSpeedFunc func(device nvml.Device, n int) (int, error) // DeviceGetTemperatureFunc mocks the DeviceGetTemperature method. - DeviceGetTemperatureFunc func(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) + DeviceGetTemperatureFunc func(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, error) // DeviceGetTemperatureThresholdFunc mocks the DeviceGetTemperatureThreshold method. - DeviceGetTemperatureThresholdFunc func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) + DeviceGetTemperatureThresholdFunc func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, error) // DeviceGetThermalSettingsFunc mocks the DeviceGetThermalSettings method. - DeviceGetThermalSettingsFunc func(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) + DeviceGetThermalSettingsFunc func(device nvml.Device, v uint32) (nvml.GpuThermalSettings, error) // DeviceGetTopologyCommonAncestorFunc mocks the DeviceGetTopologyCommonAncestor method. - DeviceGetTopologyCommonAncestorFunc func(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) + DeviceGetTopologyCommonAncestorFunc func(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, error) // DeviceGetTopologyNearestGpusFunc mocks the DeviceGetTopologyNearestGpus method. - DeviceGetTopologyNearestGpusFunc func(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) + DeviceGetTopologyNearestGpusFunc func(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, error) // DeviceGetTotalEccErrorsFunc mocks the DeviceGetTotalEccErrors method. - DeviceGetTotalEccErrorsFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) + DeviceGetTotalEccErrorsFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, error) // DeviceGetTotalEnergyConsumptionFunc mocks the DeviceGetTotalEnergyConsumption method. - DeviceGetTotalEnergyConsumptionFunc func(device nvml.Device) (uint64, nvml.Return) + DeviceGetTotalEnergyConsumptionFunc func(device nvml.Device) (uint64, error) // DeviceGetUUIDFunc mocks the DeviceGetUUID method. - DeviceGetUUIDFunc func(device nvml.Device) (string, nvml.Return) + DeviceGetUUIDFunc func(device nvml.Device) (string, error) // DeviceGetUtilizationRatesFunc mocks the DeviceGetUtilizationRates method. - DeviceGetUtilizationRatesFunc func(device nvml.Device) (nvml.Utilization, nvml.Return) + DeviceGetUtilizationRatesFunc func(device nvml.Device) (nvml.Utilization, error) // DeviceGetVbiosVersionFunc mocks the DeviceGetVbiosVersion method. - DeviceGetVbiosVersionFunc func(device nvml.Device) (string, nvml.Return) + DeviceGetVbiosVersionFunc func(device nvml.Device) (string, error) // DeviceGetVgpuCapabilitiesFunc mocks the DeviceGetVgpuCapabilities method. - DeviceGetVgpuCapabilitiesFunc func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) + DeviceGetVgpuCapabilitiesFunc func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, error) // DeviceGetVgpuHeterogeneousModeFunc mocks the DeviceGetVgpuHeterogeneousMode method. - DeviceGetVgpuHeterogeneousModeFunc func(device nvml.Device) (nvml.VgpuHeterogeneousMode, nvml.Return) + DeviceGetVgpuHeterogeneousModeFunc func(device nvml.Device) (nvml.VgpuHeterogeneousMode, error) // DeviceGetVgpuInstancesUtilizationInfoFunc mocks the DeviceGetVgpuInstancesUtilizationInfo method. - DeviceGetVgpuInstancesUtilizationInfoFunc func(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, nvml.Return) + DeviceGetVgpuInstancesUtilizationInfoFunc func(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, error) // DeviceGetVgpuMetadataFunc mocks the DeviceGetVgpuMetadata method. - DeviceGetVgpuMetadataFunc func(device nvml.Device) (nvml.VgpuPgpuMetadata, nvml.Return) + DeviceGetVgpuMetadataFunc func(device nvml.Device) (nvml.VgpuPgpuMetadata, error) // DeviceGetVgpuProcessUtilizationFunc mocks the DeviceGetVgpuProcessUtilization method. - DeviceGetVgpuProcessUtilizationFunc func(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) + DeviceGetVgpuProcessUtilizationFunc func(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, error) // DeviceGetVgpuProcessesUtilizationInfoFunc mocks the DeviceGetVgpuProcessesUtilizationInfo method. - DeviceGetVgpuProcessesUtilizationInfoFunc func(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, nvml.Return) + DeviceGetVgpuProcessesUtilizationInfoFunc func(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, error) // DeviceGetVgpuSchedulerCapabilitiesFunc mocks the DeviceGetVgpuSchedulerCapabilities method. - DeviceGetVgpuSchedulerCapabilitiesFunc func(device nvml.Device) (nvml.VgpuSchedulerCapabilities, nvml.Return) + DeviceGetVgpuSchedulerCapabilitiesFunc func(device nvml.Device) (nvml.VgpuSchedulerCapabilities, error) // DeviceGetVgpuSchedulerLogFunc mocks the DeviceGetVgpuSchedulerLog method. - DeviceGetVgpuSchedulerLogFunc func(device nvml.Device) (nvml.VgpuSchedulerLog, nvml.Return) + DeviceGetVgpuSchedulerLogFunc func(device nvml.Device) (nvml.VgpuSchedulerLog, error) // DeviceGetVgpuSchedulerStateFunc mocks the DeviceGetVgpuSchedulerState method. - DeviceGetVgpuSchedulerStateFunc func(device nvml.Device) (nvml.VgpuSchedulerGetState, nvml.Return) + DeviceGetVgpuSchedulerStateFunc func(device nvml.Device) (nvml.VgpuSchedulerGetState, error) // DeviceGetVgpuTypeCreatablePlacementsFunc mocks the DeviceGetVgpuTypeCreatablePlacements method. - DeviceGetVgpuTypeCreatablePlacementsFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) + DeviceGetVgpuTypeCreatablePlacementsFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) // DeviceGetVgpuTypeSupportedPlacementsFunc mocks the DeviceGetVgpuTypeSupportedPlacements method. - DeviceGetVgpuTypeSupportedPlacementsFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) + DeviceGetVgpuTypeSupportedPlacementsFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) // DeviceGetVgpuUtilizationFunc mocks the DeviceGetVgpuUtilization method. - DeviceGetVgpuUtilizationFunc func(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) + DeviceGetVgpuUtilizationFunc func(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, error) // DeviceGetViolationStatusFunc mocks the DeviceGetViolationStatus method. - DeviceGetViolationStatusFunc func(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) + DeviceGetViolationStatusFunc func(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, error) // DeviceGetVirtualizationModeFunc mocks the DeviceGetVirtualizationMode method. - DeviceGetVirtualizationModeFunc func(device nvml.Device) (nvml.GpuVirtualizationMode, nvml.Return) + DeviceGetVirtualizationModeFunc func(device nvml.Device) (nvml.GpuVirtualizationMode, error) // DeviceIsMigDeviceHandleFunc mocks the DeviceIsMigDeviceHandle method. - DeviceIsMigDeviceHandleFunc func(device nvml.Device) (bool, nvml.Return) + DeviceIsMigDeviceHandleFunc func(device nvml.Device) (bool, error) // DeviceModifyDrainStateFunc mocks the DeviceModifyDrainState method. - DeviceModifyDrainStateFunc func(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return + DeviceModifyDrainStateFunc func(pciInfo *nvml.PciInfo, enableState nvml.EnableState) error // DeviceOnSameBoardFunc mocks the DeviceOnSameBoard method. - DeviceOnSameBoardFunc func(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) + DeviceOnSameBoardFunc func(device1 nvml.Device, device2 nvml.Device) (int, error) // DeviceQueryDrainStateFunc mocks the DeviceQueryDrainState method. - DeviceQueryDrainStateFunc func(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) + DeviceQueryDrainStateFunc func(pciInfo *nvml.PciInfo) (nvml.EnableState, error) // DeviceRegisterEventsFunc mocks the DeviceRegisterEvents method. - DeviceRegisterEventsFunc func(device nvml.Device, v uint64, eventSet nvml.EventSet) nvml.Return + DeviceRegisterEventsFunc func(device nvml.Device, v uint64, eventSet nvml.EventSet) error // DeviceRemoveGpuFunc mocks the DeviceRemoveGpu method. - DeviceRemoveGpuFunc func(pciInfo *nvml.PciInfo) nvml.Return + DeviceRemoveGpuFunc func(pciInfo *nvml.PciInfo) error // DeviceRemoveGpu_v2Func mocks the DeviceRemoveGpu_v2 method. - DeviceRemoveGpu_v2Func func(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) nvml.Return + DeviceRemoveGpu_v2Func func(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) error // DeviceResetApplicationsClocksFunc mocks the DeviceResetApplicationsClocks method. - DeviceResetApplicationsClocksFunc func(device nvml.Device) nvml.Return + DeviceResetApplicationsClocksFunc func(device nvml.Device) error // DeviceResetGpuLockedClocksFunc mocks the DeviceResetGpuLockedClocks method. - DeviceResetGpuLockedClocksFunc func(device nvml.Device) nvml.Return + DeviceResetGpuLockedClocksFunc func(device nvml.Device) error // DeviceResetMemoryLockedClocksFunc mocks the DeviceResetMemoryLockedClocks method. - DeviceResetMemoryLockedClocksFunc func(device nvml.Device) nvml.Return + DeviceResetMemoryLockedClocksFunc func(device nvml.Device) error // DeviceResetNvLinkErrorCountersFunc mocks the DeviceResetNvLinkErrorCounters method. - DeviceResetNvLinkErrorCountersFunc func(device nvml.Device, n int) nvml.Return + DeviceResetNvLinkErrorCountersFunc func(device nvml.Device, n int) error // DeviceResetNvLinkUtilizationCounterFunc mocks the DeviceResetNvLinkUtilizationCounter method. - DeviceResetNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int) nvml.Return + DeviceResetNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int) error // DeviceSetAPIRestrictionFunc mocks the DeviceSetAPIRestriction method. - DeviceSetAPIRestrictionFunc func(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return + DeviceSetAPIRestrictionFunc func(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) error // DeviceSetAccountingModeFunc mocks the DeviceSetAccountingMode method. - DeviceSetAccountingModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return + DeviceSetAccountingModeFunc func(device nvml.Device, enableState nvml.EnableState) error // DeviceSetApplicationsClocksFunc mocks the DeviceSetApplicationsClocks method. - DeviceSetApplicationsClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return + DeviceSetApplicationsClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) error // DeviceSetAutoBoostedClocksEnabledFunc mocks the DeviceSetAutoBoostedClocksEnabled method. - DeviceSetAutoBoostedClocksEnabledFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return + DeviceSetAutoBoostedClocksEnabledFunc func(device nvml.Device, enableState nvml.EnableState) error // DeviceSetComputeModeFunc mocks the DeviceSetComputeMode method. - DeviceSetComputeModeFunc func(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return + DeviceSetComputeModeFunc func(device nvml.Device, computeMode nvml.ComputeMode) error // DeviceSetConfComputeUnprotectedMemSizeFunc mocks the DeviceSetConfComputeUnprotectedMemSize method. - DeviceSetConfComputeUnprotectedMemSizeFunc func(device nvml.Device, v uint64) nvml.Return + DeviceSetConfComputeUnprotectedMemSizeFunc func(device nvml.Device, v uint64) error // DeviceSetCpuAffinityFunc mocks the DeviceSetCpuAffinity method. - DeviceSetCpuAffinityFunc func(device nvml.Device) nvml.Return + DeviceSetCpuAffinityFunc func(device nvml.Device) error // DeviceSetDefaultAutoBoostedClocksEnabledFunc mocks the DeviceSetDefaultAutoBoostedClocksEnabled method. - DeviceSetDefaultAutoBoostedClocksEnabledFunc func(device nvml.Device, enableState nvml.EnableState, v uint32) nvml.Return + DeviceSetDefaultAutoBoostedClocksEnabledFunc func(device nvml.Device, enableState nvml.EnableState, v uint32) error // DeviceSetDefaultFanSpeed_v2Func mocks the DeviceSetDefaultFanSpeed_v2 method. - DeviceSetDefaultFanSpeed_v2Func func(device nvml.Device, n int) nvml.Return + DeviceSetDefaultFanSpeed_v2Func func(device nvml.Device, n int) error // DeviceSetDriverModelFunc mocks the DeviceSetDriverModel method. - DeviceSetDriverModelFunc func(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return + DeviceSetDriverModelFunc func(device nvml.Device, driverModel nvml.DriverModel, v uint32) error // DeviceSetEccModeFunc mocks the DeviceSetEccMode method. - DeviceSetEccModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return + DeviceSetEccModeFunc func(device nvml.Device, enableState nvml.EnableState) error // DeviceSetFanControlPolicyFunc mocks the DeviceSetFanControlPolicy method. - DeviceSetFanControlPolicyFunc func(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return + DeviceSetFanControlPolicyFunc func(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) error // DeviceSetFanSpeed_v2Func mocks the DeviceSetFanSpeed_v2 method. - DeviceSetFanSpeed_v2Func func(device nvml.Device, n1 int, n2 int) nvml.Return + DeviceSetFanSpeed_v2Func func(device nvml.Device, n1 int, n2 int) error // DeviceSetGpcClkVfOffsetFunc mocks the DeviceSetGpcClkVfOffset method. - DeviceSetGpcClkVfOffsetFunc func(device nvml.Device, n int) nvml.Return + DeviceSetGpcClkVfOffsetFunc func(device nvml.Device, n int) error // DeviceSetGpuLockedClocksFunc mocks the DeviceSetGpuLockedClocks method. - DeviceSetGpuLockedClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return + DeviceSetGpuLockedClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) error // DeviceSetGpuOperationModeFunc mocks the DeviceSetGpuOperationMode method. - DeviceSetGpuOperationModeFunc func(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) nvml.Return + DeviceSetGpuOperationModeFunc func(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) error // DeviceSetMemClkVfOffsetFunc mocks the DeviceSetMemClkVfOffset method. - DeviceSetMemClkVfOffsetFunc func(device nvml.Device, n int) nvml.Return + DeviceSetMemClkVfOffsetFunc func(device nvml.Device, n int) error // DeviceSetMemoryLockedClocksFunc mocks the DeviceSetMemoryLockedClocks method. - DeviceSetMemoryLockedClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return + DeviceSetMemoryLockedClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) error // DeviceSetMigModeFunc mocks the DeviceSetMigMode method. - DeviceSetMigModeFunc func(device nvml.Device, n int) (nvml.Return, nvml.Return) + DeviceSetMigModeFunc func(device nvml.Device, n int) (error, error) // DeviceSetNvLinkDeviceLowPowerThresholdFunc mocks the DeviceSetNvLinkDeviceLowPowerThreshold method. - DeviceSetNvLinkDeviceLowPowerThresholdFunc func(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return + DeviceSetNvLinkDeviceLowPowerThresholdFunc func(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) error // DeviceSetNvLinkUtilizationControlFunc mocks the DeviceSetNvLinkUtilizationControl method. - DeviceSetNvLinkUtilizationControlFunc func(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return + DeviceSetNvLinkUtilizationControlFunc func(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) error // DeviceSetPersistenceModeFunc mocks the DeviceSetPersistenceMode method. - DeviceSetPersistenceModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return + DeviceSetPersistenceModeFunc func(device nvml.Device, enableState nvml.EnableState) error // DeviceSetPowerManagementLimitFunc mocks the DeviceSetPowerManagementLimit method. - DeviceSetPowerManagementLimitFunc func(device nvml.Device, v uint32) nvml.Return + DeviceSetPowerManagementLimitFunc func(device nvml.Device, v uint32) error // DeviceSetPowerManagementLimit_v2Func mocks the DeviceSetPowerManagementLimit_v2 method. - DeviceSetPowerManagementLimit_v2Func func(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) nvml.Return + DeviceSetPowerManagementLimit_v2Func func(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) error // DeviceSetTemperatureThresholdFunc mocks the DeviceSetTemperatureThreshold method. - DeviceSetTemperatureThresholdFunc func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return + DeviceSetTemperatureThresholdFunc func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) error // DeviceSetVgpuCapabilitiesFunc mocks the DeviceSetVgpuCapabilities method. - DeviceSetVgpuCapabilitiesFunc func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return + DeviceSetVgpuCapabilitiesFunc func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) error // DeviceSetVgpuHeterogeneousModeFunc mocks the DeviceSetVgpuHeterogeneousMode method. - DeviceSetVgpuHeterogeneousModeFunc func(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return + DeviceSetVgpuHeterogeneousModeFunc func(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) error // DeviceSetVgpuSchedulerStateFunc mocks the DeviceSetVgpuSchedulerState method. - DeviceSetVgpuSchedulerStateFunc func(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return + DeviceSetVgpuSchedulerStateFunc func(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) error // DeviceSetVirtualizationModeFunc mocks the DeviceSetVirtualizationMode method. - DeviceSetVirtualizationModeFunc func(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return + DeviceSetVirtualizationModeFunc func(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) error // DeviceValidateInforomFunc mocks the DeviceValidateInforom method. - DeviceValidateInforomFunc func(device nvml.Device) nvml.Return + DeviceValidateInforomFunc func(device nvml.Device) error // ErrorStringFunc mocks the ErrorString method. ErrorStringFunc func(returnMoqParam nvml.Return) string // EventSetCreateFunc mocks the EventSetCreate method. - EventSetCreateFunc func() (nvml.EventSet, nvml.Return) + EventSetCreateFunc func() (nvml.EventSet, error) // EventSetFreeFunc mocks the EventSetFree method. - EventSetFreeFunc func(eventSet nvml.EventSet) nvml.Return + EventSetFreeFunc func(eventSet nvml.EventSet) error // EventSetWaitFunc mocks the EventSetWait method. - EventSetWaitFunc func(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) + EventSetWaitFunc func(eventSet nvml.EventSet, v uint32) (nvml.EventData, error) // ExtensionsFunc mocks the Extensions method. ExtensionsFunc func() nvml.ExtendedInterface // GetExcludedDeviceCountFunc mocks the GetExcludedDeviceCount method. - GetExcludedDeviceCountFunc func() (int, nvml.Return) + GetExcludedDeviceCountFunc func() (int, error) // GetExcludedDeviceInfoByIndexFunc mocks the GetExcludedDeviceInfoByIndex method. - GetExcludedDeviceInfoByIndexFunc func(n int) (nvml.ExcludedDeviceInfo, nvml.Return) + GetExcludedDeviceInfoByIndexFunc func(n int) (nvml.ExcludedDeviceInfo, error) // GetVgpuCompatibilityFunc mocks the GetVgpuCompatibility method. - GetVgpuCompatibilityFunc func(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, nvml.Return) + GetVgpuCompatibilityFunc func(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, error) // GetVgpuDriverCapabilitiesFunc mocks the GetVgpuDriverCapabilities method. - GetVgpuDriverCapabilitiesFunc func(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, nvml.Return) + GetVgpuDriverCapabilitiesFunc func(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, error) // GetVgpuVersionFunc mocks the GetVgpuVersion method. - GetVgpuVersionFunc func() (nvml.VgpuVersion, nvml.VgpuVersion, nvml.Return) + GetVgpuVersionFunc func() (nvml.VgpuVersion, nvml.VgpuVersion, error) // GpmMetricsGetFunc mocks the GpmMetricsGet method. - GpmMetricsGetFunc func(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.Return + GpmMetricsGetFunc func(gpmMetricsGetType *nvml.GpmMetricsGetType) error // GpmMetricsGetVFunc mocks the GpmMetricsGetV method. GpmMetricsGetVFunc func(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.GpmMetricsGetVType // GpmMigSampleGetFunc mocks the GpmMigSampleGet method. - GpmMigSampleGetFunc func(device nvml.Device, n int, gpmSample nvml.GpmSample) nvml.Return + GpmMigSampleGetFunc func(device nvml.Device, n int, gpmSample nvml.GpmSample) error // GpmQueryDeviceSupportFunc mocks the GpmQueryDeviceSupport method. - GpmQueryDeviceSupportFunc func(device nvml.Device) (nvml.GpmSupport, nvml.Return) + GpmQueryDeviceSupportFunc func(device nvml.Device) (nvml.GpmSupport, error) // GpmQueryDeviceSupportVFunc mocks the GpmQueryDeviceSupportV method. GpmQueryDeviceSupportVFunc func(device nvml.Device) nvml.GpmSupportV // GpmQueryIfStreamingEnabledFunc mocks the GpmQueryIfStreamingEnabled method. - GpmQueryIfStreamingEnabledFunc func(device nvml.Device) (uint32, nvml.Return) + GpmQueryIfStreamingEnabledFunc func(device nvml.Device) (uint32, error) // GpmSampleAllocFunc mocks the GpmSampleAlloc method. - GpmSampleAllocFunc func() (nvml.GpmSample, nvml.Return) + GpmSampleAllocFunc func() (nvml.GpmSample, error) // GpmSampleFreeFunc mocks the GpmSampleFree method. - GpmSampleFreeFunc func(gpmSample nvml.GpmSample) nvml.Return + GpmSampleFreeFunc func(gpmSample nvml.GpmSample) error // GpmSampleGetFunc mocks the GpmSampleGet method. - GpmSampleGetFunc func(device nvml.Device, gpmSample nvml.GpmSample) nvml.Return + GpmSampleGetFunc func(device nvml.Device, gpmSample nvml.GpmSample) error // GpmSetStreamingEnabledFunc mocks the GpmSetStreamingEnabled method. - GpmSetStreamingEnabledFunc func(device nvml.Device, v uint32) nvml.Return + GpmSetStreamingEnabledFunc func(device nvml.Device, v uint32) error // GpuInstanceCreateComputeInstanceFunc mocks the GpuInstanceCreateComputeInstance method. - GpuInstanceCreateComputeInstanceFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) + GpuInstanceCreateComputeInstanceFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, error) // GpuInstanceCreateComputeInstanceWithPlacementFunc mocks the GpuInstanceCreateComputeInstanceWithPlacement method. - GpuInstanceCreateComputeInstanceWithPlacementFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) + GpuInstanceCreateComputeInstanceWithPlacementFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, error) // GpuInstanceDestroyFunc mocks the GpuInstanceDestroy method. - GpuInstanceDestroyFunc func(gpuInstance nvml.GpuInstance) nvml.Return + GpuInstanceDestroyFunc func(gpuInstance nvml.GpuInstance) error // GpuInstanceGetComputeInstanceByIdFunc mocks the GpuInstanceGetComputeInstanceById method. - GpuInstanceGetComputeInstanceByIdFunc func(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) + GpuInstanceGetComputeInstanceByIdFunc func(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, error) // GpuInstanceGetComputeInstancePossiblePlacementsFunc mocks the GpuInstanceGetComputeInstancePossiblePlacements method. - GpuInstanceGetComputeInstancePossiblePlacementsFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) + GpuInstanceGetComputeInstancePossiblePlacementsFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, error) // GpuInstanceGetComputeInstanceProfileInfoFunc mocks the GpuInstanceGetComputeInstanceProfileInfo method. - GpuInstanceGetComputeInstanceProfileInfoFunc func(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) + GpuInstanceGetComputeInstanceProfileInfoFunc func(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, error) // GpuInstanceGetComputeInstanceProfileInfoVFunc mocks the GpuInstanceGetComputeInstanceProfileInfoV method. GpuInstanceGetComputeInstanceProfileInfoVFunc func(gpuInstance nvml.GpuInstance, n1 int, n2 int) nvml.ComputeInstanceProfileInfoHandler // GpuInstanceGetComputeInstanceRemainingCapacityFunc mocks the GpuInstanceGetComputeInstanceRemainingCapacity method. - GpuInstanceGetComputeInstanceRemainingCapacityFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, nvml.Return) + GpuInstanceGetComputeInstanceRemainingCapacityFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, error) // GpuInstanceGetComputeInstancesFunc mocks the GpuInstanceGetComputeInstances method. - GpuInstanceGetComputeInstancesFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) + GpuInstanceGetComputeInstancesFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, error) // GpuInstanceGetInfoFunc mocks the GpuInstanceGetInfo method. - GpuInstanceGetInfoFunc func(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) + GpuInstanceGetInfoFunc func(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, error) // InitFunc mocks the Init method. - InitFunc func() nvml.Return + InitFunc func() error // InitWithFlagsFunc mocks the InitWithFlags method. - InitWithFlagsFunc func(v uint32) nvml.Return + InitWithFlagsFunc func(v uint32) error // SetVgpuVersionFunc mocks the SetVgpuVersion method. - SetVgpuVersionFunc func(vgpuVersion *nvml.VgpuVersion) nvml.Return + SetVgpuVersionFunc func(vgpuVersion *nvml.VgpuVersion) error // ShutdownFunc mocks the Shutdown method. - ShutdownFunc func() nvml.Return + ShutdownFunc func() error // SystemGetConfComputeCapabilitiesFunc mocks the SystemGetConfComputeCapabilities method. - SystemGetConfComputeCapabilitiesFunc func() (nvml.ConfComputeSystemCaps, nvml.Return) + SystemGetConfComputeCapabilitiesFunc func() (nvml.ConfComputeSystemCaps, error) // SystemGetConfComputeKeyRotationThresholdInfoFunc mocks the SystemGetConfComputeKeyRotationThresholdInfo method. - SystemGetConfComputeKeyRotationThresholdInfoFunc func() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) + SystemGetConfComputeKeyRotationThresholdInfoFunc func() (nvml.ConfComputeGetKeyRotationThresholdInfo, error) // SystemGetConfComputeSettingsFunc mocks the SystemGetConfComputeSettings method. - SystemGetConfComputeSettingsFunc func() (nvml.SystemConfComputeSettings, nvml.Return) + SystemGetConfComputeSettingsFunc func() (nvml.SystemConfComputeSettings, error) // SystemGetCudaDriverVersionFunc mocks the SystemGetCudaDriverVersion method. - SystemGetCudaDriverVersionFunc func() (int, nvml.Return) + SystemGetCudaDriverVersionFunc func() (int, error) // SystemGetCudaDriverVersion_v2Func mocks the SystemGetCudaDriverVersion_v2 method. - SystemGetCudaDriverVersion_v2Func func() (int, nvml.Return) + SystemGetCudaDriverVersion_v2Func func() (int, error) // SystemGetDriverVersionFunc mocks the SystemGetDriverVersion method. - SystemGetDriverVersionFunc func() (string, nvml.Return) + SystemGetDriverVersionFunc func() (string, error) // SystemGetHicVersionFunc mocks the SystemGetHicVersion method. - SystemGetHicVersionFunc func() ([]nvml.HwbcEntry, nvml.Return) + SystemGetHicVersionFunc func() ([]nvml.HwbcEntry, error) // SystemGetNVMLVersionFunc mocks the SystemGetNVMLVersion method. - SystemGetNVMLVersionFunc func() (string, nvml.Return) + SystemGetNVMLVersionFunc func() (string, error) // SystemGetProcessNameFunc mocks the SystemGetProcessName method. - SystemGetProcessNameFunc func(n int) (string, nvml.Return) + SystemGetProcessNameFunc func(n int) (string, error) // SystemGetTopologyGpuSetFunc mocks the SystemGetTopologyGpuSet method. - SystemGetTopologyGpuSetFunc func(n int) ([]nvml.Device, nvml.Return) + SystemGetTopologyGpuSetFunc func(n int) ([]nvml.Device, error) // SystemSetConfComputeKeyRotationThresholdInfoFunc mocks the SystemSetConfComputeKeyRotationThresholdInfo method. - SystemSetConfComputeKeyRotationThresholdInfoFunc func(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return + SystemSetConfComputeKeyRotationThresholdInfoFunc func(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) error // UnitGetCountFunc mocks the UnitGetCount method. - UnitGetCountFunc func() (int, nvml.Return) + UnitGetCountFunc func() (int, error) // UnitGetDevicesFunc mocks the UnitGetDevices method. - UnitGetDevicesFunc func(unit nvml.Unit) ([]nvml.Device, nvml.Return) + UnitGetDevicesFunc func(unit nvml.Unit) ([]nvml.Device, error) // UnitGetFanSpeedInfoFunc mocks the UnitGetFanSpeedInfo method. - UnitGetFanSpeedInfoFunc func(unit nvml.Unit) (nvml.UnitFanSpeeds, nvml.Return) + UnitGetFanSpeedInfoFunc func(unit nvml.Unit) (nvml.UnitFanSpeeds, error) // UnitGetHandleByIndexFunc mocks the UnitGetHandleByIndex method. - UnitGetHandleByIndexFunc func(n int) (nvml.Unit, nvml.Return) + UnitGetHandleByIndexFunc func(n int) (nvml.Unit, error) // UnitGetLedStateFunc mocks the UnitGetLedState method. - UnitGetLedStateFunc func(unit nvml.Unit) (nvml.LedState, nvml.Return) + UnitGetLedStateFunc func(unit nvml.Unit) (nvml.LedState, error) // UnitGetPsuInfoFunc mocks the UnitGetPsuInfo method. - UnitGetPsuInfoFunc func(unit nvml.Unit) (nvml.PSUInfo, nvml.Return) + UnitGetPsuInfoFunc func(unit nvml.Unit) (nvml.PSUInfo, error) // UnitGetTemperatureFunc mocks the UnitGetTemperature method. - UnitGetTemperatureFunc func(unit nvml.Unit, n int) (uint32, nvml.Return) + UnitGetTemperatureFunc func(unit nvml.Unit, n int) (uint32, error) // UnitGetUnitInfoFunc mocks the UnitGetUnitInfo method. - UnitGetUnitInfoFunc func(unit nvml.Unit) (nvml.UnitInfo, nvml.Return) + UnitGetUnitInfoFunc func(unit nvml.Unit) (nvml.UnitInfo, error) // UnitSetLedStateFunc mocks the UnitSetLedState method. - UnitSetLedStateFunc func(unit nvml.Unit, ledColor nvml.LedColor) nvml.Return + UnitSetLedStateFunc func(unit nvml.Unit, ledColor nvml.LedColor) error // VgpuInstanceClearAccountingPidsFunc mocks the VgpuInstanceClearAccountingPids method. - VgpuInstanceClearAccountingPidsFunc func(vgpuInstance nvml.VgpuInstance) nvml.Return + VgpuInstanceClearAccountingPidsFunc func(vgpuInstance nvml.VgpuInstance) error // VgpuInstanceGetAccountingModeFunc mocks the VgpuInstanceGetAccountingMode method. - VgpuInstanceGetAccountingModeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) + VgpuInstanceGetAccountingModeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, error) // VgpuInstanceGetAccountingPidsFunc mocks the VgpuInstanceGetAccountingPids method. - VgpuInstanceGetAccountingPidsFunc func(vgpuInstance nvml.VgpuInstance) ([]int, nvml.Return) + VgpuInstanceGetAccountingPidsFunc func(vgpuInstance nvml.VgpuInstance) ([]int, error) // VgpuInstanceGetAccountingStatsFunc mocks the VgpuInstanceGetAccountingStats method. - VgpuInstanceGetAccountingStatsFunc func(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, nvml.Return) + VgpuInstanceGetAccountingStatsFunc func(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, error) // VgpuInstanceGetEccModeFunc mocks the VgpuInstanceGetEccMode method. - VgpuInstanceGetEccModeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) + VgpuInstanceGetEccModeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, error) // VgpuInstanceGetEncoderCapacityFunc mocks the VgpuInstanceGetEncoderCapacity method. - VgpuInstanceGetEncoderCapacityFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) + VgpuInstanceGetEncoderCapacityFunc func(vgpuInstance nvml.VgpuInstance) (int, error) // VgpuInstanceGetEncoderSessionsFunc mocks the VgpuInstanceGetEncoderSessions method. - VgpuInstanceGetEncoderSessionsFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, nvml.Return) + VgpuInstanceGetEncoderSessionsFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, error) // VgpuInstanceGetEncoderStatsFunc mocks the VgpuInstanceGetEncoderStats method. - VgpuInstanceGetEncoderStatsFunc func(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, nvml.Return) + VgpuInstanceGetEncoderStatsFunc func(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, error) // VgpuInstanceGetFBCSessionsFunc mocks the VgpuInstanceGetFBCSessions method. - VgpuInstanceGetFBCSessionsFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, nvml.Return) + VgpuInstanceGetFBCSessionsFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, error) // VgpuInstanceGetFBCStatsFunc mocks the VgpuInstanceGetFBCStats method. - VgpuInstanceGetFBCStatsFunc func(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, nvml.Return) + VgpuInstanceGetFBCStatsFunc func(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, error) // VgpuInstanceGetFbUsageFunc mocks the VgpuInstanceGetFbUsage method. - VgpuInstanceGetFbUsageFunc func(vgpuInstance nvml.VgpuInstance) (uint64, nvml.Return) + VgpuInstanceGetFbUsageFunc func(vgpuInstance nvml.VgpuInstance) (uint64, error) // VgpuInstanceGetFrameRateLimitFunc mocks the VgpuInstanceGetFrameRateLimit method. - VgpuInstanceGetFrameRateLimitFunc func(vgpuInstance nvml.VgpuInstance) (uint32, nvml.Return) + VgpuInstanceGetFrameRateLimitFunc func(vgpuInstance nvml.VgpuInstance) (uint32, error) // VgpuInstanceGetGpuInstanceIdFunc mocks the VgpuInstanceGetGpuInstanceId method. - VgpuInstanceGetGpuInstanceIdFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) + VgpuInstanceGetGpuInstanceIdFunc func(vgpuInstance nvml.VgpuInstance) (int, error) // VgpuInstanceGetGpuPciIdFunc mocks the VgpuInstanceGetGpuPciId method. - VgpuInstanceGetGpuPciIdFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) + VgpuInstanceGetGpuPciIdFunc func(vgpuInstance nvml.VgpuInstance) (string, error) // VgpuInstanceGetLicenseInfoFunc mocks the VgpuInstanceGetLicenseInfo method. - VgpuInstanceGetLicenseInfoFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, nvml.Return) + VgpuInstanceGetLicenseInfoFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, error) // VgpuInstanceGetLicenseStatusFunc mocks the VgpuInstanceGetLicenseStatus method. - VgpuInstanceGetLicenseStatusFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) + VgpuInstanceGetLicenseStatusFunc func(vgpuInstance nvml.VgpuInstance) (int, error) // VgpuInstanceGetMdevUUIDFunc mocks the VgpuInstanceGetMdevUUID method. - VgpuInstanceGetMdevUUIDFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) + VgpuInstanceGetMdevUUIDFunc func(vgpuInstance nvml.VgpuInstance) (string, error) // VgpuInstanceGetMetadataFunc mocks the VgpuInstanceGetMetadata method. - VgpuInstanceGetMetadataFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) + VgpuInstanceGetMetadataFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, error) // VgpuInstanceGetTypeFunc mocks the VgpuInstanceGetType method. - VgpuInstanceGetTypeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) + VgpuInstanceGetTypeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, error) // VgpuInstanceGetUUIDFunc mocks the VgpuInstanceGetUUID method. - VgpuInstanceGetUUIDFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) + VgpuInstanceGetUUIDFunc func(vgpuInstance nvml.VgpuInstance) (string, error) // VgpuInstanceGetVmDriverVersionFunc mocks the VgpuInstanceGetVmDriverVersion method. - VgpuInstanceGetVmDriverVersionFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) + VgpuInstanceGetVmDriverVersionFunc func(vgpuInstance nvml.VgpuInstance) (string, error) // VgpuInstanceGetVmIDFunc mocks the VgpuInstanceGetVmID method. - VgpuInstanceGetVmIDFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, nvml.Return) + VgpuInstanceGetVmIDFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, error) // VgpuInstanceSetEncoderCapacityFunc mocks the VgpuInstanceSetEncoderCapacity method. - VgpuInstanceSetEncoderCapacityFunc func(vgpuInstance nvml.VgpuInstance, n int) nvml.Return + VgpuInstanceSetEncoderCapacityFunc func(vgpuInstance nvml.VgpuInstance, n int) error // VgpuTypeGetCapabilitiesFunc mocks the VgpuTypeGetCapabilities method. - VgpuTypeGetCapabilitiesFunc func(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) + VgpuTypeGetCapabilitiesFunc func(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, error) // VgpuTypeGetClassFunc mocks the VgpuTypeGetClass method. - VgpuTypeGetClassFunc func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) + VgpuTypeGetClassFunc func(vgpuTypeId nvml.VgpuTypeId) (string, error) // VgpuTypeGetDeviceIDFunc mocks the VgpuTypeGetDeviceID method. - VgpuTypeGetDeviceIDFunc func(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, nvml.Return) + VgpuTypeGetDeviceIDFunc func(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, error) // VgpuTypeGetFrameRateLimitFunc mocks the VgpuTypeGetFrameRateLimit method. - VgpuTypeGetFrameRateLimitFunc func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) + VgpuTypeGetFrameRateLimitFunc func(vgpuTypeId nvml.VgpuTypeId) (uint32, error) // VgpuTypeGetFramebufferSizeFunc mocks the VgpuTypeGetFramebufferSize method. - VgpuTypeGetFramebufferSizeFunc func(vgpuTypeId nvml.VgpuTypeId) (uint64, nvml.Return) + VgpuTypeGetFramebufferSizeFunc func(vgpuTypeId nvml.VgpuTypeId) (uint64, error) // VgpuTypeGetGpuInstanceProfileIdFunc mocks the VgpuTypeGetGpuInstanceProfileId method. - VgpuTypeGetGpuInstanceProfileIdFunc func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) + VgpuTypeGetGpuInstanceProfileIdFunc func(vgpuTypeId nvml.VgpuTypeId) (uint32, error) // VgpuTypeGetLicenseFunc mocks the VgpuTypeGetLicense method. - VgpuTypeGetLicenseFunc func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) + VgpuTypeGetLicenseFunc func(vgpuTypeId nvml.VgpuTypeId) (string, error) // VgpuTypeGetMaxInstancesFunc mocks the VgpuTypeGetMaxInstances method. - VgpuTypeGetMaxInstancesFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) + VgpuTypeGetMaxInstancesFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, error) // VgpuTypeGetMaxInstancesPerVmFunc mocks the VgpuTypeGetMaxInstancesPerVm method. - VgpuTypeGetMaxInstancesPerVmFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) + VgpuTypeGetMaxInstancesPerVmFunc func(vgpuTypeId nvml.VgpuTypeId) (int, error) // VgpuTypeGetNameFunc mocks the VgpuTypeGetName method. - VgpuTypeGetNameFunc func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) + VgpuTypeGetNameFunc func(vgpuTypeId nvml.VgpuTypeId) (string, error) // VgpuTypeGetNumDisplayHeadsFunc mocks the VgpuTypeGetNumDisplayHeads method. - VgpuTypeGetNumDisplayHeadsFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) + VgpuTypeGetNumDisplayHeadsFunc func(vgpuTypeId nvml.VgpuTypeId) (int, error) // VgpuTypeGetResolutionFunc mocks the VgpuTypeGetResolution method. - VgpuTypeGetResolutionFunc func(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, nvml.Return) + VgpuTypeGetResolutionFunc func(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, error) // calls tracks calls to the methods. calls struct { @@ -4147,7 +4147,7 @@ type Interface struct { } // ComputeInstanceDestroy calls ComputeInstanceDestroyFunc. -func (mock *Interface) ComputeInstanceDestroy(computeInstance nvml.ComputeInstance) nvml.Return { +func (mock *Interface) ComputeInstanceDestroy(computeInstance nvml.ComputeInstance) error { if mock.ComputeInstanceDestroyFunc == nil { panic("Interface.ComputeInstanceDestroyFunc: method is nil but Interface.ComputeInstanceDestroy was just called") } @@ -4179,7 +4179,7 @@ func (mock *Interface) ComputeInstanceDestroyCalls() []struct { } // ComputeInstanceGetInfo calls ComputeInstanceGetInfoFunc. -func (mock *Interface) ComputeInstanceGetInfo(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, nvml.Return) { +func (mock *Interface) ComputeInstanceGetInfo(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, error) { if mock.ComputeInstanceGetInfoFunc == nil { panic("Interface.ComputeInstanceGetInfoFunc: method is nil but Interface.ComputeInstanceGetInfo was just called") } @@ -4211,7 +4211,7 @@ func (mock *Interface) ComputeInstanceGetInfoCalls() []struct { } // DeviceClearAccountingPids calls DeviceClearAccountingPidsFunc. -func (mock *Interface) DeviceClearAccountingPids(device nvml.Device) nvml.Return { +func (mock *Interface) DeviceClearAccountingPids(device nvml.Device) error { if mock.DeviceClearAccountingPidsFunc == nil { panic("Interface.DeviceClearAccountingPidsFunc: method is nil but Interface.DeviceClearAccountingPids was just called") } @@ -4243,7 +4243,7 @@ func (mock *Interface) DeviceClearAccountingPidsCalls() []struct { } // DeviceClearCpuAffinity calls DeviceClearCpuAffinityFunc. -func (mock *Interface) DeviceClearCpuAffinity(device nvml.Device) nvml.Return { +func (mock *Interface) DeviceClearCpuAffinity(device nvml.Device) error { if mock.DeviceClearCpuAffinityFunc == nil { panic("Interface.DeviceClearCpuAffinityFunc: method is nil but Interface.DeviceClearCpuAffinity was just called") } @@ -4275,7 +4275,7 @@ func (mock *Interface) DeviceClearCpuAffinityCalls() []struct { } // DeviceClearEccErrorCounts calls DeviceClearEccErrorCountsFunc. -func (mock *Interface) DeviceClearEccErrorCounts(device nvml.Device, eccCounterType nvml.EccCounterType) nvml.Return { +func (mock *Interface) DeviceClearEccErrorCounts(device nvml.Device, eccCounterType nvml.EccCounterType) error { if mock.DeviceClearEccErrorCountsFunc == nil { panic("Interface.DeviceClearEccErrorCountsFunc: method is nil but Interface.DeviceClearEccErrorCounts was just called") } @@ -4311,7 +4311,7 @@ func (mock *Interface) DeviceClearEccErrorCountsCalls() []struct { } // DeviceClearFieldValues calls DeviceClearFieldValuesFunc. -func (mock *Interface) DeviceClearFieldValues(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { +func (mock *Interface) DeviceClearFieldValues(device nvml.Device, fieldValues []nvml.FieldValue) error { if mock.DeviceClearFieldValuesFunc == nil { panic("Interface.DeviceClearFieldValuesFunc: method is nil but Interface.DeviceClearFieldValues was just called") } @@ -4347,7 +4347,7 @@ func (mock *Interface) DeviceClearFieldValuesCalls() []struct { } // DeviceCreateGpuInstance calls DeviceCreateGpuInstanceFunc. -func (mock *Interface) DeviceCreateGpuInstance(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { +func (mock *Interface) DeviceCreateGpuInstance(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, error) { if mock.DeviceCreateGpuInstanceFunc == nil { panic("Interface.DeviceCreateGpuInstanceFunc: method is nil but Interface.DeviceCreateGpuInstance was just called") } @@ -4383,7 +4383,7 @@ func (mock *Interface) DeviceCreateGpuInstanceCalls() []struct { } // DeviceCreateGpuInstanceWithPlacement calls DeviceCreateGpuInstanceWithPlacementFunc. -func (mock *Interface) DeviceCreateGpuInstanceWithPlacement(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { +func (mock *Interface) DeviceCreateGpuInstanceWithPlacement(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, error) { if mock.DeviceCreateGpuInstanceWithPlacementFunc == nil { panic("Interface.DeviceCreateGpuInstanceWithPlacementFunc: method is nil but Interface.DeviceCreateGpuInstanceWithPlacement was just called") } @@ -4423,7 +4423,7 @@ func (mock *Interface) DeviceCreateGpuInstanceWithPlacementCalls() []struct { } // DeviceDiscoverGpus calls DeviceDiscoverGpusFunc. -func (mock *Interface) DeviceDiscoverGpus() (nvml.PciInfo, nvml.Return) { +func (mock *Interface) DeviceDiscoverGpus() (nvml.PciInfo, error) { if mock.DeviceDiscoverGpusFunc == nil { panic("Interface.DeviceDiscoverGpusFunc: method is nil but Interface.DeviceDiscoverGpus was just called") } @@ -4450,7 +4450,7 @@ func (mock *Interface) DeviceDiscoverGpusCalls() []struct { } // DeviceFreezeNvLinkUtilizationCounter calls DeviceFreezeNvLinkUtilizationCounterFunc. -func (mock *Interface) DeviceFreezeNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) nvml.Return { +func (mock *Interface) DeviceFreezeNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) error { if mock.DeviceFreezeNvLinkUtilizationCounterFunc == nil { panic("Interface.DeviceFreezeNvLinkUtilizationCounterFunc: method is nil but Interface.DeviceFreezeNvLinkUtilizationCounter was just called") } @@ -4494,7 +4494,7 @@ func (mock *Interface) DeviceFreezeNvLinkUtilizationCounterCalls() []struct { } // DeviceGetAPIRestriction calls DeviceGetAPIRestrictionFunc. -func (mock *Interface) DeviceGetAPIRestriction(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetAPIRestriction(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, error) { if mock.DeviceGetAPIRestrictionFunc == nil { panic("Interface.DeviceGetAPIRestrictionFunc: method is nil but Interface.DeviceGetAPIRestriction was just called") } @@ -4530,7 +4530,7 @@ func (mock *Interface) DeviceGetAPIRestrictionCalls() []struct { } // DeviceGetAccountingBufferSize calls DeviceGetAccountingBufferSizeFunc. -func (mock *Interface) DeviceGetAccountingBufferSize(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetAccountingBufferSize(device nvml.Device) (int, error) { if mock.DeviceGetAccountingBufferSizeFunc == nil { panic("Interface.DeviceGetAccountingBufferSizeFunc: method is nil but Interface.DeviceGetAccountingBufferSize was just called") } @@ -4562,7 +4562,7 @@ func (mock *Interface) DeviceGetAccountingBufferSizeCalls() []struct { } // DeviceGetAccountingMode calls DeviceGetAccountingModeFunc. -func (mock *Interface) DeviceGetAccountingMode(device nvml.Device) (nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetAccountingMode(device nvml.Device) (nvml.EnableState, error) { if mock.DeviceGetAccountingModeFunc == nil { panic("Interface.DeviceGetAccountingModeFunc: method is nil but Interface.DeviceGetAccountingMode was just called") } @@ -4594,7 +4594,7 @@ func (mock *Interface) DeviceGetAccountingModeCalls() []struct { } // DeviceGetAccountingPids calls DeviceGetAccountingPidsFunc. -func (mock *Interface) DeviceGetAccountingPids(device nvml.Device) ([]int, nvml.Return) { +func (mock *Interface) DeviceGetAccountingPids(device nvml.Device) ([]int, error) { if mock.DeviceGetAccountingPidsFunc == nil { panic("Interface.DeviceGetAccountingPidsFunc: method is nil but Interface.DeviceGetAccountingPids was just called") } @@ -4626,7 +4626,7 @@ func (mock *Interface) DeviceGetAccountingPidsCalls() []struct { } // DeviceGetAccountingStats calls DeviceGetAccountingStatsFunc. -func (mock *Interface) DeviceGetAccountingStats(device nvml.Device, v uint32) (nvml.AccountingStats, nvml.Return) { +func (mock *Interface) DeviceGetAccountingStats(device nvml.Device, v uint32) (nvml.AccountingStats, error) { if mock.DeviceGetAccountingStatsFunc == nil { panic("Interface.DeviceGetAccountingStatsFunc: method is nil but Interface.DeviceGetAccountingStats was just called") } @@ -4662,7 +4662,7 @@ func (mock *Interface) DeviceGetAccountingStatsCalls() []struct { } // DeviceGetActiveVgpus calls DeviceGetActiveVgpusFunc. -func (mock *Interface) DeviceGetActiveVgpus(device nvml.Device) ([]nvml.VgpuInstance, nvml.Return) { +func (mock *Interface) DeviceGetActiveVgpus(device nvml.Device) ([]nvml.VgpuInstance, error) { if mock.DeviceGetActiveVgpusFunc == nil { panic("Interface.DeviceGetActiveVgpusFunc: method is nil but Interface.DeviceGetActiveVgpus was just called") } @@ -4694,7 +4694,7 @@ func (mock *Interface) DeviceGetActiveVgpusCalls() []struct { } // DeviceGetAdaptiveClockInfoStatus calls DeviceGetAdaptiveClockInfoStatusFunc. -func (mock *Interface) DeviceGetAdaptiveClockInfoStatus(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetAdaptiveClockInfoStatus(device nvml.Device) (uint32, error) { if mock.DeviceGetAdaptiveClockInfoStatusFunc == nil { panic("Interface.DeviceGetAdaptiveClockInfoStatusFunc: method is nil but Interface.DeviceGetAdaptiveClockInfoStatus was just called") } @@ -4726,7 +4726,7 @@ func (mock *Interface) DeviceGetAdaptiveClockInfoStatusCalls() []struct { } // DeviceGetApplicationsClock calls DeviceGetApplicationsClockFunc. -func (mock *Interface) DeviceGetApplicationsClock(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetApplicationsClock(device nvml.Device, clockType nvml.ClockType) (uint32, error) { if mock.DeviceGetApplicationsClockFunc == nil { panic("Interface.DeviceGetApplicationsClockFunc: method is nil but Interface.DeviceGetApplicationsClock was just called") } @@ -4762,7 +4762,7 @@ func (mock *Interface) DeviceGetApplicationsClockCalls() []struct { } // DeviceGetArchitecture calls DeviceGetArchitectureFunc. -func (mock *Interface) DeviceGetArchitecture(device nvml.Device) (nvml.DeviceArchitecture, nvml.Return) { +func (mock *Interface) DeviceGetArchitecture(device nvml.Device) (nvml.DeviceArchitecture, error) { if mock.DeviceGetArchitectureFunc == nil { panic("Interface.DeviceGetArchitectureFunc: method is nil but Interface.DeviceGetArchitecture was just called") } @@ -4794,7 +4794,7 @@ func (mock *Interface) DeviceGetArchitectureCalls() []struct { } // DeviceGetAttributes calls DeviceGetAttributesFunc. -func (mock *Interface) DeviceGetAttributes(device nvml.Device) (nvml.DeviceAttributes, nvml.Return) { +func (mock *Interface) DeviceGetAttributes(device nvml.Device) (nvml.DeviceAttributes, error) { if mock.DeviceGetAttributesFunc == nil { panic("Interface.DeviceGetAttributesFunc: method is nil but Interface.DeviceGetAttributes was just called") } @@ -4826,7 +4826,7 @@ func (mock *Interface) DeviceGetAttributesCalls() []struct { } // DeviceGetAutoBoostedClocksEnabled calls DeviceGetAutoBoostedClocksEnabledFunc. -func (mock *Interface) DeviceGetAutoBoostedClocksEnabled(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetAutoBoostedClocksEnabled(device nvml.Device) (nvml.EnableState, nvml.EnableState, error) { if mock.DeviceGetAutoBoostedClocksEnabledFunc == nil { panic("Interface.DeviceGetAutoBoostedClocksEnabledFunc: method is nil but Interface.DeviceGetAutoBoostedClocksEnabled was just called") } @@ -4858,7 +4858,7 @@ func (mock *Interface) DeviceGetAutoBoostedClocksEnabledCalls() []struct { } // DeviceGetBAR1MemoryInfo calls DeviceGetBAR1MemoryInfoFunc. -func (mock *Interface) DeviceGetBAR1MemoryInfo(device nvml.Device) (nvml.BAR1Memory, nvml.Return) { +func (mock *Interface) DeviceGetBAR1MemoryInfo(device nvml.Device) (nvml.BAR1Memory, error) { if mock.DeviceGetBAR1MemoryInfoFunc == nil { panic("Interface.DeviceGetBAR1MemoryInfoFunc: method is nil but Interface.DeviceGetBAR1MemoryInfo was just called") } @@ -4890,7 +4890,7 @@ func (mock *Interface) DeviceGetBAR1MemoryInfoCalls() []struct { } // DeviceGetBoardId calls DeviceGetBoardIdFunc. -func (mock *Interface) DeviceGetBoardId(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetBoardId(device nvml.Device) (uint32, error) { if mock.DeviceGetBoardIdFunc == nil { panic("Interface.DeviceGetBoardIdFunc: method is nil but Interface.DeviceGetBoardId was just called") } @@ -4922,7 +4922,7 @@ func (mock *Interface) DeviceGetBoardIdCalls() []struct { } // DeviceGetBoardPartNumber calls DeviceGetBoardPartNumberFunc. -func (mock *Interface) DeviceGetBoardPartNumber(device nvml.Device) (string, nvml.Return) { +func (mock *Interface) DeviceGetBoardPartNumber(device nvml.Device) (string, error) { if mock.DeviceGetBoardPartNumberFunc == nil { panic("Interface.DeviceGetBoardPartNumberFunc: method is nil but Interface.DeviceGetBoardPartNumber was just called") } @@ -4954,7 +4954,7 @@ func (mock *Interface) DeviceGetBoardPartNumberCalls() []struct { } // DeviceGetBrand calls DeviceGetBrandFunc. -func (mock *Interface) DeviceGetBrand(device nvml.Device) (nvml.BrandType, nvml.Return) { +func (mock *Interface) DeviceGetBrand(device nvml.Device) (nvml.BrandType, error) { if mock.DeviceGetBrandFunc == nil { panic("Interface.DeviceGetBrandFunc: method is nil but Interface.DeviceGetBrand was just called") } @@ -4986,7 +4986,7 @@ func (mock *Interface) DeviceGetBrandCalls() []struct { } // DeviceGetBridgeChipInfo calls DeviceGetBridgeChipInfoFunc. -func (mock *Interface) DeviceGetBridgeChipInfo(device nvml.Device) (nvml.BridgeChipHierarchy, nvml.Return) { +func (mock *Interface) DeviceGetBridgeChipInfo(device nvml.Device) (nvml.BridgeChipHierarchy, error) { if mock.DeviceGetBridgeChipInfoFunc == nil { panic("Interface.DeviceGetBridgeChipInfoFunc: method is nil but Interface.DeviceGetBridgeChipInfo was just called") } @@ -5018,7 +5018,7 @@ func (mock *Interface) DeviceGetBridgeChipInfoCalls() []struct { } // DeviceGetBusType calls DeviceGetBusTypeFunc. -func (mock *Interface) DeviceGetBusType(device nvml.Device) (nvml.BusType, nvml.Return) { +func (mock *Interface) DeviceGetBusType(device nvml.Device) (nvml.BusType, error) { if mock.DeviceGetBusTypeFunc == nil { panic("Interface.DeviceGetBusTypeFunc: method is nil but Interface.DeviceGetBusType was just called") } @@ -5082,7 +5082,7 @@ func (mock *Interface) DeviceGetC2cModeInfoVCalls() []struct { } // DeviceGetClkMonStatus calls DeviceGetClkMonStatusFunc. -func (mock *Interface) DeviceGetClkMonStatus(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) { +func (mock *Interface) DeviceGetClkMonStatus(device nvml.Device) (nvml.ClkMonStatus, error) { if mock.DeviceGetClkMonStatusFunc == nil { panic("Interface.DeviceGetClkMonStatusFunc: method is nil but Interface.DeviceGetClkMonStatus was just called") } @@ -5114,7 +5114,7 @@ func (mock *Interface) DeviceGetClkMonStatusCalls() []struct { } // DeviceGetClock calls DeviceGetClockFunc. -func (mock *Interface) DeviceGetClock(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetClock(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, error) { if mock.DeviceGetClockFunc == nil { panic("Interface.DeviceGetClockFunc: method is nil but Interface.DeviceGetClock was just called") } @@ -5154,7 +5154,7 @@ func (mock *Interface) DeviceGetClockCalls() []struct { } // DeviceGetClockInfo calls DeviceGetClockInfoFunc. -func (mock *Interface) DeviceGetClockInfo(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetClockInfo(device nvml.Device, clockType nvml.ClockType) (uint32, error) { if mock.DeviceGetClockInfoFunc == nil { panic("Interface.DeviceGetClockInfoFunc: method is nil but Interface.DeviceGetClockInfo was just called") } @@ -5190,7 +5190,7 @@ func (mock *Interface) DeviceGetClockInfoCalls() []struct { } // DeviceGetComputeInstanceId calls DeviceGetComputeInstanceIdFunc. -func (mock *Interface) DeviceGetComputeInstanceId(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetComputeInstanceId(device nvml.Device) (int, error) { if mock.DeviceGetComputeInstanceIdFunc == nil { panic("Interface.DeviceGetComputeInstanceIdFunc: method is nil but Interface.DeviceGetComputeInstanceId was just called") } @@ -5222,7 +5222,7 @@ func (mock *Interface) DeviceGetComputeInstanceIdCalls() []struct { } // DeviceGetComputeMode calls DeviceGetComputeModeFunc. -func (mock *Interface) DeviceGetComputeMode(device nvml.Device) (nvml.ComputeMode, nvml.Return) { +func (mock *Interface) DeviceGetComputeMode(device nvml.Device) (nvml.ComputeMode, error) { if mock.DeviceGetComputeModeFunc == nil { panic("Interface.DeviceGetComputeModeFunc: method is nil but Interface.DeviceGetComputeMode was just called") } @@ -5254,7 +5254,7 @@ func (mock *Interface) DeviceGetComputeModeCalls() []struct { } // DeviceGetComputeRunningProcesses calls DeviceGetComputeRunningProcessesFunc. -func (mock *Interface) DeviceGetComputeRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { +func (mock *Interface) DeviceGetComputeRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, error) { if mock.DeviceGetComputeRunningProcessesFunc == nil { panic("Interface.DeviceGetComputeRunningProcessesFunc: method is nil but Interface.DeviceGetComputeRunningProcesses was just called") } @@ -5286,7 +5286,7 @@ func (mock *Interface) DeviceGetComputeRunningProcessesCalls() []struct { } // DeviceGetConfComputeGpuAttestationReport calls DeviceGetConfComputeGpuAttestationReportFunc. -func (mock *Interface) DeviceGetConfComputeGpuAttestationReport(device nvml.Device) (nvml.ConfComputeGpuAttestationReport, nvml.Return) { +func (mock *Interface) DeviceGetConfComputeGpuAttestationReport(device nvml.Device) (nvml.ConfComputeGpuAttestationReport, error) { if mock.DeviceGetConfComputeGpuAttestationReportFunc == nil { panic("Interface.DeviceGetConfComputeGpuAttestationReportFunc: method is nil but Interface.DeviceGetConfComputeGpuAttestationReport was just called") } @@ -5318,7 +5318,7 @@ func (mock *Interface) DeviceGetConfComputeGpuAttestationReportCalls() []struct } // DeviceGetConfComputeGpuCertificate calls DeviceGetConfComputeGpuCertificateFunc. -func (mock *Interface) DeviceGetConfComputeGpuCertificate(device nvml.Device) (nvml.ConfComputeGpuCertificate, nvml.Return) { +func (mock *Interface) DeviceGetConfComputeGpuCertificate(device nvml.Device) (nvml.ConfComputeGpuCertificate, error) { if mock.DeviceGetConfComputeGpuCertificateFunc == nil { panic("Interface.DeviceGetConfComputeGpuCertificateFunc: method is nil but Interface.DeviceGetConfComputeGpuCertificate was just called") } @@ -5350,7 +5350,7 @@ func (mock *Interface) DeviceGetConfComputeGpuCertificateCalls() []struct { } // DeviceGetConfComputeMemSizeInfo calls DeviceGetConfComputeMemSizeInfoFunc. -func (mock *Interface) DeviceGetConfComputeMemSizeInfo(device nvml.Device) (nvml.ConfComputeMemSizeInfo, nvml.Return) { +func (mock *Interface) DeviceGetConfComputeMemSizeInfo(device nvml.Device) (nvml.ConfComputeMemSizeInfo, error) { if mock.DeviceGetConfComputeMemSizeInfoFunc == nil { panic("Interface.DeviceGetConfComputeMemSizeInfoFunc: method is nil but Interface.DeviceGetConfComputeMemSizeInfo was just called") } @@ -5382,7 +5382,7 @@ func (mock *Interface) DeviceGetConfComputeMemSizeInfoCalls() []struct { } // DeviceGetConfComputeProtectedMemoryUsage calls DeviceGetConfComputeProtectedMemoryUsageFunc. -func (mock *Interface) DeviceGetConfComputeProtectedMemoryUsage(device nvml.Device) (nvml.Memory, nvml.Return) { +func (mock *Interface) DeviceGetConfComputeProtectedMemoryUsage(device nvml.Device) (nvml.Memory, error) { if mock.DeviceGetConfComputeProtectedMemoryUsageFunc == nil { panic("Interface.DeviceGetConfComputeProtectedMemoryUsageFunc: method is nil but Interface.DeviceGetConfComputeProtectedMemoryUsage was just called") } @@ -5414,7 +5414,7 @@ func (mock *Interface) DeviceGetConfComputeProtectedMemoryUsageCalls() []struct } // DeviceGetCount calls DeviceGetCountFunc. -func (mock *Interface) DeviceGetCount() (int, nvml.Return) { +func (mock *Interface) DeviceGetCount() (int, error) { if mock.DeviceGetCountFunc == nil { panic("Interface.DeviceGetCountFunc: method is nil but Interface.DeviceGetCount was just called") } @@ -5441,7 +5441,7 @@ func (mock *Interface) DeviceGetCountCalls() []struct { } // DeviceGetCpuAffinity calls DeviceGetCpuAffinityFunc. -func (mock *Interface) DeviceGetCpuAffinity(device nvml.Device, n int) ([]uint, nvml.Return) { +func (mock *Interface) DeviceGetCpuAffinity(device nvml.Device, n int) ([]uint, error) { if mock.DeviceGetCpuAffinityFunc == nil { panic("Interface.DeviceGetCpuAffinityFunc: method is nil but Interface.DeviceGetCpuAffinity was just called") } @@ -5477,7 +5477,7 @@ func (mock *Interface) DeviceGetCpuAffinityCalls() []struct { } // DeviceGetCpuAffinityWithinScope calls DeviceGetCpuAffinityWithinScopeFunc. -func (mock *Interface) DeviceGetCpuAffinityWithinScope(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +func (mock *Interface) DeviceGetCpuAffinityWithinScope(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, error) { if mock.DeviceGetCpuAffinityWithinScopeFunc == nil { panic("Interface.DeviceGetCpuAffinityWithinScopeFunc: method is nil but Interface.DeviceGetCpuAffinityWithinScope was just called") } @@ -5517,7 +5517,7 @@ func (mock *Interface) DeviceGetCpuAffinityWithinScopeCalls() []struct { } // DeviceGetCreatableVgpus calls DeviceGetCreatableVgpusFunc. -func (mock *Interface) DeviceGetCreatableVgpus(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { +func (mock *Interface) DeviceGetCreatableVgpus(device nvml.Device) ([]nvml.VgpuTypeId, error) { if mock.DeviceGetCreatableVgpusFunc == nil { panic("Interface.DeviceGetCreatableVgpusFunc: method is nil but Interface.DeviceGetCreatableVgpus was just called") } @@ -5549,7 +5549,7 @@ func (mock *Interface) DeviceGetCreatableVgpusCalls() []struct { } // DeviceGetCudaComputeCapability calls DeviceGetCudaComputeCapabilityFunc. -func (mock *Interface) DeviceGetCudaComputeCapability(device nvml.Device) (int, int, nvml.Return) { +func (mock *Interface) DeviceGetCudaComputeCapability(device nvml.Device) (int, int, error) { if mock.DeviceGetCudaComputeCapabilityFunc == nil { panic("Interface.DeviceGetCudaComputeCapabilityFunc: method is nil but Interface.DeviceGetCudaComputeCapability was just called") } @@ -5581,7 +5581,7 @@ func (mock *Interface) DeviceGetCudaComputeCapabilityCalls() []struct { } // DeviceGetCurrPcieLinkGeneration calls DeviceGetCurrPcieLinkGenerationFunc. -func (mock *Interface) DeviceGetCurrPcieLinkGeneration(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetCurrPcieLinkGeneration(device nvml.Device) (int, error) { if mock.DeviceGetCurrPcieLinkGenerationFunc == nil { panic("Interface.DeviceGetCurrPcieLinkGenerationFunc: method is nil but Interface.DeviceGetCurrPcieLinkGeneration was just called") } @@ -5613,7 +5613,7 @@ func (mock *Interface) DeviceGetCurrPcieLinkGenerationCalls() []struct { } // DeviceGetCurrPcieLinkWidth calls DeviceGetCurrPcieLinkWidthFunc. -func (mock *Interface) DeviceGetCurrPcieLinkWidth(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetCurrPcieLinkWidth(device nvml.Device) (int, error) { if mock.DeviceGetCurrPcieLinkWidthFunc == nil { panic("Interface.DeviceGetCurrPcieLinkWidthFunc: method is nil but Interface.DeviceGetCurrPcieLinkWidth was just called") } @@ -5645,7 +5645,7 @@ func (mock *Interface) DeviceGetCurrPcieLinkWidthCalls() []struct { } // DeviceGetCurrentClocksEventReasons calls DeviceGetCurrentClocksEventReasonsFunc. -func (mock *Interface) DeviceGetCurrentClocksEventReasons(device nvml.Device) (uint64, nvml.Return) { +func (mock *Interface) DeviceGetCurrentClocksEventReasons(device nvml.Device) (uint64, error) { if mock.DeviceGetCurrentClocksEventReasonsFunc == nil { panic("Interface.DeviceGetCurrentClocksEventReasonsFunc: method is nil but Interface.DeviceGetCurrentClocksEventReasons was just called") } @@ -5677,7 +5677,7 @@ func (mock *Interface) DeviceGetCurrentClocksEventReasonsCalls() []struct { } // DeviceGetCurrentClocksThrottleReasons calls DeviceGetCurrentClocksThrottleReasonsFunc. -func (mock *Interface) DeviceGetCurrentClocksThrottleReasons(device nvml.Device) (uint64, nvml.Return) { +func (mock *Interface) DeviceGetCurrentClocksThrottleReasons(device nvml.Device) (uint64, error) { if mock.DeviceGetCurrentClocksThrottleReasonsFunc == nil { panic("Interface.DeviceGetCurrentClocksThrottleReasonsFunc: method is nil but Interface.DeviceGetCurrentClocksThrottleReasons was just called") } @@ -5709,7 +5709,7 @@ func (mock *Interface) DeviceGetCurrentClocksThrottleReasonsCalls() []struct { } // DeviceGetDecoderUtilization calls DeviceGetDecoderUtilizationFunc. -func (mock *Interface) DeviceGetDecoderUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { +func (mock *Interface) DeviceGetDecoderUtilization(device nvml.Device) (uint32, uint32, error) { if mock.DeviceGetDecoderUtilizationFunc == nil { panic("Interface.DeviceGetDecoderUtilizationFunc: method is nil but Interface.DeviceGetDecoderUtilization was just called") } @@ -5741,7 +5741,7 @@ func (mock *Interface) DeviceGetDecoderUtilizationCalls() []struct { } // DeviceGetDefaultApplicationsClock calls DeviceGetDefaultApplicationsClockFunc. -func (mock *Interface) DeviceGetDefaultApplicationsClock(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetDefaultApplicationsClock(device nvml.Device, clockType nvml.ClockType) (uint32, error) { if mock.DeviceGetDefaultApplicationsClockFunc == nil { panic("Interface.DeviceGetDefaultApplicationsClockFunc: method is nil but Interface.DeviceGetDefaultApplicationsClock was just called") } @@ -5777,7 +5777,7 @@ func (mock *Interface) DeviceGetDefaultApplicationsClockCalls() []struct { } // DeviceGetDefaultEccMode calls DeviceGetDefaultEccModeFunc. -func (mock *Interface) DeviceGetDefaultEccMode(device nvml.Device) (nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetDefaultEccMode(device nvml.Device) (nvml.EnableState, error) { if mock.DeviceGetDefaultEccModeFunc == nil { panic("Interface.DeviceGetDefaultEccModeFunc: method is nil but Interface.DeviceGetDefaultEccMode was just called") } @@ -5809,7 +5809,7 @@ func (mock *Interface) DeviceGetDefaultEccModeCalls() []struct { } // DeviceGetDetailedEccErrors calls DeviceGetDetailedEccErrorsFunc. -func (mock *Interface) DeviceGetDetailedEccErrors(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { +func (mock *Interface) DeviceGetDetailedEccErrors(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, error) { if mock.DeviceGetDetailedEccErrorsFunc == nil { panic("Interface.DeviceGetDetailedEccErrorsFunc: method is nil but Interface.DeviceGetDetailedEccErrors was just called") } @@ -5849,7 +5849,7 @@ func (mock *Interface) DeviceGetDetailedEccErrorsCalls() []struct { } // DeviceGetDeviceHandleFromMigDeviceHandle calls DeviceGetDeviceHandleFromMigDeviceHandleFunc. -func (mock *Interface) DeviceGetDeviceHandleFromMigDeviceHandle(device nvml.Device) (nvml.Device, nvml.Return) { +func (mock *Interface) DeviceGetDeviceHandleFromMigDeviceHandle(device nvml.Device) (nvml.Device, error) { if mock.DeviceGetDeviceHandleFromMigDeviceHandleFunc == nil { panic("Interface.DeviceGetDeviceHandleFromMigDeviceHandleFunc: method is nil but Interface.DeviceGetDeviceHandleFromMigDeviceHandle was just called") } @@ -5881,7 +5881,7 @@ func (mock *Interface) DeviceGetDeviceHandleFromMigDeviceHandleCalls() []struct } // DeviceGetDisplayActive calls DeviceGetDisplayActiveFunc. -func (mock *Interface) DeviceGetDisplayActive(device nvml.Device) (nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetDisplayActive(device nvml.Device) (nvml.EnableState, error) { if mock.DeviceGetDisplayActiveFunc == nil { panic("Interface.DeviceGetDisplayActiveFunc: method is nil but Interface.DeviceGetDisplayActive was just called") } @@ -5913,7 +5913,7 @@ func (mock *Interface) DeviceGetDisplayActiveCalls() []struct { } // DeviceGetDisplayMode calls DeviceGetDisplayModeFunc. -func (mock *Interface) DeviceGetDisplayMode(device nvml.Device) (nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetDisplayMode(device nvml.Device) (nvml.EnableState, error) { if mock.DeviceGetDisplayModeFunc == nil { panic("Interface.DeviceGetDisplayModeFunc: method is nil but Interface.DeviceGetDisplayMode was just called") } @@ -5945,7 +5945,7 @@ func (mock *Interface) DeviceGetDisplayModeCalls() []struct { } // DeviceGetDriverModel calls DeviceGetDriverModelFunc. -func (mock *Interface) DeviceGetDriverModel(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { +func (mock *Interface) DeviceGetDriverModel(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, error) { if mock.DeviceGetDriverModelFunc == nil { panic("Interface.DeviceGetDriverModelFunc: method is nil but Interface.DeviceGetDriverModel was just called") } @@ -5977,7 +5977,7 @@ func (mock *Interface) DeviceGetDriverModelCalls() []struct { } // DeviceGetDynamicPstatesInfo calls DeviceGetDynamicPstatesInfoFunc. -func (mock *Interface) DeviceGetDynamicPstatesInfo(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) { +func (mock *Interface) DeviceGetDynamicPstatesInfo(device nvml.Device) (nvml.GpuDynamicPstatesInfo, error) { if mock.DeviceGetDynamicPstatesInfoFunc == nil { panic("Interface.DeviceGetDynamicPstatesInfoFunc: method is nil but Interface.DeviceGetDynamicPstatesInfo was just called") } @@ -6009,7 +6009,7 @@ func (mock *Interface) DeviceGetDynamicPstatesInfoCalls() []struct { } // DeviceGetEccMode calls DeviceGetEccModeFunc. -func (mock *Interface) DeviceGetEccMode(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetEccMode(device nvml.Device) (nvml.EnableState, nvml.EnableState, error) { if mock.DeviceGetEccModeFunc == nil { panic("Interface.DeviceGetEccModeFunc: method is nil but Interface.DeviceGetEccMode was just called") } @@ -6041,7 +6041,7 @@ func (mock *Interface) DeviceGetEccModeCalls() []struct { } // DeviceGetEncoderCapacity calls DeviceGetEncoderCapacityFunc. -func (mock *Interface) DeviceGetEncoderCapacity(device nvml.Device, encoderType nvml.EncoderType) (int, nvml.Return) { +func (mock *Interface) DeviceGetEncoderCapacity(device nvml.Device, encoderType nvml.EncoderType) (int, error) { if mock.DeviceGetEncoderCapacityFunc == nil { panic("Interface.DeviceGetEncoderCapacityFunc: method is nil but Interface.DeviceGetEncoderCapacity was just called") } @@ -6077,7 +6077,7 @@ func (mock *Interface) DeviceGetEncoderCapacityCalls() []struct { } // DeviceGetEncoderSessions calls DeviceGetEncoderSessionsFunc. -func (mock *Interface) DeviceGetEncoderSessions(device nvml.Device) ([]nvml.EncoderSessionInfo, nvml.Return) { +func (mock *Interface) DeviceGetEncoderSessions(device nvml.Device) ([]nvml.EncoderSessionInfo, error) { if mock.DeviceGetEncoderSessionsFunc == nil { panic("Interface.DeviceGetEncoderSessionsFunc: method is nil but Interface.DeviceGetEncoderSessions was just called") } @@ -6109,7 +6109,7 @@ func (mock *Interface) DeviceGetEncoderSessionsCalls() []struct { } // DeviceGetEncoderStats calls DeviceGetEncoderStatsFunc. -func (mock *Interface) DeviceGetEncoderStats(device nvml.Device) (int, uint32, uint32, nvml.Return) { +func (mock *Interface) DeviceGetEncoderStats(device nvml.Device) (int, uint32, uint32, error) { if mock.DeviceGetEncoderStatsFunc == nil { panic("Interface.DeviceGetEncoderStatsFunc: method is nil but Interface.DeviceGetEncoderStats was just called") } @@ -6141,7 +6141,7 @@ func (mock *Interface) DeviceGetEncoderStatsCalls() []struct { } // DeviceGetEncoderUtilization calls DeviceGetEncoderUtilizationFunc. -func (mock *Interface) DeviceGetEncoderUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { +func (mock *Interface) DeviceGetEncoderUtilization(device nvml.Device) (uint32, uint32, error) { if mock.DeviceGetEncoderUtilizationFunc == nil { panic("Interface.DeviceGetEncoderUtilizationFunc: method is nil but Interface.DeviceGetEncoderUtilization was just called") } @@ -6173,7 +6173,7 @@ func (mock *Interface) DeviceGetEncoderUtilizationCalls() []struct { } // DeviceGetEnforcedPowerLimit calls DeviceGetEnforcedPowerLimitFunc. -func (mock *Interface) DeviceGetEnforcedPowerLimit(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetEnforcedPowerLimit(device nvml.Device) (uint32, error) { if mock.DeviceGetEnforcedPowerLimitFunc == nil { panic("Interface.DeviceGetEnforcedPowerLimitFunc: method is nil but Interface.DeviceGetEnforcedPowerLimit was just called") } @@ -6205,7 +6205,7 @@ func (mock *Interface) DeviceGetEnforcedPowerLimitCalls() []struct { } // DeviceGetFBCSessions calls DeviceGetFBCSessionsFunc. -func (mock *Interface) DeviceGetFBCSessions(device nvml.Device) ([]nvml.FBCSessionInfo, nvml.Return) { +func (mock *Interface) DeviceGetFBCSessions(device nvml.Device) ([]nvml.FBCSessionInfo, error) { if mock.DeviceGetFBCSessionsFunc == nil { panic("Interface.DeviceGetFBCSessionsFunc: method is nil but Interface.DeviceGetFBCSessions was just called") } @@ -6237,7 +6237,7 @@ func (mock *Interface) DeviceGetFBCSessionsCalls() []struct { } // DeviceGetFBCStats calls DeviceGetFBCStatsFunc. -func (mock *Interface) DeviceGetFBCStats(device nvml.Device) (nvml.FBCStats, nvml.Return) { +func (mock *Interface) DeviceGetFBCStats(device nvml.Device) (nvml.FBCStats, error) { if mock.DeviceGetFBCStatsFunc == nil { panic("Interface.DeviceGetFBCStatsFunc: method is nil but Interface.DeviceGetFBCStats was just called") } @@ -6269,7 +6269,7 @@ func (mock *Interface) DeviceGetFBCStatsCalls() []struct { } // DeviceGetFanControlPolicy_v2 calls DeviceGetFanControlPolicy_v2Func. -func (mock *Interface) DeviceGetFanControlPolicy_v2(device nvml.Device, n int) (nvml.FanControlPolicy, nvml.Return) { +func (mock *Interface) DeviceGetFanControlPolicy_v2(device nvml.Device, n int) (nvml.FanControlPolicy, error) { if mock.DeviceGetFanControlPolicy_v2Func == nil { panic("Interface.DeviceGetFanControlPolicy_v2Func: method is nil but Interface.DeviceGetFanControlPolicy_v2 was just called") } @@ -6305,7 +6305,7 @@ func (mock *Interface) DeviceGetFanControlPolicy_v2Calls() []struct { } // DeviceGetFanSpeed calls DeviceGetFanSpeedFunc. -func (mock *Interface) DeviceGetFanSpeed(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetFanSpeed(device nvml.Device) (uint32, error) { if mock.DeviceGetFanSpeedFunc == nil { panic("Interface.DeviceGetFanSpeedFunc: method is nil but Interface.DeviceGetFanSpeed was just called") } @@ -6337,7 +6337,7 @@ func (mock *Interface) DeviceGetFanSpeedCalls() []struct { } // DeviceGetFanSpeed_v2 calls DeviceGetFanSpeed_v2Func. -func (mock *Interface) DeviceGetFanSpeed_v2(device nvml.Device, n int) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetFanSpeed_v2(device nvml.Device, n int) (uint32, error) { if mock.DeviceGetFanSpeed_v2Func == nil { panic("Interface.DeviceGetFanSpeed_v2Func: method is nil but Interface.DeviceGetFanSpeed_v2 was just called") } @@ -6373,7 +6373,7 @@ func (mock *Interface) DeviceGetFanSpeed_v2Calls() []struct { } // DeviceGetFieldValues calls DeviceGetFieldValuesFunc. -func (mock *Interface) DeviceGetFieldValues(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { +func (mock *Interface) DeviceGetFieldValues(device nvml.Device, fieldValues []nvml.FieldValue) error { if mock.DeviceGetFieldValuesFunc == nil { panic("Interface.DeviceGetFieldValuesFunc: method is nil but Interface.DeviceGetFieldValues was just called") } @@ -6409,7 +6409,7 @@ func (mock *Interface) DeviceGetFieldValuesCalls() []struct { } // DeviceGetGpcClkMinMaxVfOffset calls DeviceGetGpcClkMinMaxVfOffsetFunc. -func (mock *Interface) DeviceGetGpcClkMinMaxVfOffset(device nvml.Device) (int, int, nvml.Return) { +func (mock *Interface) DeviceGetGpcClkMinMaxVfOffset(device nvml.Device) (int, int, error) { if mock.DeviceGetGpcClkMinMaxVfOffsetFunc == nil { panic("Interface.DeviceGetGpcClkMinMaxVfOffsetFunc: method is nil but Interface.DeviceGetGpcClkMinMaxVfOffset was just called") } @@ -6441,7 +6441,7 @@ func (mock *Interface) DeviceGetGpcClkMinMaxVfOffsetCalls() []struct { } // DeviceGetGpcClkVfOffset calls DeviceGetGpcClkVfOffsetFunc. -func (mock *Interface) DeviceGetGpcClkVfOffset(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetGpcClkVfOffset(device nvml.Device) (int, error) { if mock.DeviceGetGpcClkVfOffsetFunc == nil { panic("Interface.DeviceGetGpcClkVfOffsetFunc: method is nil but Interface.DeviceGetGpcClkVfOffset was just called") } @@ -6473,7 +6473,7 @@ func (mock *Interface) DeviceGetGpcClkVfOffsetCalls() []struct { } // DeviceGetGpuFabricInfo calls DeviceGetGpuFabricInfoFunc. -func (mock *Interface) DeviceGetGpuFabricInfo(device nvml.Device) (nvml.GpuFabricInfo, nvml.Return) { +func (mock *Interface) DeviceGetGpuFabricInfo(device nvml.Device) (nvml.GpuFabricInfo, error) { if mock.DeviceGetGpuFabricInfoFunc == nil { panic("Interface.DeviceGetGpuFabricInfoFunc: method is nil but Interface.DeviceGetGpuFabricInfo was just called") } @@ -6537,7 +6537,7 @@ func (mock *Interface) DeviceGetGpuFabricInfoVCalls() []struct { } // DeviceGetGpuInstanceById calls DeviceGetGpuInstanceByIdFunc. -func (mock *Interface) DeviceGetGpuInstanceById(device nvml.Device, n int) (nvml.GpuInstance, nvml.Return) { +func (mock *Interface) DeviceGetGpuInstanceById(device nvml.Device, n int) (nvml.GpuInstance, error) { if mock.DeviceGetGpuInstanceByIdFunc == nil { panic("Interface.DeviceGetGpuInstanceByIdFunc: method is nil but Interface.DeviceGetGpuInstanceById was just called") } @@ -6573,7 +6573,7 @@ func (mock *Interface) DeviceGetGpuInstanceByIdCalls() []struct { } // DeviceGetGpuInstanceId calls DeviceGetGpuInstanceIdFunc. -func (mock *Interface) DeviceGetGpuInstanceId(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetGpuInstanceId(device nvml.Device) (int, error) { if mock.DeviceGetGpuInstanceIdFunc == nil { panic("Interface.DeviceGetGpuInstanceIdFunc: method is nil but Interface.DeviceGetGpuInstanceId was just called") } @@ -6605,7 +6605,7 @@ func (mock *Interface) DeviceGetGpuInstanceIdCalls() []struct { } // DeviceGetGpuInstancePossiblePlacements calls DeviceGetGpuInstancePossiblePlacementsFunc. -func (mock *Interface) DeviceGetGpuInstancePossiblePlacements(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { +func (mock *Interface) DeviceGetGpuInstancePossiblePlacements(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, error) { if mock.DeviceGetGpuInstancePossiblePlacementsFunc == nil { panic("Interface.DeviceGetGpuInstancePossiblePlacementsFunc: method is nil but Interface.DeviceGetGpuInstancePossiblePlacements was just called") } @@ -6641,7 +6641,7 @@ func (mock *Interface) DeviceGetGpuInstancePossiblePlacementsCalls() []struct { } // DeviceGetGpuInstanceProfileInfo calls DeviceGetGpuInstanceProfileInfoFunc. -func (mock *Interface) DeviceGetGpuInstanceProfileInfo(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { +func (mock *Interface) DeviceGetGpuInstanceProfileInfo(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, error) { if mock.DeviceGetGpuInstanceProfileInfoFunc == nil { panic("Interface.DeviceGetGpuInstanceProfileInfoFunc: method is nil but Interface.DeviceGetGpuInstanceProfileInfo was just called") } @@ -6713,7 +6713,7 @@ func (mock *Interface) DeviceGetGpuInstanceProfileInfoVCalls() []struct { } // DeviceGetGpuInstanceRemainingCapacity calls DeviceGetGpuInstanceRemainingCapacityFunc. -func (mock *Interface) DeviceGetGpuInstanceRemainingCapacity(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) { +func (mock *Interface) DeviceGetGpuInstanceRemainingCapacity(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, error) { if mock.DeviceGetGpuInstanceRemainingCapacityFunc == nil { panic("Interface.DeviceGetGpuInstanceRemainingCapacityFunc: method is nil but Interface.DeviceGetGpuInstanceRemainingCapacity was just called") } @@ -6749,7 +6749,7 @@ func (mock *Interface) DeviceGetGpuInstanceRemainingCapacityCalls() []struct { } // DeviceGetGpuInstances calls DeviceGetGpuInstancesFunc. -func (mock *Interface) DeviceGetGpuInstances(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { +func (mock *Interface) DeviceGetGpuInstances(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, error) { if mock.DeviceGetGpuInstancesFunc == nil { panic("Interface.DeviceGetGpuInstancesFunc: method is nil but Interface.DeviceGetGpuInstances was just called") } @@ -6785,7 +6785,7 @@ func (mock *Interface) DeviceGetGpuInstancesCalls() []struct { } // DeviceGetGpuMaxPcieLinkGeneration calls DeviceGetGpuMaxPcieLinkGenerationFunc. -func (mock *Interface) DeviceGetGpuMaxPcieLinkGeneration(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetGpuMaxPcieLinkGeneration(device nvml.Device) (int, error) { if mock.DeviceGetGpuMaxPcieLinkGenerationFunc == nil { panic("Interface.DeviceGetGpuMaxPcieLinkGenerationFunc: method is nil but Interface.DeviceGetGpuMaxPcieLinkGeneration was just called") } @@ -6817,7 +6817,7 @@ func (mock *Interface) DeviceGetGpuMaxPcieLinkGenerationCalls() []struct { } // DeviceGetGpuOperationMode calls DeviceGetGpuOperationModeFunc. -func (mock *Interface) DeviceGetGpuOperationMode(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { +func (mock *Interface) DeviceGetGpuOperationMode(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, error) { if mock.DeviceGetGpuOperationModeFunc == nil { panic("Interface.DeviceGetGpuOperationModeFunc: method is nil but Interface.DeviceGetGpuOperationMode was just called") } @@ -6849,7 +6849,7 @@ func (mock *Interface) DeviceGetGpuOperationModeCalls() []struct { } // DeviceGetGraphicsRunningProcesses calls DeviceGetGraphicsRunningProcessesFunc. -func (mock *Interface) DeviceGetGraphicsRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { +func (mock *Interface) DeviceGetGraphicsRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, error) { if mock.DeviceGetGraphicsRunningProcessesFunc == nil { panic("Interface.DeviceGetGraphicsRunningProcessesFunc: method is nil but Interface.DeviceGetGraphicsRunningProcesses was just called") } @@ -6881,7 +6881,7 @@ func (mock *Interface) DeviceGetGraphicsRunningProcessesCalls() []struct { } // DeviceGetGridLicensableFeatures calls DeviceGetGridLicensableFeaturesFunc. -func (mock *Interface) DeviceGetGridLicensableFeatures(device nvml.Device) (nvml.GridLicensableFeatures, nvml.Return) { +func (mock *Interface) DeviceGetGridLicensableFeatures(device nvml.Device) (nvml.GridLicensableFeatures, error) { if mock.DeviceGetGridLicensableFeaturesFunc == nil { panic("Interface.DeviceGetGridLicensableFeaturesFunc: method is nil but Interface.DeviceGetGridLicensableFeatures was just called") } @@ -6913,7 +6913,7 @@ func (mock *Interface) DeviceGetGridLicensableFeaturesCalls() []struct { } // DeviceGetGspFirmwareMode calls DeviceGetGspFirmwareModeFunc. -func (mock *Interface) DeviceGetGspFirmwareMode(device nvml.Device) (bool, bool, nvml.Return) { +func (mock *Interface) DeviceGetGspFirmwareMode(device nvml.Device) (bool, bool, error) { if mock.DeviceGetGspFirmwareModeFunc == nil { panic("Interface.DeviceGetGspFirmwareModeFunc: method is nil but Interface.DeviceGetGspFirmwareMode was just called") } @@ -6945,7 +6945,7 @@ func (mock *Interface) DeviceGetGspFirmwareModeCalls() []struct { } // DeviceGetGspFirmwareVersion calls DeviceGetGspFirmwareVersionFunc. -func (mock *Interface) DeviceGetGspFirmwareVersion(device nvml.Device) (string, nvml.Return) { +func (mock *Interface) DeviceGetGspFirmwareVersion(device nvml.Device) (string, error) { if mock.DeviceGetGspFirmwareVersionFunc == nil { panic("Interface.DeviceGetGspFirmwareVersionFunc: method is nil but Interface.DeviceGetGspFirmwareVersion was just called") } @@ -6977,7 +6977,7 @@ func (mock *Interface) DeviceGetGspFirmwareVersionCalls() []struct { } // DeviceGetHandleByIndex calls DeviceGetHandleByIndexFunc. -func (mock *Interface) DeviceGetHandleByIndex(n int) (nvml.Device, nvml.Return) { +func (mock *Interface) DeviceGetHandleByIndex(n int) (nvml.Device, error) { if mock.DeviceGetHandleByIndexFunc == nil { panic("Interface.DeviceGetHandleByIndexFunc: method is nil but Interface.DeviceGetHandleByIndex was just called") } @@ -7009,7 +7009,7 @@ func (mock *Interface) DeviceGetHandleByIndexCalls() []struct { } // DeviceGetHandleByPciBusId calls DeviceGetHandleByPciBusIdFunc. -func (mock *Interface) DeviceGetHandleByPciBusId(s string) (nvml.Device, nvml.Return) { +func (mock *Interface) DeviceGetHandleByPciBusId(s string) (nvml.Device, error) { if mock.DeviceGetHandleByPciBusIdFunc == nil { panic("Interface.DeviceGetHandleByPciBusIdFunc: method is nil but Interface.DeviceGetHandleByPciBusId was just called") } @@ -7041,7 +7041,7 @@ func (mock *Interface) DeviceGetHandleByPciBusIdCalls() []struct { } // DeviceGetHandleBySerial calls DeviceGetHandleBySerialFunc. -func (mock *Interface) DeviceGetHandleBySerial(s string) (nvml.Device, nvml.Return) { +func (mock *Interface) DeviceGetHandleBySerial(s string) (nvml.Device, error) { if mock.DeviceGetHandleBySerialFunc == nil { panic("Interface.DeviceGetHandleBySerialFunc: method is nil but Interface.DeviceGetHandleBySerial was just called") } @@ -7073,7 +7073,7 @@ func (mock *Interface) DeviceGetHandleBySerialCalls() []struct { } // DeviceGetHandleByUUID calls DeviceGetHandleByUUIDFunc. -func (mock *Interface) DeviceGetHandleByUUID(s string) (nvml.Device, nvml.Return) { +func (mock *Interface) DeviceGetHandleByUUID(s string) (nvml.Device, error) { if mock.DeviceGetHandleByUUIDFunc == nil { panic("Interface.DeviceGetHandleByUUIDFunc: method is nil but Interface.DeviceGetHandleByUUID was just called") } @@ -7105,7 +7105,7 @@ func (mock *Interface) DeviceGetHandleByUUIDCalls() []struct { } // DeviceGetHostVgpuMode calls DeviceGetHostVgpuModeFunc. -func (mock *Interface) DeviceGetHostVgpuMode(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) { +func (mock *Interface) DeviceGetHostVgpuMode(device nvml.Device) (nvml.HostVgpuMode, error) { if mock.DeviceGetHostVgpuModeFunc == nil { panic("Interface.DeviceGetHostVgpuModeFunc: method is nil but Interface.DeviceGetHostVgpuMode was just called") } @@ -7137,7 +7137,7 @@ func (mock *Interface) DeviceGetHostVgpuModeCalls() []struct { } // DeviceGetIndex calls DeviceGetIndexFunc. -func (mock *Interface) DeviceGetIndex(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetIndex(device nvml.Device) (int, error) { if mock.DeviceGetIndexFunc == nil { panic("Interface.DeviceGetIndexFunc: method is nil but Interface.DeviceGetIndex was just called") } @@ -7169,7 +7169,7 @@ func (mock *Interface) DeviceGetIndexCalls() []struct { } // DeviceGetInforomConfigurationChecksum calls DeviceGetInforomConfigurationChecksumFunc. -func (mock *Interface) DeviceGetInforomConfigurationChecksum(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetInforomConfigurationChecksum(device nvml.Device) (uint32, error) { if mock.DeviceGetInforomConfigurationChecksumFunc == nil { panic("Interface.DeviceGetInforomConfigurationChecksumFunc: method is nil but Interface.DeviceGetInforomConfigurationChecksum was just called") } @@ -7201,7 +7201,7 @@ func (mock *Interface) DeviceGetInforomConfigurationChecksumCalls() []struct { } // DeviceGetInforomImageVersion calls DeviceGetInforomImageVersionFunc. -func (mock *Interface) DeviceGetInforomImageVersion(device nvml.Device) (string, nvml.Return) { +func (mock *Interface) DeviceGetInforomImageVersion(device nvml.Device) (string, error) { if mock.DeviceGetInforomImageVersionFunc == nil { panic("Interface.DeviceGetInforomImageVersionFunc: method is nil but Interface.DeviceGetInforomImageVersion was just called") } @@ -7233,7 +7233,7 @@ func (mock *Interface) DeviceGetInforomImageVersionCalls() []struct { } // DeviceGetInforomVersion calls DeviceGetInforomVersionFunc. -func (mock *Interface) DeviceGetInforomVersion(device nvml.Device, inforomObject nvml.InforomObject) (string, nvml.Return) { +func (mock *Interface) DeviceGetInforomVersion(device nvml.Device, inforomObject nvml.InforomObject) (string, error) { if mock.DeviceGetInforomVersionFunc == nil { panic("Interface.DeviceGetInforomVersionFunc: method is nil but Interface.DeviceGetInforomVersion was just called") } @@ -7269,7 +7269,7 @@ func (mock *Interface) DeviceGetInforomVersionCalls() []struct { } // DeviceGetIrqNum calls DeviceGetIrqNumFunc. -func (mock *Interface) DeviceGetIrqNum(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetIrqNum(device nvml.Device) (int, error) { if mock.DeviceGetIrqNumFunc == nil { panic("Interface.DeviceGetIrqNumFunc: method is nil but Interface.DeviceGetIrqNum was just called") } @@ -7301,7 +7301,7 @@ func (mock *Interface) DeviceGetIrqNumCalls() []struct { } // DeviceGetJpgUtilization calls DeviceGetJpgUtilizationFunc. -func (mock *Interface) DeviceGetJpgUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { +func (mock *Interface) DeviceGetJpgUtilization(device nvml.Device) (uint32, uint32, error) { if mock.DeviceGetJpgUtilizationFunc == nil { panic("Interface.DeviceGetJpgUtilizationFunc: method is nil but Interface.DeviceGetJpgUtilization was just called") } @@ -7333,7 +7333,7 @@ func (mock *Interface) DeviceGetJpgUtilizationCalls() []struct { } // DeviceGetLastBBXFlushTime calls DeviceGetLastBBXFlushTimeFunc. -func (mock *Interface) DeviceGetLastBBXFlushTime(device nvml.Device) (uint64, uint, nvml.Return) { +func (mock *Interface) DeviceGetLastBBXFlushTime(device nvml.Device) (uint64, uint, error) { if mock.DeviceGetLastBBXFlushTimeFunc == nil { panic("Interface.DeviceGetLastBBXFlushTimeFunc: method is nil but Interface.DeviceGetLastBBXFlushTime was just called") } @@ -7365,7 +7365,7 @@ func (mock *Interface) DeviceGetLastBBXFlushTimeCalls() []struct { } // DeviceGetMPSComputeRunningProcesses calls DeviceGetMPSComputeRunningProcessesFunc. -func (mock *Interface) DeviceGetMPSComputeRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { +func (mock *Interface) DeviceGetMPSComputeRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, error) { if mock.DeviceGetMPSComputeRunningProcessesFunc == nil { panic("Interface.DeviceGetMPSComputeRunningProcessesFunc: method is nil but Interface.DeviceGetMPSComputeRunningProcesses was just called") } @@ -7397,7 +7397,7 @@ func (mock *Interface) DeviceGetMPSComputeRunningProcessesCalls() []struct { } // DeviceGetMaxClockInfo calls DeviceGetMaxClockInfoFunc. -func (mock *Interface) DeviceGetMaxClockInfo(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetMaxClockInfo(device nvml.Device, clockType nvml.ClockType) (uint32, error) { if mock.DeviceGetMaxClockInfoFunc == nil { panic("Interface.DeviceGetMaxClockInfoFunc: method is nil but Interface.DeviceGetMaxClockInfo was just called") } @@ -7433,7 +7433,7 @@ func (mock *Interface) DeviceGetMaxClockInfoCalls() []struct { } // DeviceGetMaxCustomerBoostClock calls DeviceGetMaxCustomerBoostClockFunc. -func (mock *Interface) DeviceGetMaxCustomerBoostClock(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetMaxCustomerBoostClock(device nvml.Device, clockType nvml.ClockType) (uint32, error) { if mock.DeviceGetMaxCustomerBoostClockFunc == nil { panic("Interface.DeviceGetMaxCustomerBoostClockFunc: method is nil but Interface.DeviceGetMaxCustomerBoostClock was just called") } @@ -7469,7 +7469,7 @@ func (mock *Interface) DeviceGetMaxCustomerBoostClockCalls() []struct { } // DeviceGetMaxMigDeviceCount calls DeviceGetMaxMigDeviceCountFunc. -func (mock *Interface) DeviceGetMaxMigDeviceCount(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetMaxMigDeviceCount(device nvml.Device) (int, error) { if mock.DeviceGetMaxMigDeviceCountFunc == nil { panic("Interface.DeviceGetMaxMigDeviceCountFunc: method is nil but Interface.DeviceGetMaxMigDeviceCount was just called") } @@ -7501,7 +7501,7 @@ func (mock *Interface) DeviceGetMaxMigDeviceCountCalls() []struct { } // DeviceGetMaxPcieLinkGeneration calls DeviceGetMaxPcieLinkGenerationFunc. -func (mock *Interface) DeviceGetMaxPcieLinkGeneration(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetMaxPcieLinkGeneration(device nvml.Device) (int, error) { if mock.DeviceGetMaxPcieLinkGenerationFunc == nil { panic("Interface.DeviceGetMaxPcieLinkGenerationFunc: method is nil but Interface.DeviceGetMaxPcieLinkGeneration was just called") } @@ -7533,7 +7533,7 @@ func (mock *Interface) DeviceGetMaxPcieLinkGenerationCalls() []struct { } // DeviceGetMaxPcieLinkWidth calls DeviceGetMaxPcieLinkWidthFunc. -func (mock *Interface) DeviceGetMaxPcieLinkWidth(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetMaxPcieLinkWidth(device nvml.Device) (int, error) { if mock.DeviceGetMaxPcieLinkWidthFunc == nil { panic("Interface.DeviceGetMaxPcieLinkWidthFunc: method is nil but Interface.DeviceGetMaxPcieLinkWidth was just called") } @@ -7565,7 +7565,7 @@ func (mock *Interface) DeviceGetMaxPcieLinkWidthCalls() []struct { } // DeviceGetMemClkMinMaxVfOffset calls DeviceGetMemClkMinMaxVfOffsetFunc. -func (mock *Interface) DeviceGetMemClkMinMaxVfOffset(device nvml.Device) (int, int, nvml.Return) { +func (mock *Interface) DeviceGetMemClkMinMaxVfOffset(device nvml.Device) (int, int, error) { if mock.DeviceGetMemClkMinMaxVfOffsetFunc == nil { panic("Interface.DeviceGetMemClkMinMaxVfOffsetFunc: method is nil but Interface.DeviceGetMemClkMinMaxVfOffset was just called") } @@ -7597,7 +7597,7 @@ func (mock *Interface) DeviceGetMemClkMinMaxVfOffsetCalls() []struct { } // DeviceGetMemClkVfOffset calls DeviceGetMemClkVfOffsetFunc. -func (mock *Interface) DeviceGetMemClkVfOffset(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetMemClkVfOffset(device nvml.Device) (int, error) { if mock.DeviceGetMemClkVfOffsetFunc == nil { panic("Interface.DeviceGetMemClkVfOffsetFunc: method is nil but Interface.DeviceGetMemClkVfOffset was just called") } @@ -7629,7 +7629,7 @@ func (mock *Interface) DeviceGetMemClkVfOffsetCalls() []struct { } // DeviceGetMemoryAffinity calls DeviceGetMemoryAffinityFunc. -func (mock *Interface) DeviceGetMemoryAffinity(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +func (mock *Interface) DeviceGetMemoryAffinity(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, error) { if mock.DeviceGetMemoryAffinityFunc == nil { panic("Interface.DeviceGetMemoryAffinityFunc: method is nil but Interface.DeviceGetMemoryAffinity was just called") } @@ -7669,7 +7669,7 @@ func (mock *Interface) DeviceGetMemoryAffinityCalls() []struct { } // DeviceGetMemoryBusWidth calls DeviceGetMemoryBusWidthFunc. -func (mock *Interface) DeviceGetMemoryBusWidth(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetMemoryBusWidth(device nvml.Device) (uint32, error) { if mock.DeviceGetMemoryBusWidthFunc == nil { panic("Interface.DeviceGetMemoryBusWidthFunc: method is nil but Interface.DeviceGetMemoryBusWidth was just called") } @@ -7701,7 +7701,7 @@ func (mock *Interface) DeviceGetMemoryBusWidthCalls() []struct { } // DeviceGetMemoryErrorCounter calls DeviceGetMemoryErrorCounterFunc. -func (mock *Interface) DeviceGetMemoryErrorCounter(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { +func (mock *Interface) DeviceGetMemoryErrorCounter(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, error) { if mock.DeviceGetMemoryErrorCounterFunc == nil { panic("Interface.DeviceGetMemoryErrorCounterFunc: method is nil but Interface.DeviceGetMemoryErrorCounter was just called") } @@ -7745,7 +7745,7 @@ func (mock *Interface) DeviceGetMemoryErrorCounterCalls() []struct { } // DeviceGetMemoryInfo calls DeviceGetMemoryInfoFunc. -func (mock *Interface) DeviceGetMemoryInfo(device nvml.Device) (nvml.Memory, nvml.Return) { +func (mock *Interface) DeviceGetMemoryInfo(device nvml.Device) (nvml.Memory, error) { if mock.DeviceGetMemoryInfoFunc == nil { panic("Interface.DeviceGetMemoryInfoFunc: method is nil but Interface.DeviceGetMemoryInfo was just called") } @@ -7777,7 +7777,7 @@ func (mock *Interface) DeviceGetMemoryInfoCalls() []struct { } // DeviceGetMemoryInfo_v2 calls DeviceGetMemoryInfo_v2Func. -func (mock *Interface) DeviceGetMemoryInfo_v2(device nvml.Device) (nvml.Memory_v2, nvml.Return) { +func (mock *Interface) DeviceGetMemoryInfo_v2(device nvml.Device) (nvml.Memory_v2, error) { if mock.DeviceGetMemoryInfo_v2Func == nil { panic("Interface.DeviceGetMemoryInfo_v2Func: method is nil but Interface.DeviceGetMemoryInfo_v2 was just called") } @@ -7809,7 +7809,7 @@ func (mock *Interface) DeviceGetMemoryInfo_v2Calls() []struct { } // DeviceGetMigDeviceHandleByIndex calls DeviceGetMigDeviceHandleByIndexFunc. -func (mock *Interface) DeviceGetMigDeviceHandleByIndex(device nvml.Device, n int) (nvml.Device, nvml.Return) { +func (mock *Interface) DeviceGetMigDeviceHandleByIndex(device nvml.Device, n int) (nvml.Device, error) { if mock.DeviceGetMigDeviceHandleByIndexFunc == nil { panic("Interface.DeviceGetMigDeviceHandleByIndexFunc: method is nil but Interface.DeviceGetMigDeviceHandleByIndex was just called") } @@ -7845,7 +7845,7 @@ func (mock *Interface) DeviceGetMigDeviceHandleByIndexCalls() []struct { } // DeviceGetMigMode calls DeviceGetMigModeFunc. -func (mock *Interface) DeviceGetMigMode(device nvml.Device) (int, int, nvml.Return) { +func (mock *Interface) DeviceGetMigMode(device nvml.Device) (int, int, error) { if mock.DeviceGetMigModeFunc == nil { panic("Interface.DeviceGetMigModeFunc: method is nil but Interface.DeviceGetMigMode was just called") } @@ -7877,7 +7877,7 @@ func (mock *Interface) DeviceGetMigModeCalls() []struct { } // DeviceGetMinMaxClockOfPState calls DeviceGetMinMaxClockOfPStateFunc. -func (mock *Interface) DeviceGetMinMaxClockOfPState(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { +func (mock *Interface) DeviceGetMinMaxClockOfPState(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, error) { if mock.DeviceGetMinMaxClockOfPStateFunc == nil { panic("Interface.DeviceGetMinMaxClockOfPStateFunc: method is nil but Interface.DeviceGetMinMaxClockOfPState was just called") } @@ -7917,7 +7917,7 @@ func (mock *Interface) DeviceGetMinMaxClockOfPStateCalls() []struct { } // DeviceGetMinMaxFanSpeed calls DeviceGetMinMaxFanSpeedFunc. -func (mock *Interface) DeviceGetMinMaxFanSpeed(device nvml.Device) (int, int, nvml.Return) { +func (mock *Interface) DeviceGetMinMaxFanSpeed(device nvml.Device) (int, int, error) { if mock.DeviceGetMinMaxFanSpeedFunc == nil { panic("Interface.DeviceGetMinMaxFanSpeedFunc: method is nil but Interface.DeviceGetMinMaxFanSpeed was just called") } @@ -7949,7 +7949,7 @@ func (mock *Interface) DeviceGetMinMaxFanSpeedCalls() []struct { } // DeviceGetMinorNumber calls DeviceGetMinorNumberFunc. -func (mock *Interface) DeviceGetMinorNumber(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetMinorNumber(device nvml.Device) (int, error) { if mock.DeviceGetMinorNumberFunc == nil { panic("Interface.DeviceGetMinorNumberFunc: method is nil but Interface.DeviceGetMinorNumber was just called") } @@ -7981,7 +7981,7 @@ func (mock *Interface) DeviceGetMinorNumberCalls() []struct { } // DeviceGetModuleId calls DeviceGetModuleIdFunc. -func (mock *Interface) DeviceGetModuleId(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetModuleId(device nvml.Device) (int, error) { if mock.DeviceGetModuleIdFunc == nil { panic("Interface.DeviceGetModuleIdFunc: method is nil but Interface.DeviceGetModuleId was just called") } @@ -8013,7 +8013,7 @@ func (mock *Interface) DeviceGetModuleIdCalls() []struct { } // DeviceGetMultiGpuBoard calls DeviceGetMultiGpuBoardFunc. -func (mock *Interface) DeviceGetMultiGpuBoard(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetMultiGpuBoard(device nvml.Device) (int, error) { if mock.DeviceGetMultiGpuBoardFunc == nil { panic("Interface.DeviceGetMultiGpuBoardFunc: method is nil but Interface.DeviceGetMultiGpuBoard was just called") } @@ -8045,7 +8045,7 @@ func (mock *Interface) DeviceGetMultiGpuBoardCalls() []struct { } // DeviceGetName calls DeviceGetNameFunc. -func (mock *Interface) DeviceGetName(device nvml.Device) (string, nvml.Return) { +func (mock *Interface) DeviceGetName(device nvml.Device) (string, error) { if mock.DeviceGetNameFunc == nil { panic("Interface.DeviceGetNameFunc: method is nil but Interface.DeviceGetName was just called") } @@ -8077,7 +8077,7 @@ func (mock *Interface) DeviceGetNameCalls() []struct { } // DeviceGetNumFans calls DeviceGetNumFansFunc. -func (mock *Interface) DeviceGetNumFans(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetNumFans(device nvml.Device) (int, error) { if mock.DeviceGetNumFansFunc == nil { panic("Interface.DeviceGetNumFansFunc: method is nil but Interface.DeviceGetNumFans was just called") } @@ -8109,7 +8109,7 @@ func (mock *Interface) DeviceGetNumFansCalls() []struct { } // DeviceGetNumGpuCores calls DeviceGetNumGpuCoresFunc. -func (mock *Interface) DeviceGetNumGpuCores(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetNumGpuCores(device nvml.Device) (int, error) { if mock.DeviceGetNumGpuCoresFunc == nil { panic("Interface.DeviceGetNumGpuCoresFunc: method is nil but Interface.DeviceGetNumGpuCores was just called") } @@ -8141,7 +8141,7 @@ func (mock *Interface) DeviceGetNumGpuCoresCalls() []struct { } // DeviceGetNumaNodeId calls DeviceGetNumaNodeIdFunc. -func (mock *Interface) DeviceGetNumaNodeId(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetNumaNodeId(device nvml.Device) (int, error) { if mock.DeviceGetNumaNodeIdFunc == nil { panic("Interface.DeviceGetNumaNodeIdFunc: method is nil but Interface.DeviceGetNumaNodeId was just called") } @@ -8173,7 +8173,7 @@ func (mock *Interface) DeviceGetNumaNodeIdCalls() []struct { } // DeviceGetNvLinkCapability calls DeviceGetNvLinkCapabilityFunc. -func (mock *Interface) DeviceGetNvLinkCapability(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetNvLinkCapability(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, error) { if mock.DeviceGetNvLinkCapabilityFunc == nil { panic("Interface.DeviceGetNvLinkCapabilityFunc: method is nil but Interface.DeviceGetNvLinkCapability was just called") } @@ -8213,7 +8213,7 @@ func (mock *Interface) DeviceGetNvLinkCapabilityCalls() []struct { } // DeviceGetNvLinkErrorCounter calls DeviceGetNvLinkErrorCounterFunc. -func (mock *Interface) DeviceGetNvLinkErrorCounter(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { +func (mock *Interface) DeviceGetNvLinkErrorCounter(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, error) { if mock.DeviceGetNvLinkErrorCounterFunc == nil { panic("Interface.DeviceGetNvLinkErrorCounterFunc: method is nil but Interface.DeviceGetNvLinkErrorCounter was just called") } @@ -8253,7 +8253,7 @@ func (mock *Interface) DeviceGetNvLinkErrorCounterCalls() []struct { } // DeviceGetNvLinkRemoteDeviceType calls DeviceGetNvLinkRemoteDeviceTypeFunc. -func (mock *Interface) DeviceGetNvLinkRemoteDeviceType(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) { +func (mock *Interface) DeviceGetNvLinkRemoteDeviceType(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, error) { if mock.DeviceGetNvLinkRemoteDeviceTypeFunc == nil { panic("Interface.DeviceGetNvLinkRemoteDeviceTypeFunc: method is nil but Interface.DeviceGetNvLinkRemoteDeviceType was just called") } @@ -8289,7 +8289,7 @@ func (mock *Interface) DeviceGetNvLinkRemoteDeviceTypeCalls() []struct { } // DeviceGetNvLinkRemotePciInfo calls DeviceGetNvLinkRemotePciInfoFunc. -func (mock *Interface) DeviceGetNvLinkRemotePciInfo(device nvml.Device, n int) (nvml.PciInfo, nvml.Return) { +func (mock *Interface) DeviceGetNvLinkRemotePciInfo(device nvml.Device, n int) (nvml.PciInfo, error) { if mock.DeviceGetNvLinkRemotePciInfoFunc == nil { panic("Interface.DeviceGetNvLinkRemotePciInfoFunc: method is nil but Interface.DeviceGetNvLinkRemotePciInfo was just called") } @@ -8325,7 +8325,7 @@ func (mock *Interface) DeviceGetNvLinkRemotePciInfoCalls() []struct { } // DeviceGetNvLinkState calls DeviceGetNvLinkStateFunc. -func (mock *Interface) DeviceGetNvLinkState(device nvml.Device, n int) (nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetNvLinkState(device nvml.Device, n int) (nvml.EnableState, error) { if mock.DeviceGetNvLinkStateFunc == nil { panic("Interface.DeviceGetNvLinkStateFunc: method is nil but Interface.DeviceGetNvLinkState was just called") } @@ -8361,7 +8361,7 @@ func (mock *Interface) DeviceGetNvLinkStateCalls() []struct { } // DeviceGetNvLinkUtilizationControl calls DeviceGetNvLinkUtilizationControlFunc. -func (mock *Interface) DeviceGetNvLinkUtilizationControl(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { +func (mock *Interface) DeviceGetNvLinkUtilizationControl(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, error) { if mock.DeviceGetNvLinkUtilizationControlFunc == nil { panic("Interface.DeviceGetNvLinkUtilizationControlFunc: method is nil but Interface.DeviceGetNvLinkUtilizationControl was just called") } @@ -8401,7 +8401,7 @@ func (mock *Interface) DeviceGetNvLinkUtilizationControlCalls() []struct { } // DeviceGetNvLinkUtilizationCounter calls DeviceGetNvLinkUtilizationCounterFunc. -func (mock *Interface) DeviceGetNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int) (uint64, uint64, nvml.Return) { +func (mock *Interface) DeviceGetNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int) (uint64, uint64, error) { if mock.DeviceGetNvLinkUtilizationCounterFunc == nil { panic("Interface.DeviceGetNvLinkUtilizationCounterFunc: method is nil but Interface.DeviceGetNvLinkUtilizationCounter was just called") } @@ -8441,7 +8441,7 @@ func (mock *Interface) DeviceGetNvLinkUtilizationCounterCalls() []struct { } // DeviceGetNvLinkVersion calls DeviceGetNvLinkVersionFunc. -func (mock *Interface) DeviceGetNvLinkVersion(device nvml.Device, n int) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetNvLinkVersion(device nvml.Device, n int) (uint32, error) { if mock.DeviceGetNvLinkVersionFunc == nil { panic("Interface.DeviceGetNvLinkVersionFunc: method is nil but Interface.DeviceGetNvLinkVersion was just called") } @@ -8477,7 +8477,7 @@ func (mock *Interface) DeviceGetNvLinkVersionCalls() []struct { } // DeviceGetOfaUtilization calls DeviceGetOfaUtilizationFunc. -func (mock *Interface) DeviceGetOfaUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { +func (mock *Interface) DeviceGetOfaUtilization(device nvml.Device) (uint32, uint32, error) { if mock.DeviceGetOfaUtilizationFunc == nil { panic("Interface.DeviceGetOfaUtilizationFunc: method is nil but Interface.DeviceGetOfaUtilization was just called") } @@ -8509,7 +8509,7 @@ func (mock *Interface) DeviceGetOfaUtilizationCalls() []struct { } // DeviceGetP2PStatus calls DeviceGetP2PStatusFunc. -func (mock *Interface) DeviceGetP2PStatus(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { +func (mock *Interface) DeviceGetP2PStatus(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, error) { if mock.DeviceGetP2PStatusFunc == nil { panic("Interface.DeviceGetP2PStatusFunc: method is nil but Interface.DeviceGetP2PStatus was just called") } @@ -8549,7 +8549,7 @@ func (mock *Interface) DeviceGetP2PStatusCalls() []struct { } // DeviceGetPciInfo calls DeviceGetPciInfoFunc. -func (mock *Interface) DeviceGetPciInfo(device nvml.Device) (nvml.PciInfo, nvml.Return) { +func (mock *Interface) DeviceGetPciInfo(device nvml.Device) (nvml.PciInfo, error) { if mock.DeviceGetPciInfoFunc == nil { panic("Interface.DeviceGetPciInfoFunc: method is nil but Interface.DeviceGetPciInfo was just called") } @@ -8581,7 +8581,7 @@ func (mock *Interface) DeviceGetPciInfoCalls() []struct { } // DeviceGetPciInfoExt calls DeviceGetPciInfoExtFunc. -func (mock *Interface) DeviceGetPciInfoExt(device nvml.Device) (nvml.PciInfoExt, nvml.Return) { +func (mock *Interface) DeviceGetPciInfoExt(device nvml.Device) (nvml.PciInfoExt, error) { if mock.DeviceGetPciInfoExtFunc == nil { panic("Interface.DeviceGetPciInfoExtFunc: method is nil but Interface.DeviceGetPciInfoExt was just called") } @@ -8613,7 +8613,7 @@ func (mock *Interface) DeviceGetPciInfoExtCalls() []struct { } // DeviceGetPcieLinkMaxSpeed calls DeviceGetPcieLinkMaxSpeedFunc. -func (mock *Interface) DeviceGetPcieLinkMaxSpeed(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetPcieLinkMaxSpeed(device nvml.Device) (uint32, error) { if mock.DeviceGetPcieLinkMaxSpeedFunc == nil { panic("Interface.DeviceGetPcieLinkMaxSpeedFunc: method is nil but Interface.DeviceGetPcieLinkMaxSpeed was just called") } @@ -8645,7 +8645,7 @@ func (mock *Interface) DeviceGetPcieLinkMaxSpeedCalls() []struct { } // DeviceGetPcieReplayCounter calls DeviceGetPcieReplayCounterFunc. -func (mock *Interface) DeviceGetPcieReplayCounter(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetPcieReplayCounter(device nvml.Device) (int, error) { if mock.DeviceGetPcieReplayCounterFunc == nil { panic("Interface.DeviceGetPcieReplayCounterFunc: method is nil but Interface.DeviceGetPcieReplayCounter was just called") } @@ -8677,7 +8677,7 @@ func (mock *Interface) DeviceGetPcieReplayCounterCalls() []struct { } // DeviceGetPcieSpeed calls DeviceGetPcieSpeedFunc. -func (mock *Interface) DeviceGetPcieSpeed(device nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceGetPcieSpeed(device nvml.Device) (int, error) { if mock.DeviceGetPcieSpeedFunc == nil { panic("Interface.DeviceGetPcieSpeedFunc: method is nil but Interface.DeviceGetPcieSpeed was just called") } @@ -8709,7 +8709,7 @@ func (mock *Interface) DeviceGetPcieSpeedCalls() []struct { } // DeviceGetPcieThroughput calls DeviceGetPcieThroughputFunc. -func (mock *Interface) DeviceGetPcieThroughput(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetPcieThroughput(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, error) { if mock.DeviceGetPcieThroughputFunc == nil { panic("Interface.DeviceGetPcieThroughputFunc: method is nil but Interface.DeviceGetPcieThroughput was just called") } @@ -8745,7 +8745,7 @@ func (mock *Interface) DeviceGetPcieThroughputCalls() []struct { } // DeviceGetPerformanceState calls DeviceGetPerformanceStateFunc. -func (mock *Interface) DeviceGetPerformanceState(device nvml.Device) (nvml.Pstates, nvml.Return) { +func (mock *Interface) DeviceGetPerformanceState(device nvml.Device) (nvml.Pstates, error) { if mock.DeviceGetPerformanceStateFunc == nil { panic("Interface.DeviceGetPerformanceStateFunc: method is nil but Interface.DeviceGetPerformanceState was just called") } @@ -8777,7 +8777,7 @@ func (mock *Interface) DeviceGetPerformanceStateCalls() []struct { } // DeviceGetPersistenceMode calls DeviceGetPersistenceModeFunc. -func (mock *Interface) DeviceGetPersistenceMode(device nvml.Device) (nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetPersistenceMode(device nvml.Device) (nvml.EnableState, error) { if mock.DeviceGetPersistenceModeFunc == nil { panic("Interface.DeviceGetPersistenceModeFunc: method is nil but Interface.DeviceGetPersistenceMode was just called") } @@ -8809,7 +8809,7 @@ func (mock *Interface) DeviceGetPersistenceModeCalls() []struct { } // DeviceGetPgpuMetadataString calls DeviceGetPgpuMetadataStringFunc. -func (mock *Interface) DeviceGetPgpuMetadataString(device nvml.Device) (string, nvml.Return) { +func (mock *Interface) DeviceGetPgpuMetadataString(device nvml.Device) (string, error) { if mock.DeviceGetPgpuMetadataStringFunc == nil { panic("Interface.DeviceGetPgpuMetadataStringFunc: method is nil but Interface.DeviceGetPgpuMetadataString was just called") } @@ -8841,7 +8841,7 @@ func (mock *Interface) DeviceGetPgpuMetadataStringCalls() []struct { } // DeviceGetPowerManagementDefaultLimit calls DeviceGetPowerManagementDefaultLimitFunc. -func (mock *Interface) DeviceGetPowerManagementDefaultLimit(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetPowerManagementDefaultLimit(device nvml.Device) (uint32, error) { if mock.DeviceGetPowerManagementDefaultLimitFunc == nil { panic("Interface.DeviceGetPowerManagementDefaultLimitFunc: method is nil but Interface.DeviceGetPowerManagementDefaultLimit was just called") } @@ -8873,7 +8873,7 @@ func (mock *Interface) DeviceGetPowerManagementDefaultLimitCalls() []struct { } // DeviceGetPowerManagementLimit calls DeviceGetPowerManagementLimitFunc. -func (mock *Interface) DeviceGetPowerManagementLimit(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetPowerManagementLimit(device nvml.Device) (uint32, error) { if mock.DeviceGetPowerManagementLimitFunc == nil { panic("Interface.DeviceGetPowerManagementLimitFunc: method is nil but Interface.DeviceGetPowerManagementLimit was just called") } @@ -8905,7 +8905,7 @@ func (mock *Interface) DeviceGetPowerManagementLimitCalls() []struct { } // DeviceGetPowerManagementLimitConstraints calls DeviceGetPowerManagementLimitConstraintsFunc. -func (mock *Interface) DeviceGetPowerManagementLimitConstraints(device nvml.Device) (uint32, uint32, nvml.Return) { +func (mock *Interface) DeviceGetPowerManagementLimitConstraints(device nvml.Device) (uint32, uint32, error) { if mock.DeviceGetPowerManagementLimitConstraintsFunc == nil { panic("Interface.DeviceGetPowerManagementLimitConstraintsFunc: method is nil but Interface.DeviceGetPowerManagementLimitConstraints was just called") } @@ -8937,7 +8937,7 @@ func (mock *Interface) DeviceGetPowerManagementLimitConstraintsCalls() []struct } // DeviceGetPowerManagementMode calls DeviceGetPowerManagementModeFunc. -func (mock *Interface) DeviceGetPowerManagementMode(device nvml.Device) (nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetPowerManagementMode(device nvml.Device) (nvml.EnableState, error) { if mock.DeviceGetPowerManagementModeFunc == nil { panic("Interface.DeviceGetPowerManagementModeFunc: method is nil but Interface.DeviceGetPowerManagementMode was just called") } @@ -8969,7 +8969,7 @@ func (mock *Interface) DeviceGetPowerManagementModeCalls() []struct { } // DeviceGetPowerSource calls DeviceGetPowerSourceFunc. -func (mock *Interface) DeviceGetPowerSource(device nvml.Device) (nvml.PowerSource, nvml.Return) { +func (mock *Interface) DeviceGetPowerSource(device nvml.Device) (nvml.PowerSource, error) { if mock.DeviceGetPowerSourceFunc == nil { panic("Interface.DeviceGetPowerSourceFunc: method is nil but Interface.DeviceGetPowerSource was just called") } @@ -9001,7 +9001,7 @@ func (mock *Interface) DeviceGetPowerSourceCalls() []struct { } // DeviceGetPowerState calls DeviceGetPowerStateFunc. -func (mock *Interface) DeviceGetPowerState(device nvml.Device) (nvml.Pstates, nvml.Return) { +func (mock *Interface) DeviceGetPowerState(device nvml.Device) (nvml.Pstates, error) { if mock.DeviceGetPowerStateFunc == nil { panic("Interface.DeviceGetPowerStateFunc: method is nil but Interface.DeviceGetPowerState was just called") } @@ -9033,7 +9033,7 @@ func (mock *Interface) DeviceGetPowerStateCalls() []struct { } // DeviceGetPowerUsage calls DeviceGetPowerUsageFunc. -func (mock *Interface) DeviceGetPowerUsage(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetPowerUsage(device nvml.Device) (uint32, error) { if mock.DeviceGetPowerUsageFunc == nil { panic("Interface.DeviceGetPowerUsageFunc: method is nil but Interface.DeviceGetPowerUsage was just called") } @@ -9065,7 +9065,7 @@ func (mock *Interface) DeviceGetPowerUsageCalls() []struct { } // DeviceGetProcessUtilization calls DeviceGetProcessUtilizationFunc. -func (mock *Interface) DeviceGetProcessUtilization(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { +func (mock *Interface) DeviceGetProcessUtilization(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, error) { if mock.DeviceGetProcessUtilizationFunc == nil { panic("Interface.DeviceGetProcessUtilizationFunc: method is nil but Interface.DeviceGetProcessUtilization was just called") } @@ -9101,7 +9101,7 @@ func (mock *Interface) DeviceGetProcessUtilizationCalls() []struct { } // DeviceGetProcessesUtilizationInfo calls DeviceGetProcessesUtilizationInfoFunc. -func (mock *Interface) DeviceGetProcessesUtilizationInfo(device nvml.Device) (nvml.ProcessesUtilizationInfo, nvml.Return) { +func (mock *Interface) DeviceGetProcessesUtilizationInfo(device nvml.Device) (nvml.ProcessesUtilizationInfo, error) { if mock.DeviceGetProcessesUtilizationInfoFunc == nil { panic("Interface.DeviceGetProcessesUtilizationInfoFunc: method is nil but Interface.DeviceGetProcessesUtilizationInfo was just called") } @@ -9133,7 +9133,7 @@ func (mock *Interface) DeviceGetProcessesUtilizationInfoCalls() []struct { } // DeviceGetRemappedRows calls DeviceGetRemappedRowsFunc. -func (mock *Interface) DeviceGetRemappedRows(device nvml.Device) (int, int, bool, bool, nvml.Return) { +func (mock *Interface) DeviceGetRemappedRows(device nvml.Device) (int, int, bool, bool, error) { if mock.DeviceGetRemappedRowsFunc == nil { panic("Interface.DeviceGetRemappedRowsFunc: method is nil but Interface.DeviceGetRemappedRows was just called") } @@ -9165,7 +9165,7 @@ func (mock *Interface) DeviceGetRemappedRowsCalls() []struct { } // DeviceGetRetiredPages calls DeviceGetRetiredPagesFunc. -func (mock *Interface) DeviceGetRetiredPages(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { +func (mock *Interface) DeviceGetRetiredPages(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, error) { if mock.DeviceGetRetiredPagesFunc == nil { panic("Interface.DeviceGetRetiredPagesFunc: method is nil but Interface.DeviceGetRetiredPages was just called") } @@ -9201,7 +9201,7 @@ func (mock *Interface) DeviceGetRetiredPagesCalls() []struct { } // DeviceGetRetiredPagesPendingStatus calls DeviceGetRetiredPagesPendingStatusFunc. -func (mock *Interface) DeviceGetRetiredPagesPendingStatus(device nvml.Device) (nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceGetRetiredPagesPendingStatus(device nvml.Device) (nvml.EnableState, error) { if mock.DeviceGetRetiredPagesPendingStatusFunc == nil { panic("Interface.DeviceGetRetiredPagesPendingStatusFunc: method is nil but Interface.DeviceGetRetiredPagesPendingStatus was just called") } @@ -9233,7 +9233,7 @@ func (mock *Interface) DeviceGetRetiredPagesPendingStatusCalls() []struct { } // DeviceGetRetiredPages_v2 calls DeviceGetRetiredPages_v2Func. -func (mock *Interface) DeviceGetRetiredPages_v2(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { +func (mock *Interface) DeviceGetRetiredPages_v2(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, error) { if mock.DeviceGetRetiredPages_v2Func == nil { panic("Interface.DeviceGetRetiredPages_v2Func: method is nil but Interface.DeviceGetRetiredPages_v2 was just called") } @@ -9269,7 +9269,7 @@ func (mock *Interface) DeviceGetRetiredPages_v2Calls() []struct { } // DeviceGetRowRemapperHistogram calls DeviceGetRowRemapperHistogramFunc. -func (mock *Interface) DeviceGetRowRemapperHistogram(device nvml.Device) (nvml.RowRemapperHistogramValues, nvml.Return) { +func (mock *Interface) DeviceGetRowRemapperHistogram(device nvml.Device) (nvml.RowRemapperHistogramValues, error) { if mock.DeviceGetRowRemapperHistogramFunc == nil { panic("Interface.DeviceGetRowRemapperHistogramFunc: method is nil but Interface.DeviceGetRowRemapperHistogram was just called") } @@ -9301,7 +9301,7 @@ func (mock *Interface) DeviceGetRowRemapperHistogramCalls() []struct { } // DeviceGetRunningProcessDetailList calls DeviceGetRunningProcessDetailListFunc. -func (mock *Interface) DeviceGetRunningProcessDetailList(device nvml.Device) (nvml.ProcessDetailList, nvml.Return) { +func (mock *Interface) DeviceGetRunningProcessDetailList(device nvml.Device) (nvml.ProcessDetailList, error) { if mock.DeviceGetRunningProcessDetailListFunc == nil { panic("Interface.DeviceGetRunningProcessDetailListFunc: method is nil but Interface.DeviceGetRunningProcessDetailList was just called") } @@ -9333,7 +9333,7 @@ func (mock *Interface) DeviceGetRunningProcessDetailListCalls() []struct { } // DeviceGetSamples calls DeviceGetSamplesFunc. -func (mock *Interface) DeviceGetSamples(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { +func (mock *Interface) DeviceGetSamples(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, error) { if mock.DeviceGetSamplesFunc == nil { panic("Interface.DeviceGetSamplesFunc: method is nil but Interface.DeviceGetSamples was just called") } @@ -9373,7 +9373,7 @@ func (mock *Interface) DeviceGetSamplesCalls() []struct { } // DeviceGetSerial calls DeviceGetSerialFunc. -func (mock *Interface) DeviceGetSerial(device nvml.Device) (string, nvml.Return) { +func (mock *Interface) DeviceGetSerial(device nvml.Device) (string, error) { if mock.DeviceGetSerialFunc == nil { panic("Interface.DeviceGetSerialFunc: method is nil but Interface.DeviceGetSerial was just called") } @@ -9405,7 +9405,7 @@ func (mock *Interface) DeviceGetSerialCalls() []struct { } // DeviceGetSramEccErrorStatus calls DeviceGetSramEccErrorStatusFunc. -func (mock *Interface) DeviceGetSramEccErrorStatus(device nvml.Device) (nvml.EccSramErrorStatus, nvml.Return) { +func (mock *Interface) DeviceGetSramEccErrorStatus(device nvml.Device) (nvml.EccSramErrorStatus, error) { if mock.DeviceGetSramEccErrorStatusFunc == nil { panic("Interface.DeviceGetSramEccErrorStatusFunc: method is nil but Interface.DeviceGetSramEccErrorStatus was just called") } @@ -9437,7 +9437,7 @@ func (mock *Interface) DeviceGetSramEccErrorStatusCalls() []struct { } // DeviceGetSupportedClocksEventReasons calls DeviceGetSupportedClocksEventReasonsFunc. -func (mock *Interface) DeviceGetSupportedClocksEventReasons(device nvml.Device) (uint64, nvml.Return) { +func (mock *Interface) DeviceGetSupportedClocksEventReasons(device nvml.Device) (uint64, error) { if mock.DeviceGetSupportedClocksEventReasonsFunc == nil { panic("Interface.DeviceGetSupportedClocksEventReasonsFunc: method is nil but Interface.DeviceGetSupportedClocksEventReasons was just called") } @@ -9469,7 +9469,7 @@ func (mock *Interface) DeviceGetSupportedClocksEventReasonsCalls() []struct { } // DeviceGetSupportedClocksThrottleReasons calls DeviceGetSupportedClocksThrottleReasonsFunc. -func (mock *Interface) DeviceGetSupportedClocksThrottleReasons(device nvml.Device) (uint64, nvml.Return) { +func (mock *Interface) DeviceGetSupportedClocksThrottleReasons(device nvml.Device) (uint64, error) { if mock.DeviceGetSupportedClocksThrottleReasonsFunc == nil { panic("Interface.DeviceGetSupportedClocksThrottleReasonsFunc: method is nil but Interface.DeviceGetSupportedClocksThrottleReasons was just called") } @@ -9501,7 +9501,7 @@ func (mock *Interface) DeviceGetSupportedClocksThrottleReasonsCalls() []struct { } // DeviceGetSupportedEventTypes calls DeviceGetSupportedEventTypesFunc. -func (mock *Interface) DeviceGetSupportedEventTypes(device nvml.Device) (uint64, nvml.Return) { +func (mock *Interface) DeviceGetSupportedEventTypes(device nvml.Device) (uint64, error) { if mock.DeviceGetSupportedEventTypesFunc == nil { panic("Interface.DeviceGetSupportedEventTypesFunc: method is nil but Interface.DeviceGetSupportedEventTypes was just called") } @@ -9533,7 +9533,7 @@ func (mock *Interface) DeviceGetSupportedEventTypesCalls() []struct { } // DeviceGetSupportedGraphicsClocks calls DeviceGetSupportedGraphicsClocksFunc. -func (mock *Interface) DeviceGetSupportedGraphicsClocks(device nvml.Device, n int) (int, uint32, nvml.Return) { +func (mock *Interface) DeviceGetSupportedGraphicsClocks(device nvml.Device, n int) (int, uint32, error) { if mock.DeviceGetSupportedGraphicsClocksFunc == nil { panic("Interface.DeviceGetSupportedGraphicsClocksFunc: method is nil but Interface.DeviceGetSupportedGraphicsClocks was just called") } @@ -9569,7 +9569,7 @@ func (mock *Interface) DeviceGetSupportedGraphicsClocksCalls() []struct { } // DeviceGetSupportedMemoryClocks calls DeviceGetSupportedMemoryClocksFunc. -func (mock *Interface) DeviceGetSupportedMemoryClocks(device nvml.Device) (int, uint32, nvml.Return) { +func (mock *Interface) DeviceGetSupportedMemoryClocks(device nvml.Device) (int, uint32, error) { if mock.DeviceGetSupportedMemoryClocksFunc == nil { panic("Interface.DeviceGetSupportedMemoryClocksFunc: method is nil but Interface.DeviceGetSupportedMemoryClocks was just called") } @@ -9601,7 +9601,7 @@ func (mock *Interface) DeviceGetSupportedMemoryClocksCalls() []struct { } // DeviceGetSupportedPerformanceStates calls DeviceGetSupportedPerformanceStatesFunc. -func (mock *Interface) DeviceGetSupportedPerformanceStates(device nvml.Device) ([]nvml.Pstates, nvml.Return) { +func (mock *Interface) DeviceGetSupportedPerformanceStates(device nvml.Device) ([]nvml.Pstates, error) { if mock.DeviceGetSupportedPerformanceStatesFunc == nil { panic("Interface.DeviceGetSupportedPerformanceStatesFunc: method is nil but Interface.DeviceGetSupportedPerformanceStates was just called") } @@ -9633,7 +9633,7 @@ func (mock *Interface) DeviceGetSupportedPerformanceStatesCalls() []struct { } // DeviceGetSupportedVgpus calls DeviceGetSupportedVgpusFunc. -func (mock *Interface) DeviceGetSupportedVgpus(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { +func (mock *Interface) DeviceGetSupportedVgpus(device nvml.Device) ([]nvml.VgpuTypeId, error) { if mock.DeviceGetSupportedVgpusFunc == nil { panic("Interface.DeviceGetSupportedVgpusFunc: method is nil but Interface.DeviceGetSupportedVgpus was just called") } @@ -9665,7 +9665,7 @@ func (mock *Interface) DeviceGetSupportedVgpusCalls() []struct { } // DeviceGetTargetFanSpeed calls DeviceGetTargetFanSpeedFunc. -func (mock *Interface) DeviceGetTargetFanSpeed(device nvml.Device, n int) (int, nvml.Return) { +func (mock *Interface) DeviceGetTargetFanSpeed(device nvml.Device, n int) (int, error) { if mock.DeviceGetTargetFanSpeedFunc == nil { panic("Interface.DeviceGetTargetFanSpeedFunc: method is nil but Interface.DeviceGetTargetFanSpeed was just called") } @@ -9701,7 +9701,7 @@ func (mock *Interface) DeviceGetTargetFanSpeedCalls() []struct { } // DeviceGetTemperature calls DeviceGetTemperatureFunc. -func (mock *Interface) DeviceGetTemperature(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetTemperature(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, error) { if mock.DeviceGetTemperatureFunc == nil { panic("Interface.DeviceGetTemperatureFunc: method is nil but Interface.DeviceGetTemperature was just called") } @@ -9737,7 +9737,7 @@ func (mock *Interface) DeviceGetTemperatureCalls() []struct { } // DeviceGetTemperatureThreshold calls DeviceGetTemperatureThresholdFunc. -func (mock *Interface) DeviceGetTemperatureThreshold(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { +func (mock *Interface) DeviceGetTemperatureThreshold(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, error) { if mock.DeviceGetTemperatureThresholdFunc == nil { panic("Interface.DeviceGetTemperatureThresholdFunc: method is nil but Interface.DeviceGetTemperatureThreshold was just called") } @@ -9773,7 +9773,7 @@ func (mock *Interface) DeviceGetTemperatureThresholdCalls() []struct { } // DeviceGetThermalSettings calls DeviceGetThermalSettingsFunc. -func (mock *Interface) DeviceGetThermalSettings(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) { +func (mock *Interface) DeviceGetThermalSettings(device nvml.Device, v uint32) (nvml.GpuThermalSettings, error) { if mock.DeviceGetThermalSettingsFunc == nil { panic("Interface.DeviceGetThermalSettingsFunc: method is nil but Interface.DeviceGetThermalSettings was just called") } @@ -9809,7 +9809,7 @@ func (mock *Interface) DeviceGetThermalSettingsCalls() []struct { } // DeviceGetTopologyCommonAncestor calls DeviceGetTopologyCommonAncestorFunc. -func (mock *Interface) DeviceGetTopologyCommonAncestor(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { +func (mock *Interface) DeviceGetTopologyCommonAncestor(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, error) { if mock.DeviceGetTopologyCommonAncestorFunc == nil { panic("Interface.DeviceGetTopologyCommonAncestorFunc: method is nil but Interface.DeviceGetTopologyCommonAncestor was just called") } @@ -9845,7 +9845,7 @@ func (mock *Interface) DeviceGetTopologyCommonAncestorCalls() []struct { } // DeviceGetTopologyNearestGpus calls DeviceGetTopologyNearestGpusFunc. -func (mock *Interface) DeviceGetTopologyNearestGpus(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { +func (mock *Interface) DeviceGetTopologyNearestGpus(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, error) { if mock.DeviceGetTopologyNearestGpusFunc == nil { panic("Interface.DeviceGetTopologyNearestGpusFunc: method is nil but Interface.DeviceGetTopologyNearestGpus was just called") } @@ -9881,7 +9881,7 @@ func (mock *Interface) DeviceGetTopologyNearestGpusCalls() []struct { } // DeviceGetTotalEccErrors calls DeviceGetTotalEccErrorsFunc. -func (mock *Interface) DeviceGetTotalEccErrors(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { +func (mock *Interface) DeviceGetTotalEccErrors(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, error) { if mock.DeviceGetTotalEccErrorsFunc == nil { panic("Interface.DeviceGetTotalEccErrorsFunc: method is nil but Interface.DeviceGetTotalEccErrors was just called") } @@ -9921,7 +9921,7 @@ func (mock *Interface) DeviceGetTotalEccErrorsCalls() []struct { } // DeviceGetTotalEnergyConsumption calls DeviceGetTotalEnergyConsumptionFunc. -func (mock *Interface) DeviceGetTotalEnergyConsumption(device nvml.Device) (uint64, nvml.Return) { +func (mock *Interface) DeviceGetTotalEnergyConsumption(device nvml.Device) (uint64, error) { if mock.DeviceGetTotalEnergyConsumptionFunc == nil { panic("Interface.DeviceGetTotalEnergyConsumptionFunc: method is nil but Interface.DeviceGetTotalEnergyConsumption was just called") } @@ -9953,7 +9953,7 @@ func (mock *Interface) DeviceGetTotalEnergyConsumptionCalls() []struct { } // DeviceGetUUID calls DeviceGetUUIDFunc. -func (mock *Interface) DeviceGetUUID(device nvml.Device) (string, nvml.Return) { +func (mock *Interface) DeviceGetUUID(device nvml.Device) (string, error) { if mock.DeviceGetUUIDFunc == nil { panic("Interface.DeviceGetUUIDFunc: method is nil but Interface.DeviceGetUUID was just called") } @@ -9985,7 +9985,7 @@ func (mock *Interface) DeviceGetUUIDCalls() []struct { } // DeviceGetUtilizationRates calls DeviceGetUtilizationRatesFunc. -func (mock *Interface) DeviceGetUtilizationRates(device nvml.Device) (nvml.Utilization, nvml.Return) { +func (mock *Interface) DeviceGetUtilizationRates(device nvml.Device) (nvml.Utilization, error) { if mock.DeviceGetUtilizationRatesFunc == nil { panic("Interface.DeviceGetUtilizationRatesFunc: method is nil but Interface.DeviceGetUtilizationRates was just called") } @@ -10017,7 +10017,7 @@ func (mock *Interface) DeviceGetUtilizationRatesCalls() []struct { } // DeviceGetVbiosVersion calls DeviceGetVbiosVersionFunc. -func (mock *Interface) DeviceGetVbiosVersion(device nvml.Device) (string, nvml.Return) { +func (mock *Interface) DeviceGetVbiosVersion(device nvml.Device) (string, error) { if mock.DeviceGetVbiosVersionFunc == nil { panic("Interface.DeviceGetVbiosVersionFunc: method is nil but Interface.DeviceGetVbiosVersion was just called") } @@ -10049,7 +10049,7 @@ func (mock *Interface) DeviceGetVbiosVersionCalls() []struct { } // DeviceGetVgpuCapabilities calls DeviceGetVgpuCapabilitiesFunc. -func (mock *Interface) DeviceGetVgpuCapabilities(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { +func (mock *Interface) DeviceGetVgpuCapabilities(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, error) { if mock.DeviceGetVgpuCapabilitiesFunc == nil { panic("Interface.DeviceGetVgpuCapabilitiesFunc: method is nil but Interface.DeviceGetVgpuCapabilities was just called") } @@ -10085,7 +10085,7 @@ func (mock *Interface) DeviceGetVgpuCapabilitiesCalls() []struct { } // DeviceGetVgpuHeterogeneousMode calls DeviceGetVgpuHeterogeneousModeFunc. -func (mock *Interface) DeviceGetVgpuHeterogeneousMode(device nvml.Device) (nvml.VgpuHeterogeneousMode, nvml.Return) { +func (mock *Interface) DeviceGetVgpuHeterogeneousMode(device nvml.Device) (nvml.VgpuHeterogeneousMode, error) { if mock.DeviceGetVgpuHeterogeneousModeFunc == nil { panic("Interface.DeviceGetVgpuHeterogeneousModeFunc: method is nil but Interface.DeviceGetVgpuHeterogeneousMode was just called") } @@ -10117,7 +10117,7 @@ func (mock *Interface) DeviceGetVgpuHeterogeneousModeCalls() []struct { } // DeviceGetVgpuInstancesUtilizationInfo calls DeviceGetVgpuInstancesUtilizationInfoFunc. -func (mock *Interface) DeviceGetVgpuInstancesUtilizationInfo(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { +func (mock *Interface) DeviceGetVgpuInstancesUtilizationInfo(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, error) { if mock.DeviceGetVgpuInstancesUtilizationInfoFunc == nil { panic("Interface.DeviceGetVgpuInstancesUtilizationInfoFunc: method is nil but Interface.DeviceGetVgpuInstancesUtilizationInfo was just called") } @@ -10149,7 +10149,7 @@ func (mock *Interface) DeviceGetVgpuInstancesUtilizationInfoCalls() []struct { } // DeviceGetVgpuMetadata calls DeviceGetVgpuMetadataFunc. -func (mock *Interface) DeviceGetVgpuMetadata(device nvml.Device) (nvml.VgpuPgpuMetadata, nvml.Return) { +func (mock *Interface) DeviceGetVgpuMetadata(device nvml.Device) (nvml.VgpuPgpuMetadata, error) { if mock.DeviceGetVgpuMetadataFunc == nil { panic("Interface.DeviceGetVgpuMetadataFunc: method is nil but Interface.DeviceGetVgpuMetadata was just called") } @@ -10181,7 +10181,7 @@ func (mock *Interface) DeviceGetVgpuMetadataCalls() []struct { } // DeviceGetVgpuProcessUtilization calls DeviceGetVgpuProcessUtilizationFunc. -func (mock *Interface) DeviceGetVgpuProcessUtilization(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { +func (mock *Interface) DeviceGetVgpuProcessUtilization(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, error) { if mock.DeviceGetVgpuProcessUtilizationFunc == nil { panic("Interface.DeviceGetVgpuProcessUtilizationFunc: method is nil but Interface.DeviceGetVgpuProcessUtilization was just called") } @@ -10217,7 +10217,7 @@ func (mock *Interface) DeviceGetVgpuProcessUtilizationCalls() []struct { } // DeviceGetVgpuProcessesUtilizationInfo calls DeviceGetVgpuProcessesUtilizationInfoFunc. -func (mock *Interface) DeviceGetVgpuProcessesUtilizationInfo(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { +func (mock *Interface) DeviceGetVgpuProcessesUtilizationInfo(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, error) { if mock.DeviceGetVgpuProcessesUtilizationInfoFunc == nil { panic("Interface.DeviceGetVgpuProcessesUtilizationInfoFunc: method is nil but Interface.DeviceGetVgpuProcessesUtilizationInfo was just called") } @@ -10249,7 +10249,7 @@ func (mock *Interface) DeviceGetVgpuProcessesUtilizationInfoCalls() []struct { } // DeviceGetVgpuSchedulerCapabilities calls DeviceGetVgpuSchedulerCapabilitiesFunc. -func (mock *Interface) DeviceGetVgpuSchedulerCapabilities(device nvml.Device) (nvml.VgpuSchedulerCapabilities, nvml.Return) { +func (mock *Interface) DeviceGetVgpuSchedulerCapabilities(device nvml.Device) (nvml.VgpuSchedulerCapabilities, error) { if mock.DeviceGetVgpuSchedulerCapabilitiesFunc == nil { panic("Interface.DeviceGetVgpuSchedulerCapabilitiesFunc: method is nil but Interface.DeviceGetVgpuSchedulerCapabilities was just called") } @@ -10281,7 +10281,7 @@ func (mock *Interface) DeviceGetVgpuSchedulerCapabilitiesCalls() []struct { } // DeviceGetVgpuSchedulerLog calls DeviceGetVgpuSchedulerLogFunc. -func (mock *Interface) DeviceGetVgpuSchedulerLog(device nvml.Device) (nvml.VgpuSchedulerLog, nvml.Return) { +func (mock *Interface) DeviceGetVgpuSchedulerLog(device nvml.Device) (nvml.VgpuSchedulerLog, error) { if mock.DeviceGetVgpuSchedulerLogFunc == nil { panic("Interface.DeviceGetVgpuSchedulerLogFunc: method is nil but Interface.DeviceGetVgpuSchedulerLog was just called") } @@ -10313,7 +10313,7 @@ func (mock *Interface) DeviceGetVgpuSchedulerLogCalls() []struct { } // DeviceGetVgpuSchedulerState calls DeviceGetVgpuSchedulerStateFunc. -func (mock *Interface) DeviceGetVgpuSchedulerState(device nvml.Device) (nvml.VgpuSchedulerGetState, nvml.Return) { +func (mock *Interface) DeviceGetVgpuSchedulerState(device nvml.Device) (nvml.VgpuSchedulerGetState, error) { if mock.DeviceGetVgpuSchedulerStateFunc == nil { panic("Interface.DeviceGetVgpuSchedulerStateFunc: method is nil but Interface.DeviceGetVgpuSchedulerState was just called") } @@ -10345,7 +10345,7 @@ func (mock *Interface) DeviceGetVgpuSchedulerStateCalls() []struct { } // DeviceGetVgpuTypeCreatablePlacements calls DeviceGetVgpuTypeCreatablePlacementsFunc. -func (mock *Interface) DeviceGetVgpuTypeCreatablePlacements(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +func (mock *Interface) DeviceGetVgpuTypeCreatablePlacements(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) { if mock.DeviceGetVgpuTypeCreatablePlacementsFunc == nil { panic("Interface.DeviceGetVgpuTypeCreatablePlacementsFunc: method is nil but Interface.DeviceGetVgpuTypeCreatablePlacements was just called") } @@ -10381,7 +10381,7 @@ func (mock *Interface) DeviceGetVgpuTypeCreatablePlacementsCalls() []struct { } // DeviceGetVgpuTypeSupportedPlacements calls DeviceGetVgpuTypeSupportedPlacementsFunc. -func (mock *Interface) DeviceGetVgpuTypeSupportedPlacements(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +func (mock *Interface) DeviceGetVgpuTypeSupportedPlacements(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, error) { if mock.DeviceGetVgpuTypeSupportedPlacementsFunc == nil { panic("Interface.DeviceGetVgpuTypeSupportedPlacementsFunc: method is nil but Interface.DeviceGetVgpuTypeSupportedPlacements was just called") } @@ -10417,7 +10417,7 @@ func (mock *Interface) DeviceGetVgpuTypeSupportedPlacementsCalls() []struct { } // DeviceGetVgpuUtilization calls DeviceGetVgpuUtilizationFunc. -func (mock *Interface) DeviceGetVgpuUtilization(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { +func (mock *Interface) DeviceGetVgpuUtilization(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, error) { if mock.DeviceGetVgpuUtilizationFunc == nil { panic("Interface.DeviceGetVgpuUtilizationFunc: method is nil but Interface.DeviceGetVgpuUtilization was just called") } @@ -10453,7 +10453,7 @@ func (mock *Interface) DeviceGetVgpuUtilizationCalls() []struct { } // DeviceGetViolationStatus calls DeviceGetViolationStatusFunc. -func (mock *Interface) DeviceGetViolationStatus(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { +func (mock *Interface) DeviceGetViolationStatus(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, error) { if mock.DeviceGetViolationStatusFunc == nil { panic("Interface.DeviceGetViolationStatusFunc: method is nil but Interface.DeviceGetViolationStatus was just called") } @@ -10489,7 +10489,7 @@ func (mock *Interface) DeviceGetViolationStatusCalls() []struct { } // DeviceGetVirtualizationMode calls DeviceGetVirtualizationModeFunc. -func (mock *Interface) DeviceGetVirtualizationMode(device nvml.Device) (nvml.GpuVirtualizationMode, nvml.Return) { +func (mock *Interface) DeviceGetVirtualizationMode(device nvml.Device) (nvml.GpuVirtualizationMode, error) { if mock.DeviceGetVirtualizationModeFunc == nil { panic("Interface.DeviceGetVirtualizationModeFunc: method is nil but Interface.DeviceGetVirtualizationMode was just called") } @@ -10521,7 +10521,7 @@ func (mock *Interface) DeviceGetVirtualizationModeCalls() []struct { } // DeviceIsMigDeviceHandle calls DeviceIsMigDeviceHandleFunc. -func (mock *Interface) DeviceIsMigDeviceHandle(device nvml.Device) (bool, nvml.Return) { +func (mock *Interface) DeviceIsMigDeviceHandle(device nvml.Device) (bool, error) { if mock.DeviceIsMigDeviceHandleFunc == nil { panic("Interface.DeviceIsMigDeviceHandleFunc: method is nil but Interface.DeviceIsMigDeviceHandle was just called") } @@ -10553,7 +10553,7 @@ func (mock *Interface) DeviceIsMigDeviceHandleCalls() []struct { } // DeviceModifyDrainState calls DeviceModifyDrainStateFunc. -func (mock *Interface) DeviceModifyDrainState(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return { +func (mock *Interface) DeviceModifyDrainState(pciInfo *nvml.PciInfo, enableState nvml.EnableState) error { if mock.DeviceModifyDrainStateFunc == nil { panic("Interface.DeviceModifyDrainStateFunc: method is nil but Interface.DeviceModifyDrainState was just called") } @@ -10589,7 +10589,7 @@ func (mock *Interface) DeviceModifyDrainStateCalls() []struct { } // DeviceOnSameBoard calls DeviceOnSameBoardFunc. -func (mock *Interface) DeviceOnSameBoard(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) { +func (mock *Interface) DeviceOnSameBoard(device1 nvml.Device, device2 nvml.Device) (int, error) { if mock.DeviceOnSameBoardFunc == nil { panic("Interface.DeviceOnSameBoardFunc: method is nil but Interface.DeviceOnSameBoard was just called") } @@ -10625,7 +10625,7 @@ func (mock *Interface) DeviceOnSameBoardCalls() []struct { } // DeviceQueryDrainState calls DeviceQueryDrainStateFunc. -func (mock *Interface) DeviceQueryDrainState(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) { +func (mock *Interface) DeviceQueryDrainState(pciInfo *nvml.PciInfo) (nvml.EnableState, error) { if mock.DeviceQueryDrainStateFunc == nil { panic("Interface.DeviceQueryDrainStateFunc: method is nil but Interface.DeviceQueryDrainState was just called") } @@ -10657,7 +10657,7 @@ func (mock *Interface) DeviceQueryDrainStateCalls() []struct { } // DeviceRegisterEvents calls DeviceRegisterEventsFunc. -func (mock *Interface) DeviceRegisterEvents(device nvml.Device, v uint64, eventSet nvml.EventSet) nvml.Return { +func (mock *Interface) DeviceRegisterEvents(device nvml.Device, v uint64, eventSet nvml.EventSet) error { if mock.DeviceRegisterEventsFunc == nil { panic("Interface.DeviceRegisterEventsFunc: method is nil but Interface.DeviceRegisterEvents was just called") } @@ -10697,7 +10697,7 @@ func (mock *Interface) DeviceRegisterEventsCalls() []struct { } // DeviceRemoveGpu calls DeviceRemoveGpuFunc. -func (mock *Interface) DeviceRemoveGpu(pciInfo *nvml.PciInfo) nvml.Return { +func (mock *Interface) DeviceRemoveGpu(pciInfo *nvml.PciInfo) error { if mock.DeviceRemoveGpuFunc == nil { panic("Interface.DeviceRemoveGpuFunc: method is nil but Interface.DeviceRemoveGpu was just called") } @@ -10729,7 +10729,7 @@ func (mock *Interface) DeviceRemoveGpuCalls() []struct { } // DeviceRemoveGpu_v2 calls DeviceRemoveGpu_v2Func. -func (mock *Interface) DeviceRemoveGpu_v2(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) nvml.Return { +func (mock *Interface) DeviceRemoveGpu_v2(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) error { if mock.DeviceRemoveGpu_v2Func == nil { panic("Interface.DeviceRemoveGpu_v2Func: method is nil but Interface.DeviceRemoveGpu_v2 was just called") } @@ -10769,7 +10769,7 @@ func (mock *Interface) DeviceRemoveGpu_v2Calls() []struct { } // DeviceResetApplicationsClocks calls DeviceResetApplicationsClocksFunc. -func (mock *Interface) DeviceResetApplicationsClocks(device nvml.Device) nvml.Return { +func (mock *Interface) DeviceResetApplicationsClocks(device nvml.Device) error { if mock.DeviceResetApplicationsClocksFunc == nil { panic("Interface.DeviceResetApplicationsClocksFunc: method is nil but Interface.DeviceResetApplicationsClocks was just called") } @@ -10801,7 +10801,7 @@ func (mock *Interface) DeviceResetApplicationsClocksCalls() []struct { } // DeviceResetGpuLockedClocks calls DeviceResetGpuLockedClocksFunc. -func (mock *Interface) DeviceResetGpuLockedClocks(device nvml.Device) nvml.Return { +func (mock *Interface) DeviceResetGpuLockedClocks(device nvml.Device) error { if mock.DeviceResetGpuLockedClocksFunc == nil { panic("Interface.DeviceResetGpuLockedClocksFunc: method is nil but Interface.DeviceResetGpuLockedClocks was just called") } @@ -10833,7 +10833,7 @@ func (mock *Interface) DeviceResetGpuLockedClocksCalls() []struct { } // DeviceResetMemoryLockedClocks calls DeviceResetMemoryLockedClocksFunc. -func (mock *Interface) DeviceResetMemoryLockedClocks(device nvml.Device) nvml.Return { +func (mock *Interface) DeviceResetMemoryLockedClocks(device nvml.Device) error { if mock.DeviceResetMemoryLockedClocksFunc == nil { panic("Interface.DeviceResetMemoryLockedClocksFunc: method is nil but Interface.DeviceResetMemoryLockedClocks was just called") } @@ -10865,7 +10865,7 @@ func (mock *Interface) DeviceResetMemoryLockedClocksCalls() []struct { } // DeviceResetNvLinkErrorCounters calls DeviceResetNvLinkErrorCountersFunc. -func (mock *Interface) DeviceResetNvLinkErrorCounters(device nvml.Device, n int) nvml.Return { +func (mock *Interface) DeviceResetNvLinkErrorCounters(device nvml.Device, n int) error { if mock.DeviceResetNvLinkErrorCountersFunc == nil { panic("Interface.DeviceResetNvLinkErrorCountersFunc: method is nil but Interface.DeviceResetNvLinkErrorCounters was just called") } @@ -10901,7 +10901,7 @@ func (mock *Interface) DeviceResetNvLinkErrorCountersCalls() []struct { } // DeviceResetNvLinkUtilizationCounter calls DeviceResetNvLinkUtilizationCounterFunc. -func (mock *Interface) DeviceResetNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int) nvml.Return { +func (mock *Interface) DeviceResetNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int) error { if mock.DeviceResetNvLinkUtilizationCounterFunc == nil { panic("Interface.DeviceResetNvLinkUtilizationCounterFunc: method is nil but Interface.DeviceResetNvLinkUtilizationCounter was just called") } @@ -10941,7 +10941,7 @@ func (mock *Interface) DeviceResetNvLinkUtilizationCounterCalls() []struct { } // DeviceSetAPIRestriction calls DeviceSetAPIRestrictionFunc. -func (mock *Interface) DeviceSetAPIRestriction(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { +func (mock *Interface) DeviceSetAPIRestriction(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) error { if mock.DeviceSetAPIRestrictionFunc == nil { panic("Interface.DeviceSetAPIRestrictionFunc: method is nil but Interface.DeviceSetAPIRestriction was just called") } @@ -10981,7 +10981,7 @@ func (mock *Interface) DeviceSetAPIRestrictionCalls() []struct { } // DeviceSetAccountingMode calls DeviceSetAccountingModeFunc. -func (mock *Interface) DeviceSetAccountingMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { +func (mock *Interface) DeviceSetAccountingMode(device nvml.Device, enableState nvml.EnableState) error { if mock.DeviceSetAccountingModeFunc == nil { panic("Interface.DeviceSetAccountingModeFunc: method is nil but Interface.DeviceSetAccountingMode was just called") } @@ -11017,7 +11017,7 @@ func (mock *Interface) DeviceSetAccountingModeCalls() []struct { } // DeviceSetApplicationsClocks calls DeviceSetApplicationsClocksFunc. -func (mock *Interface) DeviceSetApplicationsClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { +func (mock *Interface) DeviceSetApplicationsClocks(device nvml.Device, v1 uint32, v2 uint32) error { if mock.DeviceSetApplicationsClocksFunc == nil { panic("Interface.DeviceSetApplicationsClocksFunc: method is nil but Interface.DeviceSetApplicationsClocks was just called") } @@ -11057,7 +11057,7 @@ func (mock *Interface) DeviceSetApplicationsClocksCalls() []struct { } // DeviceSetAutoBoostedClocksEnabled calls DeviceSetAutoBoostedClocksEnabledFunc. -func (mock *Interface) DeviceSetAutoBoostedClocksEnabled(device nvml.Device, enableState nvml.EnableState) nvml.Return { +func (mock *Interface) DeviceSetAutoBoostedClocksEnabled(device nvml.Device, enableState nvml.EnableState) error { if mock.DeviceSetAutoBoostedClocksEnabledFunc == nil { panic("Interface.DeviceSetAutoBoostedClocksEnabledFunc: method is nil but Interface.DeviceSetAutoBoostedClocksEnabled was just called") } @@ -11093,7 +11093,7 @@ func (mock *Interface) DeviceSetAutoBoostedClocksEnabledCalls() []struct { } // DeviceSetComputeMode calls DeviceSetComputeModeFunc. -func (mock *Interface) DeviceSetComputeMode(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return { +func (mock *Interface) DeviceSetComputeMode(device nvml.Device, computeMode nvml.ComputeMode) error { if mock.DeviceSetComputeModeFunc == nil { panic("Interface.DeviceSetComputeModeFunc: method is nil but Interface.DeviceSetComputeMode was just called") } @@ -11129,7 +11129,7 @@ func (mock *Interface) DeviceSetComputeModeCalls() []struct { } // DeviceSetConfComputeUnprotectedMemSize calls DeviceSetConfComputeUnprotectedMemSizeFunc. -func (mock *Interface) DeviceSetConfComputeUnprotectedMemSize(device nvml.Device, v uint64) nvml.Return { +func (mock *Interface) DeviceSetConfComputeUnprotectedMemSize(device nvml.Device, v uint64) error { if mock.DeviceSetConfComputeUnprotectedMemSizeFunc == nil { panic("Interface.DeviceSetConfComputeUnprotectedMemSizeFunc: method is nil but Interface.DeviceSetConfComputeUnprotectedMemSize was just called") } @@ -11165,7 +11165,7 @@ func (mock *Interface) DeviceSetConfComputeUnprotectedMemSizeCalls() []struct { } // DeviceSetCpuAffinity calls DeviceSetCpuAffinityFunc. -func (mock *Interface) DeviceSetCpuAffinity(device nvml.Device) nvml.Return { +func (mock *Interface) DeviceSetCpuAffinity(device nvml.Device) error { if mock.DeviceSetCpuAffinityFunc == nil { panic("Interface.DeviceSetCpuAffinityFunc: method is nil but Interface.DeviceSetCpuAffinity was just called") } @@ -11197,7 +11197,7 @@ func (mock *Interface) DeviceSetCpuAffinityCalls() []struct { } // DeviceSetDefaultAutoBoostedClocksEnabled calls DeviceSetDefaultAutoBoostedClocksEnabledFunc. -func (mock *Interface) DeviceSetDefaultAutoBoostedClocksEnabled(device nvml.Device, enableState nvml.EnableState, v uint32) nvml.Return { +func (mock *Interface) DeviceSetDefaultAutoBoostedClocksEnabled(device nvml.Device, enableState nvml.EnableState, v uint32) error { if mock.DeviceSetDefaultAutoBoostedClocksEnabledFunc == nil { panic("Interface.DeviceSetDefaultAutoBoostedClocksEnabledFunc: method is nil but Interface.DeviceSetDefaultAutoBoostedClocksEnabled was just called") } @@ -11237,7 +11237,7 @@ func (mock *Interface) DeviceSetDefaultAutoBoostedClocksEnabledCalls() []struct } // DeviceSetDefaultFanSpeed_v2 calls DeviceSetDefaultFanSpeed_v2Func. -func (mock *Interface) DeviceSetDefaultFanSpeed_v2(device nvml.Device, n int) nvml.Return { +func (mock *Interface) DeviceSetDefaultFanSpeed_v2(device nvml.Device, n int) error { if mock.DeviceSetDefaultFanSpeed_v2Func == nil { panic("Interface.DeviceSetDefaultFanSpeed_v2Func: method is nil but Interface.DeviceSetDefaultFanSpeed_v2 was just called") } @@ -11273,7 +11273,7 @@ func (mock *Interface) DeviceSetDefaultFanSpeed_v2Calls() []struct { } // DeviceSetDriverModel calls DeviceSetDriverModelFunc. -func (mock *Interface) DeviceSetDriverModel(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return { +func (mock *Interface) DeviceSetDriverModel(device nvml.Device, driverModel nvml.DriverModel, v uint32) error { if mock.DeviceSetDriverModelFunc == nil { panic("Interface.DeviceSetDriverModelFunc: method is nil but Interface.DeviceSetDriverModel was just called") } @@ -11313,7 +11313,7 @@ func (mock *Interface) DeviceSetDriverModelCalls() []struct { } // DeviceSetEccMode calls DeviceSetEccModeFunc. -func (mock *Interface) DeviceSetEccMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { +func (mock *Interface) DeviceSetEccMode(device nvml.Device, enableState nvml.EnableState) error { if mock.DeviceSetEccModeFunc == nil { panic("Interface.DeviceSetEccModeFunc: method is nil but Interface.DeviceSetEccMode was just called") } @@ -11349,7 +11349,7 @@ func (mock *Interface) DeviceSetEccModeCalls() []struct { } // DeviceSetFanControlPolicy calls DeviceSetFanControlPolicyFunc. -func (mock *Interface) DeviceSetFanControlPolicy(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { +func (mock *Interface) DeviceSetFanControlPolicy(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) error { if mock.DeviceSetFanControlPolicyFunc == nil { panic("Interface.DeviceSetFanControlPolicyFunc: method is nil but Interface.DeviceSetFanControlPolicy was just called") } @@ -11389,7 +11389,7 @@ func (mock *Interface) DeviceSetFanControlPolicyCalls() []struct { } // DeviceSetFanSpeed_v2 calls DeviceSetFanSpeed_v2Func. -func (mock *Interface) DeviceSetFanSpeed_v2(device nvml.Device, n1 int, n2 int) nvml.Return { +func (mock *Interface) DeviceSetFanSpeed_v2(device nvml.Device, n1 int, n2 int) error { if mock.DeviceSetFanSpeed_v2Func == nil { panic("Interface.DeviceSetFanSpeed_v2Func: method is nil but Interface.DeviceSetFanSpeed_v2 was just called") } @@ -11429,7 +11429,7 @@ func (mock *Interface) DeviceSetFanSpeed_v2Calls() []struct { } // DeviceSetGpcClkVfOffset calls DeviceSetGpcClkVfOffsetFunc. -func (mock *Interface) DeviceSetGpcClkVfOffset(device nvml.Device, n int) nvml.Return { +func (mock *Interface) DeviceSetGpcClkVfOffset(device nvml.Device, n int) error { if mock.DeviceSetGpcClkVfOffsetFunc == nil { panic("Interface.DeviceSetGpcClkVfOffsetFunc: method is nil but Interface.DeviceSetGpcClkVfOffset was just called") } @@ -11465,7 +11465,7 @@ func (mock *Interface) DeviceSetGpcClkVfOffsetCalls() []struct { } // DeviceSetGpuLockedClocks calls DeviceSetGpuLockedClocksFunc. -func (mock *Interface) DeviceSetGpuLockedClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { +func (mock *Interface) DeviceSetGpuLockedClocks(device nvml.Device, v1 uint32, v2 uint32) error { if mock.DeviceSetGpuLockedClocksFunc == nil { panic("Interface.DeviceSetGpuLockedClocksFunc: method is nil but Interface.DeviceSetGpuLockedClocks was just called") } @@ -11505,7 +11505,7 @@ func (mock *Interface) DeviceSetGpuLockedClocksCalls() []struct { } // DeviceSetGpuOperationMode calls DeviceSetGpuOperationModeFunc. -func (mock *Interface) DeviceSetGpuOperationMode(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) nvml.Return { +func (mock *Interface) DeviceSetGpuOperationMode(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) error { if mock.DeviceSetGpuOperationModeFunc == nil { panic("Interface.DeviceSetGpuOperationModeFunc: method is nil but Interface.DeviceSetGpuOperationMode was just called") } @@ -11541,7 +11541,7 @@ func (mock *Interface) DeviceSetGpuOperationModeCalls() []struct { } // DeviceSetMemClkVfOffset calls DeviceSetMemClkVfOffsetFunc. -func (mock *Interface) DeviceSetMemClkVfOffset(device nvml.Device, n int) nvml.Return { +func (mock *Interface) DeviceSetMemClkVfOffset(device nvml.Device, n int) error { if mock.DeviceSetMemClkVfOffsetFunc == nil { panic("Interface.DeviceSetMemClkVfOffsetFunc: method is nil but Interface.DeviceSetMemClkVfOffset was just called") } @@ -11577,7 +11577,7 @@ func (mock *Interface) DeviceSetMemClkVfOffsetCalls() []struct { } // DeviceSetMemoryLockedClocks calls DeviceSetMemoryLockedClocksFunc. -func (mock *Interface) DeviceSetMemoryLockedClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { +func (mock *Interface) DeviceSetMemoryLockedClocks(device nvml.Device, v1 uint32, v2 uint32) error { if mock.DeviceSetMemoryLockedClocksFunc == nil { panic("Interface.DeviceSetMemoryLockedClocksFunc: method is nil but Interface.DeviceSetMemoryLockedClocks was just called") } @@ -11617,7 +11617,7 @@ func (mock *Interface) DeviceSetMemoryLockedClocksCalls() []struct { } // DeviceSetMigMode calls DeviceSetMigModeFunc. -func (mock *Interface) DeviceSetMigMode(device nvml.Device, n int) (nvml.Return, nvml.Return) { +func (mock *Interface) DeviceSetMigMode(device nvml.Device, n int) (error, error) { if mock.DeviceSetMigModeFunc == nil { panic("Interface.DeviceSetMigModeFunc: method is nil but Interface.DeviceSetMigMode was just called") } @@ -11653,7 +11653,7 @@ func (mock *Interface) DeviceSetMigModeCalls() []struct { } // DeviceSetNvLinkDeviceLowPowerThreshold calls DeviceSetNvLinkDeviceLowPowerThresholdFunc. -func (mock *Interface) DeviceSetNvLinkDeviceLowPowerThreshold(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { +func (mock *Interface) DeviceSetNvLinkDeviceLowPowerThreshold(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) error { if mock.DeviceSetNvLinkDeviceLowPowerThresholdFunc == nil { panic("Interface.DeviceSetNvLinkDeviceLowPowerThresholdFunc: method is nil but Interface.DeviceSetNvLinkDeviceLowPowerThreshold was just called") } @@ -11689,7 +11689,7 @@ func (mock *Interface) DeviceSetNvLinkDeviceLowPowerThresholdCalls() []struct { } // DeviceSetNvLinkUtilizationControl calls DeviceSetNvLinkUtilizationControlFunc. -func (mock *Interface) DeviceSetNvLinkUtilizationControl(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { +func (mock *Interface) DeviceSetNvLinkUtilizationControl(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) error { if mock.DeviceSetNvLinkUtilizationControlFunc == nil { panic("Interface.DeviceSetNvLinkUtilizationControlFunc: method is nil but Interface.DeviceSetNvLinkUtilizationControl was just called") } @@ -11737,7 +11737,7 @@ func (mock *Interface) DeviceSetNvLinkUtilizationControlCalls() []struct { } // DeviceSetPersistenceMode calls DeviceSetPersistenceModeFunc. -func (mock *Interface) DeviceSetPersistenceMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { +func (mock *Interface) DeviceSetPersistenceMode(device nvml.Device, enableState nvml.EnableState) error { if mock.DeviceSetPersistenceModeFunc == nil { panic("Interface.DeviceSetPersistenceModeFunc: method is nil but Interface.DeviceSetPersistenceMode was just called") } @@ -11773,7 +11773,7 @@ func (mock *Interface) DeviceSetPersistenceModeCalls() []struct { } // DeviceSetPowerManagementLimit calls DeviceSetPowerManagementLimitFunc. -func (mock *Interface) DeviceSetPowerManagementLimit(device nvml.Device, v uint32) nvml.Return { +func (mock *Interface) DeviceSetPowerManagementLimit(device nvml.Device, v uint32) error { if mock.DeviceSetPowerManagementLimitFunc == nil { panic("Interface.DeviceSetPowerManagementLimitFunc: method is nil but Interface.DeviceSetPowerManagementLimit was just called") } @@ -11809,7 +11809,7 @@ func (mock *Interface) DeviceSetPowerManagementLimitCalls() []struct { } // DeviceSetPowerManagementLimit_v2 calls DeviceSetPowerManagementLimit_v2Func. -func (mock *Interface) DeviceSetPowerManagementLimit_v2(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) nvml.Return { +func (mock *Interface) DeviceSetPowerManagementLimit_v2(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) error { if mock.DeviceSetPowerManagementLimit_v2Func == nil { panic("Interface.DeviceSetPowerManagementLimit_v2Func: method is nil but Interface.DeviceSetPowerManagementLimit_v2 was just called") } @@ -11845,7 +11845,7 @@ func (mock *Interface) DeviceSetPowerManagementLimit_v2Calls() []struct { } // DeviceSetTemperatureThreshold calls DeviceSetTemperatureThresholdFunc. -func (mock *Interface) DeviceSetTemperatureThreshold(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { +func (mock *Interface) DeviceSetTemperatureThreshold(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) error { if mock.DeviceSetTemperatureThresholdFunc == nil { panic("Interface.DeviceSetTemperatureThresholdFunc: method is nil but Interface.DeviceSetTemperatureThreshold was just called") } @@ -11885,7 +11885,7 @@ func (mock *Interface) DeviceSetTemperatureThresholdCalls() []struct { } // DeviceSetVgpuCapabilities calls DeviceSetVgpuCapabilitiesFunc. -func (mock *Interface) DeviceSetVgpuCapabilities(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { +func (mock *Interface) DeviceSetVgpuCapabilities(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) error { if mock.DeviceSetVgpuCapabilitiesFunc == nil { panic("Interface.DeviceSetVgpuCapabilitiesFunc: method is nil but Interface.DeviceSetVgpuCapabilities was just called") } @@ -11925,7 +11925,7 @@ func (mock *Interface) DeviceSetVgpuCapabilitiesCalls() []struct { } // DeviceSetVgpuHeterogeneousMode calls DeviceSetVgpuHeterogeneousModeFunc. -func (mock *Interface) DeviceSetVgpuHeterogeneousMode(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { +func (mock *Interface) DeviceSetVgpuHeterogeneousMode(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) error { if mock.DeviceSetVgpuHeterogeneousModeFunc == nil { panic("Interface.DeviceSetVgpuHeterogeneousModeFunc: method is nil but Interface.DeviceSetVgpuHeterogeneousMode was just called") } @@ -11961,7 +11961,7 @@ func (mock *Interface) DeviceSetVgpuHeterogeneousModeCalls() []struct { } // DeviceSetVgpuSchedulerState calls DeviceSetVgpuSchedulerStateFunc. -func (mock *Interface) DeviceSetVgpuSchedulerState(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { +func (mock *Interface) DeviceSetVgpuSchedulerState(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) error { if mock.DeviceSetVgpuSchedulerStateFunc == nil { panic("Interface.DeviceSetVgpuSchedulerStateFunc: method is nil but Interface.DeviceSetVgpuSchedulerState was just called") } @@ -11997,7 +11997,7 @@ func (mock *Interface) DeviceSetVgpuSchedulerStateCalls() []struct { } // DeviceSetVirtualizationMode calls DeviceSetVirtualizationModeFunc. -func (mock *Interface) DeviceSetVirtualizationMode(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { +func (mock *Interface) DeviceSetVirtualizationMode(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) error { if mock.DeviceSetVirtualizationModeFunc == nil { panic("Interface.DeviceSetVirtualizationModeFunc: method is nil but Interface.DeviceSetVirtualizationMode was just called") } @@ -12033,7 +12033,7 @@ func (mock *Interface) DeviceSetVirtualizationModeCalls() []struct { } // DeviceValidateInforom calls DeviceValidateInforomFunc. -func (mock *Interface) DeviceValidateInforom(device nvml.Device) nvml.Return { +func (mock *Interface) DeviceValidateInforom(device nvml.Device) error { if mock.DeviceValidateInforomFunc == nil { panic("Interface.DeviceValidateInforomFunc: method is nil but Interface.DeviceValidateInforom was just called") } @@ -12097,7 +12097,7 @@ func (mock *Interface) ErrorStringCalls() []struct { } // EventSetCreate calls EventSetCreateFunc. -func (mock *Interface) EventSetCreate() (nvml.EventSet, nvml.Return) { +func (mock *Interface) EventSetCreate() (nvml.EventSet, error) { if mock.EventSetCreateFunc == nil { panic("Interface.EventSetCreateFunc: method is nil but Interface.EventSetCreate was just called") } @@ -12124,7 +12124,7 @@ func (mock *Interface) EventSetCreateCalls() []struct { } // EventSetFree calls EventSetFreeFunc. -func (mock *Interface) EventSetFree(eventSet nvml.EventSet) nvml.Return { +func (mock *Interface) EventSetFree(eventSet nvml.EventSet) error { if mock.EventSetFreeFunc == nil { panic("Interface.EventSetFreeFunc: method is nil but Interface.EventSetFree was just called") } @@ -12156,7 +12156,7 @@ func (mock *Interface) EventSetFreeCalls() []struct { } // EventSetWait calls EventSetWaitFunc. -func (mock *Interface) EventSetWait(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) { +func (mock *Interface) EventSetWait(eventSet nvml.EventSet, v uint32) (nvml.EventData, error) { if mock.EventSetWaitFunc == nil { panic("Interface.EventSetWaitFunc: method is nil but Interface.EventSetWait was just called") } @@ -12219,7 +12219,7 @@ func (mock *Interface) ExtensionsCalls() []struct { } // GetExcludedDeviceCount calls GetExcludedDeviceCountFunc. -func (mock *Interface) GetExcludedDeviceCount() (int, nvml.Return) { +func (mock *Interface) GetExcludedDeviceCount() (int, error) { if mock.GetExcludedDeviceCountFunc == nil { panic("Interface.GetExcludedDeviceCountFunc: method is nil but Interface.GetExcludedDeviceCount was just called") } @@ -12246,7 +12246,7 @@ func (mock *Interface) GetExcludedDeviceCountCalls() []struct { } // GetExcludedDeviceInfoByIndex calls GetExcludedDeviceInfoByIndexFunc. -func (mock *Interface) GetExcludedDeviceInfoByIndex(n int) (nvml.ExcludedDeviceInfo, nvml.Return) { +func (mock *Interface) GetExcludedDeviceInfoByIndex(n int) (nvml.ExcludedDeviceInfo, error) { if mock.GetExcludedDeviceInfoByIndexFunc == nil { panic("Interface.GetExcludedDeviceInfoByIndexFunc: method is nil but Interface.GetExcludedDeviceInfoByIndex was just called") } @@ -12278,7 +12278,7 @@ func (mock *Interface) GetExcludedDeviceInfoByIndexCalls() []struct { } // GetVgpuCompatibility calls GetVgpuCompatibilityFunc. -func (mock *Interface) GetVgpuCompatibility(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, nvml.Return) { +func (mock *Interface) GetVgpuCompatibility(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, error) { if mock.GetVgpuCompatibilityFunc == nil { panic("Interface.GetVgpuCompatibilityFunc: method is nil but Interface.GetVgpuCompatibility was just called") } @@ -12314,7 +12314,7 @@ func (mock *Interface) GetVgpuCompatibilityCalls() []struct { } // GetVgpuDriverCapabilities calls GetVgpuDriverCapabilitiesFunc. -func (mock *Interface) GetVgpuDriverCapabilities(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, nvml.Return) { +func (mock *Interface) GetVgpuDriverCapabilities(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, error) { if mock.GetVgpuDriverCapabilitiesFunc == nil { panic("Interface.GetVgpuDriverCapabilitiesFunc: method is nil but Interface.GetVgpuDriverCapabilities was just called") } @@ -12346,7 +12346,7 @@ func (mock *Interface) GetVgpuDriverCapabilitiesCalls() []struct { } // GetVgpuVersion calls GetVgpuVersionFunc. -func (mock *Interface) GetVgpuVersion() (nvml.VgpuVersion, nvml.VgpuVersion, nvml.Return) { +func (mock *Interface) GetVgpuVersion() (nvml.VgpuVersion, nvml.VgpuVersion, error) { if mock.GetVgpuVersionFunc == nil { panic("Interface.GetVgpuVersionFunc: method is nil but Interface.GetVgpuVersion was just called") } @@ -12373,7 +12373,7 @@ func (mock *Interface) GetVgpuVersionCalls() []struct { } // GpmMetricsGet calls GpmMetricsGetFunc. -func (mock *Interface) GpmMetricsGet(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.Return { +func (mock *Interface) GpmMetricsGet(gpmMetricsGetType *nvml.GpmMetricsGetType) error { if mock.GpmMetricsGetFunc == nil { panic("Interface.GpmMetricsGetFunc: method is nil but Interface.GpmMetricsGet was just called") } @@ -12437,7 +12437,7 @@ func (mock *Interface) GpmMetricsGetVCalls() []struct { } // GpmMigSampleGet calls GpmMigSampleGetFunc. -func (mock *Interface) GpmMigSampleGet(device nvml.Device, n int, gpmSample nvml.GpmSample) nvml.Return { +func (mock *Interface) GpmMigSampleGet(device nvml.Device, n int, gpmSample nvml.GpmSample) error { if mock.GpmMigSampleGetFunc == nil { panic("Interface.GpmMigSampleGetFunc: method is nil but Interface.GpmMigSampleGet was just called") } @@ -12477,7 +12477,7 @@ func (mock *Interface) GpmMigSampleGetCalls() []struct { } // GpmQueryDeviceSupport calls GpmQueryDeviceSupportFunc. -func (mock *Interface) GpmQueryDeviceSupport(device nvml.Device) (nvml.GpmSupport, nvml.Return) { +func (mock *Interface) GpmQueryDeviceSupport(device nvml.Device) (nvml.GpmSupport, error) { if mock.GpmQueryDeviceSupportFunc == nil { panic("Interface.GpmQueryDeviceSupportFunc: method is nil but Interface.GpmQueryDeviceSupport was just called") } @@ -12541,7 +12541,7 @@ func (mock *Interface) GpmQueryDeviceSupportVCalls() []struct { } // GpmQueryIfStreamingEnabled calls GpmQueryIfStreamingEnabledFunc. -func (mock *Interface) GpmQueryIfStreamingEnabled(device nvml.Device) (uint32, nvml.Return) { +func (mock *Interface) GpmQueryIfStreamingEnabled(device nvml.Device) (uint32, error) { if mock.GpmQueryIfStreamingEnabledFunc == nil { panic("Interface.GpmQueryIfStreamingEnabledFunc: method is nil but Interface.GpmQueryIfStreamingEnabled was just called") } @@ -12573,7 +12573,7 @@ func (mock *Interface) GpmQueryIfStreamingEnabledCalls() []struct { } // GpmSampleAlloc calls GpmSampleAllocFunc. -func (mock *Interface) GpmSampleAlloc() (nvml.GpmSample, nvml.Return) { +func (mock *Interface) GpmSampleAlloc() (nvml.GpmSample, error) { if mock.GpmSampleAllocFunc == nil { panic("Interface.GpmSampleAllocFunc: method is nil but Interface.GpmSampleAlloc was just called") } @@ -12600,7 +12600,7 @@ func (mock *Interface) GpmSampleAllocCalls() []struct { } // GpmSampleFree calls GpmSampleFreeFunc. -func (mock *Interface) GpmSampleFree(gpmSample nvml.GpmSample) nvml.Return { +func (mock *Interface) GpmSampleFree(gpmSample nvml.GpmSample) error { if mock.GpmSampleFreeFunc == nil { panic("Interface.GpmSampleFreeFunc: method is nil but Interface.GpmSampleFree was just called") } @@ -12632,7 +12632,7 @@ func (mock *Interface) GpmSampleFreeCalls() []struct { } // GpmSampleGet calls GpmSampleGetFunc. -func (mock *Interface) GpmSampleGet(device nvml.Device, gpmSample nvml.GpmSample) nvml.Return { +func (mock *Interface) GpmSampleGet(device nvml.Device, gpmSample nvml.GpmSample) error { if mock.GpmSampleGetFunc == nil { panic("Interface.GpmSampleGetFunc: method is nil but Interface.GpmSampleGet was just called") } @@ -12668,7 +12668,7 @@ func (mock *Interface) GpmSampleGetCalls() []struct { } // GpmSetStreamingEnabled calls GpmSetStreamingEnabledFunc. -func (mock *Interface) GpmSetStreamingEnabled(device nvml.Device, v uint32) nvml.Return { +func (mock *Interface) GpmSetStreamingEnabled(device nvml.Device, v uint32) error { if mock.GpmSetStreamingEnabledFunc == nil { panic("Interface.GpmSetStreamingEnabledFunc: method is nil but Interface.GpmSetStreamingEnabled was just called") } @@ -12704,7 +12704,7 @@ func (mock *Interface) GpmSetStreamingEnabledCalls() []struct { } // GpuInstanceCreateComputeInstance calls GpuInstanceCreateComputeInstanceFunc. -func (mock *Interface) GpuInstanceCreateComputeInstance(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { +func (mock *Interface) GpuInstanceCreateComputeInstance(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, error) { if mock.GpuInstanceCreateComputeInstanceFunc == nil { panic("Interface.GpuInstanceCreateComputeInstanceFunc: method is nil but Interface.GpuInstanceCreateComputeInstance was just called") } @@ -12740,7 +12740,7 @@ func (mock *Interface) GpuInstanceCreateComputeInstanceCalls() []struct { } // GpuInstanceCreateComputeInstanceWithPlacement calls GpuInstanceCreateComputeInstanceWithPlacementFunc. -func (mock *Interface) GpuInstanceCreateComputeInstanceWithPlacement(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { +func (mock *Interface) GpuInstanceCreateComputeInstanceWithPlacement(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, error) { if mock.GpuInstanceCreateComputeInstanceWithPlacementFunc == nil { panic("Interface.GpuInstanceCreateComputeInstanceWithPlacementFunc: method is nil but Interface.GpuInstanceCreateComputeInstanceWithPlacement was just called") } @@ -12780,7 +12780,7 @@ func (mock *Interface) GpuInstanceCreateComputeInstanceWithPlacementCalls() []st } // GpuInstanceDestroy calls GpuInstanceDestroyFunc. -func (mock *Interface) GpuInstanceDestroy(gpuInstance nvml.GpuInstance) nvml.Return { +func (mock *Interface) GpuInstanceDestroy(gpuInstance nvml.GpuInstance) error { if mock.GpuInstanceDestroyFunc == nil { panic("Interface.GpuInstanceDestroyFunc: method is nil but Interface.GpuInstanceDestroy was just called") } @@ -12812,7 +12812,7 @@ func (mock *Interface) GpuInstanceDestroyCalls() []struct { } // GpuInstanceGetComputeInstanceById calls GpuInstanceGetComputeInstanceByIdFunc. -func (mock *Interface) GpuInstanceGetComputeInstanceById(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) { +func (mock *Interface) GpuInstanceGetComputeInstanceById(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, error) { if mock.GpuInstanceGetComputeInstanceByIdFunc == nil { panic("Interface.GpuInstanceGetComputeInstanceByIdFunc: method is nil but Interface.GpuInstanceGetComputeInstanceById was just called") } @@ -12848,7 +12848,7 @@ func (mock *Interface) GpuInstanceGetComputeInstanceByIdCalls() []struct { } // GpuInstanceGetComputeInstancePossiblePlacements calls GpuInstanceGetComputeInstancePossiblePlacementsFunc. -func (mock *Interface) GpuInstanceGetComputeInstancePossiblePlacements(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { +func (mock *Interface) GpuInstanceGetComputeInstancePossiblePlacements(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, error) { if mock.GpuInstanceGetComputeInstancePossiblePlacementsFunc == nil { panic("Interface.GpuInstanceGetComputeInstancePossiblePlacementsFunc: method is nil but Interface.GpuInstanceGetComputeInstancePossiblePlacements was just called") } @@ -12884,7 +12884,7 @@ func (mock *Interface) GpuInstanceGetComputeInstancePossiblePlacementsCalls() [] } // GpuInstanceGetComputeInstanceProfileInfo calls GpuInstanceGetComputeInstanceProfileInfoFunc. -func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfo(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { +func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfo(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, error) { if mock.GpuInstanceGetComputeInstanceProfileInfoFunc == nil { panic("Interface.GpuInstanceGetComputeInstanceProfileInfoFunc: method is nil but Interface.GpuInstanceGetComputeInstanceProfileInfo was just called") } @@ -12964,7 +12964,7 @@ func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfoVCalls() []struct } // GpuInstanceGetComputeInstanceRemainingCapacity calls GpuInstanceGetComputeInstanceRemainingCapacityFunc. -func (mock *Interface) GpuInstanceGetComputeInstanceRemainingCapacity(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, nvml.Return) { +func (mock *Interface) GpuInstanceGetComputeInstanceRemainingCapacity(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, error) { if mock.GpuInstanceGetComputeInstanceRemainingCapacityFunc == nil { panic("Interface.GpuInstanceGetComputeInstanceRemainingCapacityFunc: method is nil but Interface.GpuInstanceGetComputeInstanceRemainingCapacity was just called") } @@ -13000,7 +13000,7 @@ func (mock *Interface) GpuInstanceGetComputeInstanceRemainingCapacityCalls() []s } // GpuInstanceGetComputeInstances calls GpuInstanceGetComputeInstancesFunc. -func (mock *Interface) GpuInstanceGetComputeInstances(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { +func (mock *Interface) GpuInstanceGetComputeInstances(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, error) { if mock.GpuInstanceGetComputeInstancesFunc == nil { panic("Interface.GpuInstanceGetComputeInstancesFunc: method is nil but Interface.GpuInstanceGetComputeInstances was just called") } @@ -13036,7 +13036,7 @@ func (mock *Interface) GpuInstanceGetComputeInstancesCalls() []struct { } // GpuInstanceGetInfo calls GpuInstanceGetInfoFunc. -func (mock *Interface) GpuInstanceGetInfo(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) { +func (mock *Interface) GpuInstanceGetInfo(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, error) { if mock.GpuInstanceGetInfoFunc == nil { panic("Interface.GpuInstanceGetInfoFunc: method is nil but Interface.GpuInstanceGetInfo was just called") } @@ -13068,7 +13068,7 @@ func (mock *Interface) GpuInstanceGetInfoCalls() []struct { } // Init calls InitFunc. -func (mock *Interface) Init() nvml.Return { +func (mock *Interface) Init() error { if mock.InitFunc == nil { panic("Interface.InitFunc: method is nil but Interface.Init was just called") } @@ -13095,7 +13095,7 @@ func (mock *Interface) InitCalls() []struct { } // InitWithFlags calls InitWithFlagsFunc. -func (mock *Interface) InitWithFlags(v uint32) nvml.Return { +func (mock *Interface) InitWithFlags(v uint32) error { if mock.InitWithFlagsFunc == nil { panic("Interface.InitWithFlagsFunc: method is nil but Interface.InitWithFlags was just called") } @@ -13127,7 +13127,7 @@ func (mock *Interface) InitWithFlagsCalls() []struct { } // SetVgpuVersion calls SetVgpuVersionFunc. -func (mock *Interface) SetVgpuVersion(vgpuVersion *nvml.VgpuVersion) nvml.Return { +func (mock *Interface) SetVgpuVersion(vgpuVersion *nvml.VgpuVersion) error { if mock.SetVgpuVersionFunc == nil { panic("Interface.SetVgpuVersionFunc: method is nil but Interface.SetVgpuVersion was just called") } @@ -13159,7 +13159,7 @@ func (mock *Interface) SetVgpuVersionCalls() []struct { } // Shutdown calls ShutdownFunc. -func (mock *Interface) Shutdown() nvml.Return { +func (mock *Interface) Shutdown() error { if mock.ShutdownFunc == nil { panic("Interface.ShutdownFunc: method is nil but Interface.Shutdown was just called") } @@ -13186,7 +13186,7 @@ func (mock *Interface) ShutdownCalls() []struct { } // SystemGetConfComputeCapabilities calls SystemGetConfComputeCapabilitiesFunc. -func (mock *Interface) SystemGetConfComputeCapabilities() (nvml.ConfComputeSystemCaps, nvml.Return) { +func (mock *Interface) SystemGetConfComputeCapabilities() (nvml.ConfComputeSystemCaps, error) { if mock.SystemGetConfComputeCapabilitiesFunc == nil { panic("Interface.SystemGetConfComputeCapabilitiesFunc: method is nil but Interface.SystemGetConfComputeCapabilities was just called") } @@ -13213,7 +13213,7 @@ func (mock *Interface) SystemGetConfComputeCapabilitiesCalls() []struct { } // SystemGetConfComputeKeyRotationThresholdInfo calls SystemGetConfComputeKeyRotationThresholdInfoFunc. -func (mock *Interface) SystemGetConfComputeKeyRotationThresholdInfo() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) { +func (mock *Interface) SystemGetConfComputeKeyRotationThresholdInfo() (nvml.ConfComputeGetKeyRotationThresholdInfo, error) { if mock.SystemGetConfComputeKeyRotationThresholdInfoFunc == nil { panic("Interface.SystemGetConfComputeKeyRotationThresholdInfoFunc: method is nil but Interface.SystemGetConfComputeKeyRotationThresholdInfo was just called") } @@ -13240,7 +13240,7 @@ func (mock *Interface) SystemGetConfComputeKeyRotationThresholdInfoCalls() []str } // SystemGetConfComputeSettings calls SystemGetConfComputeSettingsFunc. -func (mock *Interface) SystemGetConfComputeSettings() (nvml.SystemConfComputeSettings, nvml.Return) { +func (mock *Interface) SystemGetConfComputeSettings() (nvml.SystemConfComputeSettings, error) { if mock.SystemGetConfComputeSettingsFunc == nil { panic("Interface.SystemGetConfComputeSettingsFunc: method is nil but Interface.SystemGetConfComputeSettings was just called") } @@ -13267,7 +13267,7 @@ func (mock *Interface) SystemGetConfComputeSettingsCalls() []struct { } // SystemGetCudaDriverVersion calls SystemGetCudaDriverVersionFunc. -func (mock *Interface) SystemGetCudaDriverVersion() (int, nvml.Return) { +func (mock *Interface) SystemGetCudaDriverVersion() (int, error) { if mock.SystemGetCudaDriverVersionFunc == nil { panic("Interface.SystemGetCudaDriverVersionFunc: method is nil but Interface.SystemGetCudaDriverVersion was just called") } @@ -13294,7 +13294,7 @@ func (mock *Interface) SystemGetCudaDriverVersionCalls() []struct { } // SystemGetCudaDriverVersion_v2 calls SystemGetCudaDriverVersion_v2Func. -func (mock *Interface) SystemGetCudaDriverVersion_v2() (int, nvml.Return) { +func (mock *Interface) SystemGetCudaDriverVersion_v2() (int, error) { if mock.SystemGetCudaDriverVersion_v2Func == nil { panic("Interface.SystemGetCudaDriverVersion_v2Func: method is nil but Interface.SystemGetCudaDriverVersion_v2 was just called") } @@ -13321,7 +13321,7 @@ func (mock *Interface) SystemGetCudaDriverVersion_v2Calls() []struct { } // SystemGetDriverVersion calls SystemGetDriverVersionFunc. -func (mock *Interface) SystemGetDriverVersion() (string, nvml.Return) { +func (mock *Interface) SystemGetDriverVersion() (string, error) { if mock.SystemGetDriverVersionFunc == nil { panic("Interface.SystemGetDriverVersionFunc: method is nil but Interface.SystemGetDriverVersion was just called") } @@ -13348,7 +13348,7 @@ func (mock *Interface) SystemGetDriverVersionCalls() []struct { } // SystemGetHicVersion calls SystemGetHicVersionFunc. -func (mock *Interface) SystemGetHicVersion() ([]nvml.HwbcEntry, nvml.Return) { +func (mock *Interface) SystemGetHicVersion() ([]nvml.HwbcEntry, error) { if mock.SystemGetHicVersionFunc == nil { panic("Interface.SystemGetHicVersionFunc: method is nil but Interface.SystemGetHicVersion was just called") } @@ -13375,7 +13375,7 @@ func (mock *Interface) SystemGetHicVersionCalls() []struct { } // SystemGetNVMLVersion calls SystemGetNVMLVersionFunc. -func (mock *Interface) SystemGetNVMLVersion() (string, nvml.Return) { +func (mock *Interface) SystemGetNVMLVersion() (string, error) { if mock.SystemGetNVMLVersionFunc == nil { panic("Interface.SystemGetNVMLVersionFunc: method is nil but Interface.SystemGetNVMLVersion was just called") } @@ -13402,7 +13402,7 @@ func (mock *Interface) SystemGetNVMLVersionCalls() []struct { } // SystemGetProcessName calls SystemGetProcessNameFunc. -func (mock *Interface) SystemGetProcessName(n int) (string, nvml.Return) { +func (mock *Interface) SystemGetProcessName(n int) (string, error) { if mock.SystemGetProcessNameFunc == nil { panic("Interface.SystemGetProcessNameFunc: method is nil but Interface.SystemGetProcessName was just called") } @@ -13434,7 +13434,7 @@ func (mock *Interface) SystemGetProcessNameCalls() []struct { } // SystemGetTopologyGpuSet calls SystemGetTopologyGpuSetFunc. -func (mock *Interface) SystemGetTopologyGpuSet(n int) ([]nvml.Device, nvml.Return) { +func (mock *Interface) SystemGetTopologyGpuSet(n int) ([]nvml.Device, error) { if mock.SystemGetTopologyGpuSetFunc == nil { panic("Interface.SystemGetTopologyGpuSetFunc: method is nil but Interface.SystemGetTopologyGpuSet was just called") } @@ -13466,7 +13466,7 @@ func (mock *Interface) SystemGetTopologyGpuSetCalls() []struct { } // SystemSetConfComputeKeyRotationThresholdInfo calls SystemSetConfComputeKeyRotationThresholdInfoFunc. -func (mock *Interface) SystemSetConfComputeKeyRotationThresholdInfo(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return { +func (mock *Interface) SystemSetConfComputeKeyRotationThresholdInfo(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) error { if mock.SystemSetConfComputeKeyRotationThresholdInfoFunc == nil { panic("Interface.SystemSetConfComputeKeyRotationThresholdInfoFunc: method is nil but Interface.SystemSetConfComputeKeyRotationThresholdInfo was just called") } @@ -13498,7 +13498,7 @@ func (mock *Interface) SystemSetConfComputeKeyRotationThresholdInfoCalls() []str } // UnitGetCount calls UnitGetCountFunc. -func (mock *Interface) UnitGetCount() (int, nvml.Return) { +func (mock *Interface) UnitGetCount() (int, error) { if mock.UnitGetCountFunc == nil { panic("Interface.UnitGetCountFunc: method is nil but Interface.UnitGetCount was just called") } @@ -13525,7 +13525,7 @@ func (mock *Interface) UnitGetCountCalls() []struct { } // UnitGetDevices calls UnitGetDevicesFunc. -func (mock *Interface) UnitGetDevices(unit nvml.Unit) ([]nvml.Device, nvml.Return) { +func (mock *Interface) UnitGetDevices(unit nvml.Unit) ([]nvml.Device, error) { if mock.UnitGetDevicesFunc == nil { panic("Interface.UnitGetDevicesFunc: method is nil but Interface.UnitGetDevices was just called") } @@ -13557,7 +13557,7 @@ func (mock *Interface) UnitGetDevicesCalls() []struct { } // UnitGetFanSpeedInfo calls UnitGetFanSpeedInfoFunc. -func (mock *Interface) UnitGetFanSpeedInfo(unit nvml.Unit) (nvml.UnitFanSpeeds, nvml.Return) { +func (mock *Interface) UnitGetFanSpeedInfo(unit nvml.Unit) (nvml.UnitFanSpeeds, error) { if mock.UnitGetFanSpeedInfoFunc == nil { panic("Interface.UnitGetFanSpeedInfoFunc: method is nil but Interface.UnitGetFanSpeedInfo was just called") } @@ -13589,7 +13589,7 @@ func (mock *Interface) UnitGetFanSpeedInfoCalls() []struct { } // UnitGetHandleByIndex calls UnitGetHandleByIndexFunc. -func (mock *Interface) UnitGetHandleByIndex(n int) (nvml.Unit, nvml.Return) { +func (mock *Interface) UnitGetHandleByIndex(n int) (nvml.Unit, error) { if mock.UnitGetHandleByIndexFunc == nil { panic("Interface.UnitGetHandleByIndexFunc: method is nil but Interface.UnitGetHandleByIndex was just called") } @@ -13621,7 +13621,7 @@ func (mock *Interface) UnitGetHandleByIndexCalls() []struct { } // UnitGetLedState calls UnitGetLedStateFunc. -func (mock *Interface) UnitGetLedState(unit nvml.Unit) (nvml.LedState, nvml.Return) { +func (mock *Interface) UnitGetLedState(unit nvml.Unit) (nvml.LedState, error) { if mock.UnitGetLedStateFunc == nil { panic("Interface.UnitGetLedStateFunc: method is nil but Interface.UnitGetLedState was just called") } @@ -13653,7 +13653,7 @@ func (mock *Interface) UnitGetLedStateCalls() []struct { } // UnitGetPsuInfo calls UnitGetPsuInfoFunc. -func (mock *Interface) UnitGetPsuInfo(unit nvml.Unit) (nvml.PSUInfo, nvml.Return) { +func (mock *Interface) UnitGetPsuInfo(unit nvml.Unit) (nvml.PSUInfo, error) { if mock.UnitGetPsuInfoFunc == nil { panic("Interface.UnitGetPsuInfoFunc: method is nil but Interface.UnitGetPsuInfo was just called") } @@ -13685,7 +13685,7 @@ func (mock *Interface) UnitGetPsuInfoCalls() []struct { } // UnitGetTemperature calls UnitGetTemperatureFunc. -func (mock *Interface) UnitGetTemperature(unit nvml.Unit, n int) (uint32, nvml.Return) { +func (mock *Interface) UnitGetTemperature(unit nvml.Unit, n int) (uint32, error) { if mock.UnitGetTemperatureFunc == nil { panic("Interface.UnitGetTemperatureFunc: method is nil but Interface.UnitGetTemperature was just called") } @@ -13721,7 +13721,7 @@ func (mock *Interface) UnitGetTemperatureCalls() []struct { } // UnitGetUnitInfo calls UnitGetUnitInfoFunc. -func (mock *Interface) UnitGetUnitInfo(unit nvml.Unit) (nvml.UnitInfo, nvml.Return) { +func (mock *Interface) UnitGetUnitInfo(unit nvml.Unit) (nvml.UnitInfo, error) { if mock.UnitGetUnitInfoFunc == nil { panic("Interface.UnitGetUnitInfoFunc: method is nil but Interface.UnitGetUnitInfo was just called") } @@ -13753,7 +13753,7 @@ func (mock *Interface) UnitGetUnitInfoCalls() []struct { } // UnitSetLedState calls UnitSetLedStateFunc. -func (mock *Interface) UnitSetLedState(unit nvml.Unit, ledColor nvml.LedColor) nvml.Return { +func (mock *Interface) UnitSetLedState(unit nvml.Unit, ledColor nvml.LedColor) error { if mock.UnitSetLedStateFunc == nil { panic("Interface.UnitSetLedStateFunc: method is nil but Interface.UnitSetLedState was just called") } @@ -13789,7 +13789,7 @@ func (mock *Interface) UnitSetLedStateCalls() []struct { } // VgpuInstanceClearAccountingPids calls VgpuInstanceClearAccountingPidsFunc. -func (mock *Interface) VgpuInstanceClearAccountingPids(vgpuInstance nvml.VgpuInstance) nvml.Return { +func (mock *Interface) VgpuInstanceClearAccountingPids(vgpuInstance nvml.VgpuInstance) error { if mock.VgpuInstanceClearAccountingPidsFunc == nil { panic("Interface.VgpuInstanceClearAccountingPidsFunc: method is nil but Interface.VgpuInstanceClearAccountingPids was just called") } @@ -13821,7 +13821,7 @@ func (mock *Interface) VgpuInstanceClearAccountingPidsCalls() []struct { } // VgpuInstanceGetAccountingMode calls VgpuInstanceGetAccountingModeFunc. -func (mock *Interface) VgpuInstanceGetAccountingMode(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { +func (mock *Interface) VgpuInstanceGetAccountingMode(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, error) { if mock.VgpuInstanceGetAccountingModeFunc == nil { panic("Interface.VgpuInstanceGetAccountingModeFunc: method is nil but Interface.VgpuInstanceGetAccountingMode was just called") } @@ -13853,7 +13853,7 @@ func (mock *Interface) VgpuInstanceGetAccountingModeCalls() []struct { } // VgpuInstanceGetAccountingPids calls VgpuInstanceGetAccountingPidsFunc. -func (mock *Interface) VgpuInstanceGetAccountingPids(vgpuInstance nvml.VgpuInstance) ([]int, nvml.Return) { +func (mock *Interface) VgpuInstanceGetAccountingPids(vgpuInstance nvml.VgpuInstance) ([]int, error) { if mock.VgpuInstanceGetAccountingPidsFunc == nil { panic("Interface.VgpuInstanceGetAccountingPidsFunc: method is nil but Interface.VgpuInstanceGetAccountingPids was just called") } @@ -13885,7 +13885,7 @@ func (mock *Interface) VgpuInstanceGetAccountingPidsCalls() []struct { } // VgpuInstanceGetAccountingStats calls VgpuInstanceGetAccountingStatsFunc. -func (mock *Interface) VgpuInstanceGetAccountingStats(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, nvml.Return) { +func (mock *Interface) VgpuInstanceGetAccountingStats(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, error) { if mock.VgpuInstanceGetAccountingStatsFunc == nil { panic("Interface.VgpuInstanceGetAccountingStatsFunc: method is nil but Interface.VgpuInstanceGetAccountingStats was just called") } @@ -13921,7 +13921,7 @@ func (mock *Interface) VgpuInstanceGetAccountingStatsCalls() []struct { } // VgpuInstanceGetEccMode calls VgpuInstanceGetEccModeFunc. -func (mock *Interface) VgpuInstanceGetEccMode(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { +func (mock *Interface) VgpuInstanceGetEccMode(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, error) { if mock.VgpuInstanceGetEccModeFunc == nil { panic("Interface.VgpuInstanceGetEccModeFunc: method is nil but Interface.VgpuInstanceGetEccMode was just called") } @@ -13953,7 +13953,7 @@ func (mock *Interface) VgpuInstanceGetEccModeCalls() []struct { } // VgpuInstanceGetEncoderCapacity calls VgpuInstanceGetEncoderCapacityFunc. -func (mock *Interface) VgpuInstanceGetEncoderCapacity(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { +func (mock *Interface) VgpuInstanceGetEncoderCapacity(vgpuInstance nvml.VgpuInstance) (int, error) { if mock.VgpuInstanceGetEncoderCapacityFunc == nil { panic("Interface.VgpuInstanceGetEncoderCapacityFunc: method is nil but Interface.VgpuInstanceGetEncoderCapacity was just called") } @@ -13985,7 +13985,7 @@ func (mock *Interface) VgpuInstanceGetEncoderCapacityCalls() []struct { } // VgpuInstanceGetEncoderSessions calls VgpuInstanceGetEncoderSessionsFunc. -func (mock *Interface) VgpuInstanceGetEncoderSessions(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, nvml.Return) { +func (mock *Interface) VgpuInstanceGetEncoderSessions(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, error) { if mock.VgpuInstanceGetEncoderSessionsFunc == nil { panic("Interface.VgpuInstanceGetEncoderSessionsFunc: method is nil but Interface.VgpuInstanceGetEncoderSessions was just called") } @@ -14017,7 +14017,7 @@ func (mock *Interface) VgpuInstanceGetEncoderSessionsCalls() []struct { } // VgpuInstanceGetEncoderStats calls VgpuInstanceGetEncoderStatsFunc. -func (mock *Interface) VgpuInstanceGetEncoderStats(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, nvml.Return) { +func (mock *Interface) VgpuInstanceGetEncoderStats(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, error) { if mock.VgpuInstanceGetEncoderStatsFunc == nil { panic("Interface.VgpuInstanceGetEncoderStatsFunc: method is nil but Interface.VgpuInstanceGetEncoderStats was just called") } @@ -14049,7 +14049,7 @@ func (mock *Interface) VgpuInstanceGetEncoderStatsCalls() []struct { } // VgpuInstanceGetFBCSessions calls VgpuInstanceGetFBCSessionsFunc. -func (mock *Interface) VgpuInstanceGetFBCSessions(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, nvml.Return) { +func (mock *Interface) VgpuInstanceGetFBCSessions(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, error) { if mock.VgpuInstanceGetFBCSessionsFunc == nil { panic("Interface.VgpuInstanceGetFBCSessionsFunc: method is nil but Interface.VgpuInstanceGetFBCSessions was just called") } @@ -14081,7 +14081,7 @@ func (mock *Interface) VgpuInstanceGetFBCSessionsCalls() []struct { } // VgpuInstanceGetFBCStats calls VgpuInstanceGetFBCStatsFunc. -func (mock *Interface) VgpuInstanceGetFBCStats(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, nvml.Return) { +func (mock *Interface) VgpuInstanceGetFBCStats(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, error) { if mock.VgpuInstanceGetFBCStatsFunc == nil { panic("Interface.VgpuInstanceGetFBCStatsFunc: method is nil but Interface.VgpuInstanceGetFBCStats was just called") } @@ -14113,7 +14113,7 @@ func (mock *Interface) VgpuInstanceGetFBCStatsCalls() []struct { } // VgpuInstanceGetFbUsage calls VgpuInstanceGetFbUsageFunc. -func (mock *Interface) VgpuInstanceGetFbUsage(vgpuInstance nvml.VgpuInstance) (uint64, nvml.Return) { +func (mock *Interface) VgpuInstanceGetFbUsage(vgpuInstance nvml.VgpuInstance) (uint64, error) { if mock.VgpuInstanceGetFbUsageFunc == nil { panic("Interface.VgpuInstanceGetFbUsageFunc: method is nil but Interface.VgpuInstanceGetFbUsage was just called") } @@ -14145,7 +14145,7 @@ func (mock *Interface) VgpuInstanceGetFbUsageCalls() []struct { } // VgpuInstanceGetFrameRateLimit calls VgpuInstanceGetFrameRateLimitFunc. -func (mock *Interface) VgpuInstanceGetFrameRateLimit(vgpuInstance nvml.VgpuInstance) (uint32, nvml.Return) { +func (mock *Interface) VgpuInstanceGetFrameRateLimit(vgpuInstance nvml.VgpuInstance) (uint32, error) { if mock.VgpuInstanceGetFrameRateLimitFunc == nil { panic("Interface.VgpuInstanceGetFrameRateLimitFunc: method is nil but Interface.VgpuInstanceGetFrameRateLimit was just called") } @@ -14177,7 +14177,7 @@ func (mock *Interface) VgpuInstanceGetFrameRateLimitCalls() []struct { } // VgpuInstanceGetGpuInstanceId calls VgpuInstanceGetGpuInstanceIdFunc. -func (mock *Interface) VgpuInstanceGetGpuInstanceId(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { +func (mock *Interface) VgpuInstanceGetGpuInstanceId(vgpuInstance nvml.VgpuInstance) (int, error) { if mock.VgpuInstanceGetGpuInstanceIdFunc == nil { panic("Interface.VgpuInstanceGetGpuInstanceIdFunc: method is nil but Interface.VgpuInstanceGetGpuInstanceId was just called") } @@ -14209,7 +14209,7 @@ func (mock *Interface) VgpuInstanceGetGpuInstanceIdCalls() []struct { } // VgpuInstanceGetGpuPciId calls VgpuInstanceGetGpuPciIdFunc. -func (mock *Interface) VgpuInstanceGetGpuPciId(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +func (mock *Interface) VgpuInstanceGetGpuPciId(vgpuInstance nvml.VgpuInstance) (string, error) { if mock.VgpuInstanceGetGpuPciIdFunc == nil { panic("Interface.VgpuInstanceGetGpuPciIdFunc: method is nil but Interface.VgpuInstanceGetGpuPciId was just called") } @@ -14241,7 +14241,7 @@ func (mock *Interface) VgpuInstanceGetGpuPciIdCalls() []struct { } // VgpuInstanceGetLicenseInfo calls VgpuInstanceGetLicenseInfoFunc. -func (mock *Interface) VgpuInstanceGetLicenseInfo(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, nvml.Return) { +func (mock *Interface) VgpuInstanceGetLicenseInfo(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, error) { if mock.VgpuInstanceGetLicenseInfoFunc == nil { panic("Interface.VgpuInstanceGetLicenseInfoFunc: method is nil but Interface.VgpuInstanceGetLicenseInfo was just called") } @@ -14273,7 +14273,7 @@ func (mock *Interface) VgpuInstanceGetLicenseInfoCalls() []struct { } // VgpuInstanceGetLicenseStatus calls VgpuInstanceGetLicenseStatusFunc. -func (mock *Interface) VgpuInstanceGetLicenseStatus(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { +func (mock *Interface) VgpuInstanceGetLicenseStatus(vgpuInstance nvml.VgpuInstance) (int, error) { if mock.VgpuInstanceGetLicenseStatusFunc == nil { panic("Interface.VgpuInstanceGetLicenseStatusFunc: method is nil but Interface.VgpuInstanceGetLicenseStatus was just called") } @@ -14305,7 +14305,7 @@ func (mock *Interface) VgpuInstanceGetLicenseStatusCalls() []struct { } // VgpuInstanceGetMdevUUID calls VgpuInstanceGetMdevUUIDFunc. -func (mock *Interface) VgpuInstanceGetMdevUUID(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +func (mock *Interface) VgpuInstanceGetMdevUUID(vgpuInstance nvml.VgpuInstance) (string, error) { if mock.VgpuInstanceGetMdevUUIDFunc == nil { panic("Interface.VgpuInstanceGetMdevUUIDFunc: method is nil but Interface.VgpuInstanceGetMdevUUID was just called") } @@ -14337,7 +14337,7 @@ func (mock *Interface) VgpuInstanceGetMdevUUIDCalls() []struct { } // VgpuInstanceGetMetadata calls VgpuInstanceGetMetadataFunc. -func (mock *Interface) VgpuInstanceGetMetadata(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) { +func (mock *Interface) VgpuInstanceGetMetadata(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, error) { if mock.VgpuInstanceGetMetadataFunc == nil { panic("Interface.VgpuInstanceGetMetadataFunc: method is nil but Interface.VgpuInstanceGetMetadata was just called") } @@ -14369,7 +14369,7 @@ func (mock *Interface) VgpuInstanceGetMetadataCalls() []struct { } // VgpuInstanceGetType calls VgpuInstanceGetTypeFunc. -func (mock *Interface) VgpuInstanceGetType(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) { +func (mock *Interface) VgpuInstanceGetType(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, error) { if mock.VgpuInstanceGetTypeFunc == nil { panic("Interface.VgpuInstanceGetTypeFunc: method is nil but Interface.VgpuInstanceGetType was just called") } @@ -14401,7 +14401,7 @@ func (mock *Interface) VgpuInstanceGetTypeCalls() []struct { } // VgpuInstanceGetUUID calls VgpuInstanceGetUUIDFunc. -func (mock *Interface) VgpuInstanceGetUUID(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +func (mock *Interface) VgpuInstanceGetUUID(vgpuInstance nvml.VgpuInstance) (string, error) { if mock.VgpuInstanceGetUUIDFunc == nil { panic("Interface.VgpuInstanceGetUUIDFunc: method is nil but Interface.VgpuInstanceGetUUID was just called") } @@ -14433,7 +14433,7 @@ func (mock *Interface) VgpuInstanceGetUUIDCalls() []struct { } // VgpuInstanceGetVmDriverVersion calls VgpuInstanceGetVmDriverVersionFunc. -func (mock *Interface) VgpuInstanceGetVmDriverVersion(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +func (mock *Interface) VgpuInstanceGetVmDriverVersion(vgpuInstance nvml.VgpuInstance) (string, error) { if mock.VgpuInstanceGetVmDriverVersionFunc == nil { panic("Interface.VgpuInstanceGetVmDriverVersionFunc: method is nil but Interface.VgpuInstanceGetVmDriverVersion was just called") } @@ -14465,7 +14465,7 @@ func (mock *Interface) VgpuInstanceGetVmDriverVersionCalls() []struct { } // VgpuInstanceGetVmID calls VgpuInstanceGetVmIDFunc. -func (mock *Interface) VgpuInstanceGetVmID(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, nvml.Return) { +func (mock *Interface) VgpuInstanceGetVmID(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, error) { if mock.VgpuInstanceGetVmIDFunc == nil { panic("Interface.VgpuInstanceGetVmIDFunc: method is nil but Interface.VgpuInstanceGetVmID was just called") } @@ -14497,7 +14497,7 @@ func (mock *Interface) VgpuInstanceGetVmIDCalls() []struct { } // VgpuInstanceSetEncoderCapacity calls VgpuInstanceSetEncoderCapacityFunc. -func (mock *Interface) VgpuInstanceSetEncoderCapacity(vgpuInstance nvml.VgpuInstance, n int) nvml.Return { +func (mock *Interface) VgpuInstanceSetEncoderCapacity(vgpuInstance nvml.VgpuInstance, n int) error { if mock.VgpuInstanceSetEncoderCapacityFunc == nil { panic("Interface.VgpuInstanceSetEncoderCapacityFunc: method is nil but Interface.VgpuInstanceSetEncoderCapacity was just called") } @@ -14533,7 +14533,7 @@ func (mock *Interface) VgpuInstanceSetEncoderCapacityCalls() []struct { } // VgpuTypeGetCapabilities calls VgpuTypeGetCapabilitiesFunc. -func (mock *Interface) VgpuTypeGetCapabilities(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { +func (mock *Interface) VgpuTypeGetCapabilities(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, error) { if mock.VgpuTypeGetCapabilitiesFunc == nil { panic("Interface.VgpuTypeGetCapabilitiesFunc: method is nil but Interface.VgpuTypeGetCapabilities was just called") } @@ -14569,7 +14569,7 @@ func (mock *Interface) VgpuTypeGetCapabilitiesCalls() []struct { } // VgpuTypeGetClass calls VgpuTypeGetClassFunc. -func (mock *Interface) VgpuTypeGetClass(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { +func (mock *Interface) VgpuTypeGetClass(vgpuTypeId nvml.VgpuTypeId) (string, error) { if mock.VgpuTypeGetClassFunc == nil { panic("Interface.VgpuTypeGetClassFunc: method is nil but Interface.VgpuTypeGetClass was just called") } @@ -14601,7 +14601,7 @@ func (mock *Interface) VgpuTypeGetClassCalls() []struct { } // VgpuTypeGetDeviceID calls VgpuTypeGetDeviceIDFunc. -func (mock *Interface) VgpuTypeGetDeviceID(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, nvml.Return) { +func (mock *Interface) VgpuTypeGetDeviceID(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, error) { if mock.VgpuTypeGetDeviceIDFunc == nil { panic("Interface.VgpuTypeGetDeviceIDFunc: method is nil but Interface.VgpuTypeGetDeviceID was just called") } @@ -14633,7 +14633,7 @@ func (mock *Interface) VgpuTypeGetDeviceIDCalls() []struct { } // VgpuTypeGetFrameRateLimit calls VgpuTypeGetFrameRateLimitFunc. -func (mock *Interface) VgpuTypeGetFrameRateLimit(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { +func (mock *Interface) VgpuTypeGetFrameRateLimit(vgpuTypeId nvml.VgpuTypeId) (uint32, error) { if mock.VgpuTypeGetFrameRateLimitFunc == nil { panic("Interface.VgpuTypeGetFrameRateLimitFunc: method is nil but Interface.VgpuTypeGetFrameRateLimit was just called") } @@ -14665,7 +14665,7 @@ func (mock *Interface) VgpuTypeGetFrameRateLimitCalls() []struct { } // VgpuTypeGetFramebufferSize calls VgpuTypeGetFramebufferSizeFunc. -func (mock *Interface) VgpuTypeGetFramebufferSize(vgpuTypeId nvml.VgpuTypeId) (uint64, nvml.Return) { +func (mock *Interface) VgpuTypeGetFramebufferSize(vgpuTypeId nvml.VgpuTypeId) (uint64, error) { if mock.VgpuTypeGetFramebufferSizeFunc == nil { panic("Interface.VgpuTypeGetFramebufferSizeFunc: method is nil but Interface.VgpuTypeGetFramebufferSize was just called") } @@ -14697,7 +14697,7 @@ func (mock *Interface) VgpuTypeGetFramebufferSizeCalls() []struct { } // VgpuTypeGetGpuInstanceProfileId calls VgpuTypeGetGpuInstanceProfileIdFunc. -func (mock *Interface) VgpuTypeGetGpuInstanceProfileId(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { +func (mock *Interface) VgpuTypeGetGpuInstanceProfileId(vgpuTypeId nvml.VgpuTypeId) (uint32, error) { if mock.VgpuTypeGetGpuInstanceProfileIdFunc == nil { panic("Interface.VgpuTypeGetGpuInstanceProfileIdFunc: method is nil but Interface.VgpuTypeGetGpuInstanceProfileId was just called") } @@ -14729,7 +14729,7 @@ func (mock *Interface) VgpuTypeGetGpuInstanceProfileIdCalls() []struct { } // VgpuTypeGetLicense calls VgpuTypeGetLicenseFunc. -func (mock *Interface) VgpuTypeGetLicense(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { +func (mock *Interface) VgpuTypeGetLicense(vgpuTypeId nvml.VgpuTypeId) (string, error) { if mock.VgpuTypeGetLicenseFunc == nil { panic("Interface.VgpuTypeGetLicenseFunc: method is nil but Interface.VgpuTypeGetLicense was just called") } @@ -14761,7 +14761,7 @@ func (mock *Interface) VgpuTypeGetLicenseCalls() []struct { } // VgpuTypeGetMaxInstances calls VgpuTypeGetMaxInstancesFunc. -func (mock *Interface) VgpuTypeGetMaxInstances(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +func (mock *Interface) VgpuTypeGetMaxInstances(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, error) { if mock.VgpuTypeGetMaxInstancesFunc == nil { panic("Interface.VgpuTypeGetMaxInstancesFunc: method is nil but Interface.VgpuTypeGetMaxInstances was just called") } @@ -14797,7 +14797,7 @@ func (mock *Interface) VgpuTypeGetMaxInstancesCalls() []struct { } // VgpuTypeGetMaxInstancesPerVm calls VgpuTypeGetMaxInstancesPerVmFunc. -func (mock *Interface) VgpuTypeGetMaxInstancesPerVm(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +func (mock *Interface) VgpuTypeGetMaxInstancesPerVm(vgpuTypeId nvml.VgpuTypeId) (int, error) { if mock.VgpuTypeGetMaxInstancesPerVmFunc == nil { panic("Interface.VgpuTypeGetMaxInstancesPerVmFunc: method is nil but Interface.VgpuTypeGetMaxInstancesPerVm was just called") } @@ -14829,7 +14829,7 @@ func (mock *Interface) VgpuTypeGetMaxInstancesPerVmCalls() []struct { } // VgpuTypeGetName calls VgpuTypeGetNameFunc. -func (mock *Interface) VgpuTypeGetName(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { +func (mock *Interface) VgpuTypeGetName(vgpuTypeId nvml.VgpuTypeId) (string, error) { if mock.VgpuTypeGetNameFunc == nil { panic("Interface.VgpuTypeGetNameFunc: method is nil but Interface.VgpuTypeGetName was just called") } @@ -14861,7 +14861,7 @@ func (mock *Interface) VgpuTypeGetNameCalls() []struct { } // VgpuTypeGetNumDisplayHeads calls VgpuTypeGetNumDisplayHeadsFunc. -func (mock *Interface) VgpuTypeGetNumDisplayHeads(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +func (mock *Interface) VgpuTypeGetNumDisplayHeads(vgpuTypeId nvml.VgpuTypeId) (int, error) { if mock.VgpuTypeGetNumDisplayHeadsFunc == nil { panic("Interface.VgpuTypeGetNumDisplayHeadsFunc: method is nil but Interface.VgpuTypeGetNumDisplayHeads was just called") } @@ -14893,7 +14893,7 @@ func (mock *Interface) VgpuTypeGetNumDisplayHeadsCalls() []struct { } // VgpuTypeGetResolution calls VgpuTypeGetResolutionFunc. -func (mock *Interface) VgpuTypeGetResolution(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, nvml.Return) { +func (mock *Interface) VgpuTypeGetResolution(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, error) { if mock.VgpuTypeGetResolutionFunc == nil { panic("Interface.VgpuTypeGetResolutionFunc: method is nil but Interface.VgpuTypeGetResolution was just called") } diff --git a/pkg/nvml/mock/unit.go b/pkg/nvml/mock/unit.go index 64af542..28c1f19 100644 --- a/pkg/nvml/mock/unit.go +++ b/pkg/nvml/mock/unit.go @@ -18,25 +18,25 @@ var _ nvml.Unit = &Unit{} // // // make and configure a mocked nvml.Unit // mockedUnit := &Unit{ -// GetDevicesFunc: func() ([]nvml.Device, nvml.Return) { +// GetDevicesFunc: func() ([]nvml.Device, error) { // panic("mock out the GetDevices method") // }, -// GetFanSpeedInfoFunc: func() (nvml.UnitFanSpeeds, nvml.Return) { +// GetFanSpeedInfoFunc: func() (nvml.UnitFanSpeeds, error) { // panic("mock out the GetFanSpeedInfo method") // }, -// GetLedStateFunc: func() (nvml.LedState, nvml.Return) { +// GetLedStateFunc: func() (nvml.LedState, error) { // panic("mock out the GetLedState method") // }, -// GetPsuInfoFunc: func() (nvml.PSUInfo, nvml.Return) { +// GetPsuInfoFunc: func() (nvml.PSUInfo, error) { // panic("mock out the GetPsuInfo method") // }, -// GetTemperatureFunc: func(n int) (uint32, nvml.Return) { +// GetTemperatureFunc: func(n int) (uint32, error) { // panic("mock out the GetTemperature method") // }, -// GetUnitInfoFunc: func() (nvml.UnitInfo, nvml.Return) { +// GetUnitInfoFunc: func() (nvml.UnitInfo, error) { // panic("mock out the GetUnitInfo method") // }, -// SetLedStateFunc: func(ledColor nvml.LedColor) nvml.Return { +// SetLedStateFunc: func(ledColor nvml.LedColor) error { // panic("mock out the SetLedState method") // }, // } @@ -47,25 +47,25 @@ var _ nvml.Unit = &Unit{} // } type Unit struct { // GetDevicesFunc mocks the GetDevices method. - GetDevicesFunc func() ([]nvml.Device, nvml.Return) + GetDevicesFunc func() ([]nvml.Device, error) // GetFanSpeedInfoFunc mocks the GetFanSpeedInfo method. - GetFanSpeedInfoFunc func() (nvml.UnitFanSpeeds, nvml.Return) + GetFanSpeedInfoFunc func() (nvml.UnitFanSpeeds, error) // GetLedStateFunc mocks the GetLedState method. - GetLedStateFunc func() (nvml.LedState, nvml.Return) + GetLedStateFunc func() (nvml.LedState, error) // GetPsuInfoFunc mocks the GetPsuInfo method. - GetPsuInfoFunc func() (nvml.PSUInfo, nvml.Return) + GetPsuInfoFunc func() (nvml.PSUInfo, error) // GetTemperatureFunc mocks the GetTemperature method. - GetTemperatureFunc func(n int) (uint32, nvml.Return) + GetTemperatureFunc func(n int) (uint32, error) // GetUnitInfoFunc mocks the GetUnitInfo method. - GetUnitInfoFunc func() (nvml.UnitInfo, nvml.Return) + GetUnitInfoFunc func() (nvml.UnitInfo, error) // SetLedStateFunc mocks the SetLedState method. - SetLedStateFunc func(ledColor nvml.LedColor) nvml.Return + SetLedStateFunc func(ledColor nvml.LedColor) error // calls tracks calls to the methods. calls struct { @@ -105,7 +105,7 @@ type Unit struct { } // GetDevices calls GetDevicesFunc. -func (mock *Unit) GetDevices() ([]nvml.Device, nvml.Return) { +func (mock *Unit) GetDevices() ([]nvml.Device, error) { if mock.GetDevicesFunc == nil { panic("Unit.GetDevicesFunc: method is nil but Unit.GetDevices was just called") } @@ -132,7 +132,7 @@ func (mock *Unit) GetDevicesCalls() []struct { } // GetFanSpeedInfo calls GetFanSpeedInfoFunc. -func (mock *Unit) GetFanSpeedInfo() (nvml.UnitFanSpeeds, nvml.Return) { +func (mock *Unit) GetFanSpeedInfo() (nvml.UnitFanSpeeds, error) { if mock.GetFanSpeedInfoFunc == nil { panic("Unit.GetFanSpeedInfoFunc: method is nil but Unit.GetFanSpeedInfo was just called") } @@ -159,7 +159,7 @@ func (mock *Unit) GetFanSpeedInfoCalls() []struct { } // GetLedState calls GetLedStateFunc. -func (mock *Unit) GetLedState() (nvml.LedState, nvml.Return) { +func (mock *Unit) GetLedState() (nvml.LedState, error) { if mock.GetLedStateFunc == nil { panic("Unit.GetLedStateFunc: method is nil but Unit.GetLedState was just called") } @@ -186,7 +186,7 @@ func (mock *Unit) GetLedStateCalls() []struct { } // GetPsuInfo calls GetPsuInfoFunc. -func (mock *Unit) GetPsuInfo() (nvml.PSUInfo, nvml.Return) { +func (mock *Unit) GetPsuInfo() (nvml.PSUInfo, error) { if mock.GetPsuInfoFunc == nil { panic("Unit.GetPsuInfoFunc: method is nil but Unit.GetPsuInfo was just called") } @@ -213,7 +213,7 @@ func (mock *Unit) GetPsuInfoCalls() []struct { } // GetTemperature calls GetTemperatureFunc. -func (mock *Unit) GetTemperature(n int) (uint32, nvml.Return) { +func (mock *Unit) GetTemperature(n int) (uint32, error) { if mock.GetTemperatureFunc == nil { panic("Unit.GetTemperatureFunc: method is nil but Unit.GetTemperature was just called") } @@ -245,7 +245,7 @@ func (mock *Unit) GetTemperatureCalls() []struct { } // GetUnitInfo calls GetUnitInfoFunc. -func (mock *Unit) GetUnitInfo() (nvml.UnitInfo, nvml.Return) { +func (mock *Unit) GetUnitInfo() (nvml.UnitInfo, error) { if mock.GetUnitInfoFunc == nil { panic("Unit.GetUnitInfoFunc: method is nil but Unit.GetUnitInfo was just called") } @@ -272,7 +272,7 @@ func (mock *Unit) GetUnitInfoCalls() []struct { } // SetLedState calls SetLedStateFunc. -func (mock *Unit) SetLedState(ledColor nvml.LedColor) nvml.Return { +func (mock *Unit) SetLedState(ledColor nvml.LedColor) error { if mock.SetLedStateFunc == nil { panic("Unit.SetLedStateFunc: method is nil but Unit.SetLedState was just called") } diff --git a/pkg/nvml/mock/vgpuinstance.go b/pkg/nvml/mock/vgpuinstance.go index e0af013..2749e5c 100644 --- a/pkg/nvml/mock/vgpuinstance.go +++ b/pkg/nvml/mock/vgpuinstance.go @@ -18,73 +18,73 @@ var _ nvml.VgpuInstance = &VgpuInstance{} // // // make and configure a mocked nvml.VgpuInstance // mockedVgpuInstance := &VgpuInstance{ -// ClearAccountingPidsFunc: func() nvml.Return { +// ClearAccountingPidsFunc: func() error { // panic("mock out the ClearAccountingPids method") // }, -// GetAccountingModeFunc: func() (nvml.EnableState, nvml.Return) { +// GetAccountingModeFunc: func() (nvml.EnableState, error) { // panic("mock out the GetAccountingMode method") // }, -// GetAccountingPidsFunc: func() ([]int, nvml.Return) { +// GetAccountingPidsFunc: func() ([]int, error) { // panic("mock out the GetAccountingPids method") // }, -// GetAccountingStatsFunc: func(n int) (nvml.AccountingStats, nvml.Return) { +// GetAccountingStatsFunc: func(n int) (nvml.AccountingStats, error) { // panic("mock out the GetAccountingStats method") // }, -// GetEccModeFunc: func() (nvml.EnableState, nvml.Return) { +// GetEccModeFunc: func() (nvml.EnableState, error) { // panic("mock out the GetEccMode method") // }, -// GetEncoderCapacityFunc: func() (int, nvml.Return) { +// GetEncoderCapacityFunc: func() (int, error) { // panic("mock out the GetEncoderCapacity method") // }, -// GetEncoderSessionsFunc: func() (int, nvml.EncoderSessionInfo, nvml.Return) { +// GetEncoderSessionsFunc: func() (int, nvml.EncoderSessionInfo, error) { // panic("mock out the GetEncoderSessions method") // }, -// GetEncoderStatsFunc: func() (int, uint32, uint32, nvml.Return) { +// GetEncoderStatsFunc: func() (int, uint32, uint32, error) { // panic("mock out the GetEncoderStats method") // }, -// GetFBCSessionsFunc: func() (int, nvml.FBCSessionInfo, nvml.Return) { +// GetFBCSessionsFunc: func() (int, nvml.FBCSessionInfo, error) { // panic("mock out the GetFBCSessions method") // }, -// GetFBCStatsFunc: func() (nvml.FBCStats, nvml.Return) { +// GetFBCStatsFunc: func() (nvml.FBCStats, error) { // panic("mock out the GetFBCStats method") // }, -// GetFbUsageFunc: func() (uint64, nvml.Return) { +// GetFbUsageFunc: func() (uint64, error) { // panic("mock out the GetFbUsage method") // }, -// GetFrameRateLimitFunc: func() (uint32, nvml.Return) { +// GetFrameRateLimitFunc: func() (uint32, error) { // panic("mock out the GetFrameRateLimit method") // }, -// GetGpuInstanceIdFunc: func() (int, nvml.Return) { +// GetGpuInstanceIdFunc: func() (int, error) { // panic("mock out the GetGpuInstanceId method") // }, -// GetGpuPciIdFunc: func() (string, nvml.Return) { +// GetGpuPciIdFunc: func() (string, error) { // panic("mock out the GetGpuPciId method") // }, -// GetLicenseInfoFunc: func() (nvml.VgpuLicenseInfo, nvml.Return) { +// GetLicenseInfoFunc: func() (nvml.VgpuLicenseInfo, error) { // panic("mock out the GetLicenseInfo method") // }, -// GetLicenseStatusFunc: func() (int, nvml.Return) { +// GetLicenseStatusFunc: func() (int, error) { // panic("mock out the GetLicenseStatus method") // }, -// GetMdevUUIDFunc: func() (string, nvml.Return) { +// GetMdevUUIDFunc: func() (string, error) { // panic("mock out the GetMdevUUID method") // }, -// GetMetadataFunc: func() (nvml.VgpuMetadata, nvml.Return) { +// GetMetadataFunc: func() (nvml.VgpuMetadata, error) { // panic("mock out the GetMetadata method") // }, -// GetTypeFunc: func() (nvml.VgpuTypeId, nvml.Return) { +// GetTypeFunc: func() (nvml.VgpuTypeId, error) { // panic("mock out the GetType method") // }, -// GetUUIDFunc: func() (string, nvml.Return) { +// GetUUIDFunc: func() (string, error) { // panic("mock out the GetUUID method") // }, -// GetVmDriverVersionFunc: func() (string, nvml.Return) { +// GetVmDriverVersionFunc: func() (string, error) { // panic("mock out the GetVmDriverVersion method") // }, -// GetVmIDFunc: func() (string, nvml.VgpuVmIdType, nvml.Return) { +// GetVmIDFunc: func() (string, nvml.VgpuVmIdType, error) { // panic("mock out the GetVmID method") // }, -// SetEncoderCapacityFunc: func(n int) nvml.Return { +// SetEncoderCapacityFunc: func(n int) error { // panic("mock out the SetEncoderCapacity method") // }, // } @@ -95,73 +95,73 @@ var _ nvml.VgpuInstance = &VgpuInstance{} // } type VgpuInstance struct { // ClearAccountingPidsFunc mocks the ClearAccountingPids method. - ClearAccountingPidsFunc func() nvml.Return + ClearAccountingPidsFunc func() error // GetAccountingModeFunc mocks the GetAccountingMode method. - GetAccountingModeFunc func() (nvml.EnableState, nvml.Return) + GetAccountingModeFunc func() (nvml.EnableState, error) // GetAccountingPidsFunc mocks the GetAccountingPids method. - GetAccountingPidsFunc func() ([]int, nvml.Return) + GetAccountingPidsFunc func() ([]int, error) // GetAccountingStatsFunc mocks the GetAccountingStats method. - GetAccountingStatsFunc func(n int) (nvml.AccountingStats, nvml.Return) + GetAccountingStatsFunc func(n int) (nvml.AccountingStats, error) // GetEccModeFunc mocks the GetEccMode method. - GetEccModeFunc func() (nvml.EnableState, nvml.Return) + GetEccModeFunc func() (nvml.EnableState, error) // GetEncoderCapacityFunc mocks the GetEncoderCapacity method. - GetEncoderCapacityFunc func() (int, nvml.Return) + GetEncoderCapacityFunc func() (int, error) // GetEncoderSessionsFunc mocks the GetEncoderSessions method. - GetEncoderSessionsFunc func() (int, nvml.EncoderSessionInfo, nvml.Return) + GetEncoderSessionsFunc func() (int, nvml.EncoderSessionInfo, error) // GetEncoderStatsFunc mocks the GetEncoderStats method. - GetEncoderStatsFunc func() (int, uint32, uint32, nvml.Return) + GetEncoderStatsFunc func() (int, uint32, uint32, error) // GetFBCSessionsFunc mocks the GetFBCSessions method. - GetFBCSessionsFunc func() (int, nvml.FBCSessionInfo, nvml.Return) + GetFBCSessionsFunc func() (int, nvml.FBCSessionInfo, error) // GetFBCStatsFunc mocks the GetFBCStats method. - GetFBCStatsFunc func() (nvml.FBCStats, nvml.Return) + GetFBCStatsFunc func() (nvml.FBCStats, error) // GetFbUsageFunc mocks the GetFbUsage method. - GetFbUsageFunc func() (uint64, nvml.Return) + GetFbUsageFunc func() (uint64, error) // GetFrameRateLimitFunc mocks the GetFrameRateLimit method. - GetFrameRateLimitFunc func() (uint32, nvml.Return) + GetFrameRateLimitFunc func() (uint32, error) // GetGpuInstanceIdFunc mocks the GetGpuInstanceId method. - GetGpuInstanceIdFunc func() (int, nvml.Return) + GetGpuInstanceIdFunc func() (int, error) // GetGpuPciIdFunc mocks the GetGpuPciId method. - GetGpuPciIdFunc func() (string, nvml.Return) + GetGpuPciIdFunc func() (string, error) // GetLicenseInfoFunc mocks the GetLicenseInfo method. - GetLicenseInfoFunc func() (nvml.VgpuLicenseInfo, nvml.Return) + GetLicenseInfoFunc func() (nvml.VgpuLicenseInfo, error) // GetLicenseStatusFunc mocks the GetLicenseStatus method. - GetLicenseStatusFunc func() (int, nvml.Return) + GetLicenseStatusFunc func() (int, error) // GetMdevUUIDFunc mocks the GetMdevUUID method. - GetMdevUUIDFunc func() (string, nvml.Return) + GetMdevUUIDFunc func() (string, error) // GetMetadataFunc mocks the GetMetadata method. - GetMetadataFunc func() (nvml.VgpuMetadata, nvml.Return) + GetMetadataFunc func() (nvml.VgpuMetadata, error) // GetTypeFunc mocks the GetType method. - GetTypeFunc func() (nvml.VgpuTypeId, nvml.Return) + GetTypeFunc func() (nvml.VgpuTypeId, error) // GetUUIDFunc mocks the GetUUID method. - GetUUIDFunc func() (string, nvml.Return) + GetUUIDFunc func() (string, error) // GetVmDriverVersionFunc mocks the GetVmDriverVersion method. - GetVmDriverVersionFunc func() (string, nvml.Return) + GetVmDriverVersionFunc func() (string, error) // GetVmIDFunc mocks the GetVmID method. - GetVmIDFunc func() (string, nvml.VgpuVmIdType, nvml.Return) + GetVmIDFunc func() (string, nvml.VgpuVmIdType, error) // SetEncoderCapacityFunc mocks the SetEncoderCapacity method. - SetEncoderCapacityFunc func(n int) nvml.Return + SetEncoderCapacityFunc func(n int) error // calls tracks calls to the methods. calls struct { @@ -265,7 +265,7 @@ type VgpuInstance struct { } // ClearAccountingPids calls ClearAccountingPidsFunc. -func (mock *VgpuInstance) ClearAccountingPids() nvml.Return { +func (mock *VgpuInstance) ClearAccountingPids() error { if mock.ClearAccountingPidsFunc == nil { panic("VgpuInstance.ClearAccountingPidsFunc: method is nil but VgpuInstance.ClearAccountingPids was just called") } @@ -292,7 +292,7 @@ func (mock *VgpuInstance) ClearAccountingPidsCalls() []struct { } // GetAccountingMode calls GetAccountingModeFunc. -func (mock *VgpuInstance) GetAccountingMode() (nvml.EnableState, nvml.Return) { +func (mock *VgpuInstance) GetAccountingMode() (nvml.EnableState, error) { if mock.GetAccountingModeFunc == nil { panic("VgpuInstance.GetAccountingModeFunc: method is nil but VgpuInstance.GetAccountingMode was just called") } @@ -319,7 +319,7 @@ func (mock *VgpuInstance) GetAccountingModeCalls() []struct { } // GetAccountingPids calls GetAccountingPidsFunc. -func (mock *VgpuInstance) GetAccountingPids() ([]int, nvml.Return) { +func (mock *VgpuInstance) GetAccountingPids() ([]int, error) { if mock.GetAccountingPidsFunc == nil { panic("VgpuInstance.GetAccountingPidsFunc: method is nil but VgpuInstance.GetAccountingPids was just called") } @@ -346,7 +346,7 @@ func (mock *VgpuInstance) GetAccountingPidsCalls() []struct { } // GetAccountingStats calls GetAccountingStatsFunc. -func (mock *VgpuInstance) GetAccountingStats(n int) (nvml.AccountingStats, nvml.Return) { +func (mock *VgpuInstance) GetAccountingStats(n int) (nvml.AccountingStats, error) { if mock.GetAccountingStatsFunc == nil { panic("VgpuInstance.GetAccountingStatsFunc: method is nil but VgpuInstance.GetAccountingStats was just called") } @@ -378,7 +378,7 @@ func (mock *VgpuInstance) GetAccountingStatsCalls() []struct { } // GetEccMode calls GetEccModeFunc. -func (mock *VgpuInstance) GetEccMode() (nvml.EnableState, nvml.Return) { +func (mock *VgpuInstance) GetEccMode() (nvml.EnableState, error) { if mock.GetEccModeFunc == nil { panic("VgpuInstance.GetEccModeFunc: method is nil but VgpuInstance.GetEccMode was just called") } @@ -405,7 +405,7 @@ func (mock *VgpuInstance) GetEccModeCalls() []struct { } // GetEncoderCapacity calls GetEncoderCapacityFunc. -func (mock *VgpuInstance) GetEncoderCapacity() (int, nvml.Return) { +func (mock *VgpuInstance) GetEncoderCapacity() (int, error) { if mock.GetEncoderCapacityFunc == nil { panic("VgpuInstance.GetEncoderCapacityFunc: method is nil but VgpuInstance.GetEncoderCapacity was just called") } @@ -432,7 +432,7 @@ func (mock *VgpuInstance) GetEncoderCapacityCalls() []struct { } // GetEncoderSessions calls GetEncoderSessionsFunc. -func (mock *VgpuInstance) GetEncoderSessions() (int, nvml.EncoderSessionInfo, nvml.Return) { +func (mock *VgpuInstance) GetEncoderSessions() (int, nvml.EncoderSessionInfo, error) { if mock.GetEncoderSessionsFunc == nil { panic("VgpuInstance.GetEncoderSessionsFunc: method is nil but VgpuInstance.GetEncoderSessions was just called") } @@ -459,7 +459,7 @@ func (mock *VgpuInstance) GetEncoderSessionsCalls() []struct { } // GetEncoderStats calls GetEncoderStatsFunc. -func (mock *VgpuInstance) GetEncoderStats() (int, uint32, uint32, nvml.Return) { +func (mock *VgpuInstance) GetEncoderStats() (int, uint32, uint32, error) { if mock.GetEncoderStatsFunc == nil { panic("VgpuInstance.GetEncoderStatsFunc: method is nil but VgpuInstance.GetEncoderStats was just called") } @@ -486,7 +486,7 @@ func (mock *VgpuInstance) GetEncoderStatsCalls() []struct { } // GetFBCSessions calls GetFBCSessionsFunc. -func (mock *VgpuInstance) GetFBCSessions() (int, nvml.FBCSessionInfo, nvml.Return) { +func (mock *VgpuInstance) GetFBCSessions() (int, nvml.FBCSessionInfo, error) { if mock.GetFBCSessionsFunc == nil { panic("VgpuInstance.GetFBCSessionsFunc: method is nil but VgpuInstance.GetFBCSessions was just called") } @@ -513,7 +513,7 @@ func (mock *VgpuInstance) GetFBCSessionsCalls() []struct { } // GetFBCStats calls GetFBCStatsFunc. -func (mock *VgpuInstance) GetFBCStats() (nvml.FBCStats, nvml.Return) { +func (mock *VgpuInstance) GetFBCStats() (nvml.FBCStats, error) { if mock.GetFBCStatsFunc == nil { panic("VgpuInstance.GetFBCStatsFunc: method is nil but VgpuInstance.GetFBCStats was just called") } @@ -540,7 +540,7 @@ func (mock *VgpuInstance) GetFBCStatsCalls() []struct { } // GetFbUsage calls GetFbUsageFunc. -func (mock *VgpuInstance) GetFbUsage() (uint64, nvml.Return) { +func (mock *VgpuInstance) GetFbUsage() (uint64, error) { if mock.GetFbUsageFunc == nil { panic("VgpuInstance.GetFbUsageFunc: method is nil but VgpuInstance.GetFbUsage was just called") } @@ -567,7 +567,7 @@ func (mock *VgpuInstance) GetFbUsageCalls() []struct { } // GetFrameRateLimit calls GetFrameRateLimitFunc. -func (mock *VgpuInstance) GetFrameRateLimit() (uint32, nvml.Return) { +func (mock *VgpuInstance) GetFrameRateLimit() (uint32, error) { if mock.GetFrameRateLimitFunc == nil { panic("VgpuInstance.GetFrameRateLimitFunc: method is nil but VgpuInstance.GetFrameRateLimit was just called") } @@ -594,7 +594,7 @@ func (mock *VgpuInstance) GetFrameRateLimitCalls() []struct { } // GetGpuInstanceId calls GetGpuInstanceIdFunc. -func (mock *VgpuInstance) GetGpuInstanceId() (int, nvml.Return) { +func (mock *VgpuInstance) GetGpuInstanceId() (int, error) { if mock.GetGpuInstanceIdFunc == nil { panic("VgpuInstance.GetGpuInstanceIdFunc: method is nil but VgpuInstance.GetGpuInstanceId was just called") } @@ -621,7 +621,7 @@ func (mock *VgpuInstance) GetGpuInstanceIdCalls() []struct { } // GetGpuPciId calls GetGpuPciIdFunc. -func (mock *VgpuInstance) GetGpuPciId() (string, nvml.Return) { +func (mock *VgpuInstance) GetGpuPciId() (string, error) { if mock.GetGpuPciIdFunc == nil { panic("VgpuInstance.GetGpuPciIdFunc: method is nil but VgpuInstance.GetGpuPciId was just called") } @@ -648,7 +648,7 @@ func (mock *VgpuInstance) GetGpuPciIdCalls() []struct { } // GetLicenseInfo calls GetLicenseInfoFunc. -func (mock *VgpuInstance) GetLicenseInfo() (nvml.VgpuLicenseInfo, nvml.Return) { +func (mock *VgpuInstance) GetLicenseInfo() (nvml.VgpuLicenseInfo, error) { if mock.GetLicenseInfoFunc == nil { panic("VgpuInstance.GetLicenseInfoFunc: method is nil but VgpuInstance.GetLicenseInfo was just called") } @@ -675,7 +675,7 @@ func (mock *VgpuInstance) GetLicenseInfoCalls() []struct { } // GetLicenseStatus calls GetLicenseStatusFunc. -func (mock *VgpuInstance) GetLicenseStatus() (int, nvml.Return) { +func (mock *VgpuInstance) GetLicenseStatus() (int, error) { if mock.GetLicenseStatusFunc == nil { panic("VgpuInstance.GetLicenseStatusFunc: method is nil but VgpuInstance.GetLicenseStatus was just called") } @@ -702,7 +702,7 @@ func (mock *VgpuInstance) GetLicenseStatusCalls() []struct { } // GetMdevUUID calls GetMdevUUIDFunc. -func (mock *VgpuInstance) GetMdevUUID() (string, nvml.Return) { +func (mock *VgpuInstance) GetMdevUUID() (string, error) { if mock.GetMdevUUIDFunc == nil { panic("VgpuInstance.GetMdevUUIDFunc: method is nil but VgpuInstance.GetMdevUUID was just called") } @@ -729,7 +729,7 @@ func (mock *VgpuInstance) GetMdevUUIDCalls() []struct { } // GetMetadata calls GetMetadataFunc. -func (mock *VgpuInstance) GetMetadata() (nvml.VgpuMetadata, nvml.Return) { +func (mock *VgpuInstance) GetMetadata() (nvml.VgpuMetadata, error) { if mock.GetMetadataFunc == nil { panic("VgpuInstance.GetMetadataFunc: method is nil but VgpuInstance.GetMetadata was just called") } @@ -756,7 +756,7 @@ func (mock *VgpuInstance) GetMetadataCalls() []struct { } // GetType calls GetTypeFunc. -func (mock *VgpuInstance) GetType() (nvml.VgpuTypeId, nvml.Return) { +func (mock *VgpuInstance) GetType() (nvml.VgpuTypeId, error) { if mock.GetTypeFunc == nil { panic("VgpuInstance.GetTypeFunc: method is nil but VgpuInstance.GetType was just called") } @@ -783,7 +783,7 @@ func (mock *VgpuInstance) GetTypeCalls() []struct { } // GetUUID calls GetUUIDFunc. -func (mock *VgpuInstance) GetUUID() (string, nvml.Return) { +func (mock *VgpuInstance) GetUUID() (string, error) { if mock.GetUUIDFunc == nil { panic("VgpuInstance.GetUUIDFunc: method is nil but VgpuInstance.GetUUID was just called") } @@ -810,7 +810,7 @@ func (mock *VgpuInstance) GetUUIDCalls() []struct { } // GetVmDriverVersion calls GetVmDriverVersionFunc. -func (mock *VgpuInstance) GetVmDriverVersion() (string, nvml.Return) { +func (mock *VgpuInstance) GetVmDriverVersion() (string, error) { if mock.GetVmDriverVersionFunc == nil { panic("VgpuInstance.GetVmDriverVersionFunc: method is nil but VgpuInstance.GetVmDriverVersion was just called") } @@ -837,7 +837,7 @@ func (mock *VgpuInstance) GetVmDriverVersionCalls() []struct { } // GetVmID calls GetVmIDFunc. -func (mock *VgpuInstance) GetVmID() (string, nvml.VgpuVmIdType, nvml.Return) { +func (mock *VgpuInstance) GetVmID() (string, nvml.VgpuVmIdType, error) { if mock.GetVmIDFunc == nil { panic("VgpuInstance.GetVmIDFunc: method is nil but VgpuInstance.GetVmID was just called") } @@ -864,7 +864,7 @@ func (mock *VgpuInstance) GetVmIDCalls() []struct { } // SetEncoderCapacity calls SetEncoderCapacityFunc. -func (mock *VgpuInstance) SetEncoderCapacity(n int) nvml.Return { +func (mock *VgpuInstance) SetEncoderCapacity(n int) error { if mock.SetEncoderCapacityFunc == nil { panic("VgpuInstance.SetEncoderCapacityFunc: method is nil but VgpuInstance.SetEncoderCapacity was just called") } diff --git a/pkg/nvml/mock/vgputypeid.go b/pkg/nvml/mock/vgputypeid.go index 00246e8..290ce79 100644 --- a/pkg/nvml/mock/vgputypeid.go +++ b/pkg/nvml/mock/vgputypeid.go @@ -18,46 +18,46 @@ var _ nvml.VgpuTypeId = &VgpuTypeId{} // // // make and configure a mocked nvml.VgpuTypeId // mockedVgpuTypeId := &VgpuTypeId{ -// GetCapabilitiesFunc: func(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { +// GetCapabilitiesFunc: func(vgpuCapability nvml.VgpuCapability) (bool, error) { // panic("mock out the GetCapabilities method") // }, -// GetClassFunc: func() (string, nvml.Return) { +// GetClassFunc: func() (string, error) { // panic("mock out the GetClass method") // }, -// GetCreatablePlacementsFunc: func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { +// GetCreatablePlacementsFunc: func(device nvml.Device) (nvml.VgpuPlacementList, error) { // panic("mock out the GetCreatablePlacements method") // }, -// GetDeviceIDFunc: func() (uint64, uint64, nvml.Return) { +// GetDeviceIDFunc: func() (uint64, uint64, error) { // panic("mock out the GetDeviceID method") // }, -// GetFrameRateLimitFunc: func() (uint32, nvml.Return) { +// GetFrameRateLimitFunc: func() (uint32, error) { // panic("mock out the GetFrameRateLimit method") // }, -// GetFramebufferSizeFunc: func() (uint64, nvml.Return) { +// GetFramebufferSizeFunc: func() (uint64, error) { // panic("mock out the GetFramebufferSize method") // }, -// GetGpuInstanceProfileIdFunc: func() (uint32, nvml.Return) { +// GetGpuInstanceProfileIdFunc: func() (uint32, error) { // panic("mock out the GetGpuInstanceProfileId method") // }, -// GetLicenseFunc: func() (string, nvml.Return) { +// GetLicenseFunc: func() (string, error) { // panic("mock out the GetLicense method") // }, -// GetMaxInstancesFunc: func(device nvml.Device) (int, nvml.Return) { +// GetMaxInstancesFunc: func(device nvml.Device) (int, error) { // panic("mock out the GetMaxInstances method") // }, -// GetMaxInstancesPerVmFunc: func() (int, nvml.Return) { +// GetMaxInstancesPerVmFunc: func() (int, error) { // panic("mock out the GetMaxInstancesPerVm method") // }, -// GetNameFunc: func() (string, nvml.Return) { +// GetNameFunc: func() (string, error) { // panic("mock out the GetName method") // }, -// GetNumDisplayHeadsFunc: func() (int, nvml.Return) { +// GetNumDisplayHeadsFunc: func() (int, error) { // panic("mock out the GetNumDisplayHeads method") // }, -// GetResolutionFunc: func(n int) (uint32, uint32, nvml.Return) { +// GetResolutionFunc: func(n int) (uint32, uint32, error) { // panic("mock out the GetResolution method") // }, -// GetSupportedPlacementsFunc: func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { +// GetSupportedPlacementsFunc: func(device nvml.Device) (nvml.VgpuPlacementList, error) { // panic("mock out the GetSupportedPlacements method") // }, // } @@ -68,46 +68,46 @@ var _ nvml.VgpuTypeId = &VgpuTypeId{} // } type VgpuTypeId struct { // GetCapabilitiesFunc mocks the GetCapabilities method. - GetCapabilitiesFunc func(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) + GetCapabilitiesFunc func(vgpuCapability nvml.VgpuCapability) (bool, error) // GetClassFunc mocks the GetClass method. - GetClassFunc func() (string, nvml.Return) + GetClassFunc func() (string, error) // GetCreatablePlacementsFunc mocks the GetCreatablePlacements method. - GetCreatablePlacementsFunc func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) + GetCreatablePlacementsFunc func(device nvml.Device) (nvml.VgpuPlacementList, error) // GetDeviceIDFunc mocks the GetDeviceID method. - GetDeviceIDFunc func() (uint64, uint64, nvml.Return) + GetDeviceIDFunc func() (uint64, uint64, error) // GetFrameRateLimitFunc mocks the GetFrameRateLimit method. - GetFrameRateLimitFunc func() (uint32, nvml.Return) + GetFrameRateLimitFunc func() (uint32, error) // GetFramebufferSizeFunc mocks the GetFramebufferSize method. - GetFramebufferSizeFunc func() (uint64, nvml.Return) + GetFramebufferSizeFunc func() (uint64, error) // GetGpuInstanceProfileIdFunc mocks the GetGpuInstanceProfileId method. - GetGpuInstanceProfileIdFunc func() (uint32, nvml.Return) + GetGpuInstanceProfileIdFunc func() (uint32, error) // GetLicenseFunc mocks the GetLicense method. - GetLicenseFunc func() (string, nvml.Return) + GetLicenseFunc func() (string, error) // GetMaxInstancesFunc mocks the GetMaxInstances method. - GetMaxInstancesFunc func(device nvml.Device) (int, nvml.Return) + GetMaxInstancesFunc func(device nvml.Device) (int, error) // GetMaxInstancesPerVmFunc mocks the GetMaxInstancesPerVm method. - GetMaxInstancesPerVmFunc func() (int, nvml.Return) + GetMaxInstancesPerVmFunc func() (int, error) // GetNameFunc mocks the GetName method. - GetNameFunc func() (string, nvml.Return) + GetNameFunc func() (string, error) // GetNumDisplayHeadsFunc mocks the GetNumDisplayHeads method. - GetNumDisplayHeadsFunc func() (int, nvml.Return) + GetNumDisplayHeadsFunc func() (int, error) // GetResolutionFunc mocks the GetResolution method. - GetResolutionFunc func(n int) (uint32, uint32, nvml.Return) + GetResolutionFunc func(n int) (uint32, uint32, error) // GetSupportedPlacementsFunc mocks the GetSupportedPlacements method. - GetSupportedPlacementsFunc func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) + GetSupportedPlacementsFunc func(device nvml.Device) (nvml.VgpuPlacementList, error) // calls tracks calls to the methods. calls struct { @@ -181,7 +181,7 @@ type VgpuTypeId struct { } // GetCapabilities calls GetCapabilitiesFunc. -func (mock *VgpuTypeId) GetCapabilities(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { +func (mock *VgpuTypeId) GetCapabilities(vgpuCapability nvml.VgpuCapability) (bool, error) { if mock.GetCapabilitiesFunc == nil { panic("VgpuTypeId.GetCapabilitiesFunc: method is nil but VgpuTypeId.GetCapabilities was just called") } @@ -213,7 +213,7 @@ func (mock *VgpuTypeId) GetCapabilitiesCalls() []struct { } // GetClass calls GetClassFunc. -func (mock *VgpuTypeId) GetClass() (string, nvml.Return) { +func (mock *VgpuTypeId) GetClass() (string, error) { if mock.GetClassFunc == nil { panic("VgpuTypeId.GetClassFunc: method is nil but VgpuTypeId.GetClass was just called") } @@ -240,7 +240,7 @@ func (mock *VgpuTypeId) GetClassCalls() []struct { } // GetCreatablePlacements calls GetCreatablePlacementsFunc. -func (mock *VgpuTypeId) GetCreatablePlacements(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { +func (mock *VgpuTypeId) GetCreatablePlacements(device nvml.Device) (nvml.VgpuPlacementList, error) { if mock.GetCreatablePlacementsFunc == nil { panic("VgpuTypeId.GetCreatablePlacementsFunc: method is nil but VgpuTypeId.GetCreatablePlacements was just called") } @@ -272,7 +272,7 @@ func (mock *VgpuTypeId) GetCreatablePlacementsCalls() []struct { } // GetDeviceID calls GetDeviceIDFunc. -func (mock *VgpuTypeId) GetDeviceID() (uint64, uint64, nvml.Return) { +func (mock *VgpuTypeId) GetDeviceID() (uint64, uint64, error) { if mock.GetDeviceIDFunc == nil { panic("VgpuTypeId.GetDeviceIDFunc: method is nil but VgpuTypeId.GetDeviceID was just called") } @@ -299,7 +299,7 @@ func (mock *VgpuTypeId) GetDeviceIDCalls() []struct { } // GetFrameRateLimit calls GetFrameRateLimitFunc. -func (mock *VgpuTypeId) GetFrameRateLimit() (uint32, nvml.Return) { +func (mock *VgpuTypeId) GetFrameRateLimit() (uint32, error) { if mock.GetFrameRateLimitFunc == nil { panic("VgpuTypeId.GetFrameRateLimitFunc: method is nil but VgpuTypeId.GetFrameRateLimit was just called") } @@ -326,7 +326,7 @@ func (mock *VgpuTypeId) GetFrameRateLimitCalls() []struct { } // GetFramebufferSize calls GetFramebufferSizeFunc. -func (mock *VgpuTypeId) GetFramebufferSize() (uint64, nvml.Return) { +func (mock *VgpuTypeId) GetFramebufferSize() (uint64, error) { if mock.GetFramebufferSizeFunc == nil { panic("VgpuTypeId.GetFramebufferSizeFunc: method is nil but VgpuTypeId.GetFramebufferSize was just called") } @@ -353,7 +353,7 @@ func (mock *VgpuTypeId) GetFramebufferSizeCalls() []struct { } // GetGpuInstanceProfileId calls GetGpuInstanceProfileIdFunc. -func (mock *VgpuTypeId) GetGpuInstanceProfileId() (uint32, nvml.Return) { +func (mock *VgpuTypeId) GetGpuInstanceProfileId() (uint32, error) { if mock.GetGpuInstanceProfileIdFunc == nil { panic("VgpuTypeId.GetGpuInstanceProfileIdFunc: method is nil but VgpuTypeId.GetGpuInstanceProfileId was just called") } @@ -380,7 +380,7 @@ func (mock *VgpuTypeId) GetGpuInstanceProfileIdCalls() []struct { } // GetLicense calls GetLicenseFunc. -func (mock *VgpuTypeId) GetLicense() (string, nvml.Return) { +func (mock *VgpuTypeId) GetLicense() (string, error) { if mock.GetLicenseFunc == nil { panic("VgpuTypeId.GetLicenseFunc: method is nil but VgpuTypeId.GetLicense was just called") } @@ -407,7 +407,7 @@ func (mock *VgpuTypeId) GetLicenseCalls() []struct { } // GetMaxInstances calls GetMaxInstancesFunc. -func (mock *VgpuTypeId) GetMaxInstances(device nvml.Device) (int, nvml.Return) { +func (mock *VgpuTypeId) GetMaxInstances(device nvml.Device) (int, error) { if mock.GetMaxInstancesFunc == nil { panic("VgpuTypeId.GetMaxInstancesFunc: method is nil but VgpuTypeId.GetMaxInstances was just called") } @@ -439,7 +439,7 @@ func (mock *VgpuTypeId) GetMaxInstancesCalls() []struct { } // GetMaxInstancesPerVm calls GetMaxInstancesPerVmFunc. -func (mock *VgpuTypeId) GetMaxInstancesPerVm() (int, nvml.Return) { +func (mock *VgpuTypeId) GetMaxInstancesPerVm() (int, error) { if mock.GetMaxInstancesPerVmFunc == nil { panic("VgpuTypeId.GetMaxInstancesPerVmFunc: method is nil but VgpuTypeId.GetMaxInstancesPerVm was just called") } @@ -466,7 +466,7 @@ func (mock *VgpuTypeId) GetMaxInstancesPerVmCalls() []struct { } // GetName calls GetNameFunc. -func (mock *VgpuTypeId) GetName() (string, nvml.Return) { +func (mock *VgpuTypeId) GetName() (string, error) { if mock.GetNameFunc == nil { panic("VgpuTypeId.GetNameFunc: method is nil but VgpuTypeId.GetName was just called") } @@ -493,7 +493,7 @@ func (mock *VgpuTypeId) GetNameCalls() []struct { } // GetNumDisplayHeads calls GetNumDisplayHeadsFunc. -func (mock *VgpuTypeId) GetNumDisplayHeads() (int, nvml.Return) { +func (mock *VgpuTypeId) GetNumDisplayHeads() (int, error) { if mock.GetNumDisplayHeadsFunc == nil { panic("VgpuTypeId.GetNumDisplayHeadsFunc: method is nil but VgpuTypeId.GetNumDisplayHeads was just called") } @@ -520,7 +520,7 @@ func (mock *VgpuTypeId) GetNumDisplayHeadsCalls() []struct { } // GetResolution calls GetResolutionFunc. -func (mock *VgpuTypeId) GetResolution(n int) (uint32, uint32, nvml.Return) { +func (mock *VgpuTypeId) GetResolution(n int) (uint32, uint32, error) { if mock.GetResolutionFunc == nil { panic("VgpuTypeId.GetResolutionFunc: method is nil but VgpuTypeId.GetResolution was just called") } @@ -552,7 +552,7 @@ func (mock *VgpuTypeId) GetResolutionCalls() []struct { } // GetSupportedPlacements calls GetSupportedPlacementsFunc. -func (mock *VgpuTypeId) GetSupportedPlacements(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { +func (mock *VgpuTypeId) GetSupportedPlacements(device nvml.Device) (nvml.VgpuPlacementList, error) { if mock.GetSupportedPlacementsFunc == nil { panic("VgpuTypeId.GetSupportedPlacementsFunc: method is nil but VgpuTypeId.GetSupportedPlacements was just called") } diff --git a/pkg/nvml/nvml.h b/pkg/nvml/nvml.h index 1e4eb12..154137a 100644 --- a/pkg/nvml/nvml.h +++ b/pkg/nvml/nvml.h @@ -2041,7 +2041,7 @@ typedef struct nvmlFieldValue_st long long timestamp; //!< CPU Timestamp of this value in microseconds since 1970 long long latencyUsec; //!< How long this field value took to update (in usec) within NVML. This may be averaged across several fields that are serviced by the same driver call. nvmlValueType_t valueType; //!< Type of the value stored in value - nvmlReturn_t nvmlReturn; //!< Return code for retrieving this value. This must be checked before looking at value, as value is undefined if nvmlReturn != NVML_SUCCESS + nvmlReturn_t nvmlReturn; //!< Return code for ret.error()rieving this value. This must be checked before looking at value, as value is undefined if nvmlReturn != NVML_SUCCESS nvmlValue_t value; //!< Value for this field. This is only valid if nvmlReturn == NVML_SUCCESS } nvmlFieldValue_t; @@ -2698,7 +2698,7 @@ typedef unsigned char nvmlGpuFabricState_t; typedef struct { unsigned char clusterUuid[NVML_GPU_FABRIC_UUID_LEN]; //!< Uuid of the cluster to which this GPU belongs - nvmlReturn_t status; //!< Error status, if any. Must be checked only if state returns "complete". + nvmlReturn_t status; //!< Error status, if any. Must be checked only if state ret.error()urns "complete". unsigned int cliqueId; //!< ID of the fabric clique to which this GPU belongs nvmlGpuFabricState_t state; //!< Current state of GPU registration process } nvmlGpuFabricInfo_t; @@ -2739,7 +2739,7 @@ typedef struct { typedef struct { unsigned int version; //!< Structure version identifier (set to \ref nvmlGpuFabricInfo_v2) unsigned char clusterUuid[NVML_GPU_FABRIC_UUID_LEN]; //!< Uuid of the cluster to which this GPU belongs - nvmlReturn_t status; //!< Error status, if any. Must be checked only if state returns "complete". + nvmlReturn_t status; //!< Error status, if any. Must be checked only if state ret.error()urns "complete". unsigned int cliqueId; //!< ID of the fabric clique to which this GPU belongs nvmlGpuFabricState_t state; //!< Current state of GPU registration process unsigned int healthMask; //!< GPU Fabric health Status Mask @@ -2978,7 +2978,7 @@ nvmlReturn_t DECLDIR nvmlSystemGetNVMLVersion(char *version, unsigned int length * * For all products. * - * The CUDA driver version returned will be retreived from the currently installed version of CUDA. + * The CUDA driver version returned will be ret.error()reived from the currently installed version of CUDA. * If the cuda library is not found, this function will return a known supported version number. * * @param cudaDriverVersion Reference in which to return the version identifier @@ -5628,7 +5628,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetBridgeChipInfo(nvmlDevice_t device, nvmlBridge * * @param device The device handle or MIG device handle * @param infoCount Reference in which to provide the \a infos array size, and - * to return the number of returned elements + * to return the number of ret.error()urned elements * @param infos Reference in which to return the process information * * @return @@ -5671,7 +5671,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetComputeRunningProcesses_v3(nvmlDevice_t device * * @param device The device handle or MIG device handle * @param infoCount Reference in which to provide the \a infos array size, and - * to return the number of returned elements + * to return the number of ret.error()urned elements * @param infos Reference in which to return the process information * * @return @@ -5715,7 +5715,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetGraphicsRunningProcesses_v3(nvmlDevice_t devic * * @param device The device handle or MIG device handle * @param infoCount Reference in which to provide the \a infos array size, and - * to return the number of returned elements + * to return the number of ret.error()urned elements * @param infos Reference in which to return the process information * * @return @@ -6426,7 +6426,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetAccountingBufferSize(nvmlDevice_t device, unsi */ /** - * Returns the list of retired pages by source, including pages that are pending retirement + * Returns the list of retired pages by source, including pages that are pending ret.error()irement * 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 * @@ -6435,7 +6435,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetAccountingBufferSize(nvmlDevice_t device, unsi * @param device The identifier of the target device * @param cause Filter page addresses by cause of retirement * @param pageCount Reference in which to provide the \a addresses buffer size, and - * to return the number of retired pages that match \a cause + * to return the number of ret.error()ired pages that match \a cause * Set to 0 to query the size without allocating an \a addresses buffer * @param addresses Buffer to write the page addresses into * @@ -6454,7 +6454,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetRetiredPages(nvmlDevice_t device, nvmlPageReti unsigned int *pageCount, unsigned long long *addresses); /** - * Returns the list of retired pages by source, including pages that are pending retirement + * Returns the list of retired pages by source, including pages that are pending ret.error()irement * 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 * @@ -6466,7 +6466,7 @@ nvmlReturn_t DECLDIR nvmlDeviceGetRetiredPages(nvmlDevice_t device, nvmlPageReti * @param device The identifier of the target device * @param cause Filter page addresses by cause of retirement * @param pageCount Reference in which to provide the \a addresses buffer size, and - * to return the number of retired pages that match \a cause + * to return the number of ret.error()ired pages that match \a cause * Set to 0 to query the size without allocating an \a addresses buffer * @param addresses Buffer to write the page addresses into * @param timestamps Buffer to write the timestamps of page retirement, additional for _v2 @@ -8116,7 +8116,7 @@ nvmlReturn_t DECLDIR nvmlDeviceSetVirtualizationMode(nvmlDevice_t device, nvmlGp * * 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. + * On successful return, the function ret.error()urns \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. @@ -8933,7 +8933,7 @@ nvmlReturn_t DECLDIR nvmlVgpuInstanceGetFBCSessions(nvmlVgpuInstance_t vgpuInsta /** * Retrieve the GPU Instance ID for the given vGPU Instance. -* The API will return a valid GPU Instance ID for MIG backed vGPU Instance, else INVALID_GPU_INSTANCE_ID is returned. +* The API will return a valid GPU Instance ID for MIG backed vGPU Instance, else INVALID_GPU_INSTANCE_ID is ret.error()urned. * * For Kepler &tm; or newer fully supported devices. * @@ -10772,7 +10772,7 @@ typedef struct unsigned int numMetrics; //!< IN: How many metrics to retrieve in metrics[] nvmlGpmSample_t sample1; //!< IN: Sample buffer nvmlGpmSample_t sample2; //!< IN: Sample buffer - nvmlGpmMetric_t metrics[NVML_GPM_METRIC_MAX]; //!< IN/OUT: Array of metrics. Set metricId on call. See nvmlReturn and value on return + nvmlGpmMetric_t metrics[NVML_GPM_METRIC_MAX]; //!< IN/OUT: Array of metrics. Set metricId on call. See nvmlReturn and value on ret.error()urn } nvmlGpmMetricsGet_t; #define NVML_GPM_METRICS_GET_VERSION 1 diff --git a/pkg/nvml/nvml_test.go b/pkg/nvml/nvml_test.go index 5e0f98f..71bb86e 100644 --- a/pkg/nvml/nvml_test.go +++ b/pkg/nvml/nvml_test.go @@ -49,8 +49,10 @@ func TestInit(t *testing.T) { func TestSystem(t *testing.T) { requireLibNvidiaML(t) - Init() - defer Shutdown() + _ = Init() + defer func() { + _ = Shutdown() + }() driverVersion, ret := SystemGetDriverVersion() if ret != SUCCESS { @@ -118,8 +120,10 @@ func TestSystem(t *testing.T) { func TestUnit(t *testing.T) { requireLibNvidiaML(t) - Init() - defer Shutdown() + _ = Init() + defer func() { + _ = Shutdown() + }() unitCount, ret := UnitGetCount() if ret != SUCCESS { @@ -261,8 +265,10 @@ func TestUnit(t *testing.T) { func TestEventSet(t *testing.T) { requireLibNvidiaML(t) - Init() - defer Shutdown() + _ = Init() + defer func() { + _ = Shutdown() + }() set, ret := EventSetCreate() if ret != SUCCESS { diff --git a/pkg/nvml/return.go b/pkg/nvml/return.go index 1aec3ec..0dd65c0 100644 --- a/pkg/nvml/return.go +++ b/pkg/nvml/return.go @@ -20,17 +20,76 @@ import ( // nvml.ErrorString() func (l *library) ErrorString(r Return) string { - return r.Error() + return r.String() } -// String returns the string representation of a Return. +// String returns the string representation of a ret.error()urn. func (r Return) String() string { - return r.Error() + return errorStringFunc(r) } -// Error returns the string representation of a Return. -func (r Return) Error() string { - return errorStringFunc(r) +// error returns the associated golang error. +func (r Return) error() error { + switch r { + case nvmlSUCCESS: + return SUCCESS + case nvmlERROR_UNINITIALIZED: + return ERROR_UNINITIALIZED + case nvmlERROR_INVALID_ARGUMENT: + return ERROR_INVALID_ARGUMENT + case nvmlERROR_NOT_SUPPORTED: + return ERROR_NOT_SUPPORTED + case nvmlERROR_NO_PERMISSION: + return ERROR_NO_PERMISSION + case nvmlERROR_ALREADY_INITIALIZED: + return ERROR_ALREADY_INITIALIZED + case nvmlERROR_NOT_FOUND: + return ERROR_NOT_FOUND + case nvmlERROR_INSUFFICIENT_SIZE: + return ERROR_INSUFFICIENT_SIZE + case nvmlERROR_INSUFFICIENT_POWER: + return ERROR_INSUFFICIENT_POWER + case nvmlERROR_DRIVER_NOT_LOADED: + return ERROR_DRIVER_NOT_LOADED + case nvmlERROR_TIMEOUT: + return ERROR_TIMEOUT + case nvmlERROR_IRQ_ISSUE: + return ERROR_IRQ_ISSUE + case nvmlERROR_LIBRARY_NOT_FOUND: + return ERROR_LIBRARY_NOT_FOUND + case nvmlERROR_FUNCTION_NOT_FOUND: + return ERROR_FUNCTION_NOT_FOUND + case nvmlERROR_CORRUPTED_INFOROM: + return ERROR_CORRUPTED_INFOROM + case nvmlERROR_GPU_IS_LOST: + return ERROR_GPU_IS_LOST + case nvmlERROR_RESET_REQUIRED: + return ERROR_RESET_REQUIRED + case nvmlERROR_OPERATING_SYSTEM: + return ERROR_OPERATING_SYSTEM + case nvmlERROR_LIB_RM_VERSION_MISMATCH: + return ERROR_LIB_RM_VERSION_MISMATCH + case nvmlERROR_IN_USE: + return ERROR_IN_USE + case nvmlERROR_MEMORY: + return ERROR_MEMORY + case nvmlERROR_NO_DATA: + return ERROR_NO_DATA + case nvmlERROR_VGPU_ECC_NOT_SUPPORTED: + return ERROR_VGPU_ECC_NOT_SUPPORTED + case nvmlERROR_INSUFFICIENT_RESOURCES: + return ERROR_INSUFFICIENT_RESOURCES + case nvmlERROR_FREQ_NOT_SUPPORTED: + return ERROR_FREQ_NOT_SUPPORTED + case nvmlERROR_ARGUMENT_VERSION_MISMATCH: + return ERROR_ARGUMENT_VERSION_MISMATCH + case nvmlERROR_DEPRECATED: + return ERROR_DEPRECATED + case nvmlERROR_UNKNOWN: + return ERROR_UNKNOWN + default: + return fmt.Errorf("%w: unknown ret.error()urn value: %d", ERROR_UNKNOWN, r) + } } // Assigned to nvml.ErrorString if the system nvml library is in use. @@ -40,64 +99,5 @@ var errorStringFunc = defaultErrorStringFunc // This allows the nvml.ErrorString function to be used even if the NVML library // is not loaded. var defaultErrorStringFunc = func(r Return) string { - switch r { - case SUCCESS: - return "SUCCESS" - case ERROR_UNINITIALIZED: - return "ERROR_UNINITIALIZED" - case ERROR_INVALID_ARGUMENT: - return "ERROR_INVALID_ARGUMENT" - case ERROR_NOT_SUPPORTED: - return "ERROR_NOT_SUPPORTED" - case ERROR_NO_PERMISSION: - return "ERROR_NO_PERMISSION" - case ERROR_ALREADY_INITIALIZED: - return "ERROR_ALREADY_INITIALIZED" - case ERROR_NOT_FOUND: - return "ERROR_NOT_FOUND" - case ERROR_INSUFFICIENT_SIZE: - return "ERROR_INSUFFICIENT_SIZE" - case ERROR_INSUFFICIENT_POWER: - return "ERROR_INSUFFICIENT_POWER" - case ERROR_DRIVER_NOT_LOADED: - return "ERROR_DRIVER_NOT_LOADED" - case ERROR_TIMEOUT: - return "ERROR_TIMEOUT" - case ERROR_IRQ_ISSUE: - return "ERROR_IRQ_ISSUE" - case ERROR_LIBRARY_NOT_FOUND: - return "ERROR_LIBRARY_NOT_FOUND" - case ERROR_FUNCTION_NOT_FOUND: - return "ERROR_FUNCTION_NOT_FOUND" - case ERROR_CORRUPTED_INFOROM: - return "ERROR_CORRUPTED_INFOROM" - case ERROR_GPU_IS_LOST: - return "ERROR_GPU_IS_LOST" - case ERROR_RESET_REQUIRED: - return "ERROR_RESET_REQUIRED" - case ERROR_OPERATING_SYSTEM: - return "ERROR_OPERATING_SYSTEM" - case ERROR_LIB_RM_VERSION_MISMATCH: - return "ERROR_LIB_RM_VERSION_MISMATCH" - case ERROR_IN_USE: - return "ERROR_IN_USE" - case ERROR_MEMORY: - return "ERROR_MEMORY" - case ERROR_NO_DATA: - return "ERROR_NO_DATA" - case ERROR_VGPU_ECC_NOT_SUPPORTED: - return "ERROR_VGPU_ECC_NOT_SUPPORTED" - case ERROR_INSUFFICIENT_RESOURCES: - return "ERROR_INSUFFICIENT_RESOURCES" - case ERROR_FREQ_NOT_SUPPORTED: - return "ERROR_FREQ_NOT_SUPPORTED" - case ERROR_ARGUMENT_VERSION_MISMATCH: - return "ERROR_ARGUMENT_VERSION_MISMATCH" - case ERROR_DEPRECATED: - return "ERROR_DEPRECATED" - case ERROR_UNKNOWN: - return "ERROR_UNKNOWN" - default: - return fmt.Sprintf("unknown return value: %d", r) - } + return fmt.Sprintf("%s", r.error()) } diff --git a/pkg/nvml/system.go b/pkg/nvml/system.go index bee3964..ba1926d 100644 --- a/pkg/nvml/system.go +++ b/pkg/nvml/system.go @@ -15,124 +15,124 @@ package nvml // nvml.SystemGetDriverVersion() -func (l *library) SystemGetDriverVersion() (string, Return) { +func (l *library) SystemGetDriverVersion() (string, error) { Version := make([]byte, SYSTEM_DRIVER_VERSION_BUFFER_SIZE) ret := nvmlSystemGetDriverVersion(&Version[0], SYSTEM_DRIVER_VERSION_BUFFER_SIZE) - return string(Version[:clen(Version)]), ret + return string(Version[:clen(Version)]), ret.error() } // nvml.SystemGetNVMLVersion() -func (l *library) SystemGetNVMLVersion() (string, Return) { +func (l *library) SystemGetNVMLVersion() (string, error) { Version := make([]byte, SYSTEM_NVML_VERSION_BUFFER_SIZE) ret := nvmlSystemGetNVMLVersion(&Version[0], SYSTEM_NVML_VERSION_BUFFER_SIZE) - return string(Version[:clen(Version)]), ret + return string(Version[:clen(Version)]), ret.error() } // nvml.SystemGetCudaDriverVersion() -func (l *library) SystemGetCudaDriverVersion() (int, Return) { +func (l *library) SystemGetCudaDriverVersion() (int, error) { var CudaDriverVersion int32 ret := nvmlSystemGetCudaDriverVersion(&CudaDriverVersion) - return int(CudaDriverVersion), ret + return int(CudaDriverVersion), ret.error() } // nvml.SystemGetCudaDriverVersion_v2() -func (l *library) SystemGetCudaDriverVersion_v2() (int, Return) { +func (l *library) SystemGetCudaDriverVersion_v2() (int, error) { var CudaDriverVersion int32 ret := nvmlSystemGetCudaDriverVersion_v2(&CudaDriverVersion) - return int(CudaDriverVersion), ret + return int(CudaDriverVersion), ret.error() } // nvml.SystemGetProcessName() -func (l *library) SystemGetProcessName(pid int) (string, Return) { +func (l *library) SystemGetProcessName(pid int) (string, error) { name := make([]byte, SYSTEM_PROCESS_NAME_BUFFER_SIZE) ret := nvmlSystemGetProcessName(uint32(pid), &name[0], SYSTEM_PROCESS_NAME_BUFFER_SIZE) - return string(name[:clen(name)]), ret + return string(name[:clen(name)]), ret.error() } // nvml.SystemGetHicVersion() -func (l *library) SystemGetHicVersion() ([]HwbcEntry, Return) { +func (l *library) SystemGetHicVersion() ([]HwbcEntry, error) { var hwbcCount uint32 = 1 // Will be reduced upon returning for { hwbcEntries := make([]HwbcEntry, hwbcCount) ret := nvmlSystemGetHicVersion(&hwbcCount, &hwbcEntries[0]) - if ret == SUCCESS { - return hwbcEntries[:hwbcCount], ret + if ret == nvmlSUCCESS { + return hwbcEntries[:hwbcCount], ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } hwbcCount *= 2 } } // nvml.SystemGetTopologyGpuSet() -func (l *library) SystemGetTopologyGpuSet(cpuNumber int) ([]Device, Return) { +func (l *library) SystemGetTopologyGpuSet(cpuNumber int) ([]Device, error) { var count uint32 ret := nvmlSystemGetTopologyGpuSet(uint32(cpuNumber), &count, nil) - if ret != SUCCESS { - return nil, ret + if ret != nvmlSUCCESS { + return nil, ret.error() } if count == 0 { - return []Device{}, ret + return []Device{}, ret.error() } deviceArray := make([]nvmlDevice, count) ret = nvmlSystemGetTopologyGpuSet(uint32(cpuNumber), &count, &deviceArray[0]) - return convertSlice[nvmlDevice, Device](deviceArray), ret + return convertSlice[nvmlDevice, Device](deviceArray), ret.error() } // nvml.SystemGetConfComputeCapabilities() -func (l *library) SystemGetConfComputeCapabilities() (ConfComputeSystemCaps, Return) { +func (l *library) SystemGetConfComputeCapabilities() (ConfComputeSystemCaps, error) { var capabilities ConfComputeSystemCaps ret := nvmlSystemGetConfComputeCapabilities(&capabilities) - return capabilities, ret + return capabilities, ret.error() } // nvml.SystemGetConfComputeState() -func SystemGetConfComputeState() (ConfComputeSystemState, Return) { +func SystemGetConfComputeState() (ConfComputeSystemState, error) { var state ConfComputeSystemState ret := nvmlSystemGetConfComputeState(&state) - return state, ret + return state, ret.error() } // nvml.SystemGetConfComputeGpusReadyState() -func SystemGetConfComputeGpusReadyState() (uint32, Return) { +func SystemGetConfComputeGpusReadyState() (uint32, error) { var isAcceptingWork uint32 ret := nvmlSystemGetConfComputeGpusReadyState(&isAcceptingWork) - return isAcceptingWork, ret + return isAcceptingWork, ret.error() } // nvml.SystemSetConfComputeGpusReadyState() -func SystemSetConfComputeGpusReadyState(isAcceptingWork uint32) Return { - return nvmlSystemSetConfComputeGpusReadyState(isAcceptingWork) +func SystemSetConfComputeGpusReadyState(isAcceptingWork uint32) error { + return nvmlSystemSetConfComputeGpusReadyState(isAcceptingWork).error() } // nvml.SystemSetNvlinkBwMode() -func SystemSetNvlinkBwMode(nvlinkBwMode uint32) Return { - return nvmlSystemSetNvlinkBwMode(nvlinkBwMode) +func SystemSetNvlinkBwMode(nvlinkBwMode uint32) error { + return nvmlSystemSetNvlinkBwMode(nvlinkBwMode).error() } // nvml.SystemGetNvlinkBwMode() -func SystemGetNvlinkBwMode() (uint32, Return) { +func SystemGetNvlinkBwMode() (uint32, error) { var nvlinkBwMode uint32 ret := nvmlSystemGetNvlinkBwMode(&nvlinkBwMode) - return nvlinkBwMode, ret + return nvlinkBwMode, ret.error() } // nvml.SystemGetConfComputeKeyRotationThresholdInfo() -func (l *library) SystemGetConfComputeKeyRotationThresholdInfo() (ConfComputeGetKeyRotationThresholdInfo, Return) { +func (l *library) SystemGetConfComputeKeyRotationThresholdInfo() (ConfComputeGetKeyRotationThresholdInfo, error) { var keyRotationThresholdInfo ConfComputeGetKeyRotationThresholdInfo ret := nvmlSystemGetConfComputeKeyRotationThresholdInfo(&keyRotationThresholdInfo) - return keyRotationThresholdInfo, ret + return keyRotationThresholdInfo, ret.error() } // nvml.SystemGetConfComputeSettings() -func (l *library) SystemGetConfComputeSettings() (SystemConfComputeSettings, Return) { +func (l *library) SystemGetConfComputeSettings() (SystemConfComputeSettings, error) { var settings SystemConfComputeSettings ret := nvmlSystemGetConfComputeSettings(&settings) - return settings, ret + return settings, ret.error() } // nvml.SystemSetConfComputeKeyRotationThresholdInfo() -func (l *library) SystemSetConfComputeKeyRotationThresholdInfo(keyRotationThresholdInfo ConfComputeSetKeyRotationThresholdInfo) Return { - return nvmlSystemSetConfComputeKeyRotationThresholdInfo(&keyRotationThresholdInfo) +func (l *library) SystemSetConfComputeKeyRotationThresholdInfo(keyRotationThresholdInfo ConfComputeSetKeyRotationThresholdInfo) error { + return nvmlSystemSetConfComputeKeyRotationThresholdInfo(&keyRotationThresholdInfo).error() } diff --git a/pkg/nvml/unit.go b/pkg/nvml/unit.go index 617ad54..d277683 100644 --- a/pkg/nvml/unit.go +++ b/pkg/nvml/unit.go @@ -15,99 +15,99 @@ package nvml // nvml.UnitGetCount() -func (l *library) UnitGetCount() (int, Return) { +func (l *library) UnitGetCount() (int, error) { var UnitCount uint32 ret := nvmlUnitGetCount(&UnitCount) - return int(UnitCount), ret + return int(UnitCount), ret.error() } // nvml.UnitGetHandleByIndex() -func (l *library) UnitGetHandleByIndex(index int) (Unit, Return) { +func (l *library) UnitGetHandleByIndex(index int) (Unit, error) { var unit nvmlUnit ret := nvmlUnitGetHandleByIndex(uint32(index), &unit) - return unit, ret + return unit, ret.error() } // nvml.UnitGetUnitInfo() -func (l *library) UnitGetUnitInfo(unit Unit) (UnitInfo, Return) { +func (l *library) UnitGetUnitInfo(unit Unit) (UnitInfo, error) { return unit.GetUnitInfo() } -func (unit nvmlUnit) GetUnitInfo() (UnitInfo, Return) { +func (unit nvmlUnit) GetUnitInfo() (UnitInfo, error) { var info UnitInfo ret := nvmlUnitGetUnitInfo(unit, &info) - return info, ret + return info, ret.error() } // nvml.UnitGetLedState() -func (l *library) UnitGetLedState(unit Unit) (LedState, Return) { +func (l *library) UnitGetLedState(unit Unit) (LedState, error) { return unit.GetLedState() } -func (unit nvmlUnit) GetLedState() (LedState, Return) { +func (unit nvmlUnit) GetLedState() (LedState, error) { var state LedState ret := nvmlUnitGetLedState(unit, &state) - return state, ret + return state, ret.error() } // nvml.UnitGetPsuInfo() -func (l *library) UnitGetPsuInfo(unit Unit) (PSUInfo, Return) { +func (l *library) UnitGetPsuInfo(unit Unit) (PSUInfo, error) { return unit.GetPsuInfo() } -func (unit nvmlUnit) GetPsuInfo() (PSUInfo, Return) { +func (unit nvmlUnit) GetPsuInfo() (PSUInfo, error) { var psu PSUInfo ret := nvmlUnitGetPsuInfo(unit, &psu) - return psu, ret + return psu, ret.error() } // nvml.UnitGetTemperature() -func (l *library) UnitGetTemperature(unit Unit, ttype int) (uint32, Return) { +func (l *library) UnitGetTemperature(unit Unit, ttype int) (uint32, error) { return unit.GetTemperature(ttype) } -func (unit nvmlUnit) GetTemperature(ttype int) (uint32, Return) { +func (unit nvmlUnit) GetTemperature(ttype int) (uint32, error) { var temp uint32 ret := nvmlUnitGetTemperature(unit, uint32(ttype), &temp) - return temp, ret + return temp, ret.error() } // nvml.UnitGetFanSpeedInfo() -func (l *library) UnitGetFanSpeedInfo(unit Unit) (UnitFanSpeeds, Return) { +func (l *library) UnitGetFanSpeedInfo(unit Unit) (UnitFanSpeeds, error) { return unit.GetFanSpeedInfo() } -func (unit nvmlUnit) GetFanSpeedInfo() (UnitFanSpeeds, Return) { +func (unit nvmlUnit) GetFanSpeedInfo() (UnitFanSpeeds, error) { var fanSpeeds UnitFanSpeeds ret := nvmlUnitGetFanSpeedInfo(unit, &fanSpeeds) - return fanSpeeds, ret + return fanSpeeds, ret.error() } // nvml.UnitGetDevices() -func (l *library) UnitGetDevices(unit Unit) ([]Device, Return) { +func (l *library) UnitGetDevices(unit Unit) ([]Device, error) { return unit.GetDevices() } -func (unit nvmlUnit) GetDevices() ([]Device, Return) { +func (unit nvmlUnit) GetDevices() ([]Device, error) { var deviceCount uint32 = 1 // Will be reduced upon returning for { devices := make([]nvmlDevice, deviceCount) ret := nvmlUnitGetDevices(unit, &deviceCount, &devices[0]) - if ret == SUCCESS { - return convertSlice[nvmlDevice, Device](devices[:deviceCount]), ret + if ret == nvmlSUCCESS { + return convertSlice[nvmlDevice, Device](devices[:deviceCount]), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } deviceCount *= 2 } } // nvml.UnitSetLedState() -func (l *library) UnitSetLedState(unit Unit, color LedColor) Return { +func (l *library) UnitSetLedState(unit Unit, color LedColor) error { return unit.SetLedState(color) } -func (unit nvmlUnit) SetLedState(color LedColor) Return { - return nvmlUnitSetLedState(unit, color) +func (unit nvmlUnit) SetLedState(color LedColor) error { + return nvmlUnitSetLedState(unit, color).error() } diff --git a/pkg/nvml/vgpu.go b/pkg/nvml/vgpu.go index da49524..06e5c87 100644 --- a/pkg/nvml/vgpu.go +++ b/pkg/nvml/vgpu.go @@ -31,335 +31,335 @@ type VgpuPgpuMetadata struct { } // nvml.VgpuTypeGetClass() -func (l *library) VgpuTypeGetClass(vgpuTypeId VgpuTypeId) (string, Return) { +func (l *library) VgpuTypeGetClass(vgpuTypeId VgpuTypeId) (string, error) { return vgpuTypeId.GetClass() } -func (vgpuTypeId nvmlVgpuTypeId) GetClass() (string, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetClass() (string, error) { var size uint32 = DEVICE_NAME_BUFFER_SIZE vgpuTypeClass := make([]byte, DEVICE_NAME_BUFFER_SIZE) ret := nvmlVgpuTypeGetClass(vgpuTypeId, &vgpuTypeClass[0], &size) - return string(vgpuTypeClass[:clen(vgpuTypeClass)]), ret + return string(vgpuTypeClass[:clen(vgpuTypeClass)]), ret.error() } // nvml.VgpuTypeGetName() -func (l *library) VgpuTypeGetName(vgpuTypeId VgpuTypeId) (string, Return) { +func (l *library) VgpuTypeGetName(vgpuTypeId VgpuTypeId) (string, error) { return vgpuTypeId.GetName() } -func (vgpuTypeId nvmlVgpuTypeId) GetName() (string, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetName() (string, error) { var size uint32 = DEVICE_NAME_BUFFER_SIZE vgpuTypeName := make([]byte, DEVICE_NAME_BUFFER_SIZE) ret := nvmlVgpuTypeGetName(vgpuTypeId, &vgpuTypeName[0], &size) - return string(vgpuTypeName[:clen(vgpuTypeName)]), ret + return string(vgpuTypeName[:clen(vgpuTypeName)]), ret.error() } // nvml.VgpuTypeGetGpuInstanceProfileId() -func (l *library) VgpuTypeGetGpuInstanceProfileId(vgpuTypeId VgpuTypeId) (uint32, Return) { +func (l *library) VgpuTypeGetGpuInstanceProfileId(vgpuTypeId VgpuTypeId) (uint32, error) { return vgpuTypeId.GetGpuInstanceProfileId() } -func (vgpuTypeId nvmlVgpuTypeId) GetGpuInstanceProfileId() (uint32, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetGpuInstanceProfileId() (uint32, error) { var size uint32 ret := nvmlVgpuTypeGetGpuInstanceProfileId(vgpuTypeId, &size) - return size, ret + return size, ret.error() } // nvml.VgpuTypeGetDeviceID() -func (l *library) VgpuTypeGetDeviceID(vgpuTypeId VgpuTypeId) (uint64, uint64, Return) { +func (l *library) VgpuTypeGetDeviceID(vgpuTypeId VgpuTypeId) (uint64, uint64, error) { return vgpuTypeId.GetDeviceID() } -func (vgpuTypeId nvmlVgpuTypeId) GetDeviceID() (uint64, uint64, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetDeviceID() (uint64, uint64, error) { var deviceID, subsystemID uint64 ret := nvmlVgpuTypeGetDeviceID(vgpuTypeId, &deviceID, &subsystemID) - return deviceID, subsystemID, ret + return deviceID, subsystemID, ret.error() } // nvml.VgpuTypeGetFramebufferSize() -func (l *library) VgpuTypeGetFramebufferSize(vgpuTypeId VgpuTypeId) (uint64, Return) { +func (l *library) VgpuTypeGetFramebufferSize(vgpuTypeId VgpuTypeId) (uint64, error) { return vgpuTypeId.GetFramebufferSize() } -func (vgpuTypeId nvmlVgpuTypeId) GetFramebufferSize() (uint64, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetFramebufferSize() (uint64, error) { var fbSize uint64 ret := nvmlVgpuTypeGetFramebufferSize(vgpuTypeId, &fbSize) - return fbSize, ret + return fbSize, ret.error() } // nvml.VgpuTypeGetNumDisplayHeads() -func (l *library) VgpuTypeGetNumDisplayHeads(vgpuTypeId VgpuTypeId) (int, Return) { +func (l *library) VgpuTypeGetNumDisplayHeads(vgpuTypeId VgpuTypeId) (int, error) { return vgpuTypeId.GetNumDisplayHeads() } -func (vgpuTypeId nvmlVgpuTypeId) GetNumDisplayHeads() (int, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetNumDisplayHeads() (int, error) { var numDisplayHeads uint32 ret := nvmlVgpuTypeGetNumDisplayHeads(vgpuTypeId, &numDisplayHeads) - return int(numDisplayHeads), ret + return int(numDisplayHeads), ret.error() } // nvml.VgpuTypeGetResolution() -func (l *library) VgpuTypeGetResolution(vgpuTypeId VgpuTypeId, displayIndex int) (uint32, uint32, Return) { +func (l *library) VgpuTypeGetResolution(vgpuTypeId VgpuTypeId, displayIndex int) (uint32, uint32, error) { return vgpuTypeId.GetResolution(displayIndex) } -func (vgpuTypeId nvmlVgpuTypeId) GetResolution(displayIndex int) (uint32, uint32, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetResolution(displayIndex int) (uint32, uint32, error) { var xdim, ydim uint32 ret := nvmlVgpuTypeGetResolution(vgpuTypeId, uint32(displayIndex), &xdim, &ydim) - return xdim, ydim, ret + return xdim, ydim, ret.error() } // nvml.VgpuTypeGetLicense() -func (l *library) VgpuTypeGetLicense(vgpuTypeId VgpuTypeId) (string, Return) { +func (l *library) VgpuTypeGetLicense(vgpuTypeId VgpuTypeId) (string, error) { return vgpuTypeId.GetLicense() } -func (vgpuTypeId nvmlVgpuTypeId) GetLicense() (string, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetLicense() (string, error) { vgpuTypeLicenseString := make([]byte, GRID_LICENSE_BUFFER_SIZE) ret := nvmlVgpuTypeGetLicense(vgpuTypeId, &vgpuTypeLicenseString[0], GRID_LICENSE_BUFFER_SIZE) - return string(vgpuTypeLicenseString[:clen(vgpuTypeLicenseString)]), ret + return string(vgpuTypeLicenseString[:clen(vgpuTypeLicenseString)]), ret.error() } // nvml.VgpuTypeGetFrameRateLimit() -func (l *library) VgpuTypeGetFrameRateLimit(vgpuTypeId VgpuTypeId) (uint32, Return) { +func (l *library) VgpuTypeGetFrameRateLimit(vgpuTypeId VgpuTypeId) (uint32, error) { return vgpuTypeId.GetFrameRateLimit() } -func (vgpuTypeId nvmlVgpuTypeId) GetFrameRateLimit() (uint32, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetFrameRateLimit() (uint32, error) { var frameRateLimit uint32 ret := nvmlVgpuTypeGetFrameRateLimit(vgpuTypeId, &frameRateLimit) - return frameRateLimit, ret + return frameRateLimit, ret.error() } // nvml.VgpuTypeGetMaxInstances() -func (l *library) VgpuTypeGetMaxInstances(device Device, vgpuTypeId VgpuTypeId) (int, Return) { +func (l *library) VgpuTypeGetMaxInstances(device Device, vgpuTypeId VgpuTypeId) (int, error) { return vgpuTypeId.GetMaxInstances(device) } -func (device nvmlDevice) VgpuTypeGetMaxInstances(vgpuTypeId VgpuTypeId) (int, Return) { +func (device nvmlDevice) VgpuTypeGetMaxInstances(vgpuTypeId VgpuTypeId) (int, error) { return vgpuTypeId.GetMaxInstances(device) } -func (vgpuTypeId nvmlVgpuTypeId) GetMaxInstances(device Device) (int, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetMaxInstances(device Device) (int, error) { var vgpuInstanceCount uint32 ret := nvmlVgpuTypeGetMaxInstances(nvmlDeviceHandle(device), vgpuTypeId, &vgpuInstanceCount) - return int(vgpuInstanceCount), ret + return int(vgpuInstanceCount), ret.error() } // nvml.VgpuTypeGetMaxInstancesPerVm() -func (l *library) VgpuTypeGetMaxInstancesPerVm(vgpuTypeId VgpuTypeId) (int, Return) { +func (l *library) VgpuTypeGetMaxInstancesPerVm(vgpuTypeId VgpuTypeId) (int, error) { return vgpuTypeId.GetMaxInstancesPerVm() } -func (vgpuTypeId nvmlVgpuTypeId) GetMaxInstancesPerVm() (int, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetMaxInstancesPerVm() (int, error) { var vgpuInstanceCountPerVm uint32 ret := nvmlVgpuTypeGetMaxInstancesPerVm(vgpuTypeId, &vgpuInstanceCountPerVm) - return int(vgpuInstanceCountPerVm), ret + return int(vgpuInstanceCountPerVm), ret.error() } // nvml.VgpuInstanceGetVmID() -func (l *library) VgpuInstanceGetVmID(vgpuInstance VgpuInstance) (string, VgpuVmIdType, Return) { +func (l *library) VgpuInstanceGetVmID(vgpuInstance VgpuInstance) (string, VgpuVmIdType, error) { return vgpuInstance.GetVmID() } -func (vgpuInstance nvmlVgpuInstance) GetVmID() (string, VgpuVmIdType, Return) { +func (vgpuInstance nvmlVgpuInstance) GetVmID() (string, VgpuVmIdType, error) { var vmIdType VgpuVmIdType vmId := make([]byte, DEVICE_UUID_BUFFER_SIZE) ret := nvmlVgpuInstanceGetVmID(vgpuInstance, &vmId[0], DEVICE_UUID_BUFFER_SIZE, &vmIdType) - return string(vmId[:clen(vmId)]), vmIdType, ret + return string(vmId[:clen(vmId)]), vmIdType, ret.error() } // nvml.VgpuInstanceGetUUID() -func (l *library) VgpuInstanceGetUUID(vgpuInstance VgpuInstance) (string, Return) { +func (l *library) VgpuInstanceGetUUID(vgpuInstance VgpuInstance) (string, error) { return vgpuInstance.GetUUID() } -func (vgpuInstance nvmlVgpuInstance) GetUUID() (string, Return) { +func (vgpuInstance nvmlVgpuInstance) GetUUID() (string, error) { uuid := make([]byte, DEVICE_UUID_BUFFER_SIZE) ret := nvmlVgpuInstanceGetUUID(vgpuInstance, &uuid[0], DEVICE_UUID_BUFFER_SIZE) - return string(uuid[:clen(uuid)]), ret + return string(uuid[:clen(uuid)]), ret.error() } // nvml.VgpuInstanceGetVmDriverVersion() -func (l *library) VgpuInstanceGetVmDriverVersion(vgpuInstance VgpuInstance) (string, Return) { +func (l *library) VgpuInstanceGetVmDriverVersion(vgpuInstance VgpuInstance) (string, error) { return vgpuInstance.GetVmDriverVersion() } -func (vgpuInstance nvmlVgpuInstance) GetVmDriverVersion() (string, Return) { +func (vgpuInstance nvmlVgpuInstance) GetVmDriverVersion() (string, error) { version := make([]byte, SYSTEM_DRIVER_VERSION_BUFFER_SIZE) ret := nvmlVgpuInstanceGetVmDriverVersion(vgpuInstance, &version[0], SYSTEM_DRIVER_VERSION_BUFFER_SIZE) - return string(version[:clen(version)]), ret + return string(version[:clen(version)]), ret.error() } // nvml.VgpuInstanceGetFbUsage() -func (l *library) VgpuInstanceGetFbUsage(vgpuInstance VgpuInstance) (uint64, Return) { +func (l *library) VgpuInstanceGetFbUsage(vgpuInstance VgpuInstance) (uint64, error) { return vgpuInstance.GetFbUsage() } -func (vgpuInstance nvmlVgpuInstance) GetFbUsage() (uint64, Return) { +func (vgpuInstance nvmlVgpuInstance) GetFbUsage() (uint64, error) { var fbUsage uint64 ret := nvmlVgpuInstanceGetFbUsage(vgpuInstance, &fbUsage) - return fbUsage, ret + return fbUsage, ret.error() } // nvml.VgpuInstanceGetLicenseInfo() -func (l *library) VgpuInstanceGetLicenseInfo(vgpuInstance VgpuInstance) (VgpuLicenseInfo, Return) { +func (l *library) VgpuInstanceGetLicenseInfo(vgpuInstance VgpuInstance) (VgpuLicenseInfo, error) { return vgpuInstance.GetLicenseInfo() } -func (vgpuInstance nvmlVgpuInstance) GetLicenseInfo() (VgpuLicenseInfo, Return) { +func (vgpuInstance nvmlVgpuInstance) GetLicenseInfo() (VgpuLicenseInfo, error) { var licenseInfo VgpuLicenseInfo ret := nvmlVgpuInstanceGetLicenseInfo(vgpuInstance, &licenseInfo) - return licenseInfo, ret + return licenseInfo, ret.error() } // nvml.VgpuInstanceGetLicenseStatus() -func (l *library) VgpuInstanceGetLicenseStatus(vgpuInstance VgpuInstance) (int, Return) { +func (l *library) VgpuInstanceGetLicenseStatus(vgpuInstance VgpuInstance) (int, error) { return vgpuInstance.GetLicenseStatus() } -func (vgpuInstance nvmlVgpuInstance) GetLicenseStatus() (int, Return) { +func (vgpuInstance nvmlVgpuInstance) GetLicenseStatus() (int, error) { var licensed uint32 ret := nvmlVgpuInstanceGetLicenseStatus(vgpuInstance, &licensed) - return int(licensed), ret + return int(licensed), ret.error() } // nvml.VgpuInstanceGetType() -func (l *library) VgpuInstanceGetType(vgpuInstance VgpuInstance) (VgpuTypeId, Return) { +func (l *library) VgpuInstanceGetType(vgpuInstance VgpuInstance) (VgpuTypeId, error) { return vgpuInstance.GetType() } -func (vgpuInstance nvmlVgpuInstance) GetType() (VgpuTypeId, Return) { +func (vgpuInstance nvmlVgpuInstance) GetType() (VgpuTypeId, error) { var vgpuTypeId nvmlVgpuTypeId ret := nvmlVgpuInstanceGetType(vgpuInstance, &vgpuTypeId) - return vgpuTypeId, ret + return vgpuTypeId, ret.error() } // nvml.VgpuInstanceGetFrameRateLimit() -func (l *library) VgpuInstanceGetFrameRateLimit(vgpuInstance VgpuInstance) (uint32, Return) { +func (l *library) VgpuInstanceGetFrameRateLimit(vgpuInstance VgpuInstance) (uint32, error) { return vgpuInstance.GetFrameRateLimit() } -func (vgpuInstance nvmlVgpuInstance) GetFrameRateLimit() (uint32, Return) { +func (vgpuInstance nvmlVgpuInstance) GetFrameRateLimit() (uint32, error) { var frameRateLimit uint32 ret := nvmlVgpuInstanceGetFrameRateLimit(vgpuInstance, &frameRateLimit) - return frameRateLimit, ret + return frameRateLimit, ret.error() } // nvml.VgpuInstanceGetEccMode() -func (l *library) VgpuInstanceGetEccMode(vgpuInstance VgpuInstance) (EnableState, Return) { +func (l *library) VgpuInstanceGetEccMode(vgpuInstance VgpuInstance) (EnableState, error) { return vgpuInstance.GetEccMode() } -func (vgpuInstance nvmlVgpuInstance) GetEccMode() (EnableState, Return) { +func (vgpuInstance nvmlVgpuInstance) GetEccMode() (EnableState, error) { var eccMode EnableState ret := nvmlVgpuInstanceGetEccMode(vgpuInstance, &eccMode) - return eccMode, ret + return eccMode, ret.error() } // nvml.VgpuInstanceGetEncoderCapacity() -func (l *library) VgpuInstanceGetEncoderCapacity(vgpuInstance VgpuInstance) (int, Return) { +func (l *library) VgpuInstanceGetEncoderCapacity(vgpuInstance VgpuInstance) (int, error) { return vgpuInstance.GetEncoderCapacity() } -func (vgpuInstance nvmlVgpuInstance) GetEncoderCapacity() (int, Return) { +func (vgpuInstance nvmlVgpuInstance) GetEncoderCapacity() (int, error) { var encoderCapacity uint32 ret := nvmlVgpuInstanceGetEncoderCapacity(vgpuInstance, &encoderCapacity) - return int(encoderCapacity), ret + return int(encoderCapacity), ret.error() } // nvml.VgpuInstanceSetEncoderCapacity() -func (l *library) VgpuInstanceSetEncoderCapacity(vgpuInstance VgpuInstance, encoderCapacity int) Return { +func (l *library) VgpuInstanceSetEncoderCapacity(vgpuInstance VgpuInstance, encoderCapacity int) error { return vgpuInstance.SetEncoderCapacity(encoderCapacity) } -func (vgpuInstance nvmlVgpuInstance) SetEncoderCapacity(encoderCapacity int) Return { - return nvmlVgpuInstanceSetEncoderCapacity(vgpuInstance, uint32(encoderCapacity)) +func (vgpuInstance nvmlVgpuInstance) SetEncoderCapacity(encoderCapacity int) error { + return nvmlVgpuInstanceSetEncoderCapacity(vgpuInstance, uint32(encoderCapacity)).error() } // nvml.VgpuInstanceGetEncoderStats() -func (l *library) VgpuInstanceGetEncoderStats(vgpuInstance VgpuInstance) (int, uint32, uint32, Return) { +func (l *library) VgpuInstanceGetEncoderStats(vgpuInstance VgpuInstance) (int, uint32, uint32, error) { return vgpuInstance.GetEncoderStats() } -func (vgpuInstance nvmlVgpuInstance) GetEncoderStats() (int, uint32, uint32, Return) { +func (vgpuInstance nvmlVgpuInstance) GetEncoderStats() (int, uint32, uint32, error) { var sessionCount, averageFps, averageLatency uint32 ret := nvmlVgpuInstanceGetEncoderStats(vgpuInstance, &sessionCount, &averageFps, &averageLatency) - return int(sessionCount), averageFps, averageLatency, ret + return int(sessionCount), averageFps, averageLatency, ret.error() } // nvml.VgpuInstanceGetEncoderSessions() -func (l *library) VgpuInstanceGetEncoderSessions(vgpuInstance VgpuInstance) (int, EncoderSessionInfo, Return) { +func (l *library) VgpuInstanceGetEncoderSessions(vgpuInstance VgpuInstance) (int, EncoderSessionInfo, error) { return vgpuInstance.GetEncoderSessions() } -func (vgpuInstance nvmlVgpuInstance) GetEncoderSessions() (int, EncoderSessionInfo, Return) { +func (vgpuInstance nvmlVgpuInstance) GetEncoderSessions() (int, EncoderSessionInfo, error) { var sessionCount uint32 var sessionInfo EncoderSessionInfo ret := nvmlVgpuInstanceGetEncoderSessions(vgpuInstance, &sessionCount, &sessionInfo) - return int(sessionCount), sessionInfo, ret + return int(sessionCount), sessionInfo, ret.error() } // nvml.VgpuInstanceGetFBCStats() -func (l *library) VgpuInstanceGetFBCStats(vgpuInstance VgpuInstance) (FBCStats, Return) { +func (l *library) VgpuInstanceGetFBCStats(vgpuInstance VgpuInstance) (FBCStats, error) { return vgpuInstance.GetFBCStats() } -func (vgpuInstance nvmlVgpuInstance) GetFBCStats() (FBCStats, Return) { +func (vgpuInstance nvmlVgpuInstance) GetFBCStats() (FBCStats, error) { var fbcStats FBCStats ret := nvmlVgpuInstanceGetFBCStats(vgpuInstance, &fbcStats) - return fbcStats, ret + return fbcStats, ret.error() } // nvml.VgpuInstanceGetFBCSessions() -func (l *library) VgpuInstanceGetFBCSessions(vgpuInstance VgpuInstance) (int, FBCSessionInfo, Return) { +func (l *library) VgpuInstanceGetFBCSessions(vgpuInstance VgpuInstance) (int, FBCSessionInfo, error) { return vgpuInstance.GetFBCSessions() } -func (vgpuInstance nvmlVgpuInstance) GetFBCSessions() (int, FBCSessionInfo, Return) { +func (vgpuInstance nvmlVgpuInstance) GetFBCSessions() (int, FBCSessionInfo, error) { var sessionCount uint32 var sessionInfo FBCSessionInfo ret := nvmlVgpuInstanceGetFBCSessions(vgpuInstance, &sessionCount, &sessionInfo) - return int(sessionCount), sessionInfo, ret + return int(sessionCount), sessionInfo, ret.error() } // nvml.VgpuInstanceGetGpuInstanceId() -func (l *library) VgpuInstanceGetGpuInstanceId(vgpuInstance VgpuInstance) (int, Return) { +func (l *library) VgpuInstanceGetGpuInstanceId(vgpuInstance VgpuInstance) (int, error) { return vgpuInstance.GetGpuInstanceId() } -func (vgpuInstance nvmlVgpuInstance) GetGpuInstanceId() (int, Return) { +func (vgpuInstance nvmlVgpuInstance) GetGpuInstanceId() (int, error) { var gpuInstanceId uint32 ret := nvmlVgpuInstanceGetGpuInstanceId(vgpuInstance, &gpuInstanceId) - return int(gpuInstanceId), ret + return int(gpuInstanceId), ret.error() } // nvml.VgpuInstanceGetGpuPciId() -func (l *library) VgpuInstanceGetGpuPciId(vgpuInstance VgpuInstance) (string, Return) { +func (l *library) VgpuInstanceGetGpuPciId(vgpuInstance VgpuInstance) (string, error) { return vgpuInstance.GetGpuPciId() } -func (vgpuInstance nvmlVgpuInstance) GetGpuPciId() (string, Return) { +func (vgpuInstance nvmlVgpuInstance) GetGpuPciId() (string, error) { var length uint32 = 1 // Will be reduced upon returning for { vgpuPciId := make([]byte, length) ret := nvmlVgpuInstanceGetGpuPciId(vgpuInstance, &vgpuPciId[0], &length) - if ret == SUCCESS { - return string(vgpuPciId[:clen(vgpuPciId)]), ret + if ret == nvmlSUCCESS { + return string(vgpuPciId[:clen(vgpuPciId)]), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return "", ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return "", ret.error() } length *= 2 } } // nvml.VgpuInstanceGetMetadata() -func (l *library) VgpuInstanceGetMetadata(vgpuInstance VgpuInstance) (VgpuMetadata, Return) { +func (l *library) VgpuInstanceGetMetadata(vgpuInstance VgpuInstance) (VgpuMetadata, error) { return vgpuInstance.GetMetadata() } -func (vgpuInstance nvmlVgpuInstance) GetMetadata() (VgpuMetadata, Return) { +func (vgpuInstance nvmlVgpuInstance) GetMetadata() (VgpuMetadata, error) { var vgpuMetadata VgpuMetadata opaqueDataSize := unsafe.Sizeof(vgpuMetadata.nvmlVgpuMetadata.OpaqueData) vgpuMetadataSize := unsafe.Sizeof(vgpuMetadata.nvmlVgpuMetadata) - opaqueDataSize @@ -368,113 +368,113 @@ func (vgpuInstance nvmlVgpuInstance) GetMetadata() (VgpuMetadata, Return) { buffer := make([]byte, bufferSize) nvmlVgpuMetadataPtr := (*nvmlVgpuMetadata)(unsafe.Pointer(&buffer[0])) ret := nvmlVgpuInstanceGetMetadata(vgpuInstance, nvmlVgpuMetadataPtr, &bufferSize) - if ret == SUCCESS { + if ret == nvmlSUCCESS { vgpuMetadata.nvmlVgpuMetadata = *nvmlVgpuMetadataPtr vgpuMetadata.OpaqueData = buffer[vgpuMetadataSize:bufferSize] - return vgpuMetadata, ret + return vgpuMetadata, ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return vgpuMetadata, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return vgpuMetadata, ret.error() } opaqueDataSize = 2 * opaqueDataSize } } // nvml.VgpuInstanceGetAccountingMode() -func (l *library) VgpuInstanceGetAccountingMode(vgpuInstance VgpuInstance) (EnableState, Return) { +func (l *library) VgpuInstanceGetAccountingMode(vgpuInstance VgpuInstance) (EnableState, error) { return vgpuInstance.GetAccountingMode() } -func (vgpuInstance nvmlVgpuInstance) GetAccountingMode() (EnableState, Return) { +func (vgpuInstance nvmlVgpuInstance) GetAccountingMode() (EnableState, error) { var mode EnableState ret := nvmlVgpuInstanceGetAccountingMode(vgpuInstance, &mode) - return mode, ret + return mode, ret.error() } // nvml.VgpuInstanceGetAccountingPids() -func (l *library) VgpuInstanceGetAccountingPids(vgpuInstance VgpuInstance) ([]int, Return) { +func (l *library) VgpuInstanceGetAccountingPids(vgpuInstance VgpuInstance) ([]int, error) { return vgpuInstance.GetAccountingPids() } -func (vgpuInstance nvmlVgpuInstance) GetAccountingPids() ([]int, Return) { +func (vgpuInstance nvmlVgpuInstance) GetAccountingPids() ([]int, error) { var count uint32 = 1 // Will be reduced upon returning for { pids := make([]uint32, count) ret := nvmlVgpuInstanceGetAccountingPids(vgpuInstance, &count, &pids[0]) - if ret == SUCCESS { - return uint32SliceToIntSlice(pids[:count]), ret + if ret == nvmlSUCCESS { + return uint32SliceToIntSlice(pids[:count]), ret.error() } - if ret != ERROR_INSUFFICIENT_SIZE { - return nil, ret + if ret != nvmlERROR_INSUFFICIENT_SIZE { + return nil, ret.error() } count *= 2 } } // nvml.VgpuInstanceGetAccountingStats() -func (l *library) VgpuInstanceGetAccountingStats(vgpuInstance VgpuInstance, pid int) (AccountingStats, Return) { +func (l *library) VgpuInstanceGetAccountingStats(vgpuInstance VgpuInstance, pid int) (AccountingStats, error) { return vgpuInstance.GetAccountingStats(pid) } -func (vgpuInstance nvmlVgpuInstance) GetAccountingStats(pid int) (AccountingStats, Return) { +func (vgpuInstance nvmlVgpuInstance) GetAccountingStats(pid int) (AccountingStats, error) { var stats AccountingStats ret := nvmlVgpuInstanceGetAccountingStats(vgpuInstance, uint32(pid), &stats) - return stats, ret + return stats, ret.error() } // nvml.GetVgpuCompatibility() -func (l *library) GetVgpuCompatibility(vgpuMetadata *VgpuMetadata, pgpuMetadata *VgpuPgpuMetadata) (VgpuPgpuCompatibility, Return) { +func (l *library) GetVgpuCompatibility(vgpuMetadata *VgpuMetadata, pgpuMetadata *VgpuPgpuMetadata) (VgpuPgpuCompatibility, error) { var compatibilityInfo VgpuPgpuCompatibility ret := nvmlGetVgpuCompatibility(&vgpuMetadata.nvmlVgpuMetadata, &pgpuMetadata.nvmlVgpuPgpuMetadata, &compatibilityInfo) - return compatibilityInfo, ret + return compatibilityInfo, ret.error() } // nvml.GetVgpuVersion() -func (l *library) GetVgpuVersion() (VgpuVersion, VgpuVersion, Return) { +func (l *library) GetVgpuVersion() (VgpuVersion, VgpuVersion, error) { var supported, current VgpuVersion ret := nvmlGetVgpuVersion(&supported, ¤t) - return supported, current, ret + return supported, current, ret.error() } // nvml.SetVgpuVersion() -func (l *library) SetVgpuVersion(vgpuVersion *VgpuVersion) Return { - return nvmlSetVgpuVersion(vgpuVersion) +func (l *library) SetVgpuVersion(vgpuVersion *VgpuVersion) error { + return nvmlSetVgpuVersion(vgpuVersion).error() } // nvml.VgpuInstanceClearAccountingPids() -func (l *library) VgpuInstanceClearAccountingPids(vgpuInstance VgpuInstance) Return { +func (l *library) VgpuInstanceClearAccountingPids(vgpuInstance VgpuInstance) error { return vgpuInstance.ClearAccountingPids() } -func (vgpuInstance nvmlVgpuInstance) ClearAccountingPids() Return { - return nvmlVgpuInstanceClearAccountingPids(vgpuInstance) +func (vgpuInstance nvmlVgpuInstance) ClearAccountingPids() error { + return nvmlVgpuInstanceClearAccountingPids(vgpuInstance).error() } // nvml.VgpuInstanceGetMdevUUID() -func (l *library) VgpuInstanceGetMdevUUID(vgpuInstance VgpuInstance) (string, Return) { +func (l *library) VgpuInstanceGetMdevUUID(vgpuInstance VgpuInstance) (string, error) { return vgpuInstance.GetMdevUUID() } -func (vgpuInstance nvmlVgpuInstance) GetMdevUUID() (string, Return) { +func (vgpuInstance nvmlVgpuInstance) GetMdevUUID() (string, error) { mdevUUID := make([]byte, DEVICE_UUID_BUFFER_SIZE) ret := nvmlVgpuInstanceGetMdevUUID(vgpuInstance, &mdevUUID[0], DEVICE_UUID_BUFFER_SIZE) - return string(mdevUUID[:clen(mdevUUID)]), ret + return string(mdevUUID[:clen(mdevUUID)]), ret.error() } // nvml.VgpuTypeGetCapabilities() -func (l *library) VgpuTypeGetCapabilities(vgpuTypeId VgpuTypeId, capability VgpuCapability) (bool, Return) { +func (l *library) VgpuTypeGetCapabilities(vgpuTypeId VgpuTypeId, capability VgpuCapability) (bool, error) { return vgpuTypeId.GetCapabilities(capability) } -func (vgpuTypeId nvmlVgpuTypeId) GetCapabilities(capability VgpuCapability) (bool, Return) { +func (vgpuTypeId nvmlVgpuTypeId) GetCapabilities(capability VgpuCapability) (bool, error) { var capResult uint32 ret := nvmlVgpuTypeGetCapabilities(vgpuTypeId, capability, &capResult) - return (capResult != 0), ret + return (capResult != 0), ret.error() } // nvml.GetVgpuDriverCapabilities() -func (l *library) GetVgpuDriverCapabilities(capability VgpuDriverCapability) (bool, Return) { +func (l *library) GetVgpuDriverCapabilities(capability VgpuDriverCapability) (bool, error) { var capResult uint32 ret := nvmlGetVgpuDriverCapabilities(capability, &capResult) - return (capResult != 0), ret + return (capResult != 0), ret.error() } diff --git a/pkg/nvml/zz_generated.api.go b/pkg/nvml/zz_generated.api.go index c1ecb2d..f056327 100644 --- a/pkg/nvml/zz_generated.api.go +++ b/pkg/nvml/zz_generated.api.go @@ -345,663 +345,663 @@ var ( // Interface represents the interface for the library type. // -//go:generate moq -out mock/interface.go -pkg mock . Interface:Interface +//go:generate moq -rm -out mock/interface.go -pkg mock . Interface:Interface type Interface interface { - ComputeInstanceDestroy(ComputeInstance) Return - ComputeInstanceGetInfo(ComputeInstance) (ComputeInstanceInfo, Return) - DeviceClearAccountingPids(Device) Return - DeviceClearCpuAffinity(Device) Return - DeviceClearEccErrorCounts(Device, EccCounterType) Return - DeviceClearFieldValues(Device, []FieldValue) Return - DeviceCreateGpuInstance(Device, *GpuInstanceProfileInfo) (GpuInstance, Return) - DeviceCreateGpuInstanceWithPlacement(Device, *GpuInstanceProfileInfo, *GpuInstancePlacement) (GpuInstance, Return) - DeviceDiscoverGpus() (PciInfo, Return) - DeviceFreezeNvLinkUtilizationCounter(Device, int, int, EnableState) Return - DeviceGetAPIRestriction(Device, RestrictedAPI) (EnableState, Return) - DeviceGetAccountingBufferSize(Device) (int, Return) - DeviceGetAccountingMode(Device) (EnableState, Return) - DeviceGetAccountingPids(Device) ([]int, Return) - DeviceGetAccountingStats(Device, uint32) (AccountingStats, Return) - DeviceGetActiveVgpus(Device) ([]VgpuInstance, Return) - DeviceGetAdaptiveClockInfoStatus(Device) (uint32, Return) - DeviceGetApplicationsClock(Device, ClockType) (uint32, Return) - DeviceGetArchitecture(Device) (DeviceArchitecture, Return) - DeviceGetAttributes(Device) (DeviceAttributes, Return) - DeviceGetAutoBoostedClocksEnabled(Device) (EnableState, EnableState, Return) - DeviceGetBAR1MemoryInfo(Device) (BAR1Memory, Return) - DeviceGetBoardId(Device) (uint32, Return) - DeviceGetBoardPartNumber(Device) (string, Return) - DeviceGetBrand(Device) (BrandType, Return) - DeviceGetBridgeChipInfo(Device) (BridgeChipHierarchy, Return) - DeviceGetBusType(Device) (BusType, Return) + ComputeInstanceDestroy(ComputeInstance) error + ComputeInstanceGetInfo(ComputeInstance) (ComputeInstanceInfo, error) + DeviceClearAccountingPids(Device) error + DeviceClearCpuAffinity(Device) error + DeviceClearEccErrorCounts(Device, EccCounterType) error + DeviceClearFieldValues(Device, []FieldValue) error + DeviceCreateGpuInstance(Device, *GpuInstanceProfileInfo) (GpuInstance, error) + DeviceCreateGpuInstanceWithPlacement(Device, *GpuInstanceProfileInfo, *GpuInstancePlacement) (GpuInstance, error) + DeviceDiscoverGpus() (PciInfo, error) + DeviceFreezeNvLinkUtilizationCounter(Device, int, int, EnableState) error + DeviceGetAPIRestriction(Device, RestrictedAPI) (EnableState, error) + DeviceGetAccountingBufferSize(Device) (int, error) + DeviceGetAccountingMode(Device) (EnableState, error) + DeviceGetAccountingPids(Device) ([]int, error) + DeviceGetAccountingStats(Device, uint32) (AccountingStats, error) + DeviceGetActiveVgpus(Device) ([]VgpuInstance, error) + DeviceGetAdaptiveClockInfoStatus(Device) (uint32, error) + DeviceGetApplicationsClock(Device, ClockType) (uint32, error) + DeviceGetArchitecture(Device) (DeviceArchitecture, error) + DeviceGetAttributes(Device) (DeviceAttributes, error) + DeviceGetAutoBoostedClocksEnabled(Device) (EnableState, EnableState, error) + DeviceGetBAR1MemoryInfo(Device) (BAR1Memory, error) + DeviceGetBoardId(Device) (uint32, error) + DeviceGetBoardPartNumber(Device) (string, error) + DeviceGetBrand(Device) (BrandType, error) + DeviceGetBridgeChipInfo(Device) (BridgeChipHierarchy, error) + DeviceGetBusType(Device) (BusType, error) DeviceGetC2cModeInfoV(Device) C2cModeInfoHandler - DeviceGetClkMonStatus(Device) (ClkMonStatus, Return) - DeviceGetClock(Device, ClockType, ClockId) (uint32, Return) - DeviceGetClockInfo(Device, ClockType) (uint32, Return) - DeviceGetComputeInstanceId(Device) (int, Return) - DeviceGetComputeMode(Device) (ComputeMode, Return) - DeviceGetComputeRunningProcesses(Device) ([]ProcessInfo, Return) - DeviceGetConfComputeGpuAttestationReport(Device) (ConfComputeGpuAttestationReport, Return) - DeviceGetConfComputeGpuCertificate(Device) (ConfComputeGpuCertificate, Return) - DeviceGetConfComputeMemSizeInfo(Device) (ConfComputeMemSizeInfo, Return) - DeviceGetConfComputeProtectedMemoryUsage(Device) (Memory, Return) - DeviceGetCount() (int, Return) - DeviceGetCpuAffinity(Device, int) ([]uint, Return) - DeviceGetCpuAffinityWithinScope(Device, int, AffinityScope) ([]uint, Return) - DeviceGetCreatableVgpus(Device) ([]VgpuTypeId, Return) - DeviceGetCudaComputeCapability(Device) (int, int, Return) - DeviceGetCurrPcieLinkGeneration(Device) (int, Return) - DeviceGetCurrPcieLinkWidth(Device) (int, Return) - DeviceGetCurrentClocksEventReasons(Device) (uint64, Return) - DeviceGetCurrentClocksThrottleReasons(Device) (uint64, Return) - DeviceGetDecoderUtilization(Device) (uint32, uint32, Return) - DeviceGetDefaultApplicationsClock(Device, ClockType) (uint32, Return) - DeviceGetDefaultEccMode(Device) (EnableState, Return) - DeviceGetDetailedEccErrors(Device, MemoryErrorType, EccCounterType) (EccErrorCounts, Return) - DeviceGetDeviceHandleFromMigDeviceHandle(Device) (Device, Return) - DeviceGetDisplayActive(Device) (EnableState, Return) - DeviceGetDisplayMode(Device) (EnableState, Return) - DeviceGetDriverModel(Device) (DriverModel, DriverModel, Return) - DeviceGetDynamicPstatesInfo(Device) (GpuDynamicPstatesInfo, Return) - DeviceGetEccMode(Device) (EnableState, EnableState, Return) - DeviceGetEncoderCapacity(Device, EncoderType) (int, Return) - DeviceGetEncoderSessions(Device) ([]EncoderSessionInfo, Return) - DeviceGetEncoderStats(Device) (int, uint32, uint32, Return) - DeviceGetEncoderUtilization(Device) (uint32, uint32, Return) - DeviceGetEnforcedPowerLimit(Device) (uint32, Return) - DeviceGetFBCSessions(Device) ([]FBCSessionInfo, Return) - DeviceGetFBCStats(Device) (FBCStats, Return) - DeviceGetFanControlPolicy_v2(Device, int) (FanControlPolicy, Return) - DeviceGetFanSpeed(Device) (uint32, Return) - DeviceGetFanSpeed_v2(Device, int) (uint32, Return) - DeviceGetFieldValues(Device, []FieldValue) Return - DeviceGetGpcClkMinMaxVfOffset(Device) (int, int, Return) - DeviceGetGpcClkVfOffset(Device) (int, Return) - DeviceGetGpuFabricInfo(Device) (GpuFabricInfo, Return) + DeviceGetClkMonStatus(Device) (ClkMonStatus, error) + DeviceGetClock(Device, ClockType, ClockId) (uint32, error) + DeviceGetClockInfo(Device, ClockType) (uint32, error) + DeviceGetComputeInstanceId(Device) (int, error) + DeviceGetComputeMode(Device) (ComputeMode, error) + DeviceGetComputeRunningProcesses(Device) ([]ProcessInfo, error) + DeviceGetConfComputeGpuAttestationReport(Device) (ConfComputeGpuAttestationReport, error) + DeviceGetConfComputeGpuCertificate(Device) (ConfComputeGpuCertificate, error) + DeviceGetConfComputeMemSizeInfo(Device) (ConfComputeMemSizeInfo, error) + DeviceGetConfComputeProtectedMemoryUsage(Device) (Memory, error) + DeviceGetCount() (int, error) + DeviceGetCpuAffinity(Device, int) ([]uint, error) + DeviceGetCpuAffinityWithinScope(Device, int, AffinityScope) ([]uint, error) + DeviceGetCreatableVgpus(Device) ([]VgpuTypeId, error) + DeviceGetCudaComputeCapability(Device) (int, int, error) + DeviceGetCurrPcieLinkGeneration(Device) (int, error) + DeviceGetCurrPcieLinkWidth(Device) (int, error) + DeviceGetCurrentClocksEventReasons(Device) (uint64, error) + DeviceGetCurrentClocksThrottleReasons(Device) (uint64, error) + DeviceGetDecoderUtilization(Device) (uint32, uint32, error) + DeviceGetDefaultApplicationsClock(Device, ClockType) (uint32, error) + DeviceGetDefaultEccMode(Device) (EnableState, error) + DeviceGetDetailedEccErrors(Device, MemoryErrorType, EccCounterType) (EccErrorCounts, error) + DeviceGetDeviceHandleFromMigDeviceHandle(Device) (Device, error) + DeviceGetDisplayActive(Device) (EnableState, error) + DeviceGetDisplayMode(Device) (EnableState, error) + DeviceGetDriverModel(Device) (DriverModel, DriverModel, error) + DeviceGetDynamicPstatesInfo(Device) (GpuDynamicPstatesInfo, error) + DeviceGetEccMode(Device) (EnableState, EnableState, error) + DeviceGetEncoderCapacity(Device, EncoderType) (int, error) + DeviceGetEncoderSessions(Device) ([]EncoderSessionInfo, error) + DeviceGetEncoderStats(Device) (int, uint32, uint32, error) + DeviceGetEncoderUtilization(Device) (uint32, uint32, error) + DeviceGetEnforcedPowerLimit(Device) (uint32, error) + DeviceGetFBCSessions(Device) ([]FBCSessionInfo, error) + DeviceGetFBCStats(Device) (FBCStats, error) + DeviceGetFanControlPolicy_v2(Device, int) (FanControlPolicy, error) + DeviceGetFanSpeed(Device) (uint32, error) + DeviceGetFanSpeed_v2(Device, int) (uint32, error) + DeviceGetFieldValues(Device, []FieldValue) error + DeviceGetGpcClkMinMaxVfOffset(Device) (int, int, error) + DeviceGetGpcClkVfOffset(Device) (int, error) + DeviceGetGpuFabricInfo(Device) (GpuFabricInfo, error) DeviceGetGpuFabricInfoV(Device) GpuFabricInfoHandler - DeviceGetGpuInstanceById(Device, int) (GpuInstance, Return) - DeviceGetGpuInstanceId(Device) (int, Return) - DeviceGetGpuInstancePossiblePlacements(Device, *GpuInstanceProfileInfo) ([]GpuInstancePlacement, Return) - DeviceGetGpuInstanceProfileInfo(Device, int) (GpuInstanceProfileInfo, Return) + DeviceGetGpuInstanceById(Device, int) (GpuInstance, error) + DeviceGetGpuInstanceId(Device) (int, error) + DeviceGetGpuInstancePossiblePlacements(Device, *GpuInstanceProfileInfo) ([]GpuInstancePlacement, error) + DeviceGetGpuInstanceProfileInfo(Device, int) (GpuInstanceProfileInfo, error) DeviceGetGpuInstanceProfileInfoV(Device, int) GpuInstanceProfileInfoHandler - DeviceGetGpuInstanceRemainingCapacity(Device, *GpuInstanceProfileInfo) (int, Return) - DeviceGetGpuInstances(Device, *GpuInstanceProfileInfo) ([]GpuInstance, Return) - DeviceGetGpuMaxPcieLinkGeneration(Device) (int, Return) - DeviceGetGpuOperationMode(Device) (GpuOperationMode, GpuOperationMode, Return) - DeviceGetGraphicsRunningProcesses(Device) ([]ProcessInfo, Return) - DeviceGetGridLicensableFeatures(Device) (GridLicensableFeatures, Return) - DeviceGetGspFirmwareMode(Device) (bool, bool, Return) - DeviceGetGspFirmwareVersion(Device) (string, Return) - DeviceGetHandleByIndex(int) (Device, Return) - DeviceGetHandleByPciBusId(string) (Device, Return) - DeviceGetHandleBySerial(string) (Device, Return) - DeviceGetHandleByUUID(string) (Device, Return) - DeviceGetHostVgpuMode(Device) (HostVgpuMode, Return) - DeviceGetIndex(Device) (int, Return) - DeviceGetInforomConfigurationChecksum(Device) (uint32, Return) - DeviceGetInforomImageVersion(Device) (string, Return) - DeviceGetInforomVersion(Device, InforomObject) (string, Return) - DeviceGetIrqNum(Device) (int, Return) - DeviceGetJpgUtilization(Device) (uint32, uint32, Return) - DeviceGetLastBBXFlushTime(Device) (uint64, uint, Return) - DeviceGetMPSComputeRunningProcesses(Device) ([]ProcessInfo, Return) - DeviceGetMaxClockInfo(Device, ClockType) (uint32, Return) - DeviceGetMaxCustomerBoostClock(Device, ClockType) (uint32, Return) - DeviceGetMaxMigDeviceCount(Device) (int, Return) - DeviceGetMaxPcieLinkGeneration(Device) (int, Return) - DeviceGetMaxPcieLinkWidth(Device) (int, Return) - DeviceGetMemClkMinMaxVfOffset(Device) (int, int, Return) - DeviceGetMemClkVfOffset(Device) (int, Return) - DeviceGetMemoryAffinity(Device, int, AffinityScope) ([]uint, Return) - DeviceGetMemoryBusWidth(Device) (uint32, Return) - DeviceGetMemoryErrorCounter(Device, MemoryErrorType, EccCounterType, MemoryLocation) (uint64, Return) - DeviceGetMemoryInfo(Device) (Memory, Return) - DeviceGetMemoryInfo_v2(Device) (Memory_v2, Return) - DeviceGetMigDeviceHandleByIndex(Device, int) (Device, Return) - DeviceGetMigMode(Device) (int, int, Return) - DeviceGetMinMaxClockOfPState(Device, ClockType, Pstates) (uint32, uint32, Return) - DeviceGetMinMaxFanSpeed(Device) (int, int, Return) - DeviceGetMinorNumber(Device) (int, Return) - DeviceGetModuleId(Device) (int, Return) - DeviceGetMultiGpuBoard(Device) (int, Return) - DeviceGetName(Device) (string, Return) - DeviceGetNumFans(Device) (int, Return) - DeviceGetNumGpuCores(Device) (int, Return) - DeviceGetNumaNodeId(Device) (int, Return) - DeviceGetNvLinkCapability(Device, int, NvLinkCapability) (uint32, Return) - DeviceGetNvLinkErrorCounter(Device, int, NvLinkErrorCounter) (uint64, Return) - DeviceGetNvLinkRemoteDeviceType(Device, int) (IntNvLinkDeviceType, Return) - DeviceGetNvLinkRemotePciInfo(Device, int) (PciInfo, Return) - DeviceGetNvLinkState(Device, int) (EnableState, Return) - DeviceGetNvLinkUtilizationControl(Device, int, int) (NvLinkUtilizationControl, Return) - DeviceGetNvLinkUtilizationCounter(Device, int, int) (uint64, uint64, Return) - DeviceGetNvLinkVersion(Device, int) (uint32, Return) - DeviceGetOfaUtilization(Device) (uint32, uint32, Return) - DeviceGetP2PStatus(Device, Device, GpuP2PCapsIndex) (GpuP2PStatus, Return) - DeviceGetPciInfo(Device) (PciInfo, Return) - DeviceGetPciInfoExt(Device) (PciInfoExt, Return) - DeviceGetPcieLinkMaxSpeed(Device) (uint32, Return) - DeviceGetPcieReplayCounter(Device) (int, Return) - DeviceGetPcieSpeed(Device) (int, Return) - DeviceGetPcieThroughput(Device, PcieUtilCounter) (uint32, Return) - DeviceGetPerformanceState(Device) (Pstates, Return) - DeviceGetPersistenceMode(Device) (EnableState, Return) - DeviceGetPgpuMetadataString(Device) (string, Return) - DeviceGetPowerManagementDefaultLimit(Device) (uint32, Return) - DeviceGetPowerManagementLimit(Device) (uint32, Return) - DeviceGetPowerManagementLimitConstraints(Device) (uint32, uint32, Return) - DeviceGetPowerManagementMode(Device) (EnableState, Return) - DeviceGetPowerSource(Device) (PowerSource, Return) - DeviceGetPowerState(Device) (Pstates, Return) - DeviceGetPowerUsage(Device) (uint32, Return) - DeviceGetProcessUtilization(Device, uint64) ([]ProcessUtilizationSample, Return) - DeviceGetProcessesUtilizationInfo(Device) (ProcessesUtilizationInfo, Return) - DeviceGetRemappedRows(Device) (int, int, bool, bool, Return) - DeviceGetRetiredPages(Device, PageRetirementCause) ([]uint64, Return) - DeviceGetRetiredPagesPendingStatus(Device) (EnableState, Return) - DeviceGetRetiredPages_v2(Device, PageRetirementCause) ([]uint64, []uint64, Return) - DeviceGetRowRemapperHistogram(Device) (RowRemapperHistogramValues, Return) - DeviceGetRunningProcessDetailList(Device) (ProcessDetailList, Return) - DeviceGetSamples(Device, SamplingType, uint64) (ValueType, []Sample, Return) - DeviceGetSerial(Device) (string, Return) - DeviceGetSramEccErrorStatus(Device) (EccSramErrorStatus, Return) - DeviceGetSupportedClocksEventReasons(Device) (uint64, Return) - DeviceGetSupportedClocksThrottleReasons(Device) (uint64, Return) - DeviceGetSupportedEventTypes(Device) (uint64, Return) - DeviceGetSupportedGraphicsClocks(Device, int) (int, uint32, Return) - DeviceGetSupportedMemoryClocks(Device) (int, uint32, Return) - DeviceGetSupportedPerformanceStates(Device) ([]Pstates, Return) - DeviceGetSupportedVgpus(Device) ([]VgpuTypeId, Return) - DeviceGetTargetFanSpeed(Device, int) (int, Return) - DeviceGetTemperature(Device, TemperatureSensors) (uint32, Return) - DeviceGetTemperatureThreshold(Device, TemperatureThresholds) (uint32, Return) - DeviceGetThermalSettings(Device, uint32) (GpuThermalSettings, Return) - DeviceGetTopologyCommonAncestor(Device, Device) (GpuTopologyLevel, Return) - DeviceGetTopologyNearestGpus(Device, GpuTopologyLevel) ([]Device, Return) - DeviceGetTotalEccErrors(Device, MemoryErrorType, EccCounterType) (uint64, Return) - DeviceGetTotalEnergyConsumption(Device) (uint64, Return) - DeviceGetUUID(Device) (string, Return) - DeviceGetUtilizationRates(Device) (Utilization, Return) - DeviceGetVbiosVersion(Device) (string, Return) - DeviceGetVgpuCapabilities(Device, DeviceVgpuCapability) (bool, Return) - DeviceGetVgpuHeterogeneousMode(Device) (VgpuHeterogeneousMode, Return) - DeviceGetVgpuInstancesUtilizationInfo(Device) (VgpuInstancesUtilizationInfo, Return) - DeviceGetVgpuMetadata(Device) (VgpuPgpuMetadata, Return) - DeviceGetVgpuProcessUtilization(Device, uint64) ([]VgpuProcessUtilizationSample, Return) - DeviceGetVgpuProcessesUtilizationInfo(Device) (VgpuProcessesUtilizationInfo, Return) - DeviceGetVgpuSchedulerCapabilities(Device) (VgpuSchedulerCapabilities, Return) - DeviceGetVgpuSchedulerLog(Device) (VgpuSchedulerLog, Return) - DeviceGetVgpuSchedulerState(Device) (VgpuSchedulerGetState, Return) - DeviceGetVgpuTypeCreatablePlacements(Device, VgpuTypeId) (VgpuPlacementList, Return) - DeviceGetVgpuTypeSupportedPlacements(Device, VgpuTypeId) (VgpuPlacementList, Return) - DeviceGetVgpuUtilization(Device, uint64) (ValueType, []VgpuInstanceUtilizationSample, Return) - DeviceGetViolationStatus(Device, PerfPolicyType) (ViolationTime, Return) - DeviceGetVirtualizationMode(Device) (GpuVirtualizationMode, Return) - DeviceIsMigDeviceHandle(Device) (bool, Return) - DeviceModifyDrainState(*PciInfo, EnableState) Return - DeviceOnSameBoard(Device, Device) (int, Return) - DeviceQueryDrainState(*PciInfo) (EnableState, Return) - DeviceRegisterEvents(Device, uint64, EventSet) Return - DeviceRemoveGpu(*PciInfo) Return - DeviceRemoveGpu_v2(*PciInfo, DetachGpuState, PcieLinkState) Return - DeviceResetApplicationsClocks(Device) Return - DeviceResetGpuLockedClocks(Device) Return - DeviceResetMemoryLockedClocks(Device) Return - DeviceResetNvLinkErrorCounters(Device, int) Return - DeviceResetNvLinkUtilizationCounter(Device, int, int) Return - DeviceSetAPIRestriction(Device, RestrictedAPI, EnableState) Return - DeviceSetAccountingMode(Device, EnableState) Return - DeviceSetApplicationsClocks(Device, uint32, uint32) Return - DeviceSetAutoBoostedClocksEnabled(Device, EnableState) Return - DeviceSetComputeMode(Device, ComputeMode) Return - DeviceSetConfComputeUnprotectedMemSize(Device, uint64) Return - DeviceSetCpuAffinity(Device) Return - DeviceSetDefaultAutoBoostedClocksEnabled(Device, EnableState, uint32) Return - DeviceSetDefaultFanSpeed_v2(Device, int) Return - DeviceSetDriverModel(Device, DriverModel, uint32) Return - DeviceSetEccMode(Device, EnableState) Return - DeviceSetFanControlPolicy(Device, int, FanControlPolicy) Return - DeviceSetFanSpeed_v2(Device, int, int) Return - DeviceSetGpcClkVfOffset(Device, int) Return - DeviceSetGpuLockedClocks(Device, uint32, uint32) Return - DeviceSetGpuOperationMode(Device, GpuOperationMode) Return - DeviceSetMemClkVfOffset(Device, int) Return - DeviceSetMemoryLockedClocks(Device, uint32, uint32) Return - DeviceSetMigMode(Device, int) (Return, Return) - DeviceSetNvLinkDeviceLowPowerThreshold(Device, *NvLinkPowerThres) Return - DeviceSetNvLinkUtilizationControl(Device, int, int, *NvLinkUtilizationControl, bool) Return - DeviceSetPersistenceMode(Device, EnableState) Return - DeviceSetPowerManagementLimit(Device, uint32) Return - DeviceSetPowerManagementLimit_v2(Device, *PowerValue_v2) Return - DeviceSetTemperatureThreshold(Device, TemperatureThresholds, int) Return - DeviceSetVgpuCapabilities(Device, DeviceVgpuCapability, EnableState) Return - DeviceSetVgpuHeterogeneousMode(Device, VgpuHeterogeneousMode) Return - DeviceSetVgpuSchedulerState(Device, *VgpuSchedulerSetState) Return - DeviceSetVirtualizationMode(Device, GpuVirtualizationMode) Return - DeviceValidateInforom(Device) Return + DeviceGetGpuInstanceRemainingCapacity(Device, *GpuInstanceProfileInfo) (int, error) + DeviceGetGpuInstances(Device, *GpuInstanceProfileInfo) ([]GpuInstance, error) + DeviceGetGpuMaxPcieLinkGeneration(Device) (int, error) + DeviceGetGpuOperationMode(Device) (GpuOperationMode, GpuOperationMode, error) + DeviceGetGraphicsRunningProcesses(Device) ([]ProcessInfo, error) + DeviceGetGridLicensableFeatures(Device) (GridLicensableFeatures, error) + DeviceGetGspFirmwareMode(Device) (bool, bool, error) + DeviceGetGspFirmwareVersion(Device) (string, error) + DeviceGetHandleByIndex(int) (Device, error) + DeviceGetHandleByPciBusId(string) (Device, error) + DeviceGetHandleBySerial(string) (Device, error) + DeviceGetHandleByUUID(string) (Device, error) + DeviceGetHostVgpuMode(Device) (HostVgpuMode, error) + DeviceGetIndex(Device) (int, error) + DeviceGetInforomConfigurationChecksum(Device) (uint32, error) + DeviceGetInforomImageVersion(Device) (string, error) + DeviceGetInforomVersion(Device, InforomObject) (string, error) + DeviceGetIrqNum(Device) (int, error) + DeviceGetJpgUtilization(Device) (uint32, uint32, error) + DeviceGetLastBBXFlushTime(Device) (uint64, uint, error) + DeviceGetMPSComputeRunningProcesses(Device) ([]ProcessInfo, error) + DeviceGetMaxClockInfo(Device, ClockType) (uint32, error) + DeviceGetMaxCustomerBoostClock(Device, ClockType) (uint32, error) + DeviceGetMaxMigDeviceCount(Device) (int, error) + DeviceGetMaxPcieLinkGeneration(Device) (int, error) + DeviceGetMaxPcieLinkWidth(Device) (int, error) + DeviceGetMemClkMinMaxVfOffset(Device) (int, int, error) + DeviceGetMemClkVfOffset(Device) (int, error) + DeviceGetMemoryAffinity(Device, int, AffinityScope) ([]uint, error) + DeviceGetMemoryBusWidth(Device) (uint32, error) + DeviceGetMemoryErrorCounter(Device, MemoryErrorType, EccCounterType, MemoryLocation) (uint64, error) + DeviceGetMemoryInfo(Device) (Memory, error) + DeviceGetMemoryInfo_v2(Device) (Memory_v2, error) + DeviceGetMigDeviceHandleByIndex(Device, int) (Device, error) + DeviceGetMigMode(Device) (int, int, error) + DeviceGetMinMaxClockOfPState(Device, ClockType, Pstates) (uint32, uint32, error) + DeviceGetMinMaxFanSpeed(Device) (int, int, error) + DeviceGetMinorNumber(Device) (int, error) + DeviceGetModuleId(Device) (int, error) + DeviceGetMultiGpuBoard(Device) (int, error) + DeviceGetName(Device) (string, error) + DeviceGetNumFans(Device) (int, error) + DeviceGetNumGpuCores(Device) (int, error) + DeviceGetNumaNodeId(Device) (int, error) + DeviceGetNvLinkCapability(Device, int, NvLinkCapability) (uint32, error) + DeviceGetNvLinkErrorCounter(Device, int, NvLinkErrorCounter) (uint64, error) + DeviceGetNvLinkRemoteDeviceType(Device, int) (IntNvLinkDeviceType, error) + DeviceGetNvLinkRemotePciInfo(Device, int) (PciInfo, error) + DeviceGetNvLinkState(Device, int) (EnableState, error) + DeviceGetNvLinkUtilizationControl(Device, int, int) (NvLinkUtilizationControl, error) + DeviceGetNvLinkUtilizationCounter(Device, int, int) (uint64, uint64, error) + DeviceGetNvLinkVersion(Device, int) (uint32, error) + DeviceGetOfaUtilization(Device) (uint32, uint32, error) + DeviceGetP2PStatus(Device, Device, GpuP2PCapsIndex) (GpuP2PStatus, error) + DeviceGetPciInfo(Device) (PciInfo, error) + DeviceGetPciInfoExt(Device) (PciInfoExt, error) + DeviceGetPcieLinkMaxSpeed(Device) (uint32, error) + DeviceGetPcieReplayCounter(Device) (int, error) + DeviceGetPcieSpeed(Device) (int, error) + DeviceGetPcieThroughput(Device, PcieUtilCounter) (uint32, error) + DeviceGetPerformanceState(Device) (Pstates, error) + DeviceGetPersistenceMode(Device) (EnableState, error) + DeviceGetPgpuMetadataString(Device) (string, error) + DeviceGetPowerManagementDefaultLimit(Device) (uint32, error) + DeviceGetPowerManagementLimit(Device) (uint32, error) + DeviceGetPowerManagementLimitConstraints(Device) (uint32, uint32, error) + DeviceGetPowerManagementMode(Device) (EnableState, error) + DeviceGetPowerSource(Device) (PowerSource, error) + DeviceGetPowerState(Device) (Pstates, error) + DeviceGetPowerUsage(Device) (uint32, error) + DeviceGetProcessUtilization(Device, uint64) ([]ProcessUtilizationSample, error) + DeviceGetProcessesUtilizationInfo(Device) (ProcessesUtilizationInfo, error) + DeviceGetRemappedRows(Device) (int, int, bool, bool, error) + DeviceGetRetiredPages(Device, PageRetirementCause) ([]uint64, error) + DeviceGetRetiredPagesPendingStatus(Device) (EnableState, error) + DeviceGetRetiredPages_v2(Device, PageRetirementCause) ([]uint64, []uint64, error) + DeviceGetRowRemapperHistogram(Device) (RowRemapperHistogramValues, error) + DeviceGetRunningProcessDetailList(Device) (ProcessDetailList, error) + DeviceGetSamples(Device, SamplingType, uint64) (ValueType, []Sample, error) + DeviceGetSerial(Device) (string, error) + DeviceGetSramEccErrorStatus(Device) (EccSramErrorStatus, error) + DeviceGetSupportedClocksEventReasons(Device) (uint64, error) + DeviceGetSupportedClocksThrottleReasons(Device) (uint64, error) + DeviceGetSupportedEventTypes(Device) (uint64, error) + DeviceGetSupportedGraphicsClocks(Device, int) (int, uint32, error) + DeviceGetSupportedMemoryClocks(Device) (int, uint32, error) + DeviceGetSupportedPerformanceStates(Device) ([]Pstates, error) + DeviceGetSupportedVgpus(Device) ([]VgpuTypeId, error) + DeviceGetTargetFanSpeed(Device, int) (int, error) + DeviceGetTemperature(Device, TemperatureSensors) (uint32, error) + DeviceGetTemperatureThreshold(Device, TemperatureThresholds) (uint32, error) + DeviceGetThermalSettings(Device, uint32) (GpuThermalSettings, error) + DeviceGetTopologyCommonAncestor(Device, Device) (GpuTopologyLevel, error) + DeviceGetTopologyNearestGpus(Device, GpuTopologyLevel) ([]Device, error) + DeviceGetTotalEccErrors(Device, MemoryErrorType, EccCounterType) (uint64, error) + DeviceGetTotalEnergyConsumption(Device) (uint64, error) + DeviceGetUUID(Device) (string, error) + DeviceGetUtilizationRates(Device) (Utilization, error) + DeviceGetVbiosVersion(Device) (string, error) + DeviceGetVgpuCapabilities(Device, DeviceVgpuCapability) (bool, error) + DeviceGetVgpuHeterogeneousMode(Device) (VgpuHeterogeneousMode, error) + DeviceGetVgpuInstancesUtilizationInfo(Device) (VgpuInstancesUtilizationInfo, error) + DeviceGetVgpuMetadata(Device) (VgpuPgpuMetadata, error) + DeviceGetVgpuProcessUtilization(Device, uint64) ([]VgpuProcessUtilizationSample, error) + DeviceGetVgpuProcessesUtilizationInfo(Device) (VgpuProcessesUtilizationInfo, error) + DeviceGetVgpuSchedulerCapabilities(Device) (VgpuSchedulerCapabilities, error) + DeviceGetVgpuSchedulerLog(Device) (VgpuSchedulerLog, error) + DeviceGetVgpuSchedulerState(Device) (VgpuSchedulerGetState, error) + DeviceGetVgpuTypeCreatablePlacements(Device, VgpuTypeId) (VgpuPlacementList, error) + DeviceGetVgpuTypeSupportedPlacements(Device, VgpuTypeId) (VgpuPlacementList, error) + DeviceGetVgpuUtilization(Device, uint64) (ValueType, []VgpuInstanceUtilizationSample, error) + DeviceGetViolationStatus(Device, PerfPolicyType) (ViolationTime, error) + DeviceGetVirtualizationMode(Device) (GpuVirtualizationMode, error) + DeviceIsMigDeviceHandle(Device) (bool, error) + DeviceModifyDrainState(*PciInfo, EnableState) error + DeviceOnSameBoard(Device, Device) (int, error) + DeviceQueryDrainState(*PciInfo) (EnableState, error) + DeviceRegisterEvents(Device, uint64, EventSet) error + DeviceRemoveGpu(*PciInfo) error + DeviceRemoveGpu_v2(*PciInfo, DetachGpuState, PcieLinkState) error + DeviceResetApplicationsClocks(Device) error + DeviceResetGpuLockedClocks(Device) error + DeviceResetMemoryLockedClocks(Device) error + DeviceResetNvLinkErrorCounters(Device, int) error + DeviceResetNvLinkUtilizationCounter(Device, int, int) error + DeviceSetAPIRestriction(Device, RestrictedAPI, EnableState) error + DeviceSetAccountingMode(Device, EnableState) error + DeviceSetApplicationsClocks(Device, uint32, uint32) error + DeviceSetAutoBoostedClocksEnabled(Device, EnableState) error + DeviceSetComputeMode(Device, ComputeMode) error + DeviceSetConfComputeUnprotectedMemSize(Device, uint64) error + DeviceSetCpuAffinity(Device) error + DeviceSetDefaultAutoBoostedClocksEnabled(Device, EnableState, uint32) error + DeviceSetDefaultFanSpeed_v2(Device, int) error + DeviceSetDriverModel(Device, DriverModel, uint32) error + DeviceSetEccMode(Device, EnableState) error + DeviceSetFanControlPolicy(Device, int, FanControlPolicy) error + DeviceSetFanSpeed_v2(Device, int, int) error + DeviceSetGpcClkVfOffset(Device, int) error + DeviceSetGpuLockedClocks(Device, uint32, uint32) error + DeviceSetGpuOperationMode(Device, GpuOperationMode) error + DeviceSetMemClkVfOffset(Device, int) error + DeviceSetMemoryLockedClocks(Device, uint32, uint32) error + DeviceSetMigMode(Device, int) (error, error) + DeviceSetNvLinkDeviceLowPowerThreshold(Device, *NvLinkPowerThres) error + DeviceSetNvLinkUtilizationControl(Device, int, int, *NvLinkUtilizationControl, bool) error + DeviceSetPersistenceMode(Device, EnableState) error + DeviceSetPowerManagementLimit(Device, uint32) error + DeviceSetPowerManagementLimit_v2(Device, *PowerValue_v2) error + DeviceSetTemperatureThreshold(Device, TemperatureThresholds, int) error + DeviceSetVgpuCapabilities(Device, DeviceVgpuCapability, EnableState) error + DeviceSetVgpuHeterogeneousMode(Device, VgpuHeterogeneousMode) error + DeviceSetVgpuSchedulerState(Device, *VgpuSchedulerSetState) error + DeviceSetVirtualizationMode(Device, GpuVirtualizationMode) error + DeviceValidateInforom(Device) error ErrorString(Return) string - EventSetCreate() (EventSet, Return) - EventSetFree(EventSet) Return - EventSetWait(EventSet, uint32) (EventData, Return) + EventSetCreate() (EventSet, error) + EventSetFree(EventSet) error + EventSetWait(EventSet, uint32) (EventData, error) Extensions() ExtendedInterface - GetExcludedDeviceCount() (int, Return) - GetExcludedDeviceInfoByIndex(int) (ExcludedDeviceInfo, Return) - GetVgpuCompatibility(*VgpuMetadata, *VgpuPgpuMetadata) (VgpuPgpuCompatibility, Return) - GetVgpuDriverCapabilities(VgpuDriverCapability) (bool, Return) - GetVgpuVersion() (VgpuVersion, VgpuVersion, Return) - GpmMetricsGet(*GpmMetricsGetType) Return + GetExcludedDeviceCount() (int, error) + GetExcludedDeviceInfoByIndex(int) (ExcludedDeviceInfo, error) + GetVgpuCompatibility(*VgpuMetadata, *VgpuPgpuMetadata) (VgpuPgpuCompatibility, error) + GetVgpuDriverCapabilities(VgpuDriverCapability) (bool, error) + GetVgpuVersion() (VgpuVersion, VgpuVersion, error) + GpmMetricsGet(*GpmMetricsGetType) error GpmMetricsGetV(*GpmMetricsGetType) GpmMetricsGetVType - GpmMigSampleGet(Device, int, GpmSample) Return - GpmQueryDeviceSupport(Device) (GpmSupport, Return) + GpmMigSampleGet(Device, int, GpmSample) error + GpmQueryDeviceSupport(Device) (GpmSupport, error) GpmQueryDeviceSupportV(Device) GpmSupportV - GpmQueryIfStreamingEnabled(Device) (uint32, Return) - GpmSampleAlloc() (GpmSample, Return) - GpmSampleFree(GpmSample) Return - GpmSampleGet(Device, GpmSample) Return - GpmSetStreamingEnabled(Device, uint32) Return - GpuInstanceCreateComputeInstance(GpuInstance, *ComputeInstanceProfileInfo) (ComputeInstance, Return) - GpuInstanceCreateComputeInstanceWithPlacement(GpuInstance, *ComputeInstanceProfileInfo, *ComputeInstancePlacement) (ComputeInstance, Return) - GpuInstanceDestroy(GpuInstance) Return - GpuInstanceGetComputeInstanceById(GpuInstance, int) (ComputeInstance, Return) - GpuInstanceGetComputeInstancePossiblePlacements(GpuInstance, *ComputeInstanceProfileInfo) ([]ComputeInstancePlacement, Return) - GpuInstanceGetComputeInstanceProfileInfo(GpuInstance, int, int) (ComputeInstanceProfileInfo, Return) + GpmQueryIfStreamingEnabled(Device) (uint32, error) + GpmSampleAlloc() (GpmSample, error) + GpmSampleFree(GpmSample) error + GpmSampleGet(Device, GpmSample) error + GpmSetStreamingEnabled(Device, uint32) error + GpuInstanceCreateComputeInstance(GpuInstance, *ComputeInstanceProfileInfo) (ComputeInstance, error) + GpuInstanceCreateComputeInstanceWithPlacement(GpuInstance, *ComputeInstanceProfileInfo, *ComputeInstancePlacement) (ComputeInstance, error) + GpuInstanceDestroy(GpuInstance) error + GpuInstanceGetComputeInstanceById(GpuInstance, int) (ComputeInstance, error) + GpuInstanceGetComputeInstancePossiblePlacements(GpuInstance, *ComputeInstanceProfileInfo) ([]ComputeInstancePlacement, error) + GpuInstanceGetComputeInstanceProfileInfo(GpuInstance, int, int) (ComputeInstanceProfileInfo, error) GpuInstanceGetComputeInstanceProfileInfoV(GpuInstance, int, int) ComputeInstanceProfileInfoHandler - GpuInstanceGetComputeInstanceRemainingCapacity(GpuInstance, *ComputeInstanceProfileInfo) (int, Return) - GpuInstanceGetComputeInstances(GpuInstance, *ComputeInstanceProfileInfo) ([]ComputeInstance, Return) - GpuInstanceGetInfo(GpuInstance) (GpuInstanceInfo, Return) - Init() Return - InitWithFlags(uint32) Return - SetVgpuVersion(*VgpuVersion) Return - Shutdown() Return - SystemGetConfComputeCapabilities() (ConfComputeSystemCaps, Return) - SystemGetConfComputeKeyRotationThresholdInfo() (ConfComputeGetKeyRotationThresholdInfo, Return) - SystemGetConfComputeSettings() (SystemConfComputeSettings, Return) - SystemGetCudaDriverVersion() (int, Return) - SystemGetCudaDriverVersion_v2() (int, Return) - SystemGetDriverVersion() (string, Return) - SystemGetHicVersion() ([]HwbcEntry, Return) - SystemGetNVMLVersion() (string, Return) - SystemGetProcessName(int) (string, Return) - SystemGetTopologyGpuSet(int) ([]Device, Return) - SystemSetConfComputeKeyRotationThresholdInfo(ConfComputeSetKeyRotationThresholdInfo) Return - UnitGetCount() (int, Return) - UnitGetDevices(Unit) ([]Device, Return) - UnitGetFanSpeedInfo(Unit) (UnitFanSpeeds, Return) - UnitGetHandleByIndex(int) (Unit, Return) - UnitGetLedState(Unit) (LedState, Return) - UnitGetPsuInfo(Unit) (PSUInfo, Return) - UnitGetTemperature(Unit, int) (uint32, Return) - UnitGetUnitInfo(Unit) (UnitInfo, Return) - UnitSetLedState(Unit, LedColor) Return - VgpuInstanceClearAccountingPids(VgpuInstance) Return - VgpuInstanceGetAccountingMode(VgpuInstance) (EnableState, Return) - VgpuInstanceGetAccountingPids(VgpuInstance) ([]int, Return) - VgpuInstanceGetAccountingStats(VgpuInstance, int) (AccountingStats, Return) - VgpuInstanceGetEccMode(VgpuInstance) (EnableState, Return) - VgpuInstanceGetEncoderCapacity(VgpuInstance) (int, Return) - VgpuInstanceGetEncoderSessions(VgpuInstance) (int, EncoderSessionInfo, Return) - VgpuInstanceGetEncoderStats(VgpuInstance) (int, uint32, uint32, Return) - VgpuInstanceGetFBCSessions(VgpuInstance) (int, FBCSessionInfo, Return) - VgpuInstanceGetFBCStats(VgpuInstance) (FBCStats, Return) - VgpuInstanceGetFbUsage(VgpuInstance) (uint64, Return) - VgpuInstanceGetFrameRateLimit(VgpuInstance) (uint32, Return) - VgpuInstanceGetGpuInstanceId(VgpuInstance) (int, Return) - VgpuInstanceGetGpuPciId(VgpuInstance) (string, Return) - VgpuInstanceGetLicenseInfo(VgpuInstance) (VgpuLicenseInfo, Return) - VgpuInstanceGetLicenseStatus(VgpuInstance) (int, Return) - VgpuInstanceGetMdevUUID(VgpuInstance) (string, Return) - VgpuInstanceGetMetadata(VgpuInstance) (VgpuMetadata, Return) - VgpuInstanceGetType(VgpuInstance) (VgpuTypeId, Return) - VgpuInstanceGetUUID(VgpuInstance) (string, Return) - VgpuInstanceGetVmDriverVersion(VgpuInstance) (string, Return) - VgpuInstanceGetVmID(VgpuInstance) (string, VgpuVmIdType, Return) - VgpuInstanceSetEncoderCapacity(VgpuInstance, int) Return - VgpuTypeGetCapabilities(VgpuTypeId, VgpuCapability) (bool, Return) - VgpuTypeGetClass(VgpuTypeId) (string, Return) - VgpuTypeGetDeviceID(VgpuTypeId) (uint64, uint64, Return) - VgpuTypeGetFrameRateLimit(VgpuTypeId) (uint32, Return) - VgpuTypeGetFramebufferSize(VgpuTypeId) (uint64, Return) - VgpuTypeGetGpuInstanceProfileId(VgpuTypeId) (uint32, Return) - VgpuTypeGetLicense(VgpuTypeId) (string, Return) - VgpuTypeGetMaxInstances(Device, VgpuTypeId) (int, Return) - VgpuTypeGetMaxInstancesPerVm(VgpuTypeId) (int, Return) - VgpuTypeGetName(VgpuTypeId) (string, Return) - VgpuTypeGetNumDisplayHeads(VgpuTypeId) (int, Return) - VgpuTypeGetResolution(VgpuTypeId, int) (uint32, uint32, Return) + GpuInstanceGetComputeInstanceRemainingCapacity(GpuInstance, *ComputeInstanceProfileInfo) (int, error) + GpuInstanceGetComputeInstances(GpuInstance, *ComputeInstanceProfileInfo) ([]ComputeInstance, error) + GpuInstanceGetInfo(GpuInstance) (GpuInstanceInfo, error) + Init() error + InitWithFlags(uint32) error + SetVgpuVersion(*VgpuVersion) error + Shutdown() error + SystemGetConfComputeCapabilities() (ConfComputeSystemCaps, error) + SystemGetConfComputeKeyRotationThresholdInfo() (ConfComputeGetKeyRotationThresholdInfo, error) + SystemGetConfComputeSettings() (SystemConfComputeSettings, error) + SystemGetCudaDriverVersion() (int, error) + SystemGetCudaDriverVersion_v2() (int, error) + SystemGetDriverVersion() (string, error) + SystemGetHicVersion() ([]HwbcEntry, error) + SystemGetNVMLVersion() (string, error) + SystemGetProcessName(int) (string, error) + SystemGetTopologyGpuSet(int) ([]Device, error) + SystemSetConfComputeKeyRotationThresholdInfo(ConfComputeSetKeyRotationThresholdInfo) error + UnitGetCount() (int, error) + UnitGetDevices(Unit) ([]Device, error) + UnitGetFanSpeedInfo(Unit) (UnitFanSpeeds, error) + UnitGetHandleByIndex(int) (Unit, error) + UnitGetLedState(Unit) (LedState, error) + UnitGetPsuInfo(Unit) (PSUInfo, error) + UnitGetTemperature(Unit, int) (uint32, error) + UnitGetUnitInfo(Unit) (UnitInfo, error) + UnitSetLedState(Unit, LedColor) error + VgpuInstanceClearAccountingPids(VgpuInstance) error + VgpuInstanceGetAccountingMode(VgpuInstance) (EnableState, error) + VgpuInstanceGetAccountingPids(VgpuInstance) ([]int, error) + VgpuInstanceGetAccountingStats(VgpuInstance, int) (AccountingStats, error) + VgpuInstanceGetEccMode(VgpuInstance) (EnableState, error) + VgpuInstanceGetEncoderCapacity(VgpuInstance) (int, error) + VgpuInstanceGetEncoderSessions(VgpuInstance) (int, EncoderSessionInfo, error) + VgpuInstanceGetEncoderStats(VgpuInstance) (int, uint32, uint32, error) + VgpuInstanceGetFBCSessions(VgpuInstance) (int, FBCSessionInfo, error) + VgpuInstanceGetFBCStats(VgpuInstance) (FBCStats, error) + VgpuInstanceGetFbUsage(VgpuInstance) (uint64, error) + VgpuInstanceGetFrameRateLimit(VgpuInstance) (uint32, error) + VgpuInstanceGetGpuInstanceId(VgpuInstance) (int, error) + VgpuInstanceGetGpuPciId(VgpuInstance) (string, error) + VgpuInstanceGetLicenseInfo(VgpuInstance) (VgpuLicenseInfo, error) + VgpuInstanceGetLicenseStatus(VgpuInstance) (int, error) + VgpuInstanceGetMdevUUID(VgpuInstance) (string, error) + VgpuInstanceGetMetadata(VgpuInstance) (VgpuMetadata, error) + VgpuInstanceGetType(VgpuInstance) (VgpuTypeId, error) + VgpuInstanceGetUUID(VgpuInstance) (string, error) + VgpuInstanceGetVmDriverVersion(VgpuInstance) (string, error) + VgpuInstanceGetVmID(VgpuInstance) (string, VgpuVmIdType, error) + VgpuInstanceSetEncoderCapacity(VgpuInstance, int) error + VgpuTypeGetCapabilities(VgpuTypeId, VgpuCapability) (bool, error) + VgpuTypeGetClass(VgpuTypeId) (string, error) + VgpuTypeGetDeviceID(VgpuTypeId) (uint64, uint64, error) + VgpuTypeGetFrameRateLimit(VgpuTypeId) (uint32, error) + VgpuTypeGetFramebufferSize(VgpuTypeId) (uint64, error) + VgpuTypeGetGpuInstanceProfileId(VgpuTypeId) (uint32, error) + VgpuTypeGetLicense(VgpuTypeId) (string, error) + VgpuTypeGetMaxInstances(Device, VgpuTypeId) (int, error) + VgpuTypeGetMaxInstancesPerVm(VgpuTypeId) (int, error) + VgpuTypeGetName(VgpuTypeId) (string, error) + VgpuTypeGetNumDisplayHeads(VgpuTypeId) (int, error) + VgpuTypeGetResolution(VgpuTypeId, int) (uint32, uint32, error) } // Device represents the interface for the nvmlDevice type. // -//go:generate moq -out mock/device.go -pkg mock . Device:Device +//go:generate moq -rm -out mock/device.go -pkg mock . Device:Device type Device interface { - ClearAccountingPids() Return - ClearCpuAffinity() Return - ClearEccErrorCounts(EccCounterType) Return - ClearFieldValues([]FieldValue) Return - CreateGpuInstance(*GpuInstanceProfileInfo) (GpuInstance, Return) - CreateGpuInstanceWithPlacement(*GpuInstanceProfileInfo, *GpuInstancePlacement) (GpuInstance, Return) - FreezeNvLinkUtilizationCounter(int, int, EnableState) Return - GetAPIRestriction(RestrictedAPI) (EnableState, Return) - GetAccountingBufferSize() (int, Return) - GetAccountingMode() (EnableState, Return) - GetAccountingPids() ([]int, Return) - GetAccountingStats(uint32) (AccountingStats, Return) - GetActiveVgpus() ([]VgpuInstance, Return) - GetAdaptiveClockInfoStatus() (uint32, Return) - GetApplicationsClock(ClockType) (uint32, Return) - GetArchitecture() (DeviceArchitecture, Return) - GetAttributes() (DeviceAttributes, Return) - GetAutoBoostedClocksEnabled() (EnableState, EnableState, Return) - GetBAR1MemoryInfo() (BAR1Memory, Return) - GetBoardId() (uint32, Return) - GetBoardPartNumber() (string, Return) - GetBrand() (BrandType, Return) - GetBridgeChipInfo() (BridgeChipHierarchy, Return) - GetBusType() (BusType, Return) + ClearAccountingPids() error + ClearCpuAffinity() error + ClearEccErrorCounts(EccCounterType) error + ClearFieldValues([]FieldValue) error + CreateGpuInstance(*GpuInstanceProfileInfo) (GpuInstance, error) + CreateGpuInstanceWithPlacement(*GpuInstanceProfileInfo, *GpuInstancePlacement) (GpuInstance, error) + FreezeNvLinkUtilizationCounter(int, int, EnableState) error + GetAPIRestriction(RestrictedAPI) (EnableState, error) + GetAccountingBufferSize() (int, error) + GetAccountingMode() (EnableState, error) + GetAccountingPids() ([]int, error) + GetAccountingStats(uint32) (AccountingStats, error) + GetActiveVgpus() ([]VgpuInstance, error) + GetAdaptiveClockInfoStatus() (uint32, error) + GetApplicationsClock(ClockType) (uint32, error) + GetArchitecture() (DeviceArchitecture, error) + GetAttributes() (DeviceAttributes, error) + GetAutoBoostedClocksEnabled() (EnableState, EnableState, error) + GetBAR1MemoryInfo() (BAR1Memory, error) + GetBoardId() (uint32, error) + GetBoardPartNumber() (string, error) + GetBrand() (BrandType, error) + GetBridgeChipInfo() (BridgeChipHierarchy, error) + GetBusType() (BusType, error) GetC2cModeInfoV() C2cModeInfoHandler - GetClkMonStatus() (ClkMonStatus, Return) - GetClock(ClockType, ClockId) (uint32, Return) - GetClockInfo(ClockType) (uint32, Return) - GetComputeInstanceId() (int, Return) - GetComputeMode() (ComputeMode, Return) - GetComputeRunningProcesses() ([]ProcessInfo, Return) - GetConfComputeGpuAttestationReport() (ConfComputeGpuAttestationReport, Return) - GetConfComputeGpuCertificate() (ConfComputeGpuCertificate, Return) - GetConfComputeMemSizeInfo() (ConfComputeMemSizeInfo, Return) - GetConfComputeProtectedMemoryUsage() (Memory, Return) - GetCpuAffinity(int) ([]uint, Return) - GetCpuAffinityWithinScope(int, AffinityScope) ([]uint, Return) - GetCreatableVgpus() ([]VgpuTypeId, Return) - GetCudaComputeCapability() (int, int, Return) - GetCurrPcieLinkGeneration() (int, Return) - GetCurrPcieLinkWidth() (int, Return) - GetCurrentClocksEventReasons() (uint64, Return) - GetCurrentClocksThrottleReasons() (uint64, Return) - GetDecoderUtilization() (uint32, uint32, Return) - GetDefaultApplicationsClock(ClockType) (uint32, Return) - GetDefaultEccMode() (EnableState, Return) - GetDetailedEccErrors(MemoryErrorType, EccCounterType) (EccErrorCounts, Return) - GetDeviceHandleFromMigDeviceHandle() (Device, Return) - GetDisplayActive() (EnableState, Return) - GetDisplayMode() (EnableState, Return) - GetDriverModel() (DriverModel, DriverModel, Return) - GetDynamicPstatesInfo() (GpuDynamicPstatesInfo, Return) - GetEccMode() (EnableState, EnableState, Return) - GetEncoderCapacity(EncoderType) (int, Return) - GetEncoderSessions() ([]EncoderSessionInfo, Return) - GetEncoderStats() (int, uint32, uint32, Return) - GetEncoderUtilization() (uint32, uint32, Return) - GetEnforcedPowerLimit() (uint32, Return) - GetFBCSessions() ([]FBCSessionInfo, Return) - GetFBCStats() (FBCStats, Return) - GetFanControlPolicy_v2(int) (FanControlPolicy, Return) - GetFanSpeed() (uint32, Return) - GetFanSpeed_v2(int) (uint32, Return) - GetFieldValues([]FieldValue) Return - GetGpcClkMinMaxVfOffset() (int, int, Return) - GetGpcClkVfOffset() (int, Return) - GetGpuFabricInfo() (GpuFabricInfo, Return) + GetClkMonStatus() (ClkMonStatus, error) + GetClock(ClockType, ClockId) (uint32, error) + GetClockInfo(ClockType) (uint32, error) + GetComputeInstanceId() (int, error) + GetComputeMode() (ComputeMode, error) + GetComputeRunningProcesses() ([]ProcessInfo, error) + GetConfComputeGpuAttestationReport() (ConfComputeGpuAttestationReport, error) + GetConfComputeGpuCertificate() (ConfComputeGpuCertificate, error) + GetConfComputeMemSizeInfo() (ConfComputeMemSizeInfo, error) + GetConfComputeProtectedMemoryUsage() (Memory, error) + GetCpuAffinity(int) ([]uint, error) + GetCpuAffinityWithinScope(int, AffinityScope) ([]uint, error) + GetCreatableVgpus() ([]VgpuTypeId, error) + GetCudaComputeCapability() (int, int, error) + GetCurrPcieLinkGeneration() (int, error) + GetCurrPcieLinkWidth() (int, error) + GetCurrentClocksEventReasons() (uint64, error) + GetCurrentClocksThrottleReasons() (uint64, error) + GetDecoderUtilization() (uint32, uint32, error) + GetDefaultApplicationsClock(ClockType) (uint32, error) + GetDefaultEccMode() (EnableState, error) + GetDetailedEccErrors(MemoryErrorType, EccCounterType) (EccErrorCounts, error) + GetDeviceHandleFromMigDeviceHandle() (Device, error) + GetDisplayActive() (EnableState, error) + GetDisplayMode() (EnableState, error) + GetDriverModel() (DriverModel, DriverModel, error) + GetDynamicPstatesInfo() (GpuDynamicPstatesInfo, error) + GetEccMode() (EnableState, EnableState, error) + GetEncoderCapacity(EncoderType) (int, error) + GetEncoderSessions() ([]EncoderSessionInfo, error) + GetEncoderStats() (int, uint32, uint32, error) + GetEncoderUtilization() (uint32, uint32, error) + GetEnforcedPowerLimit() (uint32, error) + GetFBCSessions() ([]FBCSessionInfo, error) + GetFBCStats() (FBCStats, error) + GetFanControlPolicy_v2(int) (FanControlPolicy, error) + GetFanSpeed() (uint32, error) + GetFanSpeed_v2(int) (uint32, error) + GetFieldValues([]FieldValue) error + GetGpcClkMinMaxVfOffset() (int, int, error) + GetGpcClkVfOffset() (int, error) + GetGpuFabricInfo() (GpuFabricInfo, error) GetGpuFabricInfoV() GpuFabricInfoHandler - GetGpuInstanceById(int) (GpuInstance, Return) - GetGpuInstanceId() (int, Return) - GetGpuInstancePossiblePlacements(*GpuInstanceProfileInfo) ([]GpuInstancePlacement, Return) - GetGpuInstanceProfileInfo(int) (GpuInstanceProfileInfo, Return) + GetGpuInstanceById(int) (GpuInstance, error) + GetGpuInstanceId() (int, error) + GetGpuInstancePossiblePlacements(*GpuInstanceProfileInfo) ([]GpuInstancePlacement, error) + GetGpuInstanceProfileInfo(int) (GpuInstanceProfileInfo, error) GetGpuInstanceProfileInfoV(int) GpuInstanceProfileInfoHandler - GetGpuInstanceRemainingCapacity(*GpuInstanceProfileInfo) (int, Return) - GetGpuInstances(*GpuInstanceProfileInfo) ([]GpuInstance, Return) - GetGpuMaxPcieLinkGeneration() (int, Return) - GetGpuOperationMode() (GpuOperationMode, GpuOperationMode, Return) - GetGraphicsRunningProcesses() ([]ProcessInfo, Return) - GetGridLicensableFeatures() (GridLicensableFeatures, Return) - GetGspFirmwareMode() (bool, bool, Return) - GetGspFirmwareVersion() (string, Return) - GetHostVgpuMode() (HostVgpuMode, Return) - GetIndex() (int, Return) - GetInforomConfigurationChecksum() (uint32, Return) - GetInforomImageVersion() (string, Return) - GetInforomVersion(InforomObject) (string, Return) - GetIrqNum() (int, Return) - GetJpgUtilization() (uint32, uint32, Return) - GetLastBBXFlushTime() (uint64, uint, Return) - GetMPSComputeRunningProcesses() ([]ProcessInfo, Return) - GetMaxClockInfo(ClockType) (uint32, Return) - GetMaxCustomerBoostClock(ClockType) (uint32, Return) - GetMaxMigDeviceCount() (int, Return) - GetMaxPcieLinkGeneration() (int, Return) - GetMaxPcieLinkWidth() (int, Return) - GetMemClkMinMaxVfOffset() (int, int, Return) - GetMemClkVfOffset() (int, Return) - GetMemoryAffinity(int, AffinityScope) ([]uint, Return) - GetMemoryBusWidth() (uint32, Return) - GetMemoryErrorCounter(MemoryErrorType, EccCounterType, MemoryLocation) (uint64, Return) - GetMemoryInfo() (Memory, Return) - GetMemoryInfo_v2() (Memory_v2, Return) - GetMigDeviceHandleByIndex(int) (Device, Return) - GetMigMode() (int, int, Return) - GetMinMaxClockOfPState(ClockType, Pstates) (uint32, uint32, Return) - GetMinMaxFanSpeed() (int, int, Return) - GetMinorNumber() (int, Return) - GetModuleId() (int, Return) - GetMultiGpuBoard() (int, Return) - GetName() (string, Return) - GetNumFans() (int, Return) - GetNumGpuCores() (int, Return) - GetNumaNodeId() (int, Return) - GetNvLinkCapability(int, NvLinkCapability) (uint32, Return) - GetNvLinkErrorCounter(int, NvLinkErrorCounter) (uint64, Return) - GetNvLinkRemoteDeviceType(int) (IntNvLinkDeviceType, Return) - GetNvLinkRemotePciInfo(int) (PciInfo, Return) - GetNvLinkState(int) (EnableState, Return) - GetNvLinkUtilizationControl(int, int) (NvLinkUtilizationControl, Return) - GetNvLinkUtilizationCounter(int, int) (uint64, uint64, Return) - GetNvLinkVersion(int) (uint32, Return) - GetOfaUtilization() (uint32, uint32, Return) - GetP2PStatus(Device, GpuP2PCapsIndex) (GpuP2PStatus, Return) - GetPciInfo() (PciInfo, Return) - GetPciInfoExt() (PciInfoExt, Return) - GetPcieLinkMaxSpeed() (uint32, Return) - GetPcieReplayCounter() (int, Return) - GetPcieSpeed() (int, Return) - GetPcieThroughput(PcieUtilCounter) (uint32, Return) - GetPerformanceState() (Pstates, Return) - GetPersistenceMode() (EnableState, Return) - GetPgpuMetadataString() (string, Return) - GetPowerManagementDefaultLimit() (uint32, Return) - GetPowerManagementLimit() (uint32, Return) - GetPowerManagementLimitConstraints() (uint32, uint32, Return) - GetPowerManagementMode() (EnableState, Return) - GetPowerSource() (PowerSource, Return) - GetPowerState() (Pstates, Return) - GetPowerUsage() (uint32, Return) - GetProcessUtilization(uint64) ([]ProcessUtilizationSample, Return) - GetProcessesUtilizationInfo() (ProcessesUtilizationInfo, Return) - GetRemappedRows() (int, int, bool, bool, Return) - GetRetiredPages(PageRetirementCause) ([]uint64, Return) - GetRetiredPagesPendingStatus() (EnableState, Return) - GetRetiredPages_v2(PageRetirementCause) ([]uint64, []uint64, Return) - GetRowRemapperHistogram() (RowRemapperHistogramValues, Return) - GetRunningProcessDetailList() (ProcessDetailList, Return) - GetSamples(SamplingType, uint64) (ValueType, []Sample, Return) - GetSerial() (string, Return) - GetSramEccErrorStatus() (EccSramErrorStatus, Return) - GetSupportedClocksEventReasons() (uint64, Return) - GetSupportedClocksThrottleReasons() (uint64, Return) - GetSupportedEventTypes() (uint64, Return) - GetSupportedGraphicsClocks(int) (int, uint32, Return) - GetSupportedMemoryClocks() (int, uint32, Return) - GetSupportedPerformanceStates() ([]Pstates, Return) - GetSupportedVgpus() ([]VgpuTypeId, Return) - GetTargetFanSpeed(int) (int, Return) - GetTemperature(TemperatureSensors) (uint32, Return) - GetTemperatureThreshold(TemperatureThresholds) (uint32, Return) - GetThermalSettings(uint32) (GpuThermalSettings, Return) - GetTopologyCommonAncestor(Device) (GpuTopologyLevel, Return) - GetTopologyNearestGpus(GpuTopologyLevel) ([]Device, Return) - GetTotalEccErrors(MemoryErrorType, EccCounterType) (uint64, Return) - GetTotalEnergyConsumption() (uint64, Return) - GetUUID() (string, Return) - GetUtilizationRates() (Utilization, Return) - GetVbiosVersion() (string, Return) - GetVgpuCapabilities(DeviceVgpuCapability) (bool, Return) - GetVgpuHeterogeneousMode() (VgpuHeterogeneousMode, Return) - GetVgpuInstancesUtilizationInfo() (VgpuInstancesUtilizationInfo, Return) - GetVgpuMetadata() (VgpuPgpuMetadata, Return) - GetVgpuProcessUtilization(uint64) ([]VgpuProcessUtilizationSample, Return) - GetVgpuProcessesUtilizationInfo() (VgpuProcessesUtilizationInfo, Return) - GetVgpuSchedulerCapabilities() (VgpuSchedulerCapabilities, Return) - GetVgpuSchedulerLog() (VgpuSchedulerLog, Return) - GetVgpuSchedulerState() (VgpuSchedulerGetState, Return) - GetVgpuTypeCreatablePlacements(VgpuTypeId) (VgpuPlacementList, Return) - GetVgpuTypeSupportedPlacements(VgpuTypeId) (VgpuPlacementList, Return) - GetVgpuUtilization(uint64) (ValueType, []VgpuInstanceUtilizationSample, Return) - GetViolationStatus(PerfPolicyType) (ViolationTime, Return) - GetVirtualizationMode() (GpuVirtualizationMode, Return) - GpmMigSampleGet(int, GpmSample) Return - GpmQueryDeviceSupport() (GpmSupport, Return) + GetGpuInstanceRemainingCapacity(*GpuInstanceProfileInfo) (int, error) + GetGpuInstances(*GpuInstanceProfileInfo) ([]GpuInstance, error) + GetGpuMaxPcieLinkGeneration() (int, error) + GetGpuOperationMode() (GpuOperationMode, GpuOperationMode, error) + GetGraphicsRunningProcesses() ([]ProcessInfo, error) + GetGridLicensableFeatures() (GridLicensableFeatures, error) + GetGspFirmwareMode() (bool, bool, error) + GetGspFirmwareVersion() (string, error) + GetHostVgpuMode() (HostVgpuMode, error) + GetIndex() (int, error) + GetInforomConfigurationChecksum() (uint32, error) + GetInforomImageVersion() (string, error) + GetInforomVersion(InforomObject) (string, error) + GetIrqNum() (int, error) + GetJpgUtilization() (uint32, uint32, error) + GetLastBBXFlushTime() (uint64, uint, error) + GetMPSComputeRunningProcesses() ([]ProcessInfo, error) + GetMaxClockInfo(ClockType) (uint32, error) + GetMaxCustomerBoostClock(ClockType) (uint32, error) + GetMaxMigDeviceCount() (int, error) + GetMaxPcieLinkGeneration() (int, error) + GetMaxPcieLinkWidth() (int, error) + GetMemClkMinMaxVfOffset() (int, int, error) + GetMemClkVfOffset() (int, error) + GetMemoryAffinity(int, AffinityScope) ([]uint, error) + GetMemoryBusWidth() (uint32, error) + GetMemoryErrorCounter(MemoryErrorType, EccCounterType, MemoryLocation) (uint64, error) + GetMemoryInfo() (Memory, error) + GetMemoryInfo_v2() (Memory_v2, error) + GetMigDeviceHandleByIndex(int) (Device, error) + GetMigMode() (int, int, error) + GetMinMaxClockOfPState(ClockType, Pstates) (uint32, uint32, error) + GetMinMaxFanSpeed() (int, int, error) + GetMinorNumber() (int, error) + GetModuleId() (int, error) + GetMultiGpuBoard() (int, error) + GetName() (string, error) + GetNumFans() (int, error) + GetNumGpuCores() (int, error) + GetNumaNodeId() (int, error) + GetNvLinkCapability(int, NvLinkCapability) (uint32, error) + GetNvLinkErrorCounter(int, NvLinkErrorCounter) (uint64, error) + GetNvLinkRemoteDeviceType(int) (IntNvLinkDeviceType, error) + GetNvLinkRemotePciInfo(int) (PciInfo, error) + GetNvLinkState(int) (EnableState, error) + GetNvLinkUtilizationControl(int, int) (NvLinkUtilizationControl, error) + GetNvLinkUtilizationCounter(int, int) (uint64, uint64, error) + GetNvLinkVersion(int) (uint32, error) + GetOfaUtilization() (uint32, uint32, error) + GetP2PStatus(Device, GpuP2PCapsIndex) (GpuP2PStatus, error) + GetPciInfo() (PciInfo, error) + GetPciInfoExt() (PciInfoExt, error) + GetPcieLinkMaxSpeed() (uint32, error) + GetPcieReplayCounter() (int, error) + GetPcieSpeed() (int, error) + GetPcieThroughput(PcieUtilCounter) (uint32, error) + GetPerformanceState() (Pstates, error) + GetPersistenceMode() (EnableState, error) + GetPgpuMetadataString() (string, error) + GetPowerManagementDefaultLimit() (uint32, error) + GetPowerManagementLimit() (uint32, error) + GetPowerManagementLimitConstraints() (uint32, uint32, error) + GetPowerManagementMode() (EnableState, error) + GetPowerSource() (PowerSource, error) + GetPowerState() (Pstates, error) + GetPowerUsage() (uint32, error) + GetProcessUtilization(uint64) ([]ProcessUtilizationSample, error) + GetProcessesUtilizationInfo() (ProcessesUtilizationInfo, error) + GetRemappedRows() (int, int, bool, bool, error) + GetRetiredPages(PageRetirementCause) ([]uint64, error) + GetRetiredPagesPendingStatus() (EnableState, error) + GetRetiredPages_v2(PageRetirementCause) ([]uint64, []uint64, error) + GetRowRemapperHistogram() (RowRemapperHistogramValues, error) + GetRunningProcessDetailList() (ProcessDetailList, error) + GetSamples(SamplingType, uint64) (ValueType, []Sample, error) + GetSerial() (string, error) + GetSramEccErrorStatus() (EccSramErrorStatus, error) + GetSupportedClocksEventReasons() (uint64, error) + GetSupportedClocksThrottleReasons() (uint64, error) + GetSupportedEventTypes() (uint64, error) + GetSupportedGraphicsClocks(int) (int, uint32, error) + GetSupportedMemoryClocks() (int, uint32, error) + GetSupportedPerformanceStates() ([]Pstates, error) + GetSupportedVgpus() ([]VgpuTypeId, error) + GetTargetFanSpeed(int) (int, error) + GetTemperature(TemperatureSensors) (uint32, error) + GetTemperatureThreshold(TemperatureThresholds) (uint32, error) + GetThermalSettings(uint32) (GpuThermalSettings, error) + GetTopologyCommonAncestor(Device) (GpuTopologyLevel, error) + GetTopologyNearestGpus(GpuTopologyLevel) ([]Device, error) + GetTotalEccErrors(MemoryErrorType, EccCounterType) (uint64, error) + GetTotalEnergyConsumption() (uint64, error) + GetUUID() (string, error) + GetUtilizationRates() (Utilization, error) + GetVbiosVersion() (string, error) + GetVgpuCapabilities(DeviceVgpuCapability) (bool, error) + GetVgpuHeterogeneousMode() (VgpuHeterogeneousMode, error) + GetVgpuInstancesUtilizationInfo() (VgpuInstancesUtilizationInfo, error) + GetVgpuMetadata() (VgpuPgpuMetadata, error) + GetVgpuProcessUtilization(uint64) ([]VgpuProcessUtilizationSample, error) + GetVgpuProcessesUtilizationInfo() (VgpuProcessesUtilizationInfo, error) + GetVgpuSchedulerCapabilities() (VgpuSchedulerCapabilities, error) + GetVgpuSchedulerLog() (VgpuSchedulerLog, error) + GetVgpuSchedulerState() (VgpuSchedulerGetState, error) + GetVgpuTypeCreatablePlacements(VgpuTypeId) (VgpuPlacementList, error) + GetVgpuTypeSupportedPlacements(VgpuTypeId) (VgpuPlacementList, error) + GetVgpuUtilization(uint64) (ValueType, []VgpuInstanceUtilizationSample, error) + GetViolationStatus(PerfPolicyType) (ViolationTime, error) + GetVirtualizationMode() (GpuVirtualizationMode, error) + GpmMigSampleGet(int, GpmSample) error + GpmQueryDeviceSupport() (GpmSupport, error) GpmQueryDeviceSupportV() GpmSupportV - GpmQueryIfStreamingEnabled() (uint32, Return) - GpmSampleGet(GpmSample) Return - GpmSetStreamingEnabled(uint32) Return - IsMigDeviceHandle() (bool, Return) - OnSameBoard(Device) (int, Return) - RegisterEvents(uint64, EventSet) Return - ResetApplicationsClocks() Return - ResetGpuLockedClocks() Return - ResetMemoryLockedClocks() Return - ResetNvLinkErrorCounters(int) Return - ResetNvLinkUtilizationCounter(int, int) Return - SetAPIRestriction(RestrictedAPI, EnableState) Return - SetAccountingMode(EnableState) Return - SetApplicationsClocks(uint32, uint32) Return - SetAutoBoostedClocksEnabled(EnableState) Return - SetComputeMode(ComputeMode) Return - SetConfComputeUnprotectedMemSize(uint64) Return - SetCpuAffinity() Return - SetDefaultAutoBoostedClocksEnabled(EnableState, uint32) Return - SetDefaultFanSpeed_v2(int) Return - SetDriverModel(DriverModel, uint32) Return - SetEccMode(EnableState) Return - SetFanControlPolicy(int, FanControlPolicy) Return - SetFanSpeed_v2(int, int) Return - SetGpcClkVfOffset(int) Return - SetGpuLockedClocks(uint32, uint32) Return - SetGpuOperationMode(GpuOperationMode) Return - SetMemClkVfOffset(int) Return - SetMemoryLockedClocks(uint32, uint32) Return - SetMigMode(int) (Return, Return) - SetNvLinkDeviceLowPowerThreshold(*NvLinkPowerThres) Return - SetNvLinkUtilizationControl(int, int, *NvLinkUtilizationControl, bool) Return - SetPersistenceMode(EnableState) Return - SetPowerManagementLimit(uint32) Return - SetPowerManagementLimit_v2(*PowerValue_v2) Return - SetTemperatureThreshold(TemperatureThresholds, int) Return - SetVgpuCapabilities(DeviceVgpuCapability, EnableState) Return - SetVgpuHeterogeneousMode(VgpuHeterogeneousMode) Return - SetVgpuSchedulerState(*VgpuSchedulerSetState) Return - SetVirtualizationMode(GpuVirtualizationMode) Return - ValidateInforom() Return - VgpuTypeGetMaxInstances(VgpuTypeId) (int, Return) + GpmQueryIfStreamingEnabled() (uint32, error) + GpmSampleGet(GpmSample) error + GpmSetStreamingEnabled(uint32) error + IsMigDeviceHandle() (bool, error) + OnSameBoard(Device) (int, error) + RegisterEvents(uint64, EventSet) error + ResetApplicationsClocks() error + ResetGpuLockedClocks() error + ResetMemoryLockedClocks() error + ResetNvLinkErrorCounters(int) error + ResetNvLinkUtilizationCounter(int, int) error + SetAPIRestriction(RestrictedAPI, EnableState) error + SetAccountingMode(EnableState) error + SetApplicationsClocks(uint32, uint32) error + SetAutoBoostedClocksEnabled(EnableState) error + SetComputeMode(ComputeMode) error + SetConfComputeUnprotectedMemSize(uint64) error + SetCpuAffinity() error + SetDefaultAutoBoostedClocksEnabled(EnableState, uint32) error + SetDefaultFanSpeed_v2(int) error + SetDriverModel(DriverModel, uint32) error + SetEccMode(EnableState) error + SetFanControlPolicy(int, FanControlPolicy) error + SetFanSpeed_v2(int, int) error + SetGpcClkVfOffset(int) error + SetGpuLockedClocks(uint32, uint32) error + SetGpuOperationMode(GpuOperationMode) error + SetMemClkVfOffset(int) error + SetMemoryLockedClocks(uint32, uint32) error + SetMigMode(int) (error, error) + SetNvLinkDeviceLowPowerThreshold(*NvLinkPowerThres) error + SetNvLinkUtilizationControl(int, int, *NvLinkUtilizationControl, bool) error + SetPersistenceMode(EnableState) error + SetPowerManagementLimit(uint32) error + SetPowerManagementLimit_v2(*PowerValue_v2) error + SetTemperatureThreshold(TemperatureThresholds, int) error + SetVgpuCapabilities(DeviceVgpuCapability, EnableState) error + SetVgpuHeterogeneousMode(VgpuHeterogeneousMode) error + SetVgpuSchedulerState(*VgpuSchedulerSetState) error + SetVirtualizationMode(GpuVirtualizationMode) error + ValidateInforom() error + VgpuTypeGetMaxInstances(VgpuTypeId) (int, error) } // GpuInstance represents the interface for the nvmlGpuInstance type. // -//go:generate moq -out mock/gpuinstance.go -pkg mock . GpuInstance:GpuInstance +//go:generate moq -rm -out mock/gpuinstance.go -pkg mock . GpuInstance:GpuInstance type GpuInstance interface { - CreateComputeInstance(*ComputeInstanceProfileInfo) (ComputeInstance, Return) - CreateComputeInstanceWithPlacement(*ComputeInstanceProfileInfo, *ComputeInstancePlacement) (ComputeInstance, Return) - Destroy() Return - GetComputeInstanceById(int) (ComputeInstance, Return) - GetComputeInstancePossiblePlacements(*ComputeInstanceProfileInfo) ([]ComputeInstancePlacement, Return) - GetComputeInstanceProfileInfo(int, int) (ComputeInstanceProfileInfo, Return) + CreateComputeInstance(*ComputeInstanceProfileInfo) (ComputeInstance, error) + CreateComputeInstanceWithPlacement(*ComputeInstanceProfileInfo, *ComputeInstancePlacement) (ComputeInstance, error) + Destroy() error + GetComputeInstanceById(int) (ComputeInstance, error) + GetComputeInstancePossiblePlacements(*ComputeInstanceProfileInfo) ([]ComputeInstancePlacement, error) + GetComputeInstanceProfileInfo(int, int) (ComputeInstanceProfileInfo, error) GetComputeInstanceProfileInfoV(int, int) ComputeInstanceProfileInfoHandler - GetComputeInstanceRemainingCapacity(*ComputeInstanceProfileInfo) (int, Return) - GetComputeInstances(*ComputeInstanceProfileInfo) ([]ComputeInstance, Return) - GetInfo() (GpuInstanceInfo, Return) + GetComputeInstanceRemainingCapacity(*ComputeInstanceProfileInfo) (int, error) + GetComputeInstances(*ComputeInstanceProfileInfo) ([]ComputeInstance, error) + GetInfo() (GpuInstanceInfo, error) } // ComputeInstance represents the interface for the nvmlComputeInstance type. // -//go:generate moq -out mock/computeinstance.go -pkg mock . ComputeInstance:ComputeInstance +//go:generate moq -rm -out mock/computeinstance.go -pkg mock . ComputeInstance:ComputeInstance type ComputeInstance interface { - Destroy() Return - GetInfo() (ComputeInstanceInfo, Return) + Destroy() error + GetInfo() (ComputeInstanceInfo, error) } // EventSet represents the interface for the nvmlEventSet type. // -//go:generate moq -out mock/eventset.go -pkg mock . EventSet:EventSet +//go:generate moq -rm -out mock/eventset.go -pkg mock . EventSet:EventSet type EventSet interface { - Free() Return - Wait(uint32) (EventData, Return) + Free() error + Wait(uint32) (EventData, error) } // GpmSample represents the interface for the nvmlGpmSample type. // -//go:generate moq -out mock/gpmsample.go -pkg mock . GpmSample:GpmSample +//go:generate moq -rm -out mock/gpmsample.go -pkg mock . GpmSample:GpmSample type GpmSample interface { - Free() Return - Get(Device) Return - MigGet(Device, int) Return + Free() error + Get(Device) error + MigGet(Device, int) error } // Unit represents the interface for the nvmlUnit type. // -//go:generate moq -out mock/unit.go -pkg mock . Unit:Unit +//go:generate moq -rm -out mock/unit.go -pkg mock . Unit:Unit type Unit interface { - GetDevices() ([]Device, Return) - GetFanSpeedInfo() (UnitFanSpeeds, Return) - GetLedState() (LedState, Return) - GetPsuInfo() (PSUInfo, Return) - GetTemperature(int) (uint32, Return) - GetUnitInfo() (UnitInfo, Return) - SetLedState(LedColor) Return + GetDevices() ([]Device, error) + GetFanSpeedInfo() (UnitFanSpeeds, error) + GetLedState() (LedState, error) + GetPsuInfo() (PSUInfo, error) + GetTemperature(int) (uint32, error) + GetUnitInfo() (UnitInfo, error) + SetLedState(LedColor) error } // VgpuInstance represents the interface for the nvmlVgpuInstance type. // -//go:generate moq -out mock/vgpuinstance.go -pkg mock . VgpuInstance:VgpuInstance +//go:generate moq -rm -out mock/vgpuinstance.go -pkg mock . VgpuInstance:VgpuInstance type VgpuInstance interface { - ClearAccountingPids() Return - GetAccountingMode() (EnableState, Return) - GetAccountingPids() ([]int, Return) - GetAccountingStats(int) (AccountingStats, Return) - GetEccMode() (EnableState, Return) - GetEncoderCapacity() (int, Return) - GetEncoderSessions() (int, EncoderSessionInfo, Return) - GetEncoderStats() (int, uint32, uint32, Return) - GetFBCSessions() (int, FBCSessionInfo, Return) - GetFBCStats() (FBCStats, Return) - GetFbUsage() (uint64, Return) - GetFrameRateLimit() (uint32, Return) - GetGpuInstanceId() (int, Return) - GetGpuPciId() (string, Return) - GetLicenseInfo() (VgpuLicenseInfo, Return) - GetLicenseStatus() (int, Return) - GetMdevUUID() (string, Return) - GetMetadata() (VgpuMetadata, Return) - GetType() (VgpuTypeId, Return) - GetUUID() (string, Return) - GetVmDriverVersion() (string, Return) - GetVmID() (string, VgpuVmIdType, Return) - SetEncoderCapacity(int) Return + ClearAccountingPids() error + GetAccountingMode() (EnableState, error) + GetAccountingPids() ([]int, error) + GetAccountingStats(int) (AccountingStats, error) + GetEccMode() (EnableState, error) + GetEncoderCapacity() (int, error) + GetEncoderSessions() (int, EncoderSessionInfo, error) + GetEncoderStats() (int, uint32, uint32, error) + GetFBCSessions() (int, FBCSessionInfo, error) + GetFBCStats() (FBCStats, error) + GetFbUsage() (uint64, error) + GetFrameRateLimit() (uint32, error) + GetGpuInstanceId() (int, error) + GetGpuPciId() (string, error) + GetLicenseInfo() (VgpuLicenseInfo, error) + GetLicenseStatus() (int, error) + GetMdevUUID() (string, error) + GetMetadata() (VgpuMetadata, error) + GetType() (VgpuTypeId, error) + GetUUID() (string, error) + GetVmDriverVersion() (string, error) + GetVmID() (string, VgpuVmIdType, error) + SetEncoderCapacity(int) error } // VgpuTypeId represents the interface for the nvmlVgpuTypeId type. // -//go:generate moq -out mock/vgputypeid.go -pkg mock . VgpuTypeId:VgpuTypeId +//go:generate moq -rm -out mock/vgputypeid.go -pkg mock . VgpuTypeId:VgpuTypeId type VgpuTypeId interface { - GetCapabilities(VgpuCapability) (bool, Return) - GetClass() (string, Return) - GetCreatablePlacements(Device) (VgpuPlacementList, Return) - GetDeviceID() (uint64, uint64, Return) - GetFrameRateLimit() (uint32, Return) - GetFramebufferSize() (uint64, Return) - GetGpuInstanceProfileId() (uint32, Return) - GetLicense() (string, Return) - GetMaxInstances(Device) (int, Return) - GetMaxInstancesPerVm() (int, Return) - GetName() (string, Return) - GetNumDisplayHeads() (int, Return) - GetResolution(int) (uint32, uint32, Return) - GetSupportedPlacements(Device) (VgpuPlacementList, Return) + GetCapabilities(VgpuCapability) (bool, error) + GetClass() (string, error) + GetCreatablePlacements(Device) (VgpuPlacementList, error) + GetDeviceID() (uint64, uint64, error) + GetFrameRateLimit() (uint32, error) + GetFramebufferSize() (uint64, error) + GetGpuInstanceProfileId() (uint32, error) + GetLicense() (string, error) + GetMaxInstances(Device) (int, error) + GetMaxInstancesPerVm() (int, error) + GetName() (string, error) + GetNumDisplayHeads() (int, error) + GetResolution(int) (uint32, uint32, error) + GetSupportedPlacements(Device) (VgpuPlacementList, error) }